All models

FA-layer / Fully-Adjacent GNN

A GNN for the Tree-NeighborsMatch problem whose last layer connects every pair of nodes.

Graphs and geometry · 121 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (39 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
4.2K
Operations
121
Framework
PyTorch
Recurrent
No
Published
ICLR 2021
Cited by
275 (as of 28 October 2026)
Authors
Uri Alon, Eran Yahav
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m16515
Graph hash
38e0bb25f90ba1b34691e284480edbb6a43f65ef56c49cba55119f3fecdf81be
Skeleton hash
7c5aee79d2ea874fbf3da4c34d506ce9183b5b263b73ef6add1b051b1c4301ef
Architecture hash
0b2cbb5f24f6fcccd3a96abbcf0f0bca10a8727aafb92061d4475286f5b7b275
Diagram SHA-256
ce2ec9d93352d8c0f3c6a7d1cc2e4446e0ec2b83c33f40c16cdc9c8f8164dfa0
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is a graph neural network (GNN) whose last layer is fully adjacent, meaning that in that layer every pair of nodes is connected by an edge. The idea comes from a paper by Uri Alon and Eran Yahav on why GNNs struggle to pass information between distant nodes: a bottleneck forms when messages are aggregated across a long path. As layers are added, each node's receptive field grows exponentially, and the information from it is compressed into fixed-length node vectors, which the paper calls over-squashing.

Making the last layer fully adjacent does not change the type of layer or add weights; it only changes the adjacency of a data sample in that one layer. The earlier layers keep the graph's own edges, and the final layer lets the resulting topology-aware node representations interact directly. The authors call it a simple solution and say their main contribution is explaining the over-squashing problem, not the fix.

The paper reports that adding the layer to extensively tuned models from prior work, with no further tuning, reduces the error rate by 42% in the QM9 dataset, by 12% in ENZYMES and by 4.8% in NCI1. It also finds that GNNs that absorb incoming edges equally, such as GCN and GIN, are more susceptible to over-squashing than GAT and GGNN. The code reproduces Tree-NeighborsMatch, a synthetic benchmark that is theoretically solvable but on which, the paper says, all GNNs fail to reach 100% training accuracy.

Key idea. The paper introduces over-squashing as an explanation for poor long-range propagation in GNNs and shows that a fully-adjacent last layer reduces error in previously tuned models.

  • FA layer
  • fully-adjacent layer
  • Fully-Adjacent GNN
  • over-squashing
  • GNN bottleneck
  • graph neural network
  • long-range interaction
  • Tree-NeighborsMatch
  • NeighborsMatch

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

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