Sam Austinon November 26, 202616 min read

Over-Smoothing in GNNs: Why Deeper Isn't Better and What to Do About It

Over-Smoothing in GNNs: Why Deeper Isn't Better and What to Do About It
Contents

Figure 1: Over-Smoothing in GNNs: Why Deeper Isn't Better and What to Do About It — repeated averaging collapses node features into indistinguishable vectors

Computer vision models stack tens or even hundreds of layers, and accuracy keeps climbing. Most GNNs in real applications stop at two or three. You add a fourth layer, then an eighth, and accuracy falls off a cliff. What went wrong? A big part of the answer has a name: over-smoothing, the tendency of node features to become more similar as depth grows.

I can't claim I've run all the methods below at scale, and I haven't executed the code in this conversation, so test it yourself. As you asked, I put the sources after the article, not inside it. IMO, over-smoothing is the best case study in GNNs for learning to separate a real phenomenon from a convenient excuse. Deep GNNs fail for several reasons, and over-smoothing is only one. Ready to untangle them?

What Over-Smoothing Actually Means

A recent survey states the idea plainly: node features tend to become more similar as network depth increases, and it gives a formal definition based on node features converging to a constant, with each connected component possibly converging to its own constant. In plain English: stack enough message-passing layers, and every node in a connected piece of the graph ends up with nearly the same vector. A classifier can't separate them anymore.

Why does it happen? Each layer averages a node's features with its neighbors'. Averaging is a smoothing filter, and repeating it flattens everything. The classic GCN analysis frames it exactly that way.

See It Happen by Hand

Return to the four-node graph from the message-passing article: A-B, A-C, C-D, with starting values A = 1, B = 3, C = 5, D = 9. Each layer replaces every node's value with the average of itself and its neighbors:

  • Start: 1, 3, 5, 9 (spread from lowest to highest: 8)
  • Layer 1: 3, 2, 5, 7 (spread 5)
  • Layer 2: 3.33, 2.5, 5, 6 (spread 3.5)
  • Layer 3: 3.61, 2.92, 4.78, 5.5 (spread 2.58)
  • Layer 4: 3.77, 3.27, 4.63, 5.14 (spread 1.88)

The spread keeps shrinking, and with enough layers it would hit zero. Now reproduce it in code. I haven't run this, but it's simple:

import numpy as np

A = np.array([[0,1,1,0],[1,0,0,0],[1,0,0,1],[0,0,1,0]], dtype=float)   # A-B, A-C, C-D
P = A + np.eye(4)                       # add self-loops
P = P / P.sum(1, keepdims=True)         # row-normalize: "average me and my neighbors"

x = np.array([1., 3., 5., 9.])
for layer in range(0, 9):
    print(layer, x.round(2), "spread:", round(x.max() - x.min(), 2))
    x = P @ x

Run it for 30 layers, and the four numbers become indistinguishable. That's over-smoothing in its purest form: no weights, no training, just repeated averaging.

How to Measure It

Researchers use two main measures. The Dirichlet energy sums squared differences between each node's features and its neighbors'. When it collapses toward zero, nodes look alike. The survey notes that recent work defines over-smoothing through measures like Dirichlet energy, cosine-based similarity, and others. Mean Average Distance (MAD), a cosine-based measure, appears often, but the same survey says MAD doesn't meet its formal conditions for a proper node-similarity measure, so prefer Dirichlet energy when you can.

Here's a quick diagnostic for your own models. I haven't run it:

import torch

def relative_dirichlet_energy(h, edge_index, eps=1e-9):
    """Mean squared feature difference across edges, divided by mean squared feature size.
    A value that decays toward 0 with depth signals over-smoothing."""
    src, dst = edge_index
    diff = (h[src] - h[dst]).pow(2).sum(1).mean()
    scale = h.pow(2).sum(1).mean() + eps
    return (diff / scale).sqrt().item()

I divide by feature magnitude so the number stays comparable across layers, which is my own normalization, not the survey's exact formula. Plot it per layer, and you'll see the collapse.

Over-Smoothing Is Not the Only Culprit

