Environment-Aware Dynamic Graph Learning for Out-of-Distribution Generalization

Haonan Yuan, Qingyun Sun, Xingcheng Fu, Ziwei Zhang, Cheng Ji, Hao Peng, Jianxin Li

Abstract

Dynamic Graph Neural Networks (DGNNs) typically assume that training and testing data share the same distribution. However, real-world dynamic graphs are often influenced by latent environmental factors—such as seasonal changes or economic shifts—that introduce spurious correlations and lead to poor Out-of-Distribution (OOD) generalization. We present EAGLE (Environment-Aware dynamic Graph LEarning), a novel framework that explicitly models and diversifies these latent environments. By disentangling spatio-temporal patterns into invariant causal components and variant spurious ones, EAGLE utilizes causal interventions to achieve robust performance across distribution shifts.

Introduction

The performance of DGNNs often degrades when the underlying environment changes between training and deployment. For instance, a recommendation system might learn a strong correlation between "iced coffee" and purchases during summer months. If the environment shifts to winter, this spurious correlation fails, as "hot coffee" becomes the more likely purchase despite the user's invariant general preference for coffee. The challenge lies in modeling these hidden environments from raw graph data and identifying the invariant patterns that persist across them.

Toy example of distribution shifts and the Structural Causal Model (SCM) used to analyze them.

The EAGLE Framework

EAGLE follows a four-stage paradigm: Modeling, Inferring, Discriminating, and Generalizing.

  1. Environment-Aware DGNN (EA-DGNN): The model uses multi-channel convolutions to disentangle node features into $K$ distinct subspaces, each corresponding to a potential latent environment.
  2. Environment Instantiation (ECVAE): To handle unseen future environments, a Conditional Variational Autoencoder (ECVAE) infers environment distributions and generates synthetic samples, diversifying the training scenarios.
  3. Invariant Pattern Recognition (IPR): Through a dynamic programming approach, EAGLE partitions learned patterns into "invariant" (stable/causal) and "variant" (shifting/spurious) sets based on their variance across environments.
  4. Spatio-temporal Causal Intervention: To break reliance on spurious correlations, EAGLE performs node-wise interventions using $do$-calculus. It replaces the variant part of a node's representation with a random sample from a different environment, forcing the link predictor to rely solely on invariant features.
The overall architecture of the EAGLE framework.

Experiments and Results

The framework was evaluated on real-world datasets including COLLAB (academic collaborations), Yelp (business reviews), and ACT (student actions). EAGLE consistently outperformed state-of-the-art baselines such as DIDA, IRM, and DySAT.

Notably, on the COLLAB dataset, EAGLE achieved an AUC of 84.41% under OOD shifts, significantly higher than the 81.87% achieved by the next best model, DIDA. The performance gap widened as distribution shifts became more severe, demonstrating EAGLE's superior ability to filter out spurious noise. Ablation studies confirmed that each component—instantiation, pattern recognition, and intervention—is critical to the model's success.

Conclusion

EAGLE represents a significant step forward in making dynamic graph learning robust to real-world distribution shifts. By treating environments as latent factors and applying causal principles, it effectively filters out spurious correlations. Future work may extend this approach to graph-level tasks and explore the integration of ground-truth environment labels for enhanced interpretability.

Summary updated

BibTeX
@inproceedings{yuan2023environment,
  author = {Haonan Yuan and Qingyun Sun and Xingcheng Fu and Ziwei Zhang and Cheng Ji and Hao Peng and Jianxin Li},
  title = {{Environment-Aware Dynamic Graph Learning for Out-of-Distribution Generalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=n8JWIzYPRz},
}
Figure