A Structure-Aware Higher-Order Message Passing Framework on Walk States for Graph Classification

Lu Bai, Lin Du, Lixin Cui, Ming Li, Bo Jiang, Hangyuan Du, Ziyu Lyu, Xin JinNeurIPS 2026

TL;DR

Standard Graph Neural Networks (GNNs) suffer from a kind of structural blindness, unable to tell apart certain distinct graphs because they only pass messages between individual nodes. Instead of fixing this with computationally exhausting math over every possible group of nodes, the authors propose L2GNN—a framework that shifts the basic unit of modeling from single nodes to short, local walks (like 3-node paths). The result is a nimble, scalable model that spots complex graph symmetries better than heavyweight baselines, without needing expensive pre-computed global maps.

What Problem Does This Paper Address?

Imagine standing in a maze where every intersection has the exact same number of hallways. If you only ask your immediate neighbors what they see, a single six-room loop looks identical to two separate three-room triangles. This is the classic bottleneck of standard Message Passing Neural Networks (MPNNs): their "expressiveness" is capped by the 1-dimensional Weisfeiler–Lehman (1-WL) graph isomorphism test.

Figure 1: Motivating example. Lifting the modeling unit from nodes to edges and walks increases receptive field, making it easier to distinguish graphs G and H that 1-WL cannot separate.

To see the bigger picture, researchers built "higher-order" GNNs based on the $k$-WL hierarchy, which colors and compares $k$-sized tuples of nodes instead of single nodes. The catch? Simulating $k$-WL directly requires looking at all $V^k$ possible node combinations—even for $k=3$, the memory and compute explode. Existing workarounds either water down the math (losing the ability to distinguish tricky graphs) or bolt on expensive global preprocessing, like calculating all-pairs shortest-path distances across the entire graph. The authors ask: can we get high-level structural awareness natively and sparsely from the graph itself?

Methods

The authors introduce a walk-induced state lifting framework, instantiated for 2-hop walks ($\ell=2$) as L2GNN:

  • Lifting Walks to Nodes: Instead of single vertices, the fundamental units of the new "lifted" graph are non-backtracking 2-hop walks—triplets of nodes $(v_1, v_2, v_3)$. In the default setup, these are canonicalized into unordered sets of three nodes to eliminate redundant permutations.
  • Structure-Aware Tokens: Each triplet state is initialized not just with its nodes' features, but with an explicit "structure token" summarizing how those three nodes are wired together (e.g., open wedge vs. closed triangle).
  • Localized, Bundled Replacements: Standard Folklore WL ($k$-FWL, a clever, more expressive cousin of $k$-WL) updates a tuple by swapping out nodes one by one with every other node in the graph. L2GNN restricts these swaps to a local candidate set—specifically, the immediate neighbors of the triplet's nodes.
  • One-Step Local Closure: Because swapping a node in a sparse graph might create a disconnected triplet that wasn't an original 2-hop walk, L2GNN performs a lightweight "local closure," adding those swapped triplets into the state space so every valid candidate forms a complete 3-replacement bundle before message passing begins.
Figure 2: Overview of the default L2GNN (ℓ=2): walk-induced triplet lifting, candidate-indexed replacement, bundle message passing, and symmetrized local 3-FWL-style aggregation.

Datasets

No new datasets are introduced; the authors evaluate L2GNN on established benchmarks testing both theoretical limits and real-world utility:

  • BREC: A notoriously tough expressiveness benchmark of 400 non-isomorphic graph pairs (Basic, Regular, Extension, and CFI splits), ranging from 1-WL-hard up to pairs that stump 4-WL.
  • Open Graph Benchmark (OGB): Real-world molecular property prediction on ogbg-molhiv and the massive ogbg-molpcba (~438,000 graphs, used as a scalability stress test).
  • TU Benchmarks: Six classic datasets covering molecules and bioinformatics (MUTAG, PTC_MR, PTC_FM, ENZYMES, NCI1, NCI109).