Don't blame every deep-GNN failure on smoothing. The same survey lists several issues that impair deep GNNs: graph bottlenecks, over-squashing, and over-smoothing. A fuller picture:

  • Over-smoothing: features converge as repeated averaging mixes neighborhoods
  • Over-squashing: information from many distant nodes gets compressed through narrow paths into a fixed-size vector, so long-range signals die
  • Optimization trouble: deep stacks suffer vanishing gradients and training instability
  • Overfitting: more layers add parameters and can memorize small label sets

One point from the survey deserves emphasis: mitigating over-smoothing is necessary but not sufficient for building deep GNNs that are expressive across many tasks. Another survey notes that some methods, such as GCNII and GraphCON, keep Dirichlet energy constant across layers yet still can't improve accuracy at depth, which the authors attribute to limited expressive power. So preserving energy doesn't guarantee better predictions. Keep that in mind when a paper celebrates a flat energy curve.

Do You Even Need Depth?

Before you fix anything, ask whether you need more layers at all. A K-layer GNN sees K hops. Many tasks, like classifying papers in Cora, need only two or three hops of context. Social and web graphs have small diameters, so a few hops already reach a large fraction of the network (a property from background knowledge, so verify it on your graph). Depth matters for genuinely long-range tasks, such as molecules where distant atoms interact, or large road networks. For those, over-squashing may bite harder than over-smoothing, and alternatives like graph transformers or virtual nodes exist (background knowledge, so check the literature).

My rule: start with 2 or 3 layers, then add depth only when validation accuracy proves it helps.

The Fix Menu

Researchers have proposed many remedies. The surveys group them into strategies: normalization and regularization, changing GNN dynamics, and residual connections. Here's each one in plain English.

Residual Connections

Add a skip connection, so each layer's output includes its input, like ResNet. Kipf and Welling tried this early on, and one source reports their experiments showed residual connections alone weren't enough to make GCN deep. A recent empirical comparison agrees in spirit: in its tests, residual GCN still showed an exponential decay of Dirichlet energy on all three graphs it examined. Skip connections slow the collapse but don't stop it.

Initial Residual and Identity Mapping (GCNII)

GCNII adds a connection back to the initial features at every layer (borrowed from APPNP), plus an identity mapping that helps deeper layers do at least as well as shallow ones. The authors report building it up to 64 layers. In the survey's tests, GCNII kept Dirichlet energy roughly constant.

APPNP-Style Propagation

APPNP mixes each propagation step with the original features (a teleport or restart, like personalized PageRank). One theoretical analysis says APPNP always maintains some input information, which prevents total collapse.

Jumping Knowledge and Layer Combination

JKNet combines representations from all layers, so the final prediction can draw on shallow and deep views. LightGCN's layer averaging, from the recommender article, uses the same idea, and it reported stable or improving performance up to four layers, while a final-layer-only variant degraded with depth.

Normalization (PairNorm)

PairNorm centers node features and rescales them each layer, which keeps total pairwise distances from collapsing. It slows over-smoothing, though one source points out it doesn't necessarily improve accuracy by itself. In the survey's tests, PairNorm kept energy approximately constant.

DropEdge

Randomly remove a fraction of edges each training iteration, which sparsifies message passing and slows the mixing of neighborhoods. Its authors report that it improves several backbones, including GCN, ResGCN, JKNet, and APPNP, while still using the full graph in a probabilistic sense over training. The survey's empirical comparison found that DropEdge-GCN still suffered exponential energy decay, so treat it as a regularizer and mild remedy, not a cure.

Changing the Dynamics (GraphCON, G²)

These methods redesign propagation as a dynamical system so that energy doesn't decay. In the survey's tests, both kept energy approximately constant. They're more specialized, so check the papers before you adopt them.

Run the Experiment Yourself

Don't take any paper's word. Compare methods across depths on Cora. I haven't run this, and PyG layer signatures change, so check GCN2Conv, PairNorm, and dropout_edge in the current docs:

import copy, numpy as np
import torch, torch.nn.functional as F
import torch_geometric.transforms as T
from torch_geometric.datasets import Planetoid
from torch_geometric.nn import GCNConv, GCN2Conv, PairNorm
from torch_geometric.utils import dropout_edge

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
data = Planetoid("data/Cora", "Cora", transform=T.NormalizeFeatures())[0].to(device)
n_feat, n_cls = data.num_features, int(data.y.max()) + 1

