Source-linked AI summary

Generative Causal Explanations for Graph Neural Networks

Wanyu Lin, Hao Lan, Baochun Li

arXiv:2104.06643v2cs.LG

TL;DR

GNNs are effective on graph-learning tasks but often operate as black boxes, while existing explainers can depend on model internals or task-specific motifs. Gem formulates explanation as causal learning with Granger-causality objectives and graph-validity constraints, yielding model-agnostic explanations. It reports up to 30% higher explanation accuracy and up to 110× faster explanation than state-of-the-art alternatives.

  • Problem

    Existing GNN explainers can rely on target-model internals or explicit task motifs, limiting explanations for arbitrary GNNs and graph-learning tasks.

  • Method

    Gem trains causal explanation models using Granger-causality objectives, approximate computation for interdependent graphs, and graph rules for valid explanations.

  • Results

    Gem consistently achieves the best explanation accuracy in reported synthetic-dataset cases, including a 30% improvement at K = 5 on BA-shapes versus GNNExplainer.

  • Takeaways & Limitations

    Gem is model-agnostic, compatible with GNNs without task-specific assumptions, and can explain target models quickly after training.

  • Takeaways & Limitations

    PGExplainer fails to explain NCI1 without t… and connectivity constraints are unnecessary in some graph-representation settings such as cell-graphs.

Abstract

from arXiv · show

This paper presents Gem, a model-agnostic approach for providing interpretable explanations for any GNNs on various graph learning tasks. Specifically, we formulate the problem of providing explanations for the decisions of GNNs as a causal learning task. Then we train a causal explanation model equipped with a loss function based on Granger causality. Different from existing explainers for GNNs, Gem explains GNNs on graph-structured data from a causal perspective. It has better generalization ability as it has no requirements on the internal structure of the GNNs or prior knowledge on the graph learning tasks. In addition, Gem, once trained, can be used to explain the target GNN very quickly. Our theoretical analysis shows that several recent explainers fall into a unified framework of additive feature attribution methods. Experimental results on synthetic and real-world datasets show that Gem achieves a relative increase of the explanation accuracy by up to $30\%$ and speeds up the explanation process by up to $110\times$ as compared to its state-of-the-art alternatives.

1. Introduction

Gem addresses the need for interpretable GNN decisions on graphs by treating explanation as a causal learning problem. It uses Granger-causality objectives, graph-validity rules, and causal explanation models to produce fast, model-agnostic explanations.

  • Existing explainers: Existing GNN explainers provide local subgraph explanations, investigate class-specific patterns, or learn collective explainers with additional structural requirements.The cited methods include XGNN, GNNExplainer, PGM-Explainer, and PGExplainer.
  • Motivation and approach: Gem frames explanations of GNN decisions on graphs as a causal learning task using Granger causality.The method treats a graph component as causally related to a prediction when its absence reduces predictive ability.
  • Motivation and approach: An approximate computation strategy addresses graph interdependency, while graph rules encourage connected, human-intelligible explanations.These design choices account for correlated nodes and edges and application-specific validity requirements.
  • Methodological contribution: Gem trains causal explanation models to distill compact subgraphs that cause target-GNN outputs without requiring model internals or task-specific motifs.The approach supports local and global explanation views and does not require retraining or adapting the original model.
  • Contribution: Gem is presented as a causal, model-agnostic methodology that is faster and more accurate than alternative explanation methods.The paper positions this approach as addressing explanation needs in decision-critical settings where interpretability matters.

2. Problem Setup

