Walking Out of the Weisfeiler Leman Hierarchy: Graph Learning Beyond Message Passing

Jan Tönshoff, Martin Ritzert, Hinrikus Wolf, Martin Grohe

TL;DR

CRaWl (CNNs for Random Walks) is a novel graph learning architecture that breaks away from traditional message-passing by applying 1D convolutions to features extracted along random walks. It is provably "incomparable" to the standard Weisfeiler-Leman hierarchy, meaning it can capture complex structural patterns and long-range interactions that traditional Graph Neural Networks (GNNs) fundamentally miss.

What Problem Does This Paper Address?

Most modern graph learning is dominated by Message Passing Neural Networks (MPGNNs). While powerful, these models have two major Achilles' heels:

  1. Limited Expressiveness: Their ability to distinguish graph structures is bounded by the 1-dimensional Weisfeiler-Leman (1-WL) algorithm. For instance, standard GNNs struggle to detect simple cycles or count specific subgraphs.
  2. Locality Bottlenecks: GNNs typically aggregate information from immediate neighbors. Capturing long-range dependencies requires stacking many layers, which often leads to "over-smoothing," where node features become indistinguishable.

While higher-order GNNs exist to solve the expressiveness problem, they are often computationally prohibitive ($O(n^k)$ complexity). The authors of this paper sought a way to achieve high expressiveness and long-range awareness without sacrificing efficiency.

Methods

The authors introduce CRaWl, which treats a graph not as a collection of neighborhoods to be aggregated, but as a space to be explored via random walks.

  • Random Walk Sampling: The model samples a set of relatively long random walks (typically non-backtracking).
  • Walk Feature Matrices: For each walk, it constructs a sequence of features. Beyond standard node and edge labels, it includes identity features (indicating if a walk has returned to a previously visited node) and connectivity features (indicating edges between any two nodes within a local window of the walk).
  • 1D Convolutions: These feature sequences are processed using standard 1D CNNs. Because the CNN looks at a sliding window along the walk, it effectively "sees" the induced subgraphs formed by those nodes.
  • Pooling and Updating: The CNN outputs are pooled back into the nodes (by averaging embeddings of all walk segments centered at a given node). This allows CRaWl to update node latent states, making it fully compatible and interleave-able with standard GNN layers.
The information flow in a CRaWl layer: from random walks to feature matrices, 1D CNN processing, and finally node updates.

Datasets

The authors evaluated CRaWl across a diverse array of benchmarks:

  • Molecular Property Prediction: ZINC (regression) and MOLPCBA (large-scale multi-task classification from OGB).
  • Computer Vision (as graphs): MNIST and CIFAR10 superpixel graphs.
  • Long-Range Graph Benchmark: PASCALVOC-SP (image segmentation), PEPTIDES-FUNC, and PEPTIDES-STRUCT.
  • Social Networks: COLLAB, IMDB-MULTI, and REDDIT-BIN.
  • Synthetic Benchmarks: Cyclic Skip Link (CSL) graphs and subgraph counting tasks (triangles, stars, cycles).

Key Insights and Ideas

  • WL-Incomparability: The most striking theoretical result is that CRaWl and $k$-WL are incomparable. CRaWl can distinguish certain graphs that even high-order GNNs cannot, and vice versa. This suggests that CRaWl isn't just a replacement for GNNs, but a powerful complement.
  • Escaping the Breadth-First Trap: GNNs essentially perform a breadth-first search. CRaWl’s random walks act more like independent depth-first probes. This allows it to "stumble upon" long-range interactions much more easily than a standard aggregator.
  • Subgraphs via Windows: By encoding all edges between nodes in a walk's sliding window, the 1D CNN can learn to recognize complex local motifs (like benzene rings in molecules) that are difficult for standard message passing to resolve.
  • Efficiency through Parallelism: By using 1D CNNs, the model leverages highly optimized GPU kernels, making it faster in practice than many other "expressive" graph models.
The architecture of a single CRaWl layer and a stacked 3-layer network.

Key Results

  • State-of-the-Art Performance: On the ZINC dataset, CRaWl achieved an MAE of 0.085, a 40% improvement over the best standard MPGNN (PNA) at the time.
  • Long-Range Excellence: On the PASCALVOC-SP task, CRaWl improved the previous best result by 13 percentage points, demonstrating its superior ability to handle long-distance dependencies.
  • Solving "Unsolvable" Tasks: On the CSL dataset—a collection of highly symmetric graphs where standard GNNs fail completely (getting ~10% accuracy)—CRaWl achieved a perfect 100% accuracy.
  • Ablation Success: Increasing the window size $s$ showed a clear performance jump at $s=6$, which corresponds to the size of a benzene ring, confirming the model's ability to capture meaningful chemical motifs.
Ablation study showing how increasing window size (s) and the number of walks (m) improves performance on the ZINC dataset.

Limitations and Future Work

  • Runtime Complexity: While efficient, CRaWl has a quadratic dependence on the window size ($O(s^2)$), making it slower than the simplest GNNs like GCN.
  • Scaling to Massive Graphs: The current implementation samples walks for every node, which might be difficult to scale to single, massive graphs with millions of nodes (like social networks) without more sophisticated sampling strategies.
  • Hybrid Architectures: The authors suggest that the most promising future direction is combining CRaWl layers with Message Passing or Graph Transformer layers to get the "best of both worlds"—local breadth-first aggregation and long-range walk-based exploration.

Summary updated

BibTeX
@article{tonshoff2023walking,
  author = {Jan Tönshoff and Martin Ritzert and Hinrikus Wolf and Martin Grohe},
  title = {{Walking Out of the Weisfeiler Leman Hierarchy: Graph Learning Beyond Message Passing}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=vgXnEyeWVY},
}
Figure