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

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

Abstract

We propose CRaWl, a novel neural network architecture for graph learning. Unlike standard message-passing graph neural networks (GNNs), CRaWl layers extract and aggregate information on subgraphs appearing along random walks using 1D Convolutions. This allows the model to detect long-range interactions and compute non-local features. Theoretically, we prove that CRaWl's expressiveness is incomparable with the Weisfeiler-Leman hierarchy. Empirically, CRaWl matches or exceeds state-of-the-art GNN architectures across diverse benchmarks for classification and regression.

Introduction

For years, Graph Neural Networks (GNNs) have been dominated by the Message Passing paradigm. In this framework, nodes update their states by aggregating features from immediate neighbors. While successful, this approach is fundamentally limited by the 1-dimensional Weisfeiler-Leman (1-WL) graph isomorphism test, preventing it from distinguishing certain non-isomorphic structures or counting motifs like triangles. Furthermore, capturing long-range dependencies in large graphs often leads to "over-squashing" or "over-smoothing."

We introduce CRaWl (CNNs for Random Walks), which treats a graph as a collection of paths rather than just neighborhoods. By applying 1D convolutions to random walks, CRaWl bypasses the locality constraints of message passing while maintaining computational efficiency.

The CRaWl Method

CRaWl operates by sampling a set of relatively long random walks from the graph. For every walk, it constructs a sequence of features that includes not just node and edge attributes, but also critical structural information:

  1. Local Identity: A binary indicator of whether a node has been visited previously within the current sliding window, which helps in detecting cycles.
  2. Connectivity: A representation of the adjacency between nodes within the walk window in the original graph, allowing the model to "reconstruct" local subgraphs.
Overview of the CRaWl layer mechanism, from random walk sampling to node feature updates via 1D CNNs.

These feature sequences are processed using standard 1D CNNs. This is a significant engineering advantage, as 1D CNNs are highly optimized for modern hardware. The output of the CNN is then pooled back into the nodes—averaging the embeddings of all "walklets" a node participated in—and passed through an MLP to update the node's latent state.

Architecture and Theoretical Expressiveness

A core contribution of this work is the proof that CRaWl is incomparable to the $k$-WL hierarchy. This means there are structural features CRaWl can identify that $k$-WL cannot, and vice versa. This theoretical independence suggests that CRaWl is not just an incremental improvement but a fundamental departure from standard GNN trajectories.

The CRaWl layer is designed to be modular, allowing it to be stacked with residual connections or even interleaved with traditional GNN layers to create hybrid architectures.

The CRaWl Layer block diagram and the complete network architecture for graph classification.

Empirical Performance

CRaWl was evaluated across a diverse battery of benchmarks, demonstrating its versatility:

  • Structural Awareness: On the CSL (Cyclic Skip Link) dataset—where standard MPGNNs fail completely (10% accuracy)—CRaWl achieves 100% accuracy.
  • Molecular Modeling: On the ZINC dataset, CRaWl achieved an MAE of 0.085, a 40% improvement over the previous best standard MPGNN (PNA).
  • Long-Range Interactions: On the Peptides datasets from the Long-Range Graph Benchmark (LRGB), CRaWl outperformed both GNNs and Graph Transformers, proving its effectiveness at capturing distant interactions without the quadratic cost of global attention.

Discussion and Limitations

While CRaWl scales linearly with the number of edges ($O(|E|)$), making it more efficient than higher-order GNNs or Transformers on large graphs, it does have a quadratic dependence on the window size ($s^2$). Additionally, as a sampling-based method, it introduces some variance, though empirical tests show this is minimal. The authors suggest that hybrid architectures interleaving CRaWl with standard GNNs may offer the most robust performance.

Conclusion

CRaWl offers a new path for graph learning that escapes the traditional limitations of the Weisfeiler-Leman hierarchy. By leveraging the efficiency of 1D CNNs on random walks, it provides a scalable and expressive alternative to message passing. Future work may explore hybrid models that combine the local aggregation of GNNs with the long-range, structural awareness of CRaWl.

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