Source-linked AI summary

Discovering Invariant Rationales for Graph Neural Networks

Ying-Xin Wu, Xiang Wang, An Zhang, Xiangnan He, Tat-Seng Chua

arXiv:2201.12872v1cs.LG

TL;DR

GNN rationalization can select non-causal features through unstable statistical associations, weakening interpretability and out-of-distribution generalization. DIR constructs interventional distributions and seeks rationales that remain informative across them; it consistently outperforms leading baselines across graph-classification settings.

  • Problem

    GNN rationalization seeks compact graph-feature subsets that explain predictions, but existing strategies can rely on non-causal statistical associations and unstable spurious correlations across environments.

  • Method

    DIR separates causal and non-causal graph parts, intervenes on non-causal representations to create perturbed distributions, and minimizes joint invariant risk across environments.

  • Results

    DIR consistently outperforms baselines, surpassing ERM by 7.65% and ASAP by 4.82% on MNIST-75sp, and exceeding IRM and SAG by 4.23% and 3.16% on Spurious-Motif.

  • Takeaways & Limitations

    The discovered rationales are intended to probe model mechanisms while improving generalization across environments, with intervention augmentation and variance regularization contributing to performance.

  • Takeaways & Limitations

    The causal formulation assumes a feature-induction condition on the non-causal part S to avoid confusion between induced subsets of S and C.

Abstract

from arXiv · show

Intrinsic interpretability of graph neural networks (GNNs) is to find a small subset of the input graph's features -- rationale -- which guides the model prediction. Unfortunately, the leading rationalization models often rely on data biases, especially shortcut features, to compose rationales and make predictions without probing the critical and causal patterns. Moreover, such data biases easily change outside the training distribution. As a result, these models suffer from a huge drop in interpretability and predictive performance on out-of-distribution data. In this work, we propose a new strategy of discovering invariant rationale (DIR) to construct intrinsically interpretable GNNs. It conducts interventions on the training distribution to create multiple interventional distributions. Then it approaches the causal rationales that are invariant across different distributions while filtering out the spurious patterns that are unstable. Experiments on both synthetic and real-world datasets validate the superiority of our DIR in terms of interpretability and generalization ability on graph classification over the leading baselines. Code and datasets are available at https://github.com/Wuyxin/DIR-GNN.

1 INTRODUCTION

Intrinsic GNN rationalization seeks compact graph-feature subsets that explain predictions, but shortcut-driven rationales can fail under distribution shift. DIR addresses this by using interventions to identify causal patterns that remain invariant across environments.

  • Motivation: Rationalization seeks a small subset of graph features that guides or explains a GNN prediction and supports model auditing.The paper also connects rationales to applications such as identifying functional groups for protein structure prediction.
  • Motivation: Intrinsic interpretability incorporates a rationalization module into the GNN so predictions are transparent, unlike post-hoc methods that explain models separately.
  • Problem: Shortcut features from confounding factors, sampling biases, and training artifacts can produce accurate in-distribution predictions while undermining OOD generalization.For House-motif graphs, Tree bases can spuriously predict House motifs when the training distribution overrepresents that pairing.
  • Problem: Causal patterns are treated as more plausible rationales because they remain stable across environments, whereas shortcut-label relations vary across distributions.
  • Approach: DIR creates interventional distributions from a standard training set to distinguish causal and non-causal graph parts without assuming environments are directly observable.
  • Approach: DIR combines a rationale generator, distribution intervener, feature encoder, and two classifiers to infer invariant causal parts and minimize invariant risk.Experiments on one synthetic and three real datasets report improved generalization and interpretability over invariant-learning, attention, and pooling baselines.

2 INVARIANT RATIONALE DISCOVERY

DIR seeks rationales whose relationship with labels remains stable across interventional distributions, rather than relying on unstable statistical shortcuts. It formalizes this goal causally and implements it with graph decomposition, intervention, encoding, and classification modules.

  • Causal formulation: DIR treats causal patterns as environment-invariant while relations between shortcut patterns and labels may vary across environments.The causal part C determines Y, whereas the non-causal part S can become spuriously correlated with Y.
  • Learning strategy: The rationale is learned from observed graphs by splitting each input into candidate causal and non-causal parts, since oracle rationales and the oracle structural equation are unavailable.The rationale module is trained jointly with a predictor over the extracted rationale.
  • Motivation: Standard intrinsic rationalization can rely on statistical associations between graph features and labels, producing non-causal rationales that generalize poorly under distribution shift.Shortcuts may arise from confounding factors, sampling biases, and training-data artifacts.
  • Principle and objective: The DIR principle minimizes both the average s-interventional risk and the variance of risks across s-interventional distributions.Its learning objective combines these terms with hyper-parameter λ controlling invariant-learning strength.
  • GNN implementation: DIR implements four components: a rationale generator, distribution intervener, feature encoder, and two classifiers.The intervener perturbs non-causal representations, while the causal classifier produces the prediction used at inference.

3 EXPERIMENTS