class DeepGNN(torch.nn.Module):
    def __init__(self, layers, kind="plain", hidden=64, dropout=0.5, drop_edge=0.0):
        super().__init__()
        self.kind, self.dropout, self.drop_edge = kind, dropout, drop_edge
        if kind == "gcnii":
            self.lin_in, self.lin_out = torch.nn.Linear(n_feat, hidden), torch.nn.Linear(hidden, n_cls)
            self.convs = torch.nn.ModuleList(
                [GCN2Conv(hidden, alpha=0.1, theta=0.5, layer=l + 1) for l in range(layers)])
        else:
            dims = [n_feat] + [hidden] * layers
            self.convs = torch.nn.ModuleList([GCNConv(dims[i], dims[i + 1]) for i in range(layers)])
            self.norm = PairNorm() if kind == "pairnorm" else None
            self.out = torch.nn.Linear(hidden, n_cls)

    def forward(self, x, edge_index):
        if self.training and self.drop_edge > 0:
            edge_index, _ = dropout_edge(edge_index, p=self.drop_edge)
        x = F.dropout(x, self.dropout, self.training)
        if self.kind == "gcnii":
            x = self.lin_in(x).relu(); x0 = x
            for conv in self.convs:
                x = F.dropout(x, self.dropout, self.training)
                x = conv(x, x0, edge_index).relu()
            return self.lin_out(F.dropout(x, self.dropout, self.training))
        h = x
        for i, conv in enumerate(self.convs):
            z = conv(h, edge_index)
            if self.norm is not None: z = self.norm(z)
            z = F.relu(z)
            h = h + z if (self.kind == "residual" and i > 0) else z   # skip from layer 2 on
            h = F.dropout(h, self.dropout, self.training)
        return self.out(h)

def run(layers, kind, seed, drop_edge=0.0, epochs=200):
    torch.manual_seed(seed)
    model = DeepGNN(layers, kind, drop_edge=drop_edge).to(device)
    opt = torch.optim.Adam(model.parameters(), lr=0.01, weight_decay=5e-4)
    best_val, best_test = 0.0, 0.0
    for _ in range(epochs):
        model.train(); opt.zero_grad()
        out = model(data.x, data.edge_index)
        F.cross_entropy(out[data.train_mask], data.y[data.train_mask]).backward(); opt.step()
        model.eval()
        with torch.no_grad():
            pred = model(data.x, data.edge_index).argmax(1)
        val = (pred[data.val_mask] == data.y[data.val_mask]).float().mean().item()
        if val > best_val:
            best_val = val
            best_test = (pred[data.test_mask] == data.y[data.test_mask]).float().mean().item()
    return best_test

for kind in ["plain", "residual", "pairnorm", "gcnii"]:
    for L in [2, 4, 8, 16, 32]:
        accs = [run(L, kind, s) for s in range(5)]
        print(f"{kind:9s} L={L:2d}: {100*np.mean(accs):.1f} ± {100*np.std(accs):.1f}")

Add a drop_edge=0.3 run for DropEdge, and print relative_dirichlet_energy on the last hidden layer to watch the collapse directly. Compare training accuracy too: if a deep plain GCN fails even on the training set, you're seeing optimization difficulty, not only over-smoothing.

What to Expect

Surveys and papers suggest a pattern, which your run should confirm or contradict:

  • Plain GCN degrades past a few layers
  • Residual GCN degrades more slowly
  • GCNII can hold up to many layers, as its authors report
  • PairNorm keeps features apart but may not raise accuracy
  • No method will necessarily beat a well-tuned 2-layer GCN on Cora

That last point matters. On a small, homophilous graph like Cora, shallow models are hard to beat, so deep methods can look pointless there. They make more sense on tasks that need long-range context.

Diagnose Before You Treat

When a deeper model underperforms, check these in order:

  1. Training accuracy: if it's low, suspect optimization (learning rate, normalization, initialization) before smoothing
  2. Dirichlet energy by layer: exponential decay confirms smoothing
  3. Cosine similarity between random node pairs in the final layer: values creeping toward 1 mean collapse
  4. Per-class accuracy: smoothing hurts minority classes first, since their signal gets averaged away
  5. Graph homophily: heterophilous graphs suffer more, since averaging mixes unlike neighbors (see the GCN-versus-GraphSAGE-versus-GAT article)
  6. Over-squashing signs: if far-away nodes matter but accuracy won't improve with depth even with energy preserved, bottlenecks may be the cause

