13 Nov 2019 | Rex Ying† Dylan Bourgeois†,‡ Jiaxuan You† Marinka Zitnik† Jure Leskovec†
GNNExplainer: Generating Explanations for Graph Neural Networks
**Rex Ying, Dylan Bourgeois, Jiexuan You, Marinka Žitnik, Jure Leskovec**
*Department of Computer Science, Stanford University*
*Robust.AI*
{rexying, dtsbourg, jiexuan, marinka, jure}@cs.stanford.edu
**Abstract**
Graph Neural Networks (GNNs) are powerful tools for machine learning on graphs, combining node feature information with graph structure by recursively passing neural messages along edges. However, explaining GNN predictions remains challenging due to the complexity of these models. We propose GNNEXPLAINER, a general, model-agnostic approach to provide interpretable explanations for any GNN-based model on graph-based machine learning tasks. GNNEXPLAINER identifies a compact subgraph structure and a small subset of node features crucial for the GNN's prediction. It can generate consistent and concise explanations for a class of instances. Formulated as an optimization task, GNNEXPLAINER maximizes mutual information between the GNN's prediction and the distribution of possible subgraph structures. Experiments on synthetic and real-world graphs show that GNNEXPLAINER accurately identifies important graph structures and node features, outperforming baseline approaches by up to 43.0% in explanation accuracy. GNNEXPLAINER offers benefits such as visualizing semantically relevant structures, improving interpretability, and providing insights into errors in faulty GNNs.
**Introduction**
Graph Neural Networks (GNNs) are effective for machine learning on graphs, combining node features with graph structure. However, explaining GNN predictions is challenging. GNNEXPLAINER addresses this by providing interpretable explanations for any GNN on any graph-based task. It identifies a small subgraph and node features crucial for the prediction, handling single- and multi-instance explanations. GNNEXPLAINER maximizes mutual information between the prediction and subgraph structure, using mean-field variational approximation and learning masks for important subgraphs and features. Experiments show GNNEXPLAINER accurately identifies important structures and features, outperforming baselines by up to 43.0% in explanation accuracy. It provides insights into domain-specific graph structures and node features, enhancing interpretability and debugging capabilities.
**Related Work**
Interpretability methods for non-graph neural networks include proxy models and feature gradients, but these have limitations. Post-hoc interpretability methods probe models for relevant information, but lack relational structures. Attention mechanisms in GNNs indicate important edges but are limited to specific architectures and cannot jointly consider graph structure and node features.
**Formulating Explanations for GNNs**
GNNs use neighborhood-based aggregation to compute node embeddings. GNNEXPLAINER identifies a small subgraph and node features crucial for the prediction by maximizing mutual information. It learns masks for important subgraphs and features, ensuring valid computation graphs.
**GNNExplainer: Generating Explanations for Graph Neural Networks
**Rex Ying, Dylan Bourgeois, Jiexuan You, Marinka Žitnik, Jure Leskovec**
*Department of Computer Science, Stanford University*
*Robust.AI*
{rexying, dtsbourg, jiexuan, marinka, jure}@cs.stanford.edu
**Abstract**
Graph Neural Networks (GNNs) are powerful tools for machine learning on graphs, combining node feature information with graph structure by recursively passing neural messages along edges. However, explaining GNN predictions remains challenging due to the complexity of these models. We propose GNNEXPLAINER, a general, model-agnostic approach to provide interpretable explanations for any GNN-based model on graph-based machine learning tasks. GNNEXPLAINER identifies a compact subgraph structure and a small subset of node features crucial for the GNN's prediction. It can generate consistent and concise explanations for a class of instances. Formulated as an optimization task, GNNEXPLAINER maximizes mutual information between the GNN's prediction and the distribution of possible subgraph structures. Experiments on synthetic and real-world graphs show that GNNEXPLAINER accurately identifies important graph structures and node features, outperforming baseline approaches by up to 43.0% in explanation accuracy. GNNEXPLAINER offers benefits such as visualizing semantically relevant structures, improving interpretability, and providing insights into errors in faulty GNNs.
**Introduction**
Graph Neural Networks (GNNs) are effective for machine learning on graphs, combining node features with graph structure. However, explaining GNN predictions is challenging. GNNEXPLAINER addresses this by providing interpretable explanations for any GNN on any graph-based task. It identifies a small subgraph and node features crucial for the prediction, handling single- and multi-instance explanations. GNNEXPLAINER maximizes mutual information between the prediction and subgraph structure, using mean-field variational approximation and learning masks for important subgraphs and features. Experiments show GNNEXPLAINER accurately identifies important structures and features, outperforming baselines by up to 43.0% in explanation accuracy. It provides insights into domain-specific graph structures and node features, enhancing interpretability and debugging capabilities.
**Related Work**
Interpretability methods for non-graph neural networks include proxy models and feature gradients, but these have limitations. Post-hoc interpretability methods probe models for relevant information, but lack relational structures. Attention mechanisms in GNNs indicate important edges but are limited to specific architectures and cannot jointly consider graph structure and node features.
**Formulating Explanations for GNNs**
GNNs use neighborhood-based aggregation to compute node embeddings. GNNEXPLAINER identifies a small subgraph and node features crucial for the prediction by maximizing mutual information. It learns masks for important subgraphs and features, ensuring valid computation graphs.
**