Abstract
The celebrated message-passing updates for graph neural networks allow representing large-scale graphs with local and computationally tractable updates. However, the updates suffer from backtracking, i.e., a message flowing through the same edge twice and revisiting the previously visited node. Since the number of message flows increases exponentially with the number of updates, the redundancy in local updates prevents the graph neural network from accurately recognizing a particular message flow relevant for downstream tasks. In this work, we propose to resolve such a redundancy issue via the non-backtracking graph neural network (NBA-GNN) that updates a message without incorporating the message from the previously visited node. We theoretically investigate how NBA-GNN alleviates the over-squashing of GNNs, and establish a connection between NBA-GNN and the impressive performance of non-backtracking updates for stochastic block model recovery. Furthermore, we empirically verify the effectiveness of our NBA-GNN on the long-range graph benchmark and transductive node classification problems.
Introduction: The Backtracking Bottleneck
Graph Neural Networks (GNNs) have become the standard tool for learning on relational data. Most GNNs rely on a "message-passing" scheme: to update a node's representation, features are aggregated from its neighbors. However, this process is typically "memoryless." If node $i$ sends a message to node $j$, in the very next step, node $j$ will likely send that same information back to node $i$. This phenomenon is known as backtracking.
As the number of layers increases, the number of redundant message paths grows exponentially. This leads to two major issues: redundancy, where the network is clogged with old information, and over-squashing, where fixed-size vectors must compress an impossible amount of information from an exponentially growing number of paths, causing long-range dependencies to vanish.
The NBA-GNN Framework
To address these inefficiencies, we introduce the Non-BAcktracking GNN (NBA-GNN). Instead of maintaining a single hidden state for each node, NBA-GNN maintains hidden states for directed edges (transitions).
The core rule of NBA-GNN is simple: when updating the message from node $j$ to node $i$ ($h_{j \to i}$), the model aggregates messages from all of $j$'s neighbors except for node $i$. This ensures that information never immediately backtracks to its source. To prevent messages from getting "trapped" at leaf nodes (nodes with only one neighbor), we implement a "begrudgingly backtracking" update: if a node has no other neighbors to pass information to, it is allowed to send the message back.
NBA-GNN is a backbone-agnostic framework. It can be applied to standard architectures like GCN, GIN, or GatedGCN by swapping the aggregation logic, making it a versatile tool for various graph learning tasks.
Theoretical Insights
We theoretically investigate the advantages of NBA-GNN through two lenses:
- Sensitivity: We prove that NBA-GNN has a higher sensitivity bound than standard GNNs. Mathematically, it is better at preserving information from $T$ hops away because it does not waste its representational capacity on redundant backtracking paths.
- Spectral Separation: In sparse graphs, the standard adjacency matrix can become noisy due to high-degree nodes. The non-backtracking operator maintains a cleaner spectral gap, allowing the model to distinguish community structures more effectively, even in very thin graphs.
Empirical Results
NBA-GNN consistently outperforms its backtracking counterparts across several challenging benchmarks:
- Long-Range Graph Benchmark (LRGB): On
PascalVOC-SP, adding the NBA framework to a standard GCN improved the F1 score from 0.1268 to 0.2537—a 100% relative improvement. NBA-GatedGCN achieved state-of-the-art results onPeptides-structandPascalVOC-SP. - Transductive Node Classification: On heterophilic datasets like
TexasandWisconsin, NBA-GNN showed massive gains (e.g., GCN + NBA on Wisconsin improved from 0.6059 to 0.7471), suggesting that non-backtracking is particularly helpful when nodes must look past immediate neighbors to find similar entities.
Conclusion
NBA-GNN offers a principled way to reduce redundancy and alleviate over-squashing in GNNs. While edge-based updates increase space complexity, the performance gains in sparse and long-range scenarios are significant. Future work will focus on scaling these edge-wise updates to massive graphs and exploring their utility in temporal graph learning.
Summary updated