DIR is evaluated on synthetic and real-world graph-classification datasets against ERM, interpretable, and robust/invariant baselines. It improves generalization and rationale quality, while analyses examine intervention, variance regularization, and training dynamics.

  • Experimental Setup: Experiments use one synthetic and three real-world graph-classification datasets, with dataset-specific GNNs and early stopping.
  • Experimental Setup: DIR is compared with ERM, interpretable attention and pooling methods, GSN, and robust or invariant-learning baselines.
  • Generalization: 7.65% over ERM and 4.82% over ASAP on MNIST-75sp; DIR also achieves the highest performance on Graph-SST2 and Molhiv.
  • Generalization: 4.23% over IRM and 3.16% over SAG across Spurious-Motif bias levels, while DIR remains effective under different bias degrees.
  • Ablation: DIR improves over DIR-Var by averages of 1.57% on Spurious-Motif and 2.62% on MNIST-75sp, indicating an additional benefit from variance regularization.
  • Interpretability: DIR has higher intrinsic interpretability by Precision@5 than baselines, with larger performance gaps as bias increases.
  • In-depth Analysis: DIR highlights sentiment-bearing words as rationales, while its variance penalty first increases and then decreases nearly to zero during training.
  • In-depth Analysis: DIR shows resistance to overfitting in the reported comparison, and its performance surpasses the best baselines across a relatively large range of λ.

4 RELATED WORKS

Related work distinguishes intrinsic GNN interpretability from post-hoc explanation and describes invariant learning as seeking representations whose predictions remain consistent across environments.

  • Intrinsic Interpretability: Post-hoc methods explain predictions separately, whereas intrinsic methods incorporate rationalization modules into GNNs for transparent predictions.
  • Intrinsic Interpretability: Attention assigns importance weights to representations, while pooling selectively downsamples representations using selection importance.
  • Invariant Learning: Invariant learning assumes causal relations remain stable and describes IRM as seeking representations whose classifier matches across environments.

5 CONCLUSION & FUTURE WORK

The paper studies intrinsic GNN interpretability causally and proposes DIR to distill features that remain informative across interventional distributions. It reports improved generalization and highlights adaptation-fitting training dynamics, while identifying broader assumptions as future work.

  • Conclusion: DIR constructs interventional distributions and distills salient features that are consistently informative across them as rationales.
  • Conclusion: The resulting rationales probe model mechanisms and are reported to be effective for generalization.
  • Future Work: The paper identifies more reliable and expressive interpretable models under various assumptions as a future direction.

ETHICS STATEMENT

The paper presents a synthetic dataset without human subjects and connects rationale exhibition with inspecting potential discrimination and fairness issues in deep models.

  • Ethics Statement: The proposed algorithm involves no human subjects, and its synthetic dataset is made available through an anonymous link.
  • Ethics Statement: The authors state that exhibiting rationales can help inspect and eliminate potential discrimination and fairness issues in real applications.

REPRODUCIBILITY STATEMENT

The paper documents reproducibility through public or available datasets, explicit model-training procedures, notation, pseudocode, and causal assumptions. Its theoretical setup distinguishes causal and non-causal graph features while imposing separability and uniqueness conditions in relevant cases.

  • REPRODUCIBILITY STATEMENT: The reproducibility materials include datasets, training procedures, hyperparameters, and implementation details aligned with the released code.The paper cites one available synthetic dataset, three public datasets, Algorithm A, and Appendix D for training details.
  • REPRODUCIBILITY STATEMENT: DIR training initializes a rationale generator, encoder, and two classifiers before generating rationales and complements from sampled graphs.The pseudocode specifies training data, class count, stepsize, and λ as inputs, then applies interventions to complement subgraphs.
  • REPRODUCIBILITY STATEMENT: The invariant-rationalization assumption requires a rationale C whose structural equation and probability relation hold across distributions over graph and label variables.The oracle structural equation fY is defined as the perfect model using C that minimizes expected task loss over the considered distributions.
  • REPRODUCIBILITY STATEMENT: The framework is limited when causal and spurious features are dependent and cannot be separately extracted or modeled.The Spurious-Motif example describes graph structures where separating S and C can break the spurious pattern while losing part of the causal feature.
  • REPRODUCIBILITY STATEMENT: The causal setup represents each graph as G = S ∪ C, with C denoting the causal subgraph and S its complement.The notation distinguishes ground-truth and generated rationales, causal and spurious predictions, and the corresponding classifiers.
  • REPRODUCIBILITY STATEMENT: The feature-induction assumption further requires that conditional independence of Y and S given C persists for induced subsets of S.The paper states that this supports uniqueness of the causal subgraph among induced complement graphs, under the graph-specific assumption.

C.2 PROOFS

