Graph Convolutional Network (GCN)

Machine Learning
Introduced by
Kipf, T. N. & Welling, M.
Year
2017
Type
Spectral graph neural network (semi-supervised node classification)

What does it do?

Graph Convolutional Network (GCN) is a deep learning architecture for graph-structured data, introduced by Thomas N. Kipf and Max Welling at ICLR 2017.

It extends the convolution operation to irregular graph domains through a first-order approximation of spectral graph convolution, so that each node aggregates feature information from its neighbors. It is widely used as a baseline for semi-supervised node classification.

The intuition behind the method

In an ordinary image, each pixel has a fixed rectangular neighborhood, so a sliding convolutional filter captures local structure directly. Graphs lack this regularity: a node can have any number of neighbors, with no fixed spatial ordering. GCN defines a convolution as a weighted average of a node's own features and those of its immediate neighbors, with weights set by the normalized graph adjacency matrix. Stacking two such layers lets each node receive information from nodes two hops away. Because only a small set of nodes carries labels, the loss is computed on those labels alone, while the adjacency structure carries information from labeled to unlabeled nodes during propagation.

History

Kipf and Welling introduced GCN in a preprint (arXiv:1609.02907) that was published as an ICLR 2017 conference paper. The model simplifies earlier spectral graph convolution work, including Bruna et al. (2014) and Defferrard et al. (2016), by using a first-order local approximation in place of more elaborate spectral filters. The paper reported results on the Cora, Citeseer, and Pubmed citation-network benchmarks. Follow-on architectures include GraphSAGE (2017), Graph Attention Networks (2018), and Graph Isomorphism Networks (2019).

When to use it

GCN is appropriate when the data has an explicit relational structure, such as citation networks, social graphs, molecular graphs, or knowledge graphs, and the main task is predicting node-level properties such as classes or scores. It suits transductive semi-supervised settings, where the full graph including unlabeled nodes is available at training time and only a small fraction of node labels is known. The model assumes an undirected graph, node features are available, and the graph fits in memory. It is a poor choice when the graph is strongly heterophilous, meaning connected nodes tend to have different labels; when the graph is very sparse or largely disconnected; or when entirely new nodes must be classified at test time without retraining.

Limitations and considerations

  • Transductive by design: the entire graph, including test nodes, must be present during training, so standard GCN cannot generalize to unseen graphs or to nodes added after training.
  • Assumes homophily, meaning that connected nodes are expected to share a label; accuracy degrades on heterophilous graphs.
  • The aggregation weights come from degree normalization and are fixed, so they cannot adapt to the relative importance of individual neighbors, unlike attention-based variants such as GAT.
  • Repeated neighborhood averaging over many layers makes node representations converge (over-smoothing), so deep stacks usually underperform the shallow two-layer design.
  • Propagation requires the full adjacency matrix in memory, which limits scalability to very large graphs unless mini-batch sampling is used.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Combines graph topology and node features in one differentiable model, which supports good semi-supervised performance with few labeled nodes.
  • The per-layer cost scales with the number of edges and feature dimensions, so full-graph propagation is practical for moderately large sparse graphs (see the scalability limitation below).
  • The two-layer architecture has few hyperparameters, which makes it a practical and easily reproduced baseline.
  • The spectral derivation links the layer to a first-order approximation of spectral graph convolution, which gives the rule a theoretical motivation.

Applications

  • Semi-supervised node classification on citation networks, such as predicting the topic of a paper from its features and citation links.
  • Molecular property prediction with atoms as nodes and bonds as edges, for example classifying a molecular property from the molecular graph.
  • Knowledge graph entity classification, where entities are nodes and relations are edges.
  • Node-level prediction on sensor or road-segment graphs, where each node carries measurements and edges encode spatial adjacency.

How it works

How it works

1

The raw adjacency matrix A is augmented with self-loops by adding the identity matrix, giving A-tilde, so that each node's own features are kept during aggregation. A-tilde is then symmetrically normalized by its degree matrix D-tilde to produce the propagation matrix A-hat. Symmetric normalization keeps the scale of aggregated features comparable when node degrees differ widely across the graph.

Formula
\hat{A} = \tilde{D}^{-1/2}\,\tilde{A}\,\tilde{D}^{-1/2}, \quad \tilde{A} = A + I_N
2

