Weisfeiler and Lehman Go Cellular: CW Networks

Cristian Bodnar, Fabrizio Frasca, Nina Otter, Yu Guang Wang, Pietro Liò, Guido Montúfar, Michael M. Bronstein

Abstract

Standard Graph Neural Networks (GNNs) are fundamentally limited by the 1-Weisfeiler-Lehman (1-WL) isomorphism test and struggle with long-range dependencies and higher-order structural representations. We present CW Networks (CWNs), a novel class of GNNs that operate on regular cell complexes. By lifting graphs into hierarchical structures containing nodes (0-cells), edges (1-cells), and rings (2-cells), CWNs enable more expressive message passing. Our theoretical analysis shows that CWNs are strictly more powerful than 1-WL. Empirically, CWNs achieve state-of-the-art performance on molecular benchmarks like ZINC and ogbg-molhiv by explicitly capturing chemical ring structures.

Introduction

Graphs are ubiquitous, but the standard GNN paradigm of node-and-edge message passing has reached a plateau. Three major issues persist: limited expressivity (the 1-WL barrier), over-smoothing/over-squashing in long-range communication, and the inability to naturally represent meso-scale structures like cliques or cycles. While Simplicial Neural Networks attempted to address this using triangles, they are too rigid for domains like organic chemistry, where rings of various sizes (e.g., pentagons, hexagons) are the primary functional units.

The CW Network Framework

CW Networks (CWNs) generalize GNNs by operating on regular cell complexes (CW complexes). This approach involves a two-step process: lifting the input graph and performing hierarchical message passing.

Lifting Graphs to Cells

The "lifting" transformation converts a graph into a higher-dimensional topological space. In molecular modeling, atoms are treated as 0-cells, bonds as 1-cells, and chemical rings as 2-cells. Unlike simplicial complexes, 2-cells in CW complexes can have an arbitrary number of boundary edges, allowing for a natural representation of any cycle.

A regular cell complex illustrating the hierarchical relationship between 0-cells, 1-cells, and 2-cells.

Hierarchical Message Passing

Once the graph is lifted, CWNs propagate information across dimensions. Boundary messages flow from lower-dimensional cells to higher ones (e.g., atoms to rings), while upper adjacency messages allow cells of the same dimension to communicate via shared higher-dimensional neighbors. This structure creates "shortcuts"; a 2-cell (ring) acts as a hub, allowing distant atoms on the ring to communicate in fewer steps, mitigating over-squashing.

Lifting a graph with multiple cycles into a 2-dimensional cell complex.

Theoretical Expressivity

The authors introduce the Cellular Weisfeiler-Lehman (CWL) test. They prove that CWNs are strictly more powerful than the 1-WL test. Furthermore, for specific lifting transformations (like cycle lifting), CWNs are at least as powerful as the 3-WL test, enabling them to distinguish graph pairs that standard GNNs cannot.

Experimental Results

The Cell Isomorphism Network (CIN), a specific implementation of CWNs, was tested across several domains:

  • Molecular Benchmarks: CIN achieved state-of-the-art results on ZINC (MAE 0.079) and ogbg-molhiv (ROC-AUC 80.94).
  • Synthetic Tasks: On the Circular Skip Link (CSL) dataset, where standard GNNs fail (10% accuracy), CIN achieved 100% accuracy. It also successfully distinguished 9 families of Strongly Regular (SR) graphs where 3-WL fails.
  • Long-Range Communication: In the RingTransfer task, CIN maintained perfect accuracy regardless of ring size, whereas standard GNN performance decayed rapidly.

Conclusion

CW Networks provide a principled way to incorporate higher-order structural information into deep learning on graphs. By leveraging the topological properties of cell complexes, they overcome the fundamental limitations of standard GNNs. Future work includes automating the lifting process and exploring 3D cells for applications like protein folding.

Summary updated

BibTeX
@inproceedings{bodnar2021weisfeiler,
  author = {Cristian Bodnar and Fabrizio Frasca and Nina Otter and Yu Guang Wang and Pietro Liò and Guido Montúfar and Michael M. Bronstein},
  title = {{Weisfeiler and Lehman Go Cellular: CW Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=uVPZCMVtsSG},
}
Figure