The proofs establish when DIR is satisfied by the oracle predictor and when the causal structural equation is unique. They also identify distributional conditions under which the principle may fail or rationale search becomes difficult.

  • C.2 PROOFS: Theorem 1 shows that if S → C does not exist, the oracle function fY satisfies the DIR Principle across every considered distribution.The proof uses invariance of the causal structure under interventions on S and the oracle model’s minimum penalty.
  • C.2 PROOFS: If S → C exists, the oracle function is not necessarily guaranteed to attain the lowest variance of interventional risks.Although fY still minimizes the interventional risk, the variance lower bound depends on the specific data distribution.
  • C.2 PROOFS: Theorem 2 states that a strict loss and exactly one nontrivial causal subset imply a unique structural equation model satisfying the DIR Principle.The uniqueness argument compares any alternative model against fY under the DIR objective.
  • C.2 PROOFS: Selecting a preferred rationale can require exponential-time search, so the experiments use fixed-size learned rationales and leave better optimization to future work.The paper motivates this choice through Occam’s Razor and rationale parsimony.
  • C.2 PROOFS: Under the uniqueness condition, optimizing the DIR objective can approach the oracle predictor while preserving the invariant causal relation between C and Y.The corollary connects the feasible rationale to the intrinsically interpretable model’s learned rationale ˜C.

D SETTING DETAILS

The experiments cover four graph-classification datasets with dataset-specific features, GNN backbones, optimization procedures, hyperparameters, and validation-based model selection. The method also uses a causal and shortcut branch to adjust training signals.

  • D SETTING DETAILS: Spurious-Motif uses random node features and constant edge weights, while MNIST-75sp represents images as superpixel graphs with pixel and coordinate features.Graph-SST2 uses pretrained BERT word embeddings, and OGBG-Molhiv uses the officially released dataset.
  • D SETTING DETAILS: The experiments use dataset-specific GNN backbones, ReLU activations, global pooling, and prediction-layer configurations.Baselines with node pooling or attention receive an additional pooling or attention layer in the second convolutional layer.
  • D SETTING DETAILS: Training uses Adam, dataset-dependent gradient optimization, up to 400 epochs, and early stopping to reduce overfitting.The paper reports a single Tesla V100 SXM2 GPU with 32 GB of memory for all experiments.
  • D SETTING DETAILS: The causal feature ratio and λ are set separately for MNIST-75sp, Spurious-Motif, Graph-SST2, and OGBG-Molhiv.Other baselines use grid search over validation datasets, while each experiment is repeated at least five times with averages and standard errors reported.
  • D SETTING DETAILS: DIR reweights causal predictions using shortcut predictions, changing the backpropagated loss to reduce or increase pressure on the main branch.The paper interprets the multiplication as estimating the pure indirect effect of shortcut features while the causal branch captures the natural direct effect.

F MORE EXPERIMENTAL RESULTS

Additional visualizations show training and testing rationales for Graph-SST2 and Spurious-Motif. The figures encode rationale importance through color intensity and mark ground-truth rationales in green for Spurious-Motif.

  • F MORE EXPERIMENTAL RESULTS: Graph-SST2 visualizations provide additional training and testing examples in which rationales are highlighted with deeper colors.Each graph represents a comment in the corresponding visualization.
  • F MORE EXPERIMENTAL RESULTS: Spurious-Motif training and testing visualizations use deeper colors for higher-importance structures and green nodes for ground-truth rationales.The same visual encoding is stated for both training and testing figures.
  • F MORE EXPERIMENTAL RESULTS: The visual comparison to make across Spurious-Motif panels is whether highlighted structures align with the green ground-truth rationale nodes.The captions specify the encoding but do not state a quantitative outcome for the comparison.

F.2 SENSITIVITY ANALYSIS

DIR’s performance is sensitive to λ: removing the invariance penalty weakens shortcut control, while excessive weighting of variance harms testing performance.

  • Figure 10 compares DIR performance with the best baseline using dashed lines and shows ACC±std as shaded areas.
  • As λ approaches 0, DIR optimizes performance in each environment without explicitly penalizing shortcut influence on predictions.
  • All testing performances drop sharply when λ is too large because the variance term can overshadow performance loss.

F.3 STUDY OF THE SPURIOUS CLASSIFIERS

The study examines spurious classifiers, rationale accuracy, and extensions for unseen biases, showing both their diagnostic value and important scope constraints.

  • Spurious classifiers are over-confident and can overfit non-causal features, causing poor out-of-distribution generalization.
  • Their degradation reflects both inadequate label inference from non-causal features and the limits of empirical-risk minimization for learning stable feature-label relations.
  • DIR rationales outperform GNNExplainer explanations in precision even when spurious correlations are absent, indicating stronger causal-feature identification.
  • The implementation memory bank contains only training-set spurious patterns and may fail on unseen patterns.
  • Attribute perturbation, external knowledge, or subgraph matching are proposed to address unseen spurious patterns under different availability conditions.
  • Feature-level interpretability assumes that graphs can be separated into causal and non-causal features, limiting applicability when that assumption fails.
  • Higher-level representation or disentangled-variable interpretations may impose fewer separability constraints and apply to broader data-generating assumptions.
Loading 2201.12872v1…