latentbrief
← Back to concepts

Concept

Graph Neural Network

A class of deep learning models designed to operate directly on graph-structured data - learning representations that capture both the features of individual nodes and the structural relationships between them.

Added May 18, 2026

Most deep learning architectures assume input data has a fixed, regular structure: sequences for RNNs and Transformers, grids for CNNs. Much of the world's most important data does not fit these structures. Molecular compounds are graphs of atoms and bonds. Social networks are graphs of people and relationships. Knowledge bases are graphs of entities and facts. Citation networks are graphs of papers and references. Road networks are graphs of intersections and roads. Graph Neural Networks (GNNs) are the family of deep learning models designed to learn from this fundamentally irregular, relational structure.

The core challenge that makes graphs hard for standard neural networks: graphs have variable size (different graphs have different numbers of nodes), irregular connectivity (each node can have an arbitrary number of neighbours), and no natural ordering (there is no canonical way to list a graph's nodes). A standard feedforward network cannot directly process a graph of variable size and topology.

GNNs address this through the message passing paradigm. In each layer, every node aggregates information from its neighbours ("messages") and updates its own representation based on the aggregated neighbour information and its current representation. After L message passing layers, each node's representation encodes information from all nodes within L hops - its local neighbourhood. The learned representations can be used for node-level tasks (classifying each node), edge-level tasks (predicting new connections), or graph-level tasks (classifying the whole graph).

The key design choices in GNNs are the message function (how each node computes what information to send to its neighbours), the aggregation function (how each node combines messages from multiple neighbours), and the update function (how each node updates its representation given the aggregated messages). Different choices produce different GNN variants: GCN uses simple mean aggregation, GAT uses attention-weighted aggregation, GraphSAGE uses learnable aggregation functions, and GIN uses sum aggregation proven to be maximally expressive.

GNNs have demonstrated strong results across many domains. Chemistry and drug discovery: predicting molecular properties from atom-bond graphs. Social networks: detecting misinformation spreaders, recommending connections. Knowledge graphs: completing missing facts, question answering. Computer vision: scene understanding as graphs of objects. Physics simulations: predicting particle interactions. Combinatorial optimisation: learning heuristics for NP-hard problems.

The field has grown rapidly since the foundational papers of Kipf & Welling (GCN, 2017), Velickovic et al. (GAT, 2018), and Hamilton et al. (GraphSAGE, 2017). PyTorch Geometric and DGL (Deep Graph Library) provide implementations of hundreds of GNN variants.

Analogy

The way humans understand social influence: a person's beliefs and behaviour are shaped not only by their own characteristics but by the beliefs of their friends, who are in turn shaped by their friends' friends. Understanding any individual requires understanding their position in the social network. GNNs apply the same principle: to understand any entity (atom, person, paper), they aggregate information from its neighbours, and neighbours' neighbours, capturing how network structure shapes entity properties.

Real-world example

AlphaFold's initial architecture used a GNN to process the residue-residue contact graph of proteins before the transformer-based evoformer took over. Drug discovery systems like those from Recursion Pharmaceuticals use GNNs to predict which molecular compounds (represented as atom-bond graphs) will have desired biochemical properties, allowing virtual screening of billions of candidate molecules without synthesising them. GNNs predict binding affinity, solubility, toxicity, and other ADMET properties from molecular graph structure.

Why it matters

GNNs extend deep learning to the vast universe of relational data - data where connections between entities matter as much as the entities themselves. Any problem involving graphs, networks, or relational structure can potentially benefit from GNN approaches. Understanding GNNs is increasingly important as AI is applied to drug discovery, network analysis, knowledge bases, and combinatorial optimisation - domains where the relational structure is the signal.

In the news

Related concepts