Efficient Higher-order Subgraph Attribution via Message Passing

Ping Xiong, Thomas Schnake, Grégoire Montavon, Klaus-Robert Müller, Shinichi NakajimaarXiv 2026

TL;DR

Explaining Graph Neural Networks (GNNs) via higher-order feature interactions (like walks) has historically been bottlenecked by exponential computational complexity. This paper introduces sGNN-LRP, a novel message-passing algorithm that leverages sum-product decomposition to reduce subgraph attribution complexity from exponential to linear time relative to network depth. This enables efficient, scalable, and highly accurate higher-order explanations for deep GNNs operating on large graphs.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) are powerful but notoriously act as "black boxes." To trust their predictions in safety-critical domains like drug discovery or social network analysis, we need to understand why they make certain decisions.

While simple explanation methods highlight individual nodes or edges, complex properties (like the toxicity of a molecule) usually emerge from the joint interaction of multiple features within a subgraph. A state-of-the-art method called GNN-LRP (Layer-wise Relevance Propagation) can capture these higher-order interactions by tracking "walks" (sequences of nodes) across the network's layers.

However, calculating the total relevance of a specific subgraph requires summing over all possible walks contained within it. As the network gets deeper, the number of walks explodes exponentially ($O(|S|^L)$ where $L$ is the network depth). This computational wall has limited higher-order explanations to tiny subgraphs and very shallow networks.

Figure 2: Computation of the subgraph relevance (left). A naive implementation of GNN-LRP computes the sum of the relevances over exponentially many walks (middle), while our proposed subgraph GNN-LRP aggregates the contributions layer-wise (right), allowing linear time computation with respect to the network depth L.

Methods

The authors overcome the exponential complexity barrier with two key innovations:

  1. LRP as Message Passing: The core breakthrough is realizing that tracking walk relevances through GNN layers shares the exact same decomposable mathematical structure as computing marginal probabilities in a Markov chain. Instead of naively enumerating every single walk, the authors apply the sum-product algorithm (commonly known as belief propagation). This allows them to aggregate walk relevances layer-wise in a single backward pass, dropping the complexity from exponential to linear ($O(|S|^2 \cdot N^2 L)$).
  2. The Forward-Hook Trick: To make the algorithm practical and easy to implement, the authors adapt a forward-hook technique. By modifying the forward pass with a constant mask matrix and utilizing standard automatic differentiation (Autograd), they can compute the subgraph relevance efficiently without manually coding complex backward message-passing routines.
  3. Generalized Subgraph Attribution: The original definition of subgraph relevance strictly looks at walks that never leave the subgraph. The authors generalize this by introducing a discounting parameter $\alpha \in [0, 1]$. Walks that step outside the subgraph are penalized rather than completely ignored, allowing the explanation to capture how a subgraph interacts with its surrounding context.

Datasets

The authors evaluated their approach across five diverse datasets:

  • BA-2motif: A synthetic dataset with ground-truth motif structures, ideal for verifying explanation accuracy.
  • MUTAG & Mutagenicity: Molecular datasets where the task is to predict whether a molecule is mutagenic (a property heavily reliant on higher-order functional groups like $NO_2$).
  • REDDIT-BINARY: A social network dataset containing large graphs (averaging over 400 nodes per graph).
  • Graph-SST2: A natural language processing sentiment dataset where sentences are mapped into parse tree graphs.

Key Insights and Ideas

  • The Markov Chain Connection: The ultimate "aha moment" of the paper is mapping relevance propagation to a virtual stochastic system. Viewing relevance as a particle moving through a Markov chain unlocks decades of established message-passing algorithms for explainable AI.
  • Isolating Subgraphs is Suboptimal: Subgraphs do not exist in a vacuum. The authors discover that setting $\alpha > 0$ (allowing walks to briefly step outside the subgraph) yields significantly better explanations in real-world datasets. This proves that a subgraph's boundary interactions with the rest of the graph are crucial to the GNN's prediction strategy.
Figure 1: Visualisation for the joint contribution of atom sub- sets when predicting the mutagenicity of a molecule. The gray sub-molecule G is a strong indicator for the mutagenic- ity of the full molecule. The orange and green bars show the lower- and higher-order relevance scores for the subset composed of all atoms which have the denoted atomic num- ber, respectively. The heat maps in the sub-molecules, close to the orange and green bars, show the relevance scores of lower- and higher-order attribution methods, respectively.

Key Results

  • Massive Speedups: On a 7-layer Graph Isomorphism Network (GIN) using the BA-2motif dataset, the Naive GNN-LRP method takes a sluggish 142,000 milliseconds. The proposed sGNN-LRP finishes the exact same calculation in just 9.81 milliseconds.
  • Scalability to Large Graphs: For the REDDIT-BINARY dataset, the naive method completely fails due to Out-of-Memory (OOM) errors. sGNN-LRP handles it easily, running in under 200 milliseconds.
  • Superior Explanation Quality: When evaluating node-ordering performance via Area Under the Activation Curve (AUAC) and Area Under the Pruning Curve (AUPC), the generalized sGNN-LRP method consistently outperformed strong baselines like GNNExplainer and Grad-CAM in 6 out of 8 evaluation scenarios.

Limitations and Future Work

While the generalized subgraph attribution method shows clear performance benefits, it introduces the discounting parameter $\alpha$, which currently requires manual tuning or grid searching depending on the dataset and task. The authors note that developing automated, data-driven tuning procedures for $\alpha$ is a primary direction for future work. Additionally, they plan to explore the application of these efficient algorithms to adjacent domains like NLP and neuroimaging.

Summary updated

BibTeX
@misc{xiong2026efficient,
  author = {Ping Xiong and Thomas Schnake and Grégoire Montavon and Klaus-Robert Müller and Shinichi Nakajima},
  title = {{Efficient Higher-order Subgraph Attribution via Message Passing}},
  year = {2026},
  eprint = {2605.22385},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.22385},
}
Figure