On the equivalence between graph isomorphism testing and function approximation with GNNs

Zhengdao Chen, Soledad Villar, Lei Chen, Joan Bruna

Introduction

As Graph Neural Networks (GNNs) have proliferated, establishing a unified metric for their "expressive power" has become a central challenge. Historically, researchers evaluated GNNs through two distinct lenses: Graph Isomorphism Testing (the ability to distinguish non-isomorphic graphs, often compared to the Weisfeiler-Lehman or WL test) and Function Approximation (the ability to learn any continuous permutation-invariant function). This paper establishes a fundamental theoretical bridge, proving these two capabilities are mathematically equivalent. Furthermore, the authors introduce Ring-GNN, a novel architecture that achieves high expressive power without the computational burden of high-order tensors.

Theoretical Framework: The Equivalence Theorem

The core contribution of this work is the Equivalence Theorem. Using the language of sigma-algebras, the authors demonstrate that a GNN's capacity to approximate any continuous invariant function is tied directly to its ability to distinguish between non-isomorphic graphs. This allows researchers to use graph isomorphism as a formal proxy for general learning capability.

To categorize GNNs, the authors propose a taxonomy based on the sigma-algebras they generate. If the sigma-algebra of GNN $A$ is a subset of GNN $B$, then $B$ is strictly more powerful. This hierarchy aligns with the classical WL-test hierarchy, providing a rigorous way to rank architectures.

Hierarchy of GNN expressive power relative to the Weisfeiler-Lehman (WL) test and other architectures.

Ring-GNN: Enhancing Expressive Power

The authors identify a critical limitation in 2nd-order Invariant Graph Networks (2-IGN): they fail to distinguish between non-isomorphic regular graphs of the same degree. To overcome this, they propose Ring-GNN.

Unlike standard GNNs that rely on simple neighborhood aggregation (sum or mean), Ring-GNN incorporates matrix multiplication of learned representations. This allows the model to explore the "polynomial ring" of the adjacency matrix, effectively capturing higher-order structural features like complex paths and cycles. This approach simulates the logic of the 3-WL test while maintaining data in efficient 2D matrix forms, avoiding the memory explosion associated with 3rd or 4th-order tensors.

Experimental Results

The theoretical power of Ring-GNN was validated across several benchmarks, most notably the Circular Skip Link (CSL) dataset. CSL graphs are specifically designed to be indistinguishable by standard message-passing GNNs (like GIN) and 2-IGNs.

Performance comparison on CSL and IMDB datasets, highlighting Ring-GNN's ability to solve the CSL task.

As shown in the results, while GIN and 2-IGN performed no better than random guessing (10% accuracy) on CSL, Ring-GNN achieved 80% accuracy. On real-world social network and bioinformatics datasets (IMDB, MUTAG, PTC), Ring-GNN consistently outperformed 2-IGN and remained highly competitive with state-of-the-art models like GIN, proving that its theoretical advantages translate into practical performance.

Discussion and Limitations

While Ring-GNN offers a significant boost in expressive power, it introduces higher computational complexity. The reliance on matrix multiplication results in a scaling of approximately $O(n^{2.38})$, which is more expensive than the $O(\text{Edges})$ scaling of simpler message-passing models. This may limit its application on massive graphs with millions of nodes.

Future work remains to fully map the GNN taxonomy, particularly for hybrid architectures. Additionally, the authors suggest shifting focus from strict isomorphism to "stability"—evaluating how GNN outputs respond to minor graph perturbations—to better understand the robustness of these models in real-world scenarios.

Summary updated

BibTeX
@inproceedings{chen2019equivalence,
  author = {Zhengdao Chen and Soledad Villar and Lei Chen and Joan Bruna},
  title = {{On the equivalence between graph isomorphism testing and function approximation with GNNs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=HAw4Y79J_Pj},
}
Figure