[Paper Review] Contrastive Graph Neural Network Explanation
This paper proposes CoGE, a contrastive graph neural network explanation method that ensures Distribution Compliant Explanation (DCE) by generating explanations using only training-distribution-compliant graphs. CoGE outperforms existing methods like GNNExplainer and occlusion by up to 10% in explanation accuracy on synthetic CYCLIQ datasets, achieving near-perfect accuracy (99%) on clique detection while maintaining robustness through ablation studies.
Graph Neural Networks achieve remarkable results on problems with structured data but come as black-box predictors. Transferring existing explanation techniques, such as occlusion, fails as even removing a single node or edge can lead to drastic changes in the graph. The resulting graphs can differ from all training examples, causing model confusion and wrong explanations. Thus, we argue that explicability must use graphs compliant with the distribution underlying the training data. We coin this property Distribution Compliant Explanation (DCE) and present a novel Contrastive GNN Explanation (CoGE) technique following this paradigm. An experimental study supports the efficacy of CoGE.
Motivation & Objective
- To address the problem of misleading explanations in Graph Neural Networks (GNNs) caused by drastic structural changes when removing nodes or edges.
- To argue that explanations must remain within the data distribution seen during training to avoid confusion with adversarial attacks.
- To propose a novel explanation method, CoGE, that adheres to Distribution Compliant Explanation (DCE) by using only real, training-distribution-compliant graphs.
- To empirically validate CoGE's superiority over existing explanation techniques such as occlusion, sensitivity, and GNNExplainer on synthetic and real graph datasets.
Proposed method
- CoGE uses a contrastive learning paradigm to identify graph substructures that make the input graph similar to positive (same-label) graphs and dissimilar to negative (different-label) graphs.
- It defines a loss function based on optimal transport (OT) distance between node embedding distributions of the input graph and reference graphs, promoting faithful representation of structural importance.
- The method optimizes for three loss terms: one to maximize similarity with same-label graphs ($\mathcal{L}_{W}^{\approx}$), one to minimize similarity with different-label graphs ($\mathcal{L}_{W}^{\not\approx}$), and one to enforce label consistency ($\mathcal{L}_{W}^{=}$).
- Explanations are derived by computing edge importance scores based on the learned contrastive representation, focusing on edges that contribute most to distinguishing the input graph from negative counterparts.
- The approach avoids modifying the original graph structure, thus preserving distribution compliance and avoiding adversarial-like perturbations.
- It leverages pre-trained GNNs to extract node embeddings and uses these for computing similarity via optimal transport, ensuring model-aware explanation.
Experimental results
Research questions
- RQ1Can explanation methods for GNNs avoid generating misleading explanations due to out-of-distribution graph modifications?
- RQ2How does a contrastive explanation approach based on real training graphs compare to existing methods like occlusion and GNNExplainer in terms of accuracy and robustness?
- RQ3To what extent does enforcing distribution compliance improve explanation quality in graph classification tasks?
- RQ4What is the contribution of each component in the contrastive loss function to the final explanation performance?
- RQ5Can CoGE generalize across different graph structures such as cycles and cliques, and how does it perform on synthetic vs. real-world datasets?
Key findings
- CoGE achieves 99% explanation accuracy on clique detection in the CYCLIQ dataset, significantly outperforming GNNExplainer (73%) and occlusion (86%) on the same task.
- On cycle detection, CoGE achieves 78% accuracy, surpassing all baselines, including GNNExplainer (43%) and occlusion (39%).
- The ablation study shows that $\mathcal{L}_{W}^{\not{\approx}}$ contributes most to performance, but combining it with $\mathcal{L}_{W}^{\approx}$ and $\mathcal{L}_{W}^{=}$ further improves accuracy.
- Replacing optimal transport with Euclidean distance on average embeddings reduces performance, indicating that OT is crucial for capturing structural differences effectively.
- CoGE maintains high performance across different hyperparameter settings, demonstrating robustness to parameter choices.
- Visualizations confirm that CoGE correctly identifies clique and cycle edges as most important, while other methods like occlusion highlight non-relevant edges due to topological disruption.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.