Concepts

Graph neural networks

3 min readintermediateUpdated 28 Sept 2026
1 · In one line

A graph neural network updates each node's hidden state based on messages.

1 · What it is

The forward pass has a message-passing phase and a readout phase. During message passing, hidden states at each node are updated based on messages. The messages come from neighboring nodes in the graph.

Successive graph-convolution layers incorporate progressively higher-order neighborhoods. GraphSAGE learns a neighborhood aggregation function that can generate embeddings for unseen nodes.

Graph attention assigns different weights to different nodes in a neighborhood. A message-passing readout can compute one feature vector for a whole graph.

2 · Why it exists

Graph data links a changing number of neighbors to each node.

Local structureA node representation may need to encode both node features and nearby graph structure.
Shared ruleOne learned neighborhood function can generate embeddings for nodes not seen during training.
Graph outputA readout phase can combine node states into one feature vector for the whole graph.
3 · How it works

Follow three neighboring papers into one updated paper node.

One graph message-passing update Three neighboring paper nodes send messages along citation edges. A message function transforms each feature, a sum aggregation combines the messages, and an update function produces the target paper's next state.
Messages come from neighboring nodes. The target hidden state is updated based on those messages.
  1. 1 · messageThe message-passing phase uses message functions M and vertex update functions U.
  2. 2 · aggregateCombine the incoming messages with an aggregation such as sum or mean.
  3. 3 · updateUse messages to update the target node's hidden state.
  4. 4 · repeatSuccessive graph-convolution layers incorporate progressively higher-order neighborhoods.

GraphSAGE samples and aggregates features from a node's local neighborhood.

4 · Where it's used
WhoWhat they askWhat it works with
Citation analyst“Which papers have similar local citation context?”Paper features and citation edges
Molecular modeller“What feature vector represents this molecule?”Atom states and bond messages
Recommendation engineer“Which local connections inform this node?”Node features and graph edges
5 · What it solves, and what it doesn't
solves
  • A graph convolution can encode local graph structure together with node features.
  • GraphSAGE learns a neighborhood aggregation function that can generate embeddings for unseen nodes.
  • Graph attention assigns different weights to different nodes in a neighborhood.
  • A message-passing readout can compute one feature vector for a whole graph.
doesn't solve
  • One graph-convolution layer covers a first-order neighborhood, while successive layers extend the order.
  • Sparse GCN computation still requires memory linear in the number of graph edges.
  • The aggregation choice, such as sum or mean, remains part of the model design.
6 · Go deeper

Sources used

This explainer is written in original language. The links below support its factual claims.

  1. paperSemi-Supervised Classification with Graph Convolutional Networks, Kipf and Welling · read 28 Sept 2026
  2. paperGraph Attention Networks, Veličković et al. · read 28 Sept 2026
  3. paperInductive Representation Learning on Large Graphs, Hamilton, Ying and Leskovec · read 28 Sept 2026
  4. paperNeural Message Passing for Quantum Chemistry, Gilmer et al. · read 28 Sept 2026
  5. docsMessagePassing, PyTorch Geometric · read 28 Sept 2026