Practical Recommendations

  • Start shallow: two or three layers first
  • Add skip connections and layer combination (residual plus jumping knowledge) before exotic methods
  • For 8+ layers, compare GCNII and APPNP-style propagation against your baseline
  • Use DropEdge or dropout as regularization, not as the cure
  • Try a separate self channel, like GraphSAGE's, when neighbors disagree
  • Consider alternatives to depth for long-range tasks, such as graph transformers or global features
  • Evaluate fairly: multiple seeds, validation-based selection, and a shallow baseline

Common Mistakes to Avoid

  • Blaming smoothing for every deep failure. Check training accuracy and gradients first.
  • Equating constant energy with good accuracy. Surveys show preserved energy doesn't guarantee improvement.
  • Skipping the shallow baseline. A tuned 2-layer GCN often wins.
  • Comparing methods at one depth. Sweep depths.
  • Using one seed. Small gaps vanish under variance.
  • Trusting plain residual connections to solve everything. Evidence says they only slow the collapse.
  • Forgetting over-squashing. Smoothing fixes don't cure bottlenecks.
  • Copying hyperparameters from a paper's dataset to yours without tuning.

Did you notice that most mistakes involve assuming one cause for a problem with several? :/

Wrapping This Up

Over-smoothing happens because message passing repeatedly averages features, so node representations converge as layers pile up. Residual connections, initial-residual designs like GCNII, layer combination, normalization, and DropEdge all push back in different ways, but none is a free lunch, and preserving feature diversity doesn't automatically buy accuracy. For most tasks, a few well-regularized layers beat a deep stack.

So run the four-line averaging demo this week, then the depth sweep on Cora with plain, residual, and GCNII variants. If plain GCN collapses and GCNII holds, you just reproduced a published pattern on your laptop. If a 2-layer model still wins, congratulations: you found out your task doesn't need depth, and you can stop fighting for it. :)

Frequently Asked Questions

What is over-smoothing in GNNs?

Over-smoothing is the tendency of node features to become more similar as network depth increases. Stack enough message-passing layers, and every node in a connected component ends up with nearly the same vector, making them indistinguishable to a classifier.

How many layers do most practical GNNs use?

Most real-world GNNs stop at 2-3 layers. Computer vision models use tens or hundreds of layers, but GNNs hit an accuracy cliff beyond 3 layers due to over-smoothing, over-squashing, and optimization difficulties.

Do residual connections fix over-smoothing?

Residual connections slow the collapse but don't stop it. Surveys show residual GCN still exhibits exponential decay of Dirichlet energy. They're necessary but not sufficient for deep GNNs.

Which method actually preserves feature diversity at depth?

GCNII (initial residual + identity mapping) and APPNP-style propagation can keep Dirichlet energy roughly constant across many layers. PairNorm and GraphCON also preserve energy, but constant energy doesn't guarantee better accuracy.

Do I need deep GNNs for my task?

Many tasks like Cora classification need only 2-3 hops. Depth matters for genuinely long-range tasks (molecules, large road networks). Start shallow, add depth only when validation accuracy proves it helps.

Sources

[1] Survey on Over-Smoothing in GNNs (2024/2025) — formalizes over-smoothing via node feature convergence to constants per component; reviews Dirichlet energy, MAD, and cosine similarity as measures; notes MAD fails formal node-similarity conditions.

[2] GCNII (Chen et al.) — initial residual connections + identity mapping; builds 64-layer GCN; keeps Dirichlet energy constant in survey tests.

[3] APPNP (Klicpera et al.) — personalized PageRank-style propagation with teleport to initial features; theoretical guarantee of non-collapse.

[4] PairNorm (Zhao & Akoglu) — centers and rescales features per layer; keeps pairwise distances from collapsing; energy approximately constant in survey tests.

[5] DropEdge (Rong et al.) — random edge removal per iteration; improves GCN, ResGCN, JKNet, APPNP; survey finds it still suffers exponential energy decay on GCN backbone.

What are You Looking For?

esc