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

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

Abstract

We propose CRaWl, a novel neural network architecture for graph learning. Like graph neural networks, CRaWl layers update node features on a graph and thus can freely be combined or interleaved with GNN layers. Yet CRaWl operates fundamentally different from message passing graph neural networks. CRaWl layers extract and aggregate information on subgraphs appearing along random walks through a graph using 1D Convolutions. Thereby it detects long range interactions and computes non-local features. As the theoretical basis for our approach, we prove a theorem stating that the expressiveness of CRaWl is incomparable with that of the Weisfeiler Leman algorithm and hence with graph neural networks. That is, there are functions expressible by CRaWl, but not by GNNs and vice versa. This result extends to higher levels of the Weisfeiler Leman hierarchy and thus to higher-order GNNs. Empirically, we show that CRaWl matches state-of-the-art GNN architectures across a multitude of benchmark datasets for classification and regression on graphs.

Introduction: Beyond the Message Passing Paradigm

Most modern graph learning relies on Message Passing Neural Networks (MPGNNs). While successful, MPGNNs face two major "glass ceilings":

  1. Theoretical Limits: Their ability to distinguish different graph structures is bounded by the 1-dimensional Weisfeiler-Leman (1-WL) test. They struggle to detect basic structures like cycles or cliques unless explicitly engineered to do so.
  2. Locality Bottlenecks: Information travels one hop per layer. Capturing long-range dependencies requires many layers, which often leads to "over-smoothing" (feature homogenization) or "over-squashing" (information bottlenecks).

Higher-order GNNs (k-WL) solve the expressiveness problem but are computationally expensive, often scaling at $O(n^k)$. CRaWl (CNNs for Random Walks) is designed to be both more expressive than 1-WL and computationally efficient.

The CRaWl Architecture

CRaWl shifts the perspective from local neighborhoods to random walks. The architecture processes graphs through a sequence of sampling and convolutional steps:

  1. Sampling: The model samples a set of relatively long random walks across the graph.
  2. Feature Encoding: For every node in a walk, CRaWl constructs a feature vector that includes structural bits: "Identity" bits (indicating if the walk looped back to a previous node) and "Connectivity" bits (indicating if a node is connected to others within a small sliding window).
  3. 1D Convolutions: These walks are treated as sequences and processed using standard 1D CNNs. Because of the structural bits, the CNN filters can "see" the exact subgraph induced by the walk within its receptive field (a "walklet").
  4. Pooling & Updating: The resulting walklet embeddings are pooled back into the nodes. Each CRaWl layer then updates the latent embedding of every node, maintaining a structure similar to standard GNN layers.
The CRaWl pipeline: from random walk sampling to node feature updates via 1D convolutions.

This approach is highly efficient, leveraging optimized 1D CNN kernels and parallelized sampling. Multiple CRaWl layers can be stacked with residual connections to form a deep architecture capable of learning complex global representations.

Deep CRaWl architecture with residual connections and global pooling.

Theoretical Foundations: The Incomparability Theorem

A striking theoretical result of this work is that CRaWl and the WL-hierarchy are incomparable. There are graphs CRaWl can distinguish that $k$-WL cannot, and vice versa. This signifies that CRaWl is not merely an incremental improvement over GNNs but a fundamentally different way of perceiving graph topology. By using a sliding window over a walk, CRaWl can detect cycles (like benzene rings in molecules) that standard GNNs are mathematically blind to. Furthermore, because a single walk can traverse the entire diameter of a graph, a single CRaWl layer can capture long-range interactions that would require dozens of message-passing layers.

Empirical Results

The authors evaluated CRaWl across diverse benchmarks, demonstrating state-of-the-art performance:

  • Molecular Modeling: On the ZINC regression task, CRaWl achieved an MAE of 0.085, a ~40% improvement over standard MPGNNs.
  • Structural Tasks: CRaWl achieved 100% accuracy on the Cyclic Skip Link (CSL) dataset, a task where standard GNNs perform no better than random guessing (10%).
  • Long-Range Dependencies: On the PASCALVOC-SP benchmark, CRaWl outperformed previous results by 13 percentage points.
  • Efficiency: CRaWl scales linearly with the number of edges $O(|E|)$, making it significantly faster than higher-order $k$-GNNs or Graph Transformers on large graphs.

Conclusion

CRaWl represents a departure from the message-passing paradigm, offering a computationally efficient way to break the 1-WL expressiveness barrier. By combining random walks with 1D convolutions, it captures both complex local structures and long-range interactions. While challenges like sampling variance and window-size trade-offs remain, the "incomparability" of CRaWl suggests that hybrid architectures—interleaving CRaWl and message-passing layers—may provide the most robust path forward for graph learning.

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