Geometric Deep Learning: One Blueprint Behind Every Architecture

6 minute read

Published:

What this book is for: the other books on this site each teach one architecture. This one explains why they are all the same architecture wearing different clothes. The recipe: state what transformations of your input should not change the answer, then build layers that commute with those transformations. Convolutions fall out for grids, message passing falls out for graphs, and self-attention falls out for sets — which is why a Transformer turns out to be a graph neural network.

The blueprint

Bronstein, Bruna, Cohen and Veličković’s Geometric Deep Learning programme makes a claim that sounds too neat to be useful and turns out to be extremely useful: most successful deep learning architectures are derivable from a single design procedure.

  1. Name the domain. A grid, a set, a graph, a manifold, a group.
  2. Name its symmetry group — the transformations under which the labels do not change. Shifting an image does not change what is in it. Relabelling the nodes of a molecule does not change the molecule.
  3. Build layers that are equivariant to that group. Transform the input, and the output transforms the same way.
  4. Add a pooling or readout step that is invariant, so the final prediction does not depend on the arbitrary choice at all.
Equivariance and invariance are not the same word. A layer \(f\) is equivariant to a transformation \(g\) when \(f(g \cdot x) = g \cdot f(x)\): shift the input, and the output shifts too. It is invariant when \(f(g \cdot x) = f(x)\): the output does not move at all. You want equivariant layers, so structure survives to the next layer, and an invariant readout, so the answer does not depend on how you happened to order or position things. Getting these two backwards is the single most common confusion in the area.

The same recipe, five domains

DomainSymmetryWhat the recipe producesWhere on this site
GridtranslationconvolutionCNNs
Setpermutationattention / sum-poolingTransformers
Graphpermutation, respecting edgesmessage passingGNNs
Manifoldisometrygeodesic convolution
Local framesgauge transformationsheaf / connection LaplaciansSheaf models

Reading down that table is the argument of this book. A convolution is not an image-processing trick that happened to work; it is what you get when you demand translation equivariance on a grid. Message passing is not a graph heuristic; it is what you get when you demand permutation equivariance on a graph. And the sheaf machinery in Book III is what you get when you stop assuming all nodes share one coordinate frame — the gauge row.

One design procedure producing four different architecturesA single blueprint — name the domain, name its symmetry, build equivariant layers, pool invariantly — branches into convolution for grids, attention for sets, message passing for graphs, and sheaf operators for local frames. One recipe, four architectures pick the symmetry group build layers that commute with it grid set graph local frames translation permutation permutation + edges gauge convolution attention message passing sheaf Laplacian A set is a graph with no edges, and a fully connected graph is a set — which is why the middle two collapse into one another.
The blueprint and its four best-known instantiations. The chapters in this book work through the middle two, where the collapse between them is exact rather than metaphorical.

The claim this book is built around

The sharpest instance of the blueprint is an equivalence rather than an analogy:

A Transformer is a graph neural network running message passing on a fully connected graph of tokens.

Not “is like”. The update equations are the same equations. Self-attention is message passing where the neighbourhood \(\mathcal{N}_i\) is the whole input, the message function is attention-weighted, and the aggregator is a sum. A Graph Attention Network is the same thing with the neighbourhood restricted by the adjacency matrix.

Chaitanya Joshi’s Transformers are Graph Neural Networks sets this out carefully, and the chapters here follow its structure:

Why this ordering of the site makes sense

Each of the other books teaches an architecture as if it were its own thing, which is the right way to learn it the first time. This book is the second pass, where the separate things turn out to be one thing:

  • Book 0’s convolution is the grid row. Its fixed local receptive field is a choice of symmetry group, and that choice is what attention later relaxes.
  • Book I’s Transformer is the set row, and — per the equivalence above — also the fully-connected-graph row.
  • Book II’s GNN is the graph row. Its oversquashing and oversmoothing pathologies are consequences of committing to a sparse graph, which the set view simply does not have.
  • Book III’s sheaf is the gauge row: what happens when you drop the assumption that every node’s features live in a shared coordinate system.
What the blueprint does not do. It tells you which layers are admissible given a symmetry, not which will train well, generalise, or run fast. Equivariance is a constraint, and constraints reduce the hypothesis space — which helps when the symmetry is real and hurts when it is not. Nothing in the theory predicted that dense attention would beat sparse message passing on actual hardware; that is an empirical fact about GPUs, and it is the subject of the last chapter.

✅ Key Takeaways

  • The blueprint is: name the domain, name its symmetry group, build equivariant layers, pool invariantly.
  • Equivariant layers, invariant readout. \(f(g \cdot x) = g \cdot f(x)\) against \(f(g \cdot x) = f(x)\) — the distinction is load-bearing throughout.
  • Convolution, attention, message passing and sheaf diffusion are four outputs of the same procedure applied to grids, sets, graphs and local frames.
  • Transformers and GNNs are not analogous — a Transformer is message passing on a complete graph, with the same update equations.
  • The blueprint constrains what is admissible. It says nothing about what trains well or runs fast, and on that second question the theory and the hardware disagreed.

References