Revisiting Random Walks for Learning on Graphs
Abstract
We revisit a simple model class for machine learning on graphs, where a random walk on a graph produces a machine-readable record, and this record is processed by a deep neural network to directly make vertex-level or graph-level predictions. We call these stochastic machines random walk neural networks (RWNNs), and through principled analysis, show that we can design them to be isomorphism invariant while capable of universal approximation of graph functions in probability. A useful finding is that almost any kind of record of random walks guarantees probabilistic invariance as long as the vertices are anonymized. This enables us, for example, to record random walks in plain text and adopt a language model to read these text records to solve graph tasks. We further establish a parallelism to message passing neural networks using tools from Markov chain theory, and show that over-smoothing in message passing is alleviated by construction in RWNNs, while over-squashing manifests as probabilistic under-reaching. We empirically demonstrate RWNNs on a range of problems, verifying our theoretical analysis and demonstrating the use of language models for separating strongly regular graphs where 3-WL test fails, and transductive classification on arXiv citation network..
Benchmark Results
Tested on 3 datasets
Tables show presented results in global context (best 3 papers + GCN + MLP).
LRGB
| # | Model | AP ↑ | Paper |
|---|---|---|---|
| 1 | S^2GCN | 0.7311
±0.0066 | |
| 2 | S4G | 0.7293
±0.0004 | |
| 3 | BuNN | 0.7276
±0.0065 | |
| 4 | GCN | 0.7261
±0.0011 best reported | best at pub: Where Did the Gap Go? Reassessing the Long-Range Graph Benchmark (TMLR 2023) best today: From Message-Passing to Linearized Graph Sequence Models (2026) |
| 18 | RWNN-DeBERTa | 0.7123
±0.0016 | This paper |
| 22 | CRaWl | 0.7074 | This paper |
| 26 | GIN | 0.7059
±0.0089 | |
| 34 | GatedGCN | 0.7006
±0.0033 best reported | best at pub: Where Did the Gap Go? Reassessing the Long-Range Graph Benchmark (TMLR 2023) best today: From Message-Passing to Linearized Graph Sequence Models (2026) |
| 78 | GINE | 0.6621 | This paper |
| 112 | SAN | 0.6439 | This paper |
| 119 | Transformer | 0.6326 | This paper |
| 181 | MLP | 0.4060
±0.0021 |
Heterophily Benchmark
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | UniGAP | 0.6375
±0.0110 | |
| 2 | H2GCN + HalfHop | 0.5961
±0.0100 | |
| 3 | GraphSAGE + HalfHop | 0.5897
±0.0150 | |
| 10 | RWNN-Llama3-8b, fine-tuned | 0.5576 | This paper |
| 12 | SAGE | 0.5569
±0.0023 | |
| 14 | GAT | 0.5559
±0.0027 best reported | best at pub: Graph Neural Networks for Graphs with Heterophily: A Survey (2022) |
| 24 | GCN | 0.5411
±0.0034 best reported | best at pub: Graph Neural Networks for Graphs with Heterophily: A Survey (2022) |
| 69 | OFA | 0.5144 | This paper |
| 84 | MLP | 0.5058 | |
| 171 | RWNN-Llama3-8B | 0.4271 | This paper |
| 199 | LLaGA | 0.2820 | This paper |
GNNBenchmark
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 5 | RWNN-DeBERTa | 1.0000 | This paper |
| 1 | PPGN | 1.0000 | This paper |
| 2 | RW-AgentNet | 1.0000 | This paper |
| 3 | AgentNet | 1.0000 | This paper |
| 4 | CRaWl | 1.0000 | This paper |
| 8 | GCN | 1.0000 | |
| 54 | GIN-Dropout | 0.8200 | This paper |
| 62 | GIN-RP | 0.3760 | This paper |
| 70 | GIN-RNI | 0.1600 | This paper |
