Skip to main content
QUICK REVIEW

[Paper Review] Generalizing Graph Neural Networks on Out-Of-Distribution Graphs

Shaohua Fan, Xiao Wang|arXiv (Cornell University)|Nov 20, 2021
Advanced Graph Neural NetworksComputer Science61 references9 citations
TL;DR

This paper proposes StableGNN, a causal representation framework that improves graph neural network generalization on out-of-distribution (OOD) graphs by mitigating spurious correlations through high-level subgraph representation learning and a causal variable distinguishing regularizer. The method achieves state-of-the-art performance across eight OOD graph benchmarks, demonstrating improved robustness and interpretability by focusing on true structural motifs rather than spurious ones.

ABSTRACT

Graph Neural Networks (GNNs) are proposed without considering the agnostic distribution shifts between training and testing graphs, inducing the degeneration of the generalization ability of GNNs on Out-Of-Distribution (OOD) settings. The fundamental reason for such degeneration is that most GNNs are developed based on the I.I.D hypothesis. In such a setting, GNNs tend to exploit subtle statistical correlations existing in the training set for predictions, even though it is a spurious correlation. However, such spurious correlations may change in testing environments, leading to the failure of GNNs. Therefore, eliminating the impact of spurious correlations is crucial for stable GNNs. To this end, we propose a general causal representation framework, called StableGNN. The main idea is to extract high-level representations from graph data first and resort to the distinguishing ability of causal inference to help the model get rid of spurious correlations. Particularly, we exploit a graph pooling layer to extract subgraph-based representations as high-level representations. Furthermore, we propose a causal variable distinguishing regularizer to correct the biased training distribution. Hence, GNNs would concentrate more on the stable correlations. Extensive experiments on both synthetic and real-world OOD graph datasets well verify the effectiveness, flexibility and interpretability of the proposed framework.

Motivation & Objective

  • Address the degradation of GNN performance on out-of-distribution (OOD) graphs due to distribution shifts.
  • Identify that spurious correlations among subgraph-level units underlie poor generalization in GNNs trained under the i.i.d. assumption.
  • Develop a generalizable framework to improve GNN stability under OOD settings by leveraging causal inference principles.
  • Enable models to focus on true, discriminative substructures rather than spurious features correlated with labels in training data.
  • Provide interpretability by aligning model attention with causal, meaningful subgraph structures.

Proposed method

  • Introduce a differentiable graph pooling layer to extract high-level, subgraph-based representations from raw graph data in an end-to-end manner.
  • Formulate the problem in a causal view, identifying spurious correlations between irrelevant substructures (e.g., 'star' motifs) and labels (e.g., 'house' motif).
  • Propose a causal variable distinguishing regularizer (CVD) inspired by confounder balancing techniques to learn sample weights that correct biased training distributions.
  • Use the CVD regularizer to minimize the Hilbert-Schmidt Independence Criterion (HSIC) between high-level representations and spurious features, promoting robustness.
  • Integrate the CVD regularizer into a unified framework that jointly optimizes representation learning and causal correction.
  • Enable end-to-end training with learnable cluster assignments, allowing the model to adapt the number of high-level representations dynamically.
Figure 1: Visualization of subgraph importance for “house” motif classification task, produced by the vanilla GCN model and StableGNN when most of training graphs containing “house” motifs with “star” motifs. The red subgraph indicates the most important subgraph used by the model for prediction (ge
Figure 1: Visualization of subgraph importance for “house” motif classification task, produced by the vanilla GCN model and StableGNN when most of training graphs containing “house” motifs with “star” motifs. The red subgraph indicates the most important subgraph used by the model for prediction (ge

Experimental results

Research questions

  • RQ1To what extent do spurious correlations between subgraph units and labels degrade GNN generalization under OOD settings?
  • RQ2Can causal representation learning improve GNN robustness when the test distribution differs from the training distribution?
  • RQ3Does the proposed causal variable distinguishing regularizer effectively reduce reliance on spurious features in graph-level prediction tasks?
  • RQ4Can the framework be flexibly integrated with existing GNN architectures to enhance their OOD generalization?
  • RQ5Does the model’s attention mechanism align with meaningful, interpretable substructures (e.g., functional groups in molecules) rather than spurious motifs?

Key findings

  • StableGNN achieves state-of-the-art performance on eight real-world OOD graph datasets, outperforming existing SOTA methods including GraphSAGE and GraphSAGE-Decorr.
  • On the OGB-Mol* benchmarks, StableGNN achieves 90.96% ± 1.93 accuracy on Molbbbp and 90.44% ± 0.79 on Molclintox, significantly outperforming baselines like GraphSAGE (86.51% and 88.89%) and GraphSAGE-Decorr (88.89% and 88.89%).
  • The CVD regularizer converges rapidly, reducing HSIC values significantly within a few epochs, indicating effective suppression of spurious correlations.
  • Ablation studies show that removing the CVD regularizer (StableGNN-NoCVD) leads to performance drops, confirming its necessity for robustness.
  • Interpretability analysis using GNNExplainer confirms that StableGNN correctly identifies biologically relevant motifs (e.g., NO₂ and NH₂ in MUTAG), while baselines focus on spurious features.
  • The framework is robust to the number of pre-defined clusters, with StableGNN consistently outperforming StableGNN-NoCVD across all datasets, validating the effectiveness of the CVD regularizer.
Figure 2: Causal graph for data generation process. Gray nodes and white nodes mean the unobserved latent variables and the observed variables, respectively.
Figure 2: Causal graph for data generation process. Gray nodes and white nodes mean the unobserved latent variables and the observed variables, respectively.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.