The problem setup represents graph and node classification through graph-structured instances, labels, and GNN outputs. Explanations are defined as relevant subgraphs of the computation graph, obtained through queries to a pre-trained classifier without requiring access to its internal computation.

  • Graph and node representations: A graph is represented as Gi = (Vi, Ei), with Vi denoting its node set and Ei its edge set.The dataset contains graph instances paired with graph labels for graph-classification tasks.
  • Graph and node representations: Nodes may carry d-dimensional features, and node-classification datasets pair nodes with their corresponding labels.Examples include classifying papers in citation networks or entities in social networks.
  • GNN models: GNNs map graphs or nodes to outputs and commonly use neighborhood aggregation to learn representations from graph structure and node features.After L aggregation iterations, a node representation captures structural information within its L-hop neighborhood.
  • Explanation objective: The explanation objective is to find a subgraph most relevant to the target GNN prediction while treating the classifier as a queryable black box.The explainer need not know the classifier’s production process, differentiability, or specific functional form.

3. Methodology

Gem treats GNN explanation as identifying a compact subgraph with causal influence on a prediction, then trains a graph generative explainer from causal guidance. The approach is model-agnostic, supports local and global explanations, and amortizes explanation costs for fast inference.

  • Problem formulation: For an instance, Gem uses the GNN’s computation graph as input and seeks a subgraph most relevant to the predicted output.Node classification uses an instance’s computation graph, while graph classification uses the entire graph.
  • Graph generative model: Gem requires neither the target GNN’s internal structure and parameters nor task-specific motifs, while supporting explanations for nodes or graphs.Once trained, the explainer can generate explanations for new instances inductively with inference complexity O(|E|).
  • Causal objective: Gem extends Granger causality by treating a compact computation-graph subgraph as the main cause of the target GNN’s prediction.The approach is motivated by the assumption that a GNN prediction is determined by its computation graph.
  • Causal objective: The causal contribution of an edge is measured by the loss difference between the full computation graph and the graph with that edge removed.This edge-level causal effect provides guidance for selecting the most relevant subgraph.
  • Ground-truth distillation: Gem incorporates graph rules such as connectivity checks and distills compact causal subgraphs to produce valid, human-intelligible explanations.Connectivity is useful for explanations such as functional groups, but may be unnecessary for cell-graph explanations containing subsets of cells and interactions.
  • Graph generative model: The explainer applies graph convolutions, then uses an inner-product decoder to generate an adjacency-based explanation mask whose values represent edge contributions.The mask defines a compact subgraph containing the computation graph portion most relevant to the prediction.

4. Experimental Studies

Gem is evaluated against GNNExplainer and PGExplainer on synthetic and real-world graph datasets using explanation accuracy, interpretability, prediction preservation, and computational cost. It generally produces accurate, compact explanations quickly, without relying on explicit motifs for real-world tasks.

  • Datasets and Experimental Settings: The experiments cover node classification on BA-shapes and Tree-cycles and graph classification on Mutag and NCI1.BA-shapes and Tree-cycles provide synthetic ground-truth structures, while Mutag and NCI1 are bioinformatics graph-classification benchmarks.
  • Experimental Results: 30% improvement in explanation accuracy is achieved by Gem over GNNExplainer when K = 5 on BA-shapes.On Tree-cycles, Gem and PGExplainer retain favorable accuracy at K = 6, whereas GNNExplainer fails when K < 8.
  • Experimental Results: Gem identifies the house motif underlying the BA-shapes node label, while GNNExplainer attributes the prediction to an out-of-motif node.The comparison uses visualized explanations, with the house motif serving as the ground-truth structure for node labels.
  • Experimental Results: Gem consistently yields high explanation accuracy across the evaluated datasets, while PGExplainer fails on NCI1 without its motif assumption.Real-world datasets lack explicit ground-truth motifs, and comparisons distinguish motif-based PGExplainer settings from explanations over the full test set.
  • Experimental Results: On Mutag, Gem identifies essential aromatic-group and NO2 components and also explains a mutagenic instance without the predefined NO2 or NH2 motifs.For a non-mutagenic instance, Gem generates an explanation recognized by the target GNN with probability 0.82.
  • Experimental Results: Gem produces log-odds differences more concentrated around 0 and explains instances faster than the baselines overall.The log-odds analysis evaluates Mutag explanations with K = 15; computational comparisons include PGExplainer and per-instance GNNExplainer timing.

5. Other Related Work

