NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Extending the Design Space of Graph Neural Networks by Rethinking Folklore Weisfeiler-Lehman

Jiarui Feng, Lecheng Kong, Hao Liu, Dacheng Tao, Fuhai Li, Muhan Zhang, Yixin Chen

Abstract

Message passing neural networks (MPNNs) have emerged as the most popular framework of graph neural networks (GNNs) in recent years. However, their expressive power is limited by the 1-dimensional Weisfeiler-Lehman (1-WL) test. Some works are inspired by $k$-WL/FWL (Folklore WL) and design the corresponding neural versions. Despite the high expressive power, there are serious limitations in this line of research. In particular, (1) $k$-WL/FWL requires at least $O(n^k)$ space complexity, which is impractical for large graphs even when $k=3$; (2) The design space of $k$-WL/FWL is rigid, with the only adjustable hyper-parameter being $k$. To tackle the first limitation, we propose an extension, $(k,t)$-FWL. We theoretically prove that even if we fix the space complexity to $O(n^k)$ (for any $k\geq 2$) in $(k,t)$-FWL, we can construct an expressiveness hierarchy up to solving the graph isomorphism problem. To tackle the second problem, we propose $k$-FWL+, which considers any equivariant set as neighbors instead of all nodes, thereby greatly expanding the design space of $k$-WL. Combining these two modifications results in a flexible and powerful framework $(k,t)$-FWL+. We demonstrate $(k,t)$-FWL+ can implement most existing models with matching expressiveness. We then introduce an instance of $(k,t)$-FWL+ called Neighborhood$^2$-FWL (N$^2$-FWL), which is practically and theoretically sound. We prove that N$^2$-FWL is no less powerful than 3-WL, and can encode many substructures while only requiring $O(n^2)$ space. Finally, we design its neural version named N$^2$-GNN and evaluate its performance on various tasks. N$^2$-GNN achieves record-breaking results on ZINC-Subset (0.059), outperforming previous SOTA results by 10.6%. Moreover, N$^2$-GNN achieves new SOTA results on the BREC dataset (71.8%) among all existing high-expressive GNN methods.

1. Introduction

Graph Neural Networks (GNNs) have become a cornerstone of machine learning on graphs, yet they face a fundamental trade-off between expressive power and computational efficiency. Most current Message Passing Neural Networks (MPNNs) are bounded by the 1-dimensional Weisfeiler-Lehman (1-WL) test, failing to distinguish many non-isomorphic graph structures. While higher-order $k$-WL and Folklore WL (FWL) variants offer a path to greater expressivity, they are often computationally prohibitive due to $O(n^k)$ space requirements and lack flexibility in their architectural design.

This paper introduces $(k, t)$-FWL+, a novel framework that breaks these constraints. By rethinking the update mechanisms and neighborhood definitions of the FWL test, the authors provide a scalable and flexible approach to building high-order GNNs.

2. Methodology: $(k, t)$-FWL+ and $N^2$-GNN

The proposed framework expands the design space of FWL through two primary innovations:

  1. $(k, t)$-FWL (The "What"): Instead of the standard FWL approach of replacing a single node in a $k$-tuple during updates, this method utilizes "neighborhood tuples" of size $t$. This allows for a controllable hierarchy of expressiveness. Crucially, the authors prove that increasing $t$ can enhance power up to solving the graph isomorphism problem while keeping space complexity fixed at $O(n^k)$.
  2. $k$-FWL+ (The "Where"): Standard FWL relies on global aggregation across all nodes. $k$-FWL+ generalizes this by allowing the use of any equivariant set as a neighborhood. This enables the model to focus on local structures, such as nodes within a specific hop distance, improving both efficiency and generalization.

The authors' primary implementation, $N^2$-GNN, is a neural version of $(2, 2)$-FWL+. It specifically aggregates information from overlapping local neighborhoods of node pairs.

The construction of neighborhood tuples and recovery of high-order structures in N²-GNN.

3. Experimental Evaluation

The effectiveness of $N^2$-GNN was tested across a variety of benchmarks, ranging from synthetic expressiveness tests to real-world molecular property prediction.

  • Synthetic Benchmarks: The model achieved perfect scores on the EXP, CSL, and SR25 datasets, which are specifically designed to challenge the expressivity of standard GNNs.
  • BREC Isomorphism Dataset: $N^2$-GNN set a new state-of-the-art with 71.8% accuracy across 400 graph pairs, outperforming all other high-expressive GNN methods.
  • Molecular Properties: On the ZINC-Subset, $N^2$-GNN achieved a Mean Absolute Error (MAE) of 0.059, a significant 10.6% improvement over previous SOTA results.
Performance of N²-GNN on the BREC dataset, showing its ability to distinguish various graph types.

4. Discussion and Conclusion

The results demonstrate that the way information is aggregated into tuples is as vital as the tuple size itself. By staying within $O(n^2)$ space and utilizing local equivariant sets, $N^2$-GNN "punches above its weight class," matching or exceeding the power of 3-WL models that require $O(n^3)$ space.

While the framework is highly flexible, it introduces a new challenge: identifying the optimal equivariant set for a given task. Future research will focus on automating this search and further optimizing time complexity for very large neighborhood tuples.

Summary updated

BibTeX
@inproceedings{feng2023extending,
  author = {Jiarui Feng and Lecheng Kong and Hao Liu and Dacheng Tao and Fuhai Li and Muhan Zhang and Yixin Chen},
  title = {{Extending the Design Space of Graph Neural Networks by Rethinking Folklore Weisfeiler-Lehman}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=UlJcZoawgU},
}
Figure