Back to paper library
Paper notesarXiv 2020ICLR 2021

Over-squashing

No Room Left

Original paper

On the Bottleneck of Graph Neural Networks and its Practical Implications

Paper authors

Uri Alon · Eran Yahav

Publication
ICLR 2021Conference
First submitted to arXiv
arXiv:2006.05205
Cite this paper · BibTeX

The citation identifies the linked source version. It cites the original paper and its authors.

@misc{graphlearningoversquashing2020,
  title = {{On the Bottleneck of Graph Neural Networks and its Practical Implications}},
  author = {Uri Alon and Eran Yahav},
  year = {2020},
  eprint = {2006.05205},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.05205}
}
On this page

Since graph neural networks were introduced around 2005, distant nodes' information has been difficult to bring across.

In practice, GNNs stop improving beyond a few layers. The accepted explanation is over-smoothing: depth makes every node's representation alike. Uri Alon and Eran Yahav at Technion note that over-smoothing has mostly been observed on short-range tasks such as paper classification, whose answers mainly depend on nearby neighbors and need little depth. If a task truly requires distant information, something else may be going wrong.

They observe that nodes at distance rr need at least rr layers to interact. Yet each additional layer makes the neighborhood grow exponentially, squeezing all that information into one fixed-length vector. They name this over-squashing.

Defining the Problem

Problem Radius

The problem radius rr is the interaction distance a prediction task needs. Usually unknown beforehand, it is estimated in practice by tuning depth KK.

After KK layers, node vv's receptive field NvK\mathcal N_v^K contains every node within KK hops. Long-range tasks require K≥rK\ge r; otherwise distant nodes cannot reach the target. This is under-reaching.

But ∣NvK∣|\mathcal N_v^K| grows exponentially with KK. Aggregation sums this growing information into a fixed-length vector, preventing important messages from reaching their destination. The model instead learns short-range training signals and generalizes poorly at test time.

The RNN Bottleneck

This recalls machine translation before attention. A seq2seq encoder compressed the whole input sentence into its final hidden state, losing information as sentences grew longer.

Figure 1 of the paper: the left shows the RNN seq2seq bottleneck, passing input information along a chain to the final node. The right shows the GNN bottleneck: many tree-like nodes on the left funnel information layer by layer into the rightmost target, with red curves squeezed together just before it.
Figure 1 from Alon and Yahav, taken from PDF page 2. The original caption is omitted.

The authors argue that the GNN bottleneck is worse. RNN receptive fields grow linearly with steps; GNN fields grow exponentially. The same fixed-length vector must hold far more.

Looking Only at Propagation Shares

Take a binary tree and look only at the share each node passes on, ignoring weights and nonlinearities. Each extra level doubles the number of leaves, while each leaf's share at the root shrinks to about a quarter. At depth 7, the information of 128 leaves is mixed together, each taking only about one ten-thousandth. This is only an intuition; the paper's argument starts from how much information a vector can hold.

A Deliberately Constructed Task

To isolate the bottleneck, the authors design NeighborsMatch.

Several green nodes each have a different number of blue neighbors and a letter label. A target also has blue neighbors; its desired label is the letter of the green node with the same blue-neighbor count. The mapping differs in every graph, so all green-node information must reach the target for comparison each time. There is no shortcut.

The task looks contrived, but the authors compare it with a coding problem. A Python program declares several variables with types and values; choosing which variable belongs at a later position requires matching the needed type and value against visible variables. This is the VarMisuse task tested later.

Tree-NeighborsMatch replaces the middle structure with a depth-rr binary tree. Green nodes are leaves, the target is the root, and all edges point toward the root. rr is the problem radius, directly controlling compression. Models use r+1r+1 layers so information receives another nonlinearity after reaching the root.

Solving the Problem

Identifying and explaining over-squashing is the main contribution. The authors describe their repair as merely the simplest way to show that the problem is widespread and unaddressed.

A Fully Adjacent Final Layer

Replace the final layer with a fully adjacent (FA) layer. Every pair of nodes is treated as adjacent, Nv:=V\mathcal N_v:=V, keeping the layer type and adding no weights.