Each GCN layer multiplies the current node-feature matrix H by A-hat, which aggregates features from each node's neighbors and itself, and then by a learnable weight matrix W. A non-linear activation, typically ReLU, follows. Each neighbor's contribution is scaled by the inverse square root of the degrees of the two endpoints, so A-hat H is a degree-weighted combination rather than a simple mean. W is shared across all nodes. The cost of a layer is O(|E| * F * F'), so it grows with the number of edges and with the input and output feature dimensions.

Formula
H^{(l+1)} = \sigma\!\left(\hat{A}\,H^{(l)}\,W^{(l)}\right)
3

The standard GCN for semi-supervised classification uses two propagation layers. The first maps the input features X through W0 and applies ReLU, producing a hidden node-embedding matrix. The second maps those embeddings through W1 and applies a row-wise softmax, so each row of the output matrix Z is a probability distribution over class labels for the corresponding node.

Formula
Z = \mathrm{softmax}\!\left(\hat{A}\;\mathrm{ReLU}\!\left(\hat{A}\,X\,W^{(0)}\right)W^{(1)}\right)
4

Cross-entropy is computed only over the labeled subset Y_L. Unlabeled nodes still take part in forward propagation, since their embeddings are computed and used during neighborhood aggregation, but they contribute no term to the loss. Their influence on the labeled nodes therefore comes through the graph structure, not through the classification objective. The formula gives the core objective only; practical training setups typically add regularization terms on top of this cross-entropy term.

Formula
\mathcal{L} = -\sum_{l \in \mathcal{Y}_L} \sum_{f=1}^{F} Y_{lf}\,\ln Z_{lf}

Common pitfalls

  • Applying the standard full-graph GCN to new, unseen nodes or graphs without switching to an inductive or sampling-based variant such as GraphSAGE.
  • Stacking many layers, which tends to over-smooth node embeddings until they become nearly identical. Residual or jumping-knowledge connections can partly mitigate this, but they usually do not make deep GCNs outperform the two-layer design.
  • Applying GCN to a heterophilous graph without first checking label homophily; the averaging step then mixes in neighbors with different labels.
  • Omitting self-loops from the adjacency matrix, so that nodes ignore their own features during aggregation.
  • Using the symmetric normalization on a directed graph; the normalization as written assumes a symmetric adjacency matrix, so direction information is not represented correctly.
  • Comparing reported accuracies across different train/validation/test splits or label budgets as if they were directly comparable.

Frequently asked questions

Why does GCN use exactly two layers in the original paper?

In the original paper, Kipf and Welling reported that deeper stacks performed worse in their experiments, and they used two propagation layers, which cover two-hop neighborhoods. A commonly given explanation for this drop is over-smoothing: repeated neighborhood averaging mixes information from increasingly large, overlapping receptive fields, so node embeddings become harder to distinguish.

What is the difference between GCN and Graph Attention Network (GAT)?

GCN aggregates neighbors using fixed weights derived from degree normalization. GAT computes learnable attention weights for each neighbor, allowing the model to emphasize some connections over others. This flexibility comes at the cost of additional parameters and training complexity.

Can GCN be used for graph-level classification (e.g., classifying whole molecules)?

The vanilla GCN produces node-level embeddings. For graph-level tasks a readout (pooling) step, such as summing or averaging all node embeddings, is added on top. Architectures such as Graph Isomorphism Network (GIN) or hierarchical pooling methods are often used instead for graph classification.

How many labeled nodes does GCN need to train effectively?

In the original experiments, Kipf and Welling used 20 labeled nodes per class on citation networks and still achieved competitive accuracy. Because the graph structure carries supervisory signal from labeled nodes to unlabeled ones, GCN can be data-efficient when the label budget is very small. The exact proportion of labeled nodes depends on the dataset size.

Related methods

Sources

  1. Kipf, T. N., & Welling, M. (2017). Semi-Supervised Classification with Graph Convolutional Networks. Proceedings of the 5th International Conference on Learning Representations (ICLR 2017), Toulon, France.

    Open publication reference
  2. Hamilton, W. L. (2020). Graph Representation Learning. Morgan & Claypool (Synthesis Lectures on Artificial Intelligence and Machine Learning).

    ISBN: 978-1-68173-963-2