family Β· backbone

graph neural networks (GNNs)

Neural networks that operate on graph-structured data by passing messages between connected nodes. The objective varies β€” node classification, link prediction, or graph classification β€” making GNNs a backbone, not a single model.

primitives, wired directly + objective: varies

Standard neural networks expect fixed-size vectors or grids. Graphs break both assumptions: a molecule has a variable number of atoms, a social network has a variable number of friends, and both have explicit topology β€” who is connected to whom. Graph neural networks (GNNs) learn directly from that topology alongside node and edge features, making them the natural choice for chemistry, recommendation systems, knowledge-base reasoning, and any domain where relationships are first-class data.

How it works

Most GNNs follow the message-passing paradigm. In each layer, every node does three things: (1) collects messages from its immediate neighbors, (2) aggregates them β€” typically by sum, mean, or max β€” and (3) updates its own representation by combining the aggregated message with its current state via a small MLP (a feed-forward network). Each node starts as an embedding of its raw features; after k layers of message passing, it encodes information from its k-hop neighborhood.

Key architectures differ mainly in how they aggregate:

Node embeddings can be pooled to produce graph-level representations for classifying whole graphs (for example, predicting molecular properties).

Variants and limits

A known weakness is over-smoothing: stack too many layers and every node’s representation converges toward the same vector, because each layer widens the neighborhood until every node has seen the entire graph. In practice, GNNs are capped at 2–5 layers, unlike CNNs or transformers that benefit from much greater depth.

Graph transformers blur the line between GNNs and attention: rather than restricting messages to graph neighbors, they apply self-attention across all nodes β€” sacrificing inductive bias for expressiveness.

Where you’ll see it

Drug discovery (predicting molecular properties and protein interactions), recommendation engines (social and item graphs), traffic and route prediction, and knowledge-graph link prediction are the dominant applications. Any time the data is naturally a set of entities with typed relationships, a GNN is the first architecture to consider.

Sources

browse all sources β€Ί