The first K−1K-1 layers pass messages on the original graph and learn structurally informed node representations. The last layer lets all nodes interact directly, bypassing the bottleneck.

How Large Must the Vector Be?

The authors derive a combinatorial lower bound on hidden dimension dd for 100% training accuracy on Tree-NeighborsMatch. It grows factorially with rr, faster than exponentially. With d=32d=32, their experimental dimension, the radius can reach at most r=7r=7. Practice is worse: gradient descent need not find an existing solution, and even d=512d=512 fits only up to r=7r=7 in their experiments.

Discussion

Tree-NeighborsMatch

Figure 3 of the paper: problem radius r from 2 to 8 is on the horizontal axis, training accuracy on the vertical. GGNN, GAT, GIN and GCN all reach 1.0 at r=2,3. At r=4, GGNN and GAT remain at 1.0, GIN falls to 0.77 and GCN to 0.70; all then decline, falling below 0.2 at r=8.
Figure 3 from Alon and Yahav, taken from PDF page 5. The original caption is omitted.

This is training accuracy. GCN and GIN fit perfectly only through r=3r=3; GCN falls to 70% at r=4r=4. From r=5r=5, none of the four GNNs fits the training set perfectly, despite seeing each example tens of thousands of times.

GAT and GGNN last through r=4r=4. The authors explain this through aggregation: GCN and GIN sum all neighboring messages into one vector before combining with the target's own representation. In their account, GAT's attention uses the target representation to select neighbors and pass relevant information upward. GGNN similarly filters through elementwise gates.

If none of these GNNs can fit training data here, how do they fit public long-range datasets? The authors hypothesize that models exploit short-range training signals and incidental features, failing to learn the long-range information lost in compression, and therefore generalizing poorly.

QM9

QM9 has roughly 130,000 molecules, averaging around 18 atoms, with 13 quantum-chemistry regression targets. The authors use Brockschmidt's 2020 implementation, which searched 500 configurations for several GNNs. Most models' best depth is 8 layers, suggesting a need for long-range information.

Using the same code, splits and settings, they change only the last layer to FA and train each property 5 times. Error falls by 42% on average.

They then test alternative explanations:

  • Under-reaching? For at least 90% of examples, depth already equals or exceeds molecular diameter. Distant nodes can already reach one another. Ten-layer models do no better.
  • Vectors too small? Doubling dimensions improves only 5.5%; FA keeps the original dimension and adds no weights yet improves 42%.
  • Must it be fully adjacent? Adding only half the edges randomly in the last layer still reduces error by 31.5% on average. More added edges bring more improvement.
  • Make every layer fully adjacent? Error increases by 1500%. Graph structure remains necessary; information just needs a direct exchange at the end.

Biological Datasets

NCI1 has 4,110 compounds labeled for anti-lung-cancer activity; ENZYMES has 600 enzymes in 6 classes. Following Errica et al.'s 2020 fair-comparison setup, the authors average 10 folds and 3 seeds, 30 runs in total.

Errica et al. found that a graph-free baseline beat every GNN on ENZYMES. With FA, GIN improves by 8.1 percentage points there, beating that baseline by 2.5 points. On NCI1, GIN+FA beats the previous best GIN by 1.5 points. FA reduces average error by 12% on ENZYMES and 4.8% on NCI1.

On the VarMisuse code dataset, all five GNNs improve with FA on projects seen in training, with R-GCN reaching 88.4%. Most also improve on unseen projects: R-GCN rises from 82.9% to 83.8%, while GGNN and GNN-MLP decline slightly.

Conclusion

The paper identifies a previously unisolated cause of GNNs' long-range difficulty: exponentially growing receptive fields meet fixed-length vectors, squeezing information out at bottlenecks. Models such as GCN and GIN, which sum neighboring information indiscriminately, suffer most. A fully adjacent final layer with no additional weights substantially improves extensively tuned models.

The authors explicitly call FA a starting point. Later work widens bottlenecks by rewiring graphs or combines local message passing and global attention in every layer, as GraphGPS does.

If your GNN stalls on a long-range task, try connecting all nodes in the last layer before increasing depth or width. No extra parameters are needed—just change that layer's adjacency matrix.