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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 13 code samples harvested from 1 repository linked to this paper: 13 ran (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 1 honoured, 0 violated, 7 with no contract checked; 5 where Syntology's instrument failed) · 0 unverified. Where Syntology's instrument failed: 4 where our contract draft was wrong; 1 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 13 samples from 1 repository, 13 ran (8 with no instrument failure; 5 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 2 of the 13 samples that ran have no recorded date.

borgwardtlab/neuralwalker officialmentioned in papermentioned on GitHubpytorchBSD-3-ClauseSyntology: 13 samples, 13 ran (5 instrument-failed) · 0 unverified 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 (of which 0 constructed an object rather than computing a result; 8 with no instrument failure: 1 honoured, 0 violated, 7 with no contract checked; 5 where Syntology's instrument failed) · 0 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
4ran · our draft was wrong
1ran; the contract check could not run
7ran

Licence: 1 of the 13 samples is pointer only, meaning Syntology does not serve that copy's text. For that sample, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. 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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

borgwardtlab/neuralwalker official repository 13 samples, 13 ran (5 instrument-failed) · 0 unverified
apply_rotary_pos_emb in 393 papers
census: 14 implementations from 15 papers, 8 distinct outputs across 7 buckets, one shared input per bucket
neuralwalker/modules/rotary_embedding.py ran; the contract check could not run (RAISES) fingerprinted BSD-3-Clause (permissive) · 2a127d3ae372d7bd · report fixture: signature x:Tensor/3/float, cos:Tensor/3/float, sin:Tensor/3/float · returned Tensor · level recorded 2026-09-24
cauchy_naive in 7 papers neuralwalker/modules/s4.py ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · b7d9d94554e93b1b · report fixture: signature v:Tensor/2/float, z:Tensor/2/float, w:Tensor/2/float · returned Tensor · level recorded, date not recorded
code2_loss neuralwalker/loss.py ran BSD-3-Clause (permissive) · b3a8bb73de60c781 · report fixture: signature pred:list/1/Tensor, true:Tensor/2/int · returned Tensor · level recorded 2026-09-24
get_1d_sine_pos_embed neuralwalker/modules/pos_embed.py ran fingerprinted BSD-3-Clause (permissive) · b470ee5f2e9afb87 · report fixture: signature dim:int/0/int, length:int/0/int, max_period:int/0/int · returned Tensor · level recorded 2026-09-24
get_constant_schedule_with_warmup in 25 papers neuralwalker/lr_schedulers.py ran BSD-3-Clause (permissive) · 4c9b4ca1dcd1d6e0 · report fixture: signature optimizer:SGD/0/?, warmup_epochs:int/0/int, max_epochs:int/0/int · returned LambdaLR · level recorded 2026-09-24
get_cosine_schedule_with_warmup in 42 papers neuralwalker/lr_schedulers.py ran BSD-3-Clause (permissive) · be4dbd83bb917452 · report fixture: signature optimizer:SGD/0/?, warmup_epochs:int/0/int, max_epochs:int/0/int · returned LambdaLR · level recorded 2026-09-24
get_global_layer neuralwalker/modules/mp_layer.py ran BSD-3-Clause (permissive) · 5a4dbef456ab5726 · report fixture: signature global_model_type:str/0/str, hidden_size:int/0/int, num_heads:int/0/int, attn_dropout:float/0/float, dropout:float/0/float, vn_norm_first:bool/0/bool, vn_norm_type:str/0/str, vn_pooling:str/0/str · returned MultiheadAttention · level recorded 2026-09-24
get_inverse_sqrt_schedule_with_warmup neuralwalker/lr_schedulers.py ran BSD-3-Clause (permissive) · b64bb26edbc3a64e · report fixture: signature optimizer:SGD/0/?, warmup_epochs:int/0/int, max_epochs:int/0/int · returned LambdaLR · level recorded 2026-09-24
get_logger in 383 papers neuralwalker/modules/s4.py ran · our draft was wrong BSD-3-Clause (permissive) · 61139ec62260b411 · report fixture: signature name:str/0/str, level:int/0/int · returned Logger · level recorded 2026-09-22
log_vandermonde_naive in 6 papers neuralwalker/modules/s4.py ran · our draft was wrong BSD-3-Clause (permissive) · e25911109ba29783 · report fixture: signature v:Tensor/2/float, x:Tensor/2/float, L:int/0/int, conj:bool/0/bool · returned Tensor · level recorded, date not recorded
multilabel_cross_entropy in 8 papers neuralwalker/loss.py ran fingerprinted BSD-3-Clause (permissive) · 3d91b44d6e828f49 · report fixture: signature pred:Tensor/2/float, true:Tensor/2/float · returned Tensor · level recorded 2026-09-24
rotate_half in 424 papers
census: 24 implementations from 96 papers, 4 distinct outputs across 2 buckets, one shared input per bucket this sample: bucket 1 of 2, arg 1: rank 2, kind float, dtype float32
neuralwalker/modules/rotary_embedding.py ran · honoured contract fingerprinted BSD-3-Clause (permissive) here; the stored copy is pointer only · 437c7011506995a3 · report fixture: signature x:Tensor/2/float · returned Tensor · level recorded 2026-09-22
weighted_cross_entropy in 14 papers neuralwalker/loss.py ran · our draft was wrong BSD-3-Clause (permissive) · cbedbb45b34d1889 · report fixture: signature pred:Tensor/2/float, true:Tensor/1/int · returned Tensor · level recorded 2026-09-24

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