Oversmoothing & Oversquashing
Why deep GNNs blur features, and bottlenecks that block long-range information.
Stack 64 GCN layers and train them on the Cora citation network: accuracy falls from 81.1% with 2 layers to 28.7%. A 64-layer network with two small changes reaches 85.5%. Deep message passing runs into two different walls. Repeated averaging washes out the differences between nodes, oversmoothing; and information from far away must squeeze through a few edges into fixed-size vectors, oversquashing. This lesson proves the first, bounds the second, and explains why the cures for one tend to aggravate the other.
What you’ll learn
- Show that normalized neighborhood averaging is Laplacian smoothing and power iteration, and derive its limit and its exponential rate from the spectrum of the propagation matrix.
- State and prove the Dirichlet-energy bound for deep ReLU GCNs, including its conditions on the weights and the activation, and identify the eigenvalue that sets the rate.
- Evaluate the remedies (residual and initial-residual connections, APPNP and GCNII, PairNorm, DropEdge) by what they provably or empirically achieve.
- Define oversquashing, derive the Jacobian sensitivity bound, and connect bottlenecks to curvature, commute time and effective resistance.
- Explain the tension between the two problems and what the evidence from long-range benchmarks shows.
Smoothing is power iteration
Li, Han & Wu (2018) noticed that the GCN propagation is a form of Laplacian smoothing. Write and for the augmented normalized Laplacian: then , one step of diffusion that pulls every node toward its neighbors.
A low-pass filter of this kind helps when neighbors tend to share labels, because it averages away noise within a class. Keriven (2022) proved it in a latent-space random-graph model with linear GNNs: a finite number of mean-aggregation steps provably improves learning, since smoothing shrinks the nodes of each community together faster than it merges the communities. Repeat it often enough, though, and every difference disappears: oversmoothing.
is symmetric with eigenvalues , all in thanks to the self-loops. For a connected graph the eigenvalue 1 is simple, with eigenvector , whose entries are . Expand a feature column in the orthonormal eigenvectors and apply layers without weights:
Every feature column converges to a multiple of : node keeps only its degree, and nodes of equal degree become identical. All other components decay geometrically, at a rate set by the largest eigenvalue magnitude other than 1:
The mean aggregation of the widgets uses , a similar matrix with the same eigenvalues. Its powers converge to , so every node converges to one shared vector, the degree-weighted average . On a graph with several components, each component converges on its own.
This predicts the widgets quantitatively. The two-community graph of the Activation lesson has (computed from its adjacency matrix), so its slowest component shrinks by about 0.936 per layer and the energy, a squared quantity, by about . The widget's energies at layers 16 and 32, 2.5% and 0.31% of the start, imply per layer. A 12-node path is long and thin, , so averaging across its whole length is slow:
Exponential loss of expressive power
Propagation. Expand in the eigenvectors of , with eigenvalues . Then , and multiplies each term by . The term with carries no energy, so only the factors , , matter:
Weights. In the edge form each term of is for row vectors , at most times the matching term of :
Activation. ReLU and leaky ReLU are 1-Lipschitz and positively homogeneous, for . With , every edge term can only shrink, . Chaining the three contractions over layers gives the theorem. For tanh or the sigmoid, which are not positively homogeneous, this step can fail.
A connected graph's propagation matrix has . A ReLU GCN on it has weight matrices of spectral norm at most 1. At most what percentage of the starting Dirichlet energy can remain after 10 layers?
Show the answer
12.2 %
, so at most 12.2%. Getting below 1% takes , about 22 layers. Larger weights weaken the bound: with the factor per layer is and the bound barely moves.
What the theorem does not say: it is an upper bound, vacuous once , so a trained GCN with large weights can hold on to its differences for a while. Nor does attention escape: Wu, Ajorlou, Wu & Jadbabaie (2023) treated attention-based GNNs as products of state-dependent aggregation matrices and proved that graph attention networks and graph transformers also lose expressive power exponentially, under their assumptions on the weights and activations.
Rusch, Bronstein & Mishra (2023) define oversmoothing as the exponential convergence to zero of a node-similarity measure such as this energy, and argue that preventing it is necessary but not sufficient for deep GNNs that work.
Remedies for oversmoothing
Every remedy keeps something from being averaged away: part of the input, the spread of the features, or some of the edges' independence.
| Remedy | Idea | What it guarantees or showed |
|---|---|---|
| Residual connections (Kipf & Welling, 2017) | easier training of deeper GCNs, but accuracy still fell as layers were added | |
| APPNP (Gasteiger, Bojchevski & Günnemann, 2019) | predict with an MLP, , then propagate | the limit is personalized PageRank, : every node keeps a share of its own prediction at any depth |
| GCNII (Chen, Wei, Huang, Ding & Li, 2020) | : an initial residual plus an identity mapping, with or and | on Cora, accuracy rose with depth to 85.5% at 64 layers, where a plain GCN fell to 28.7% |
| PairNorm (Zhao & Akoglu, 2020) | center the node vectors, then rescale them to a fixed mean squared norm, | the total pairwise squared distance stays constant, so the nodes cannot all collapse; deep GCN, GAT and SGC models became more robust in their experiments |
| DropEdge (Rong, Huang, Xu & Huang, 2020) | remove a random fraction of the edges at every training epoch | slows the convergence of oversmoothing, by their analysis, and acts as data augmentation against overfitting |
import torch
def propagation(A): # P = D^-1/2 (A + I) D^-1/2
At = A + torch.eye(A.size(0))
d = At.sum(1)
return At / torch.sqrt(d[:, None] * d[None, :])
def energy(P, X): # tr(X^T (I - P) X)
return torch.trace(X.T @ (X - P @ X))
def smoothing_curve(A, X, layers=32, alpha=0.0):
"""Energy per layer of Z <- (1 - alpha) P Z + alpha X (alpha = 0: GCN propagation; alpha > 0: APPNP)."""
P, Z, out = propagation(A), X.clone(), []
for _ in range(layers):
Z = (1 - alpha) * P @ Z + alpha * X
out.append((energy(P, Z) / energy(P, X)).item())
return out
def rate(A): # largest |eigenvalue| of P other than 1 (connected graph)
mu = torch.linalg.eigvalsh(propagation(A)) # ascending order; mu[-1] = 1
return max(abs(mu[0]), abs(mu[-2])).item()Plain propagation against APPNP on any adjacency matrix A. On Zachary's karate club, ; with random 8-dimensional features, plain propagation keeps only a few millionths of the energy after 32 layers, inside the bound , while APPNP with levels off at about 1.5–1.9% across random draws.
Stopping the collapse is not the same as using depth well. GCNII's 64-layer result on Cora, 85.5% against 83.3% for the shallow APPNP and 81.5% for a two-layer GCN in its main comparison table (its depth study's own two-layer GCN run is the hook's 81.1%), is real but modest, and on many node-classification benchmarks a few layers remain hard to beat. Long-range tasks, where depth should matter most, run into the second wall.
Oversquashing
A node's receptive field can grow exponentially with depth: in a tree with branching factor , about nodes lie hops away. All their information must pass through fixed-size vectors along a few edges, a bottleneck Alon & Yahav (2021) called oversquashing. On their synthetic NeighborsMatch task, whose answer sits in the leaves of a tree of depth , GCN and GIN fitted the training data perfectly only up to (GCN reached 70% training accuracy at ), GAT and GGNN up to , and at no GNN fitted it, although each training example had been seen tens of thousands of times.
Their remedy was blunt: replace the last layer of extensively tuned models by a fully adjacent layer, in which every pair of nodes is connected. Without new weights or tuning, the error fell by 42% on QM9, 12% on ENZYMES and 4.8% on NCI1.
Measure how strongly node 's output can depend on the input at node by a Jacobian. Take a message-passing network with scalar features, , whose update and message functions have derivatives bounded by and . If is exactly hops from :
Sketch: by the chain rule the derivative is a sum over walks from to through the layers, each step contributing at most times an entry of . With at distance , only shortest paths have the right length, so the walk sum is a sum of products of entries along shortest paths:
In a tree whose nodes all have 3 neighbors, every factor is and there is one path, so a node hops away has influence at most , while the number of such nodes grows like . At that is nodes, each bounded by about . Raising to compensate makes the network sensitive to everything at once.
Which graphs are bottlenecked? Topping et al. defined a balanced Forman curvature for each edge from the triangles and 4-cycles around it, and proved that edges with curvature near , tree-like bridges between dense regions, cause oversquashing: they bound the Jacobian across such an edge. Their rewiring, stochastic discrete Ricci flow, repeatedly adds an edge that supports the most negatively curved edge and removes the most positively curved one.
Di Giovanni, Giusti, Barbero, Luise, Liò & Bronstein (2023) separated the roles of width, depth and topology. Width can mitigate oversquashing, at the cost of making the whole network more sensitive; depth cannot, because extra layers make vanishing gradients dominate; and topology matters most, since oversquashing occurs between nodes with a large commute time, the expected time for a random walk to travel from one to the other and back. Black, Wan, Nayyeri & Wang (2023) used the closely related total effective resistance of a graph as a bound on its oversquashing and added the edges that reduce it most.
The tension, and what the benchmarks show
The two problems pull in opposite directions. Oversquashing is worst where few edges join large regions, and the cures add connections: rewiring, a virtual node joined to every node (Gilmer et al.'s master node), a fully adjacent layer, or attention over all pairs in a graph transformer. But better connectivity means faster mixing. A larger spectral gap, which Cheeger's inequality ties to the absence of bottlenecks, also tends to shrink , and by the energy theorem the features then oversmooth in fewer layers; Giraldo, Skianis, Bouwmans & Malliaros (2023) tie both problems to this gap and conclude that they cannot be relieved at the same time. A complete graph is the extreme: every node hears every other in one layer, and one mean-aggregation layer makes all nodes identical. Attention does not dissolve the tension either, since attention-based models oversmooth too (Wu et al., 2023), and full attention costs .
How much does oversquashing limit real tasks? The Long Range Graph Benchmark (Dwivedi et al., 2022) collected tasks built to need long-range interactions, and graph transformers clearly beat message-passing GNNs on them in the original results. Tönshoff, Ritzert, Rosenbluth & Grohe (2023) re-tuned the baselines and found the gap overestimated: on several of the datasets it vanished completely after basic hyperparameter optimization. As of the mid-2020s, the practical weight of oversquashing, as opposed to under-tuned baselines, is debated.
Key takeaways
- Normalized averaging is Laplacian smoothing and power iteration: features converge to the top eigenvector of (degrees only; a constant vector for mean aggregation) at a rate set by , which the widgets' energies match.
- For ReLU GCNs, : propagation, weights and activation each contract the Dirichlet energy, so all information beyond degrees and components fades exponentially when ; attention-based models are not exempt.
- Remedies keep a share of the input (APPNP's teleport, GCNII's initial residual and identity mapping), renormalize (PairNorm) or thin the graph during training (DropEdge). GCNII trained 64 layers to 85.5% on Cora, yet stopping the collapse is necessary, not sufficient, for depth to pay.
- Oversquashing squeezes exponentially many distant nodes into fixed-size vectors. The Jacobian bound ties it to the topology, through negatively curved edges, commute times and effective resistance; width helps somewhat, depth does not.
- Adding edges relieves bottlenecks but speeds up smoothing. On long-range benchmarks, re-tuned message-passing baselines closed much of the reported gap to graph transformers, so how much oversquashing limits real tasks is debated.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Repeat many times on a connected graph. What does converge to?
- The zero vector
- A multiple of , so that only the degrees remain
- The original , because the operator is normalized
- A vector whose sign alternates from one layer to the next
Show the answer
B. A multiple of , so that only the degrees remain
The top eigenvector of is , with the simple eigenvalue 1 on a connected graph, and every other component shrinks like . With the row-normalized mean the limit is a constant vector instead: all nodes equal.
The bound is proved for ReLU GCNs. When does it guarantee nothing?
- When the weights' spectral norms are large enough that
- When the graph is connected
- When the activation is leaky ReLU rather than ReLU
- When the network has more than two layers
Show the answer
A. When the weights' spectral norms are large enough that
The bound decays only if . Weights of larger norm can amplify differences as fast as propagation removes them, and then the theorem is silent, although trained networks may still oversmooth in practice.
Why does oversquashing get worse with depth on tree-like graphs?
- Each extra layer adds parameters that overfit
- Self-loops let a node's own features dominate
- The receptive field grows exponentially with depth but must fit into a fixed-size vector, and each distant node's influence is bounded by a product of normalized edge weights that shrinks exponentially
- Deeper layers are trained with smaller learning rates
Show the answer
C. The receptive field grows exponentially with depth but must fit into a fixed-size vector, and each distant node's influence is bounded by a product of normalized edge weights that shrinks exponentially
In a tree with branching factor , about nodes lie hops away, and Topping et al.'s bound makes each one's influence exponentially small. Depth enlarges the field without widening the channel.
You add a virtual node, joined to every node, to a graph with long bottlenecks. What should you expect?
- Both oversmoothing and oversquashing get worse
- No change, since message passing ignores extra nodes
- Oversmoothing disappears
- Less oversquashing, but the graph now mixes faster, so features can oversmooth in fewer layers
Show the answer
D. Less oversquashing, but the graph now mixes faster, so features can oversmooth in fewer layers
Every pair of nodes is now 2 hops apart, so distant information no longer queues through the bottleneck. The same shortcut speeds up mixing: a smaller means faster energy decay. Relieving one problem tends to aggravate the other.
Further reading
- K. Oono & T. Suzuki, "Graph neural networks exponentially lose expressive power for node classification," ICLR (2020).
- U. Alon & E. Yahav, "On the bottleneck of graph neural networks and its practical implications," ICLR (2021).
- J. Topping, F. Di Giovanni, B. P. Chamberlain, X. Dong & M. M. Bronstein, "Understanding over-squashing and bottlenecks on graphs via curvature," ICLR (2022).
- M. Chen, Z. Wei, Z. Huang, B. Ding & Y. Li, "Simple and deep graph convolutional networks," ICML (2020).
- T. K. Rusch, M. M. Bronstein & S. Mishra, "A survey on oversmoothing in graph neural networks," arXiv:2303.10993 (2023).