Rethinking Explaining Graph Neural Networks via Non-parametric Subgraph Matching

Fang Wu, Siyuan Li, Xurui Jin, Yinghui Jiang, Dragomir Radev, Zhangming Niu, Stan Z. Li

Graph Neural Networks (GNNs) have driven significant advancements in fields ranging from drug discovery to social network analysis. However, their "black-box" nature raises a critical question: Which fraction of the input graph determines the model's prediction? To address this, researchers have introduced MatchExplainer, a novel non-parametric framework that explains GNN predictions by matching subgraphs across instances of the same class. Alongside it, they propose MatchDrop, a data augmentation technique designed to preserve a graph's most critical features during training.

The Problem: Parametric Explainers and False Positives

Most existing GNN explainers are parametric—they train a secondary neural network to generate masks or importance scores for the target GNN. This approach is computationally expensive and frequently struggles with "local fidelity," meaning an explanation might work for a single graph but fail to capture broader patterns learned by the model.

Additionally, standard graph data augmentation techniques, such as random node dropping, are prone to false positive sampling. In this scenario, the most critical parts of the graph are accidentally deleted, which confuses the model and degrades training performance.

Methodology: From Learning to Matching

The authors propose a paradigm shift from learning explanations to matching them, grounded in the intuition that graphs with the same label share common structural motifs (e.g., a specific functional group in a toxic molecule).

  • MatchExplainer: Instead of training a new explainer model, MatchExplainer compares a target graph to a "reference set" of other graphs predicted to belong to the same class by the GNN. It identifies the most crucial joint substructure by minimizing the distance between nodes in the GNN’s own high-dimensional feature space. Grounded in information theory, this approach uses the concept of "Minimal Sufficient Explanations" to show that shared information between correctly classified graphs approximates the ground-truth explanation.
  • MatchDrop: Building on MatchExplainer, MatchDrop is a targeted augmentation strategy. It identifies and protects the "core" explanatory subgraph, restricting random augmentations (like node dropping) exclusively to the less informative regions of the graph.

Experimental Setup & Datasets

The framework was rigorously evaluated across four diverse benchmarks:

  • MUTAG: A real-world dataset of mutagenic molecules.
  • BA-3Motif: A synthetic dataset where specific motifs (house, cycle, or grid) are attached to Barabasi-Albert graphs.
  • MNIST-Superpixels: Handwritten digits converted into graphs of superpixels.
  • VG-5: Scene graphs derived from the Visual Genome dataset, representing objects and their relationships.

Key Results & Insights

  • Superior Accuracy: MatchExplainer significantly outperformed state-of-the-art parametric baselines (such as GNNExplainer and PGExplainer). Notably, on the MNIST-Superpixels dataset, it achieved an ACC-AUC of 93.8%, compared to roughly 63% for the best parametric baseline.
  • The Power of Counterparts: Comparing two graphs of the same class effectively cancels out unique noise, isolating the "sufficient explanation" necessary for classification. This proves that the knowledge required for explanation already resides in the GNN's feature space; it simply requires a robust extraction method.
  • Efficiency: As a training-free method, MatchExplainer is often faster in total time (training plus inference) than parametric methods, particularly on datasets like MUTAG and VG-5.
  • Enhanced Augmentation: MatchDrop demonstrates that random augmentation isn't always optimal. By safeguarding informative nodes, standard GNN backbones (like GCN and GIN) generalize better and avoid learning from structurally compromised graphs.

Limitations and Future Directions

The efficiency of MatchExplainer depends heavily on the size of the reference set. While a larger set yields better explanations, it inherently increases search time. Furthermore, the current matching process relies on a greedy algorithm to navigate the NP-hard nature of graph matching, which may result in local optima.

Future research could focus on optimizing reference set selection or developing advanced matching techniques that retain non-parametric efficiency while approaching global optima.

Summary updated

BibTeX
@inproceedings{wu2023rethinking,
  author = {Fang Wu and Siyuan Li and Xurui Jin and Yinghui Jiang and Dragomir Radev and Zhangming Niu and Stan Z. Li},
  title = {{Rethinking Explaining Graph Neural Networks via Non-parametric Subgraph Matching}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=MocsSAUKlk},
}
Figure