Invariance Principle Meets Out-of-Distribution Generalization on Graphs

Yongqiang Chen, Yonggang Zhang, Han Yang, Kaili Ma, Binghui Xie, Tongliang Liu, Bo Han, James Cheng

TL;DR

This paper introduces CIGA, a novel framework that extends the invariance principle for robust out-of-distribution (OOD) generalization on graphs. By leveraging causal models, CIGA learns to identify and focus on invariant subgraphs, making predictions immune to distribution shifts in graph attributes and structures, a significant challenge in current graph representation learning.

What Problem Does This Paper Address?

Graph Neural Networks (GNNs) have shown great success in tasks involving relational data. However, their performance often degrades significantly when applied to data from different distributions than what they were trained on (out-of-distribution or OOD generalization). This is a critical issue for real-world applications where data distributions can shift due to various factors like changes in data collection or processing. While the "invariance principle" has been successful in addressing OOD generalization for image data, applying it to graphs is challenging due to the complex nature of graph data. Distribution shifts in graphs can manifest in various ways, including changes in node attributes and graph structures, making it difficult to identify what remains invariant. Furthermore, traditional OOD methods often require explicit environment labels, which are expensive and difficult to obtain for graph datasets. This paper aims to bridge this gap by developing a method that can achieve guaranteed OOD generalization on graphs without requiring environment labels.

Methods

The core of CIGA lies in its causal modeling approach. The authors first propose Structural Causal Models (SCMs) to formally characterize potential distribution shifts in graphs, considering both attribute and structural changes. Based on these SCMs, they hypothesize that OOD generalization is achievable if models can learn to focus on "invariant subgraphs" that capture the true causal relationships with the labels, independent of spurious correlations introduced by distribution shifts.

CIGA decomposes a GNN into two main components:

  1. Featurizer (g): This module is responsible for identifying the invariant subgraph ($G_c$) from the input graph ($G$).
  2. Classifier (f_c): This module predicts the label ($Y$) based on the extracted invariant subgraph ($G_c$).

To extract the desired invariant subgraph, CIGA employs an information-theoretic objective. This objective aims to maximize the mutual information between the extracted subgraph and the label ($I(G_c; Y)$) while ensuring that the subgraph is independent of the environment ($G_c \perp E$). The paper proposes two variants, CIGAv1 and CIGAv2, which differ in their specific optimization objectives designed to handle the complexities of subgraph extraction and ensure robustness against different types of spurious correlations. CIGAv2, in particular, incorporates a contrastive learning approach and a hinge loss to achieve more stable convergence and better performance.

Datasets

The authors evaluate CIGA on a diverse set of 16 datasets, including:

  • Synthetic datasets: SPMotif (SPMotif-Struc, SPMotif-Mixed) are constructed to probe specific types of distribution shifts (structure, attribute, and mixed shifts) and evaluate OOD generalization.
  • Real-world datasets:
    • DrugOOD: A challenging benchmark for AI-aided drug discovery, featuring shifts in assay, scaffold, and size.
  • ColoredMNIST: Adapted for graph classification to introduce attribute shifts.
  • Graph-SST: Used to inject degree biases.
  • TU datasets (PROTEINS, DD, NCI1, NCI109): Used to study graph size shifts, following previous work.

Key Insights and Ideas

  • Causality as a lens for graph OOD: The paper demonstrates that framing OOD generalization on graphs through the lens of causal inference is crucial for understanding and addressing the problem.
  • Invariant subgraphs are key: The central idea is that true generalization comes from identifying and utilizing subgraphs that encode the causal factors of the label, rather than relying on spurious correlations present in specific environments.
  • Complexity of graph shifts: Graph distribution shifts are more intricate than in Euclidean data, involving both attribute and structural changes, and can be entangled in complex ways (FIIF, PIIF).
  • Environment labels are often unavailable: The practical challenge of obtaining environment labels for graph data necessitates methods that can learn invariances without this information.
  • Information-theoretic objective for subgraph extraction: CIGA's novel objective effectively balances maximizing relevant information with minimizing spurious correlations, leading to robust subgraph identification.

Key Results

  • Superior OOD performance: CIGA significantly outperforms existing state-of-the-art methods on 16 synthetic and real-world datasets, achieving up to a 10% improvement in accuracy.
  • Robustness to various shifts: CIGA demonstrates strong generalization capabilities across different types of distribution shifts, including structure, attribute, and graph size variations.
  • Effectiveness in challenging domains: The method shows promising results on the demanding DrugOOD benchmark, highlighting its potential for AI-aided drug discovery.
  • Low computational overhead: CIGA achieves its superior performance with only a marginal increase in computational cost compared to baseline methods.
  • Hyperparameter robustness: Experiments show that CIGA is robust to variations in its hyperparameters, indicating practical usability.

Limitations and Future Work

  • Specific SCM assumptions: While CIGA's SCMs are designed to be general, they might not cover all possible graph generation processes. Future work could explore incorporating more specific inductive biases about graph families.
  • Contrastive sampling strategies: The current implementation uses a standard supervised contrastive approach. Leveraging more sophisticated augmentation and sampling strategies could further improve generalization.
  • Architecture flexibility: The paper uses interpretable GNN architectures as a prototype. Exploring more sophisticated GNN architectures could enhance CIGA's capabilities.
  • Parameter tuning: While robust, CIGA's optimization process still requires careful tuning, and developing more efficient optimization techniques is a promising future direction.
  • Single environment generalization: The paper acknowledges that invariant learning fundamentally assumes multiple environments. While CIGA shows promise even in single-environment settings, further research is needed to deepen understanding and develop better solutions for such scenarios.

Summary updated

BibTeX
@inproceedings{chen2022invariance,
  author = {Yongqiang Chen and Yonggang Zhang and Han Yang and Kaili Ma and Binghui Xie and Tongliang Liu and Bo Han and James Cheng},
  title = {{Invariance Principle Meets Out-of-Distribution Generalization on Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=KLy4c9zHB4},
}
Figure