Abstract
Graph Neural Networks (GNNs) have achieved state-of-the-art performance across various domains but remain difficult to interpret globally. We present Graph Distribution Matching (GDM), a framework that generates high-fidelity global explanations by capturing the patterns that dominate a model's entire training trajectory. By matching the distribution of synthetic interpretive graphs to real training data in the GNN’s feature space, GDM produces human-intelligible summaries. Our evaluation shows that GDM significantly outperforms existing methods in model fidelity—the ability to recreate a model's logic from explanations alone—while maintaining high predictive accuracy and computational efficiency.
Introduction
The "black-box" nature of Graph Neural Networks (GNNs) poses a significant barrier to their deployment in high-stakes fields like drug discovery or social network analysis. While local interpretability methods—which explain individual predictions—have matured, they often produce noisy, instance-specific results that fail to capture the model's overarching logic. Global interpretation seeks to address this by identifying a compact set of graphs that represent entire classes.
However, existing global interpretation methods often suffer from low "Model Fidelity." They may produce graphs that the model recognizes, but these graphs lack sufficient information to reconstruct the model's decision-making process. We introduce Graph Distribution Matching (GDM) to bridge this gap by aligning explanations with the model's learning evolution.
The GDM Framework
The core innovation of GDM is its focus on the training trajectory rather than just the final model state. By observing how a GNN learns over time, GDM identifies the most robust and informative patterns.
Distribution Matching via MMD
GDM synthesizes a small set of "interpretive graphs" for each class. It employs Maximum Mean Discrepancy (MMD) to ensure that the embeddings of these synthetic graphs match the distribution of embeddings from the actual training data within the GNN’s latent space. This alignment ensures that the interpretive graphs are representative of the features the model actually utilizes.
Trajectory Alignment
Rather than explaining a static, fully-trained model, GDM performs distribution matching at multiple "snapshots" during the training process. This approach captures the "curriculum" of features the model prioritizes as it converges, leading to explanations that are more deeply rooted in the model's learned weights.
Optimization and Constraints
To ensure the generated graphs are both realistic and human-readable, GDM incorporates several constraints:
- Discrete Structure Optimization: Using a Gumbel-Softmax reparameterization to optimize the adjacency matrices of synthetic graphs.
- Sparsity and Feature Matching: Penalties are applied to prevent the creation of overly dense graphs and to ensure that rare but critical node features are preserved in the global summary.
Experimental Evaluation
We evaluated GDM against state-of-the-art baselines, including XGNN and GNNInterpreter, across several synthetic (Shape, BA-Motif, BA-LRP) and real-world (MUTAG, Graph-Twitter, Graph-SST5) datasets.
The Surrogate Test for Model Fidelity
A key metric in our study is Model Fidelity. We define this through a "surrogate test": if an explanation is truly global and high-fidelity, a new "surrogate" model trained exclusively on the explanatory graphs should be able to mimic the original model's performance on unseen test data.
Key Results
- Superior Fidelity: GDM consistently achieved higher fidelity scores than baselines. For instance, on the MUTAG dataset, GDM reached a fidelity of 94.73%, compared to 85.26% for GNNInterpreter and 89.47% for XGNN.
- Predictive Accuracy: The interpretive graphs were highly effective; the target model correctly classified them over 90% of the time across most benchmarks.
- Efficiency: By avoiding the complex reward-shaping required by reinforcement learning methods like XGNN, GDM is approximately 4x faster to train and acts as a "plug-and-play" tool that runs alongside normal training.
- Qualitative Insights: GDM successfully recovered known motifs, such as the "house" structure in BA-Motif and mutagenic $NO_2$ groups in the MUTAG dataset, matching established chemical principles.
Conclusion and Future Work
GDM represents a significant step forward in global GNN interpretability by shifting the focus to training dynamics and distribution matching. While the current framework provides a static summary of the training process, future research will explore how to visualize the evolution of these patterns over time. This could provide developers with a powerful tool for debugging models and identifying the emergence of spurious correlations during training.
Summary updated