Graph Neural Networks

Graph neural networks operate on nodes, edges, and message passing. In molecular modeling, atoms, residues, bonds, contacts, and interactions can all be represented as graph structure.

A common message-passing update is:

Here is a node state, is an edge feature, and is the neighborhood of node .

For a graph-level prediction, a readout should be permutation invariant:

For node-level outputs, a GNN is usually expected to be permutation equivariant. If permutes node order, then:

Message Passing Contract

ComponentRequired Detail
node unitatom, residue, token, pocket point, conformer, protein, ligand, or abstract entity
edge unitbond, contact, distance edge, sequence adjacency, interaction edge, learned relation
edge attributesbond type, distance, direction, residue separation, pair embedding, interaction label
update targetnode state, edge state, graph state, coordinate, vector field, score, or ranking
aggregationsum, mean, max, attention, normalized message, or degree-scaled message
readoutnode-level, edge-level, graph-level, pair-level, or complex-level output
depthnumber of message passing layers and effective receptive field

The output type changes what the GNN claim means:

OutputExample TaskRequired Symmetry
node labelresidue site, atom type, node maskpermutation equivariance
edge labelcontact, bond, interactionpermutation equivariance over node pairs
graph scalarmolecular property, affinity, classpermutation invariance
pair scoremolecule-target score, protein-ligand interactioninvariance within each entity and pair identity
coordinates or vectorspose, force, velocity, updategeometric equivariance in addition to permutation behavior

Key Ideas

  • Nodes hold entity features; edges hold relationships such as bonds, distances, contacts, or interaction types.
  • Message passing repeatedly updates node or edge states from local neighborhoods.
  • Readout functions pool graph information for graph-level tasks such as property prediction.
  • Graph construction is a modeling choice: chemical bonds, k-nearest neighbors, radius graphs, contact maps, or learned edges change the problem.
  • Weisfeiler-Lehman Test gives a reference point for the expressive power of standard message-passing GNNs.
  • Geometry-aware variants connect message passing to equivariance and coordinate updates.

Common Failure Modes

FailureSymptomCheck
oversmoothingnode embeddings become too similar after many layerslayer depth, residuals, normalization, pairwise embedding variance
oversquashinglong-range information is compressed through narrow neighborhoodsgraph diameter, bottleneck edges, attention/global edges
graph leakageedges use labels, future data, full benchmark, known pose, or test statisticsgraph construction provenance
readout mismatchgraph-level pooling hides rare active sites or interaction regionstask-specific pooling and attention audit
split mismatchtrain/test share scaffold, homolog, complex pair, or graph-derived artifactsplit unit and duplicate controls
geometry mismatchscalar GNN is used for coordinate/vector target without equivariancetarget transformation rule

Paper Reading Pattern

ClaimFirst Evidence
better GNN architecturesame graph construction, features, split, optimizer budget, and readout
better graph representationablation over nodes, edges, pair features, and construction rule
better long-range reasoningtasks requiring nonlocal signal, not only more parameters
better molecular performancescaffold/source split and feature baseline
better protein/complex performanceprotein-family or complex split plus leakage audit

Practical Checks

  • Check what the graph nodes represent: atoms, residues, ligands, pockets, conformers, or abstract states.
  • Check whether edge features include distances, directions, bond orders, residue separation, or learned relation types.
  • Watch oversmoothing when many message-passing layers make node states too similar.
  • For molecular tasks, inspect split strategy for leakage across scaffolds, protein families, or near-duplicate complexes.
  • Verify that graph construction is part of the method or held fixed across baselines.
  • Match readout to the output unit before comparing metrics.