Introduction
Graph Neural Networks (GNNs) have become the standard for processing structured data, from molecular modeling to social network analysis. However, their "black-box" nature remains a significant hurdle for deployment in high-stakes domains. Traditional interpretability methods often rely on occlusion—masking nodes or edges to observe changes in model output.
This paper argues that such structural perturbations are fundamentally flawed for graphs. Removing even a single edge in a sparse graph can create disconnected subgraphs or topological structures that the GNN never encountered during training. These out-of-distribution (OOD) inputs confuse the model, causing it to behave unpredictably. Consequently, traditional explainers often act more like adversarial attacks than genuine windows into the model's logic. To address this, the authors propose the Distribution Compliant Explanation (DCE) paradigm, ensuring that explanations are generated using data consistent with the original training distribution.
The CoGE Framework
To implement the DCE paradigm, the authors introduce Contrastive GNN Explanation (CoGE). Unlike perturbative methods, CoGE explains a prediction by contrasting the target graph against actual examples from the training set. This approach ensures the model is always evaluated on "real" data it was trained to understand.
Optimal Transport for Semantic Mapping
The core of CoGE is the use of Optimal Transport (OT) to measure similarity between graphs at a granular level. By applying OT to the final node embeddings produced by the GNN, the method establishes a "soft assignment" between nodes of different graphs. This allows the model to identify semantically equivalent structures across different graph instances without requiring rigid isomorphism.
Contrastive Optimization
CoGE optimizes a weight distribution over the nodes of the target graph. The objective is to minimize the OT distance to graphs of a different class while maximizing the distance to graphs of the same class. Nodes that receive the lowest weights during this process are identified as the most critical for maintaining the graph's class identity, forming the final explanation.
Experimental Results
The authors evaluated CoGE against popular baselines including GNNExplainer, Occlusion, and Sensitivity analysis.
Synthetic Benchmarking: CYCLIQ
A new synthetic benchmark, CYCLIQ (Cycles and Cliques), was introduced to provide clear ground-truth explanations. In this task, graphs consist of random trees with either a cycle or a clique attached. CoGE significantly outperformed all baselines, achieving an average explanation accuracy of 88%, compared to just 58% for GNNExplainer.
Real-World Applications
- MUTAG: In chemical mutagenicity prediction, CoGE successfully identified the $NO_2$ group as the primary indicator of mutagenic activity, aligning with established chemical knowledge.
- REDDIT-BINARY: For social network classification, CoGE correctly highlighted high-degree central nodes in Q&A threads, reflecting the typical structure of experts answering multiple users.
Conclusion and Future Work
By shifting the focus from adversarial perturbations to distribution-compliant contrasts, CoGE provides more robust and semantically meaningful GNN explanations. While currently limited to graph-level classification, the authors identify extending this framework to node-level classification as a primary direction for future research. This work underscores the necessity of respecting the data distribution when attempting to peer inside the "black box" of deep learning models.
Summary updated