Graph transformers

Graph & geometric · neural · 2021 · graphs · molecules

What it is

Attention over all nodes with structural encodings (shortest paths, Laplacians, random walks) injected as bias.

When to use it

Long-range graph tasks where message passing's locality and over-smoothing hurt.

Caveats

Full attention over all node pairs costs quadratic time and memory, which limits graph size. They depend on good positional and structural encodings, and on small datasets they can overfit and lose to simpler GNNs.

Key ideas

  • Every node attends to every other node, not just its neighbours
  • Graph structure enters through positional and structural encodings
  • Sidesteps the over-squashing of local message passing

Related architectures

Original paper

Do Transformers Really Perform Bad for Graph Representation? (2021, arXiv)

Browse all 198 architectures

The architecture landscape, in one place.

Two things get called “ML architecture”: the classical statistical model families, and the neural network wirings. Both are here, tagged by what they are and what data they eat.

Start from your problem

Architectures

0 shortlisted