RegExplainer: Generating Explanations for Graph Neural Networks in Regression Tasks

Jiaxing Zhang, Zhuomin Chen, Hao Mei, Longchao Da, Dongsheng Luo, Hua Wei

TL;DR

RegExplainer is the first post-hoc framework designed specifically to explain Graph Neural Network (GNN) predictions in regression tasks. By optimizing a novel graph information bottleneck objective via InfoNCE loss and incorporating a self-supervised graph mix-up strategy, it successfully overcomes the challenges of continuous labels and out-of-distribution shifts to deliver highly accurate subgraph explanations.

What Problem Does This Paper Address?

While Graph Neural Networks (GNNs) excel at processing graph-structured data, they operate largely as black boxes. To trust their predictions in sensitive fields like drug discovery or traffic forecasting, we need post-hoc explainers that can isolate the most important subgraphs driving a model's decisions.

Existing GNN explainers (such as GNNExplainer and PGExplainer) are almost exclusively tailored for classification tasks. Extending them to regression tasks introduces two major roadblocks:

  1. Incompatible Objectives: Standard explainers rely on the Graph Information Bottleneck (GIB) principle, approximating mutual information between the explanation and the label using Cross-Entropy. This formulation completely breaks down when labels are continuous numbers rather than discrete classes.
  2. The Distribution Shifting Problem: An explanation subgraph ($G^*$) inherently has a different topology and feature distribution than the full graph ($G$) the GNN was trained on. In classification, a small out-of-distribution (OOD) shift might not push a sample across a discrete decision boundary. In regression, however, the decision boundaries are continuous and highly sensitive; feeding a raw subgraph into the GNN leads to massive prediction errors, rendering the explanation process unstable.
Figure 1: Intuitive illustration of the distribution shifting problem. The 3-dimensional map repre- sents a trained GNN model f, where (h1, h2) rep- resents the embedding distribution of the graph in two dimensions, and Y represents the prediction value of the graph through f. The red and blue lines represent the distribution of the original train- ing graph set and the corresponding explanation sub-graph set, respectively. The distribution of G∗ shifts away from the original distribution, resulting in shifted prediction values.

Methods

The authors introduce RegExplainer, a model-agnostic framework that re-engineers the GIB objective for continuous spaces and repairs distribution shifts using a novel mix-up approach.

1. Continuous InfoNCE Objective

Instead of trying to calculate intractable mutual information over continuous variables, RegExplainer maximizes a lower bound of the mutual information using an adapted InfoNCE loss. For any target graph, the framework samples a "positive neighbor" $G^+$ (a graph with a similar regression label) and a "negative neighbor" $G^-$ (a graph with a distant label) to guide the explainer self-supervised.

2. Graph Mix-up Framework

To combat the distribution shift problem, RegExplainer avoids feeding bare subgraphs into the GNN. Instead, it takes the isolated explanation subgraph $G^*$ and blends it with the label-irrelevant components of its neighbor graphs. This creates a within-distribution "mixed" graph ($G^{(mix)}$) that preserves the essential explanatory structure while maintaining a realistic graph context for the GNN to evaluate safely.

Illustration of the RegExplainer framework

Datasets

The authors evaluated RegExplainer on three synthetic datasets and one newly introduced real-world dataset:

  • BA-Motif-Volume (Synthetic): A Barabási-Albert (BA) graph with attached "house" motifs and random float node features. The regression label is the sum of features on the motif.
  • BA-Motif-Counting (Synthetic): BA graphs attached to a variable number of motifs, where the label is simply the count of the motifs.
  • Triangles (Synthetic): 5,000 Erdős-Rényi random graphs where the target label is the total number of triangles present in the graph.
  • Crippen (Real-World): A molecular dataset based on the Delaney solubility benchmark. Node weights are assigned using the Crippen chemistry model to predict water-octanol partition coefficients.

Key Insights and Ideas

  • The Fragility of Subgraphs in Regression: The authors empirically demonstrate that standard GNNs fail catastrophically when evaluating raw explanation subgraphs. As shown in Figure 3, the GNN's predictions on subgraphs (green dots) wildly diverge from the true labels (blue line), proving that distribution shift is a fatal flaw for regression explanations if left unaddressed.
Visualization of distribution shifting problem on four datasets
  • Context Matters: Rather than treating an explanation as an isolated island, embedding the explanation subgraph back into a realistic "background" graph context (via mix-up) stabilizes the GNN's embedding space, allowing for faithful and robust importance estimation.
  • Label Proximity as Self-Supervision: In regression, absolute labels don't matter as much as relative distances. RegExplainer smartly leverages the continuous nature of the labels to construct triplet pairs, turning a complex explanation problem into a manageable contrastive learning task.

Key Results

RegExplainer was evaluated against several baselines (adapted to regression using MSE loss) using the AUC-ROC of edges relative to the ground-truth explanatory subgraphs.

  • Superior Faithfulness: RegExplainer consistently outperformed all baselines across all four datasets. When applied to PGExplainer as a backbone, RegExplainer improved performance over the second-best baseline by 34.3% on average, and up to 48.0% on specific tasks (Table 1).
  • Ablation Validation: Removing the mix-up component (RegE-mix) or the InfoNCE loss (RegE-nce) caused a significant drop in explanation accuracy, proving that both the continuous objective and the distribution-repair mechanism are vital to the model's success.
Ablation study of RegExplainer

Limitations and Future Work

While RegExplainer is explainer-agnostic and highly effective on static graphs, the authors note that it cannot be easily applied to Spatio-Temporal Graphs (STGs). STGs (like traffic networks) feature dynamic topologies and time-varying node features that violate the static mix-up assumptions made in this work.

The authors suggest that future extensions could incorporate cached dynamic embedding memories to track temporal shifts and extend explainable regression to dynamic graph architectures.

Summary updated

BibTeX
@inproceedings{zhang2024regexplainer,
  author = {Jiaxing Zhang and Zhuomin Chen and Hao Mei and Longchao Da and Dongsheng Luo and Hua Wei},
  title = {{RegExplainer: Generating Explanations for Graph Neural Networks in Regression Tasks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=ejWvCpLuwu},
}
Figure