Table of Contents
Fetching ...

L2XGNN: Learning to Explain Graph Neural Networks

Giuseppe Serra, Mathias Niepert

TL;DR

L2XGNN addresses the faithfulness gap in GNN explanations by integrating the learning-to-explain paradigm directly into standard GNNs. It learns to sample explanatory subgraphs, using an upstream edge-weight model and a constrained optimization sampler (via perturb-and-MAP) to produce a subgraph that is then used exclusively in message passing. The framework employs implicit maximum-likelihood learning to backpropagate through the discrete sampler, and demonstrates competitive graph-classification accuracy while providing faithful explanations that align with ground-truth motifs and facilitate debugging of shortcut learning. This approach enables motif-based interpretability without sacrificing predictive performance, with broad applicability to graph domains where interpretable structure is crucial.

Abstract

Graph Neural Networks (GNNs) are a popular class of machine learning models. Inspired by the learning to explain (L2X) paradigm, we propose L2XGNN, a framework for explainable GNNs which provides faithful explanations by design. L2XGNN learns a mechanism for selecting explanatory subgraphs (motifs) which are exclusively used in the GNNs message-passing operations. L2XGNN is able to select, for each input graph, a subgraph with specific properties such as being sparse and connected. Imposing such constraints on the motifs often leads to more interpretable and effective explanations. Experiments on several datasets suggest that L2XGNN achieves the same classification accuracy as baseline methods using the entire input graph while ensuring that only the provided explanations are used to make predictions. Moreover, we show that L2XGNN is able to identify motifs responsible for the graph's properties it is intended to predict.

L2XGNN: Learning to Explain Graph Neural Networks

TL;DR

L2XGNN addresses the faithfulness gap in GNN explanations by integrating the learning-to-explain paradigm directly into standard GNNs. It learns to sample explanatory subgraphs, using an upstream edge-weight model and a constrained optimization sampler (via perturb-and-MAP) to produce a subgraph that is then used exclusively in message passing. The framework employs implicit maximum-likelihood learning to backpropagate through the discrete sampler, and demonstrates competitive graph-classification accuracy while providing faithful explanations that align with ground-truth motifs and facilitate debugging of shortcut learning. This approach enables motif-based interpretability without sacrificing predictive performance, with broad applicability to graph domains where interpretable structure is crucial.

Abstract

Graph Neural Networks (GNNs) are a popular class of machine learning models. Inspired by the learning to explain (L2X) paradigm, we propose L2XGNN, a framework for explainable GNNs which provides faithful explanations by design. L2XGNN learns a mechanism for selecting explanatory subgraphs (motifs) which are exclusively used in the GNNs message-passing operations. L2XGNN is able to select, for each input graph, a subgraph with specific properties such as being sparse and connected. Imposing such constraints on the motifs often leads to more interpretable and effective explanations. Experiments on several datasets suggest that L2XGNN achieves the same classification accuracy as baseline methods using the entire input graph while ensuring that only the provided explanations are used to make predictions. Moreover, we show that L2XGNN is able to identify motifs responsible for the graph's properties it is intended to predict.
Paper Structure (28 sections, 15 equations, 6 figures, 12 tables, 1 algorithm)

This paper contains 28 sections, 15 equations, 6 figures, 12 tables, 1 algorithm.

Figures (6)

  • Figure 1: Workflow of the proposed approach. The upstream model $h_{\bm{v}}$ learns to assign weights $\theta_{\cdot,\cdot}$ for each edge in the input graph. The edge matrix $\bm{\theta}$ – perturbed with $\bm{\epsilon}$ – is then utilized as input by the optimization algorithm $\mathtt{opt}$ to sample a subgraph $\bm{z}$ with specific characteristics. Finally, the downstream model $f_{\bm{u}}$ uses only the information about the sampled (sub)graph to make a prediction.
  • Figure 2: Benzene-NO$_2$ motif.
  • Figure 3: Visualization of some of the subgraphs selected by L2xGnn for MUTAG$_0$ on the test set. The solid edges represent the ones sampled by our approach. The subscript dsc indicates the maximum weight k-edge subgraph problem (i.e., possibly disconnected subgraphs). Black, blue, red, and gray nodes represent carbon (C), nitrogen (N), oxygen (O), and hydrogen (H) atoms respectively.
  • Figure 4: Effect of the edge ratio on the prediction accuracy (%).
  • Figure 5: Example of model reasoning understanding through the visualization of the generated explanations.
  • ...and 1 more figures