The paper situates Gem within causal interpretability research, where causal formalisms have been used to explain neural-network components and image models. It extends this research direction to graph neural networks.

  • Other Related Work: Causal interpretability research frames explanations around questions of “what if” and “why,” using formalisms including Granger causality and causal Bayesian networks.The paper presents causality as one approach for answering inherently causal explanation questions.
  • Other Related Work: Prior causal explanation methods studied neural-network component importance and framed deep-learning explanations for images as causal learning tasks.These works include attribution based on Structural Causal Models and do(·) calculus and causal explanation models for images.

6. Conclusion

Gem is presented as a Granger-causality-based framework for explaining graph neural networks. Its intended contribution is model-agnostic, fast, compact, and broadly applicable graph explanations.

  • Conclusion: Gem explains graph neural networks using the first principles of Granger causality.The conclusion characterizes causal interpretability as a potential avenue for understanding and designing GNNs.
  • Conclusion: Gem is model-agnostic, compatible with any GNN model and graph-learning task without prior assumptions, and produces compact subgraphs quickly after training.The framework is described as supporting explanations of pre-trained GNN outputs with both broad applicability and rapid post-training use.

Graph Neural Networks

The paper analyzes GNN explainers through a unified additive feature-attribution framework and compares their optimization and approximation strategies. Gem approximates the common objective causally while using a graph generative model for inductive explanations.

  • Graph Neural Networks: Additive feature attribution methods represent explanations as linear functions of binary variables, adapted here to graph edge attribution.For graph data, the binary variable A^s_ij represents whether an edge exists in the explanation.
  • Graph Neural Networks: GNNExplainer, PGExplainer, and Gem all fall within the additive feature-attribution framework and solve the same underlying optimization problem with different approximations.The framework identifies a shared structure across these explainers despite their differing approximation methods.
  • Graph Neural Networks: The general explanation objective seeks a compact subgraph that is important for the GNN prediction, with K constraining explanation size.The optimization is formulated from mutual information and then approximated under a convexity assumption.
  • Graph Neural Networks: GNNExplainer relaxes the adjacency matrix to fractional values and uses mean-field optimization, while PGExplainer uses Bernoulli edge selection and an MLP over target-GNN node embeddings.Their attribution weights are derived from the optimized adjacency solution or the MLP output, respectively.
  • Graph Neural Networks: Gem estimates edge importance using Granger causality under conditional independence and uses those estimates to train a graph generative explanation model.The model generates explanations in an inductive setting rather than optimizing each explanation in isolation.

Experimental Results

Gem is evaluated on synthetic and real-world graph datasets for explanation accuracy and computational performance. It generally outperforms comparison explainers and amortizes explanation costs through explainer training.

  • Dataset and baseline considerations: 32% of non-mutagenic Mutag graphs contain at least NO2 or NH2 motifs, challenging PGExplainer’s motif assumption.PGExplainer trains using mutagen graphs containing at least one of these motifs, whereas GNNExplainer and Gem do not require explicit motifs for the corresponding comparison.
  • Explanation accuracy: Gem’s log-odds difference is more concentrated around 0, especially on BA-shapes, indicating better accuracy in identifying subgraphs relevant to pretrained GNN predictions.The comparison is reported against GNNExplainer and PGExplainer on the other datasets.
  • Computational performance: Gem consistently explains faster overall by training a graph generator, while distillation is a one-time preprocessing cost.Training Mutag with 1015 samples takes 5.67 seconds; the distillation-time cost is separately reported in Table 5.

C. Distillation Process

Gem distills ground-truth explanations for training instances before training its explanation model. The quality and time cost of this distillation are evaluated as a basis for explanation performance.

  • Distillation Process: The distillation process generates a ground-truth explanation Gs for each training instance from a pretrained classification model and its training set.The target classifier is denoted f(·).
  • Distillation Process: Distilled ground-truth quality provides the basis for Gem’s explanation performance, so its accuracy and associated time cost are evaluated.These measurements are reported in Table 5.
Loading 2104.06643v2…