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

Zhengdao Chen, Soledad Villar, Lei Chen, Joan Bruna

Overview

In the study of Graph Neural Networks (GNNs), researchers typically evaluate "expressive power" through two distinct lenses:

  1. Graph Isomorphism: Can the GNN distinguish between two different graph structures? This is often benchmarked against the Weisfeiler-Lehman (WL) test.
  2. Universal Approximation: Can the GNN approximate any continuous, permutation-invariant function defined on a graph?

Historically, these two perspectives have been treated as separate objectives. Furthermore, standard "message-passing" GNNs (like GCN or GIN) are known to be limited—they cannot distinguish certain complex structures, such as regular graphs with identical node degrees. While "higher-order" GNNs can solve this, they often require tensors of order $k$, leading to a prohibitive $O(n^k)$ computational cost. This paper unifies these theoretical perspectives and introduces a more efficient architecture to bridge the gap.

Theoretical Framework: The Equivalence Theorem

The authors provide a foundational theoretical contribution by using the language of sigma-algebras to prove that isomorphism testing and function approximation are mathematically equivalent. Essentially, if a GNN is "fine-grained" enough to distinguish all non-isomorphic graphs, it inherently possesses the power to approximate any invariant function on those graphs. This "Equivalence Theorem" demonstrates that the search for a "Universal GNN" is identical to the search for a GNN that perfectly solves the Graph Isomorphism problem.

The Ring-GNN Architecture

To overcome the limitations of standard models, the authors propose Ring-GNN.

A key finding of the paper is the fundamental failure of "order-2 G-invariant networks" (a common theoretical baseline) to distinguish non-isomorphic regular graphs of the same degree. To address this, Ring-GNN incorporates matrix multiplication—the "ring" operations of addition and multiplication—rather than relying solely on linear layers and simple neighborhood aggregations.

Examples of Circular Skip Link (CSL) graphs

By allowing the network to multiply feature matrices together, Ring-GNN can "see" paths and cycles that standard message-passing layers miss. This matrix multiplication allows the model to capture higher-order structural information (similar to the 3-WL test) with a computational complexity of $O(n^3)$. This is a significant improvement over the $O(n^k)$ complexity required by general high-order invariant networks, providing a clear path to more powerful GNNs without the need for massive, high-dimensional tensors.

Experiments and Results

The authors evaluated Ring-GNN on both synthetic and real-world benchmarks, including social networks (IMDB-BINARY, IMDB-MULTI, COLLAB) and bioinformatics datasets (MUTAG, PTC, PROTEINS). A critical synthetic benchmark used was the Circular Skip Links (CSL) dataset, which consists of regular graphs specifically designed to be indistinguishable by the 1-WL test and standard GNNs.

Performance comparison of GNN architectures on CSL and IMDB datasets

On the difficult CSL dataset, standard GNNs (like GIN) and order-2 invariant networks failed completely, achieving only 10% accuracy (equivalent to a random guess). In contrast, Ring-GNN achieved 80% accuracy, proving its capability to identify structures that other models cannot. Across real-world benchmarks, Ring-GNN consistently outperformed standard order-2 invariant networks. It performed competitively with GIN, although GIN occasionally held a slight edge on specific social network tasks where node degrees are highly informative.

Limitations and Future Directions

While Ring-GNN presents a significant step forward, the authors note several areas for future exploration:

  • Stability vs. Invariance: The current theory treats isomorphism as a binary condition (graphs are either identical or they are not). In practical applications, "stable" representations are needed, where nearly-identical graphs yield nearly-identical embeddings. Exploring metrics like the Gromov-Hausdorff distance could address this.
  • Computational Scaling: Although $O(n^3)$ is more efficient than $O(n^k)$, it remains more computationally expensive than the $O(|E|)$ complexity of simple message-passing GNNs. Scaling Ring-GNN to massive graphs with millions of nodes is an ongoing challenge.
  • Taxonomy Completion: The theoretical landscape of GNNs is still evolving. Specifically, the exact relationship between spectral-based GNNs and neighborhood-aggregation GNNs requires further theoretical clarification to complete the "GNN zoo."

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