Key Insights and Ideas

  • Beating Global 3-WL with Local Tricks: Intuitively, restricting node replacements to local neighborhoods sounds like it should weaken the model. Yet, because L2GNN groups replacements by candidate node (in the spirit of Folklore WL) and uses structure-aware tokens, a single layer can detect 4-node cliques ($K_4$). This lets a sparse, local model distinguish famously stubborn strongly regular graphs—like the $4\times 4$ Rook's graph and the Shrikhande graph—where dense, global 3-WL completely fails!
Figure 3: Shrikhande and 4×4 Rook’s graphs. 3-WL fails, whereas L2GNN successfully distinguishes them through effective sparsification and localization designs.
  • Avoiding the $\Theta(n^3)$ Trap: Instead of scaling with $n^3$ states and $n^4$ operations per layer like global 3-WL/3-FWL, L2GNN scales linearly with the number of retained sparse triplets ($T$) and max local candidates ($K$), costing just $O(KT)$ time.
  • Local Closure Matters: Ablations show that the one-step local closure expansion isn't just a minor engineering detail—removing it drops BREC performance from 297/400 down to 273/400, proving that complete replacement bundles are vital for clean higher-order aggregation.

Key Results

  • Expressiveness (BREC): L2GNN achieves the highest overall accuracy among all compared baselines, distinguishing 297/400 pairs (74.3%), beating distance-augmented heavyweights like $\text{N}^2$-GNN (71.8%) and $\text{I}^2$-GNN (70.2%) while also clocking the lowest total runtime on the profiled 340-pair subset. It shines brightest on Regular graphs, solving 137/140 (97.9%).
  • Real-World Tasks: On ogbg-molhiv, L2GNN takes the top spot among single-model baselines without pretraining (0.8146 ROC-AUC). On the 438K-graph ogbg-molpcba, it trains end-to-end on a single RTX 3090 GPU and achieves second place (0.2921 AP). Across all six TU datasets, it ranks either first or second.

Limitations and Future Work

L2GNN hits a clear wall on the CFI split of the BREC benchmark, scoring 0/100. CFI graphs are specifically engineered so that structural differences are hidden globally, requiring wide receptive fields or dense global tuple tracking. Because L2GNN deliberately trades global reach for local sparsity and a tight hop budget, it misses these long-range symmetries. As a diagnostic test, the authors show that injecting pre-computed shortest-path distance histograms bumps the CFI score to 10/100. Future directions are not explicitly laid out by the authors beyond noting that the framework's walk length ($\ell$) and candidate neighborhood scopes can be tuned when richer structural capture is needed.

Summary updated

Abstract

Standard Message Passing Neural Networks (MPNNs) are at most 1-dimensional Weisfeiler--Lehman (1-WL) expressive, which has spurred the development of higher-order models. In particular, many higher-order designs rely on extra global structural features (e.g., positional encodings or pairwise distances), whereas the $k$-WL hierarchy offers a principled and quantifiable path to increased expressiveness. However, directly simulating $k$-WL is computationally prohibitive, and existing $k$-WL variants often sacrifice expressiveness to gain efficiency, failing to capture critical structural distinctions. To overcome these shortcomings, we propose a higher-order message passing framework based on walk-induced lifted states with structure-aware state encoding. We prove that the default instantiation of our framework can separate certain 3-WL-indistinguishable graph pairs while avoiding dense tuple enumeration. On the challenging BREC expressiveness benchmark, our model achieves the highest total distinguishing accuracy among the compared higher-order GNN baselines. It also remains competitive on real-world graph classification tasks without using graph-wide positional or distance features.
BibTeX
@inproceedings{bai2026structure,
  author = {Lu Bai and Lin Du and Lixin Cui and Ming Li and Bo Jiang and Hangyuan Du and Ziyu Lyu and Xin Jin},
  title = {{A Structure-Aware Higher-Order Message Passing Framework on Walk States for Graph Classification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=fBUu2GWlHf},
}
Figure