Learning Long Range Dependencies on Graphs via Random Walks
Dexiong Chen, Till Hendrik Schulz, Karsten M. Borgwardt
Abstract
Message-passing graph neural networks (GNNs) excel at capturing local relationships but struggle with long-range dependencies in graphs. In contrast, graph transformers (GTs) enable global information exchange but often oversimplify the graph structure by representing graphs as sets of fixed-length vectors. This work introduces a novel architecture that overcomes the shortcomings of both approaches by combining the long-range information of random walks with local message passing. By treating random walks as sequences, our architecture leverages recent advances in sequence models to effectively capture long-range dependencies within these walks. Based on this concept, we propose a framework that offers (1) more expressive graph representations through random walk sequences, (2) the ability to utilize any sequence model for capturing long-range dependencies, and (3) the flexibility by integrating various GNN and GT architectures. Our experimental evaluations demonstrate that our approach achieves significant performance improvements on 19 graph and node benchmark datasets, notably outperforming existing methods by up to 13% on the PascalVoc-SP and COCO-SP datasets. The code is available at https://github.com/BorgwardtLab/NeuralWalker.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Cited by top-tier papers10
- Flatten Graphs as Sequences: Transformers are Scalable Graph GeneratorsDexiong Chen, Markus Krimmel, Karsten M. BorgwardtNeurIPS 2025 · 13 citations
- Flock: A Knowledge Graph Foundation Model via Learning on Random WalksJinwoo Kim, Xingyue Huang, Krzysztof Olejniczak, Kyungbin Min et al.ICLR 2026 · 8 citations
- Higher Order Structures for Graph ExplanationsAkshit Sinha, Sreeram Vennam, Charu Sharma, Ponnurangam KumaraguruAAAI 2025 · 5 citations
- Generalizable Insights for Graph Transformers in Theory and PracticeTimo Stoll, Luis Müller, Christopher MorrisNeurIPS 2025 · 2 citations
- Convergent Privacy Framework for Multi-layer GNNs through Contractive Message PassingYu Zheng, Chenang Li, Zhou Li, Qingsong WangNDSS 2026 · 1 citation
Builds on28
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Efficiently Modeling Long Sequences with Structured State SpacesAlbert Gu, Karan Goel, Christopher RéICLR 2022 · 3,482 citations
- Strategies for Pre-training Graph Neural NetworksWeihua Hu, Bowen Liu, Joseph Gomes, Marinka Zitnik et al.ICLR 2020 · 1,744 citations
- Vision Mamba: Efficient Visual Representation Learning with Bidirectional State Space ModelLianghui Zhu, Bencheng Liao, Qian Zhang, Xinlong Wang et al.ICML 2024 · 1,725 citations
- Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
Related papers
- Representing Long-Range Context for Graph Neural Networks with Global AttentionZhanghao Wu, Paras Jain, Matthew A. Wright, Azalia Mirhoseini et al.NeurIPS 2021 · 450 citations
- Best of Both Worlds: Advantages of Hybrid Graph Sequence ModelsAli Behrouz, Ali Parviz, Mahdi Karami, Clayton Sanford et al.ICML 2025
- Random Walk Conformer: Learning Graph Representation from Long and Short RangePei-Kai Yeh, Hsi-Wen Chen, Ming-Syan ChenAAAI 2023 · 9 citations
- A Scalable and Effective Alternative to Graph TransformersKaan Sancak, Zhigang Hua, Jin Fang, Yan Xie et al.AAAI 2025 · 5 citations
- Graph Mamba: Towards Learning on Graphs with State Space ModelsAli Behrouz, Farnoosh HashemiKDD 2024 · 63 citations
