Recurrent Distance Filtering for Graph Representation Learning
Yuhui Ding, Antonio Orvieto, Bobby He, Thomas Hofmann
TL;DR
GRED tackles the bottleneck of exploiting distant information in graph representation learning by combining shortest-distance based aggregation with a diagonal linear RNN, avoiding positional encodings. It introduces Graph Recurrent Encoding by Distance, which encodes the hop-sequence into a stable, long-range filter and yields competitive or superior results to graph transformers at lower cost. The authors establish injectivity of the linear RNN mapping and show GRED is more expressive than $1$-WL for $K>1$, while providing strong empirical results on benchmarks like ZINC 12K and long-range graphs. The approach demonstrates both high accuracy and training efficiency, offering a practical path toward scalable, inductive graph modeling without expensive attention mechanisms.
Abstract
Graph neural networks based on iterative one-hop message passing have been shown to struggle in harnessing the information from distant nodes effectively. Conversely, graph transformers allow each node to attend to all other nodes directly, but lack graph inductive bias and have to rely on ad-hoc positional encoding. In this paper, we propose a new architecture to reconcile these challenges. Our approach stems from the recent breakthroughs in long-range modeling provided by deep state-space models: for a given target node, our model aggregates other nodes by their shortest distances to the target and uses a linear RNN to encode the sequence of hop representations. The linear RNN is parameterized in a particular diagonal form for stable long-range signal propagation and is theoretically expressive enough to encode the neighborhood hierarchy. With no need for positional encoding, we empirically show that the performance of our model is comparable to or better than that of state-of-the-art graph transformers on various benchmarks, with a significantly reduced computational cost. Our code is open-source at https://github.com/skeletondyh/GRED.
