Papers › Learning Long Range Dependencies on Graphs via Random Walks

Learning Long Range Dependencies on Graphs via Random Walks

5 Jun 2024arXiv:2406.03386archive 2025-07-28

Dexiong Chen, Till Hendrik Schulz, Karsten Borgwardt

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.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2406.03386")

Code

Syntology Ran 13 of 13 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 9 ran with no contract checked.

By repository: official repository: 13 samples from 1 repository, 13 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

borgwardtlab/neuralwalker officialmentioned in papermentioned on GitHubpytorchBSD-3-Clause report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested; 13 ran; 1 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
9ran

Licence: 0 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from borgwardtlab/neuralwalker. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

apply_rotary_pos_emb borgwardtlab/neuralwalker/neuralwalker/modules/rotary_embedding.py official repository ran fingerprinted BSD-3-Clause (permissive) · 2a127d3ae372d7bd · report
cauchy_naive borgwardtlab/neuralwalker/neuralwalker/modules/s4.py official repository ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · b7d9d94554e93b1b · report
code2_loss borgwardtlab/neuralwalker/neuralwalker/loss.py official repository ran BSD-3-Clause (permissive) · b3a8bb73de60c781 · report
get_1d_sine_pos_embed borgwardtlab/neuralwalker/neuralwalker/modules/pos_embed.py official repository ran fingerprinted BSD-3-Clause (permissive) · b470ee5f2e9afb87 · report
get_constant_schedule_with_warmup borgwardtlab/neuralwalker/neuralwalker/lr_schedulers.py official repository ran BSD-3-Clause (permissive) · 4c9b4ca1dcd1d6e0 · report
get_cosine_schedule_with_warmup borgwardtlab/neuralwalker/neuralwalker/lr_schedulers.py official repository ran BSD-3-Clause (permissive) · be4dbd83bb917452 · report
get_global_layer borgwardtlab/neuralwalker/neuralwalker/modules/mp_layer.py official repository ran BSD-3-Clause (permissive) · 5a4dbef456ab5726 · report
get_inverse_sqrt_schedule_with_warmup borgwardtlab/neuralwalker/neuralwalker/lr_schedulers.py official repository ran BSD-3-Clause (permissive) · b64bb26edbc3a64e · report
get_logger borgwardtlab/neuralwalker/neuralwalker/modules/s4.py official repository ran · our draft was wrong BSD-3-Clause (permissive) · 61139ec62260b411 · report
log_vandermonde_naive borgwardtlab/neuralwalker/neuralwalker/modules/s4.py official repository ran · our draft was wrong BSD-3-Clause (permissive) · e25911109ba29783 · report
multilabel_cross_entropy borgwardtlab/neuralwalker/neuralwalker/loss.py official repository ran fingerprinted BSD-3-Clause (permissive) · 3d91b44d6e828f49 · report
rotate_half borgwardtlab/neuralwalker/neuralwalker/modules/rotary_embedding.py official repository ran · honoured contract fingerprinted BSD-3-Clause (permissive) · 437c7011506995a3 · report
weighted_cross_entropy borgwardtlab/neuralwalker/neuralwalker/loss.py official repository ran BSD-3-Clause (permissive) · cbedbb45b34d1889 · report

Tasks

Graph ClassificationGraph Property PredictionGraph RegressionGraph Representation LearningLink PredictionNode ClassificationRepresentation Learning

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Graph Classification CIFAR10 100k NeuralWalker Accuracy (%) 80.027 ± 0.185 #1 of 20 Archive leaderboard report
Graph Classification MNIST NeuralWalker Accuracy 98.760 ± 0.079 #2 of 13 Archive leaderboard report
Graph Classification Peptides-func NeuralWalker AP 0.7096 ± 0.0078 #11 of 44 Archive leaderboard report
Graph Regression Peptides-struct NeuralWalker MAE 0.2463 ± 0.0005 #13 of 39 Archive leaderboard report
Graph Regression ZINC NeuralWalker MAE 0.065 ± 0.001 #7 of 27 Archive leaderboard report
Link Prediction PCQM-Contact NeuralWalker MRR-ext-filtered 0.4707 ± 0.0007 #18 of 18 Archive leaderboard report
Node Classification CLUSTER NeuralWalker Accuracy 78.189 ± 0.188 #6 of 12 Archive leaderboard report
Node Classification COCO-SP NeuralWalker macro F1 0.4398 ± 0.0033 #1 of 19 Archive leaderboard report
Node Classification PATTERN NeuralWalker Accuracy 86.977 ± 0.012 #4 of 11 Archive leaderboard report
Node Classification PascalVOC-SP NeuralWalker macro F1 0.4912 ± 0.0042 #1 of 21 Archive leaderboard report
Node Classification pokec NeuralWalker Accuracy 86.46 ± 0.09 #1 of 7 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutGraph Neural NetworkGraph TransformerLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections