GNNExplainer: Seminar Study
Abstract
Graph Neural Networks (GNNs) achieve strong performance on graph-structured data but are largely opaque: it is unclear which nodes, edges, or features drive a given prediction. This paper examines GNNExplainer [Ying et al., 2019], a post-hoc method that finds the compact subgraph and feature subset that maximize mutual information with a trained model's prediction. We present a self-contained derivation of this objective and its continuous relaxation into learned edge and feature masks, including a step we show is mis-stated in the original derivation, connecting it to the practical optimization implemented in PyTorch Geometric [Fey and Lenssen, 2019]. We study two failure modes. First, gradient-based mask optimization can become trapped in local optima; on a novel multi-size clique dataset, explanation F1 stays between 0.13 and 0.26 across clique sizes and the optimizer never recovers a full clique. Second, motivated by 2026 work showing that jointly-trained self-explainable GNNs can produce explanations provably unrelated to a model's actual reasoning [Azzolin et al., 2026], we add two constant, label-independent color features to the clique dataset and test whether GNNExplainer's feature mask mistakes either one for a real signal. We find a partial version of this failure: one color feature shows almost no class-dependent gap, but the other shows a large one, disproportionate to the underlying difference in classifier accuracy between classes.
Resources
- Report (PDF)
- GitHub repository with slides, code and a summary of the key results