On the Ability of Graph Neural Networks to Model Interactions Between Vertices

Noam Razin, Tom Verbin, Nadav Cohen

TL;DR

This paper provides the first formal theoretical characterization of how Graph Neural Networks (GNNs) model interactions between different groups of vertices. The authors show that a GNN's ability to model these interactions is mathematically bounded by a graph-theoretical property they call the walk index, leading to a highly effective and efficient new edge-pruning algorithm called Walk Index Sparsification (WIS).

What Problem Does This Paper Address?

While GNNs are designed to model complex relationships in data, we haven't had a rigorous way to measure the "strength" of the interactions they actually capture. Most existing theories focus on expressivity—asking if a GNN can distinguish between two different graphs (the Weisfeiler-Leman test paradigm)—or universality, which often assumes unrealistic conditions like infinite network depth or width.

The authors tackle a more practical question: For a fixed-size GNN, how much interaction can it actually model between a specific subset of vertices and the rest of the graph? Understanding this is crucial for knowing when a GNN will succeed and for designing more efficient architectures that don't waste computation on unimportant connections.

Methods

The researchers bridge the gap between graph theory and deep learning using two main tools:

  1. Separation Rank: Borrowed from quantum mechanics (where it measures entanglement) and tensor analysis, this metric quantifies how much a function "mixes" two sets of input variables. A high separation rank means the sets interact strongly; a rank of 1 means they are completely independent.
  2. Tensor Networks: The authors represent GNNs with "product aggregation" as tree-structured tensor networks. This allows them to apply sophisticated mathematical machinery to prove bounds on interaction strength.

Central to their findings is the Walk Index. For any partition of a graph into two sets, the walk index is the number of paths (walks) of a certain length that originate from the boundary between those sets.

Illustration of the walk index: The ability of a depth-L GNN to model interactions is determined by the number of length L-1 walks originating from the boundary $C_I$.

Datasets

The authors validated their theory using both synthetic and real-world benchmarks:

  • Synthetic Interaction Tasks: Custom datasets using Fashion-MNIST patches distributed across graph cliques to specifically test how well GNNs capture interactions across boundaries.
  • Standard Benchmarks: Cora, DBLP, and OGBN-ArXiv (citation networks); Chameleon and Squirrel (Wikipedia links); and Amazon Computers (co-purchase graphs). These range from thousands to over a million edges.

Key Insights and Ideas

  • The Walk Index Rule: The "aha moment" is that interaction strength isn't just about how many edges cross a boundary, but how many paths cross it. Specifically, for a GNN with $L$ layers, the interaction is governed by walks of length $L-1$.
  • Formalizing Intuition: We often intuitively feel that "more interconnected" regions interact more. This paper proves it: the log of the separation rank is proportional to the walk index.
  • Structural Sensitivity: As shown in Figure 2, even if two partitions have the same number of boundary vertices, their walk indices can differ wildly, drastically changing the GNN's ability to model interactions across them.
Comparison of low vs. high walk index partitions. Partitions with higher walk indices allow the GNN to model significantly stronger interactions.

Key Results

  • Theoretical Tightness: The authors proved both upper and lower bounds, showing that the walk index is indeed the primary factor controlling interaction.
  • WIS Performance: The Walk Index Sparsification (WIS) algorithm, which prunes edges that contribute least to the walk index, significantly outperformed standard methods like random pruning or spectral sparsification.
  • Accuracy Preservation: In experiments on the Cora dataset, WIS maintained near-original accuracy even after removing 50-70% of the edges, whereas competing methods saw sharp performance drops.
  • Efficiency: The "1-WIS" variant (an approximation for 2-layer GNNs) is extremely fast, running in linear time relative to the number of edges and vertices.
Comparison of GNN accuracies across different sparsification methods. WIS (blue/purple lines) consistently maintains higher accuracy as more edges are removed.

Limitations and Future Work

  • Aggregation Types: The formal proofs focus on GNNs with product aggregation. While the authors show empirically that the results hold for common GNNs like GCN (mean aggregation) and GIN (sum aggregation) with ReLU, the theoretical extension to these non-linearities is a target for future work.
  • Computational Scaling: While 1-WIS is efficient, the "exact" WIS for deeper networks can be computationally expensive (cubic in the number of vertices) for very large graphs.
  • Directed Graphs: While the paper focuses on undirected graphs for simplicity, the authors note that the theory extends to directed graphs and multiple edge types (detailed in the appendices).

Summary updated

BibTeX
@inproceedings{razin2023ability,
  author = {Noam Razin and Tom Verbin and Nadav Cohen},
  title = {{On the Ability of Graph Neural Networks to Model Interactions Between Vertices}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=ayZpFoAu5c},
}
Figure