Locality-Aware Graph Rewiring in GNNs

Federico Barbero, Ameya Velingker, Amin Saberi, Michael M. Bronstein, Francesco Di Giovanni

TL;DR

Researchers have developed LASER (Locality-Aware SEquential Rewiring), a new framework that fixes the "over-squashing" problem in Graph Neural Networks (GNNs). Unlike previous methods that either make graphs too dense or ignore their natural structure, LASER strategically adds a small number of "short-cut" edges that respect the graph's locality, leading to state-of-the-art performance on long-range reasoning tasks.

The Over-Squashing Bottleneck

Standard GNNs rely on message passing: nodes update their features by aggregating information from immediate neighbors. To capture long-range interactions, models require many layers. However, as layers are added, the amount of information from a node's exponentially expanding neighborhood must be compressed into a single fixed-size vector. This bottleneck is known as over-squashing.

To fix this, researchers use graph rewiring—adding or changing edges to create "highways" for information flow. But current techniques face a fundamental trilemma:

  1. Spatial Rewiring (e.g., connecting all nodes within $k$ hops) reduces over-squashing and respects locality but destroys sparsity, making the graph computationally expensive and prone to over-smoothing.
  2. Spectral Rewiring (adding edges based on global connectivity metrics) preserves sparsity but ignores locality, often connecting very distant nodes and destroying the inductive bias of the original graph structure.
Comparison of graph rewiring properties

The authors ask: Can we design a rewiring framework that reduces over-squashing while remaining both sparse and local?

Introducing LASER

The authors introduce LASER (Locality-Aware SEquential Rewiring). The core idea is to treat rewiring not as a one-time change, but as a sequence of snapshots.

  • Sequential Snapshots: Instead of one statically rewired graph, LASER creates a trajectory of graphs ($G_0, G_1, \dots, G_L$). Each snapshot $G_\ell$ adds edges between nodes that are exactly $\ell+1$ hops away in the original graph.
  • The Connectivity Proxy ($\mu$): To keep the graph sparse, LASER doesn't add all possible $k$-hop edges. It uses a connectivity measure based on walk counts (the number of paths between node A and B). If two nodes have very few paths between them, they are likely in a "bottleneck" area, and LASER prioritizes adding an edge there.
  • The Sparsity Controller ($\rho$): A global parameter $\rho$ determines what fraction of potential edges to add, allowing users to tune the trade-off between connectivity and computational budget.
  • Multi-relational Integration: These snapshots are fed into the GNN as different "relations." The model learns to weigh information coming from the original edges differently than information coming from the new LASER shortcuts.

Key Insights

  • The Locality Bias Matters: Spectral methods often add "teleportation" edges between nodes that are mathematically far apart but semantically unrelated. LASER shows that keeping shortcuts "relatively local" (expanding hop-by-hop) preserves the structural information GNNs need to generalize.
  • Walk Counts are Efficient: While "Effective Resistance" is the gold standard for measuring graph bottlenecks, it is computationally expensive ($O(n^3)$). LASER uses powers of the adjacency matrix (walk counts) as a much cheaper proxy that still identifies where information is getting squashed.
  • Equivalence to Temporal GNNs: The authors point out a fascinating theoretical link: sequential rewiring is mathematically equivalent to running a GNN over a "temporal" graph where the connectivity evolves over time.

Key Results

LASER was evaluated on the Long Range Graph Benchmark (LRGB) (designed to test long-range interactions) and standard TUDatasets.

  • State-of-the-Art on LRGB: LASER significantly outperformed existing rewiring methods (like FOSR and SDRF) on the Peptides datasets. For example, on Peptides-func, LASER achieved an Average Precision of 0.6440, compared to the baseline GCN's 0.5930.
Performance comparison on LRGB datasets
  • Preserving the "Map": Using the Frobenius norm of distance matrices, the authors proved that LASER preserves the original graph's distance information much better than spectral methods, which tend to maximally destroy locality.
  • Scalability: LASER is highly efficient. The authors demonstrated it could rewire a synthetic graph with 100,000 nodes and 1 million edges in about 2 hours, whereas competing methods like FOSR failed to finish within 24 hours.
  • Sparsity Wins: LASER achieved better results than dense spatial methods while using only a fraction of the edges (controlled by $\rho = 0.1$).

Limitations and Future Work

  • Choice of Measures: The current version of LASER uses specific choices for connectivity and locality. Exploring alternative topological measures could yield even better results for specific domains (like chemistry vs. social networks).
  • Differentiability: LASER is currently a pre-processing step. A promising future direction is making the rewiring process fully differentiable so the network can "learn" which shortcuts to build during training.
  • Hyperparameter Tuning: While $\rho$ and the number of snapshots $L$ provide great control, they introduce new hyperparameters that require tuning for each dataset.

Summary updated

BibTeX
@inproceedings{barbero2024locality,
  author = {Federico Barbero and Ameya Velingker and Amin Saberi and Michael M. Bronstein and Francesco Di Giovanni},
  title = {{Locality-Aware Graph Rewiring in GNNs}},
  booktitle = {International Conference on Learning Representations},
  year = {2024},
  url = {https://openreview.net/forum?id=4Ua4hKiAJX},
}
Figure