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

Exact Computation of Any-Order Shapley Interactions for Graph Neural Networks

Maximilian Muschalik, Fabian Fumagalli, Paolo Frazzetto, Janine Strotherm, Luca Hermes, Alessandro Sperduti, Eyke Hüllermeier, Barbara Hammer

Introduction

Explaining Graph Neural Networks (GNNs) is a significant challenge in trustworthy AI. While standard methods like Shapley Values (SVs) assign importance scores to individual nodes, they often fail to capture the complex, higher-order interactions that define graph-structured data. For instance, in chemistry, the properties of a molecule like benzene emerge from the collective interaction of its ring structure, not just the sum of its individual atoms.

Shapley Interactions (SIs) and Möbius Interactions (MIs) offer a solution by quantifying these joint contributions. However, their computation is traditionally NP-hard, requiring $O(2^n)$ model evaluations. For a graph with 30 nodes, this entails over a billion calls, rendering exact computation impossible for real-world applications. This paper introduces GraphSHAP-IQ, a novel framework that leverages the inherent message-passing structure of GNNs to compute these interactions exactly and efficiently.

Methodology: Exploiting GNN Locality

The fundamental insight of GraphSHAP-IQ is that GNNs do not create global interactions arbitrarily. Instead, interactions are mathematically restricted by the network's architecture.

The receptive field of a node in a GNN and the linear readout structure.

The authors prove that if a GNN employs a linear global pooling layer (e.g., sum or mean) followed by a linear output layer, the interactions between nodes are strictly bounded by their receptive fields. In an $l$-layer GNN, a node only "sees" its $l$-hop neighborhood. Consequently, the Möbius Interaction between any group of nodes not fully contained within the same $l$-hop neighborhood is exactly zero.

By focusing only on these localized subsets, GraphSHAP-IQ reduces the complexity from exponential in the total number of nodes ($n$) to exponential only in the size of the largest neighborhood. This allows the algorithm to scale linearly with the total number of nodes in the graph. For cases where neighborhoods are still too large, the authors provide a deterministic approximation and "interaction-informed" baselines that prune guaranteed-zero interactions from the search space.

Visualizing Higher-Order Interactions

To make these complex interactions interpretable, the authors introduce the SI-Graph, which overlays higher-order interactions as hyperedges on the original graph structure.

Comparison of Shapley Values (SVs), 2nd-order interactions (2-SIIs), and Möbius Interactions (MIs) on a mutagenic molecule.

As shown in the comparison above, standard Shapley Values (SVs) primarily highlight individual atoms. In contrast, Möbius Interactions (MIs) successfully isolate functional groups, such as the $NO_2$ groups responsible for mutagenicity. This alignment with chemical ground truth demonstrates that GraphSHAP-IQ captures the underlying logic the GNN has learned about molecular motifs.

Key Results and Scalability

The efficiency gains of GraphSHAP-IQ are substantial:

  • Computational Speedup: For a 30-node molecule, the number of model calls required for exact computation drops from approximately $10^9$ to fewer than 8,000.
  • Large-Scale Feasibility: The method enables exact SI computation for graphs with over 100 nodes—a task that would normally require $10^{30}$ evaluations—in under $10^5$ calls for 1- and 2-layer GNNs.
  • Approximation Accuracy: When exact computation is bypassed for speed, GraphSHAP-IQ's approximation modes achieve significantly lower Mean Squared Error (MSE) compared to model-agnostic methods like KernelSHAP-IQ, given the same budget.

Discussion and Limitations

The primary constraint of GraphSHAP-IQ is its reliance on the linearity of the readout layer. While sum/mean pooling followed by a dense layer is a standard architecture, non-linear readouts (like deep MLPs) entangle node embeddings globally, destroying the localized sparsity that GraphSHAP-IQ exploits. Future research may explore architectural modifications that preserve interaction sparsity while allowing for more complex readouts. Additionally, the choice of masking strategy (e.g., using a baseline value vs. edge removal) remains an area for further investigation into how different perturbations reveal different facets of model behavior.

Summary updated

BibTeX
@inproceedings{muschalik2025exact,
  author = {Maximilian Muschalik and Fabian Fumagalli and Paolo Frazzetto and Janine Strotherm and Luca Hermes and Alessandro Sperduti and Eyke Hüllermeier and Barbara Hammer},
  title = {{Exact Computation of Any-Order Shapley Interactions for Graph Neural Networks}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=9tKC0YM8sX},
}
Figure