Unifying Graph Out-of-Distribution Generalization and Detection through Spectral Contrastive Invariant learning
Tianyin Liao, Ge Lan, Rui Chen, Ran Zhang, Zhiming Chen, Xiao Wang, Ziwei Zhang
Abstract
Graph representation learning encounters great difficulties under distribution shifts. This challenge has aroused considerable interest in graph out-of-distribution (OOD) generalization and detection, which can effectively handle covariate and semantic shifts, respectively. However, real-world graph tasks often involve complex unlabeled wild data with both covariate and semantic shifts, motivating a critical question: can we design a unified framework for joint graph OOD generalization and detection? Invariant graph learning, which extracts stable relationships between features and labels, offers a promising candidate for joint OOD generalization and detection, but faces three critical challenges (1) how to model invariant subgraphs with unlabeled data, (2) how to ensure graph representations benefit both tasks, and (3) how to integrate labeled and unlabeled data under proper invariance principles. To solve these challenges, we introduce Unified Graph Out-Of-Distribution generalization and detection framework (UniGOOD) with three tailored components. Specifically, to capture subgraphs without relying on labels, we first propose the distributional invariant subgraph generator to model subgraph conditional distributions. Next, to enable generalization and reliable detection, we propose the cross-invariant-subgraph spectral contrastive learning module to learn invariant representations from subgraph distributions. Finally, for accurate subgraph discovery across labeled and unlabeled graphs, we design the triple-population invariance regularizer to enforce the invariance principle through spectral graph theory. We prove that our method theoretically ensures accurate invariant subgraphs, enabling effective OOD generalization and detection. Experiments show that UniGOOD outperforms state-of-the-art baselines for both graph OOD generalization and detection tasks.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get fea18eed-f366-4058-a1b5-ac4bf0ae94b3Related papers
- Bridging OOD Detection and Generalization: A Graph-Theoretic ViewHan Wang, Sharon LiNeurIPS 2024 · 7 citations
- HyperGOOD: Towards Out-of-Distribution Detection in HypergraphsTingyi Cai, Yunliang Jiang, Ming Li, Changqin Huang et al.AAAI 2026
- Learning Causally Invariant Representations for Out-of-Distribution Generalization on GraphsYongqiang Chen, Yonggang Zhang, Yatao Bian, Han Yang et al.NeurIPS 2022 · 246 citations
- Disentangling Invariant Subgraph via Variance Contrastive Estimation under Distribution ShiftsHaoyang Li, Xin Wang, Xueling Zhu, Weigao Wen et al.ICML 2025
- Invariant Graph Transformer for Out-of-Distribution GeneralizationTianyin Liao, Ziwei Zhang, Yufei Sun, Chunyu Hu et al.KDD 2026 · 2 citations
