Unleashing the Power of Graph Data Augmentation on Covariate Distribution Shift

Yongduo Sui, Xiang Wang, Jiancan Wu, An Zhang, Xiangnan He, Zhou, Jun, Wang, Xiang, He, Xiangnan · DOI

Abstract

The issue of distribution shifts is emerging as a critical concern in graph representation learning. From the perspective of invariant learning and stable learning, a recently well-established paradigm for out-of-distribution generalization, stable features of the graph are assumed to causally determine labels, while environmental features tend to be unstable and can lead to the two primary types of distribution shifts. The correlation shift is often caused by the spurious correlation between environmental features and labels that differs between the training and test data; the covariate shift often stems from the presence of new environmental features in test data. However, most strategies, such as invariant learning or graph augmentation, typically struggle with limited training environments or perturbed stable features, thus exposing limitations in handling the problem of covariate shift. To address this challenge, we propose a simple-yet-effective data augmentation strategy, Adversarial Invariant Augmentation (AIA), to handle the covariate shift on graphs. Specifically, given the training data, AIA aims to extrapolate and generate new environments, while concurrently preserving the original stable features during the augmentation process. Such a design equips the graph classification model with an enhanced capability to identify stable features in new environments, thereby effectively tackling the covariate shift in data. Extensive experiments with in-depth empirical analysis demonstrate the superiority of our approach.

Introduction

Graph Neural Networks (GNNs) typically rely on the independent and identically distributed (i.i.d.) assumption, which fails when training and test data distributions diverge. These distribution shifts are categorized into correlation shifts, where spurious correlations between environmental features and labels change, and covariate shifts, where test data introduces entirely new environmental features. While correlation shifts have been widely studied, covariate shifts—such as a molecule possessing a novel chemical scaffold—remain a significant challenge. Existing invariant learning methods often require multiple training environments, and standard augmentations like DropEdge can inadvertently destroy the "stable features" (causal substructures) necessary for correct classification.

Adversarial Invariant Augmentation (AIA)

To overcome these limitations, we introduce Adversarial Invariant Augmentation (AIA). AIA is designed around two core principles: creating maximal environmental discrepancy to force generalization and maintaining stable feature consistency to preserve label-relevant information.

The framework employs a dual-network architecture:

  1. Stable Feature Generator: This network identifies and protects the informative, causal substructures of the graph. It produces a soft mask that highlights the "stable" parts of the graph that should remain untouched.
  2. Adversarial Augmenter: This network learns to perturb the non-stable (environmental) features in a way that maximizes the GNN's loss. By framing augmentation as an adversarial game, AIA forces the model to become robust against the "worst-case" environmental shifts it might encounter at test time.

By surgically applying adversarial perturbations only to environmental features while shielding the stable ones, AIA enables the GNN to focus on invariant features, making it robust to covariate shifts.

The AIA framework overview, illustrating the interaction between the Stable Feature Generator, Adversarial Augmenter, and the GNN Classifier.

Experimental Evaluation

We evaluated AIA across synthetic datasets (Motif, CMNIST) and real-world molecular benchmarks (Molbbbp, Molhiv) from the Open Graph Benchmark (OGB). These datasets were specifically chosen to test out-of-distribution (OOD) generalization under covariate shift, such as splitting molecular data by scaffold or size.

AIA consistently outperformed 16 baselines, including state-of-the-art graph generalization and augmentation methods. Key findings include:

  • Superior Generalization: AIA achieved significant performance gains, such as a ~3.17% improvement over the best baseline on CMNIST and ~2-5% on the Motif dataset.
  • Robustness to Covariate Shift: AIA maintains high accuracy even under significant distribution gaps. In the Motif dataset, for example, it successfully learns to keep the "house" motif intact while heavily perturbing the "ladder" or "tree" base structures.
  • Comparison with Random Augmentation: The results demonstrate that simple random edge dropping (DropEdge) can hurt performance because it is just as likely to remove a critical functional group in a molecule as it is to remove an irrelevant scaffold. AIA's targeted approach avoids this pitfall.
Performance comparison across synthetic and real-world datasets. AIA consistently achieves the best results across various distribution shifts.

Conclusion

AIA addresses the critical challenge of covariate shift in graph data by combining adversarial exploration with invariant feature preservation. By generating diverse environments while shielding causal substructures, AIA provides a robust solution for out-of-distribution graph classification. While the adversarial training process adds some computational complexity, the gains in generalization across diverse benchmarks justify the overhead. Future work will explore more advanced generative models, such as graph diffusion, to create even more diverse and realistic augmented environments.

Summary updated

BibTeX
@inproceedings{sui2023unleashing,
  author = {Yongduo Sui and Xiang Wang and Jiancan Wu and An Zhang and Xiangnan He and Zhou, Jun and Wang, Xiang and He, Xiangnan},
  title = {{Unleashing the Power of Graph Data Augmentation on Covariate Distribution Shift}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=hIGZujtOQv},
}
Figure