Invariant Graph Transformer for Out-of-Distribution Generalization
Tianyin Liao, Ziwei Zhang, Yufei Sun, Chunyu Hu, Jianxin Li
Abstract
Graph Transformers (GTs) have demonstrated great effectiveness across various graph analytical tasks. However, the existing GTs focus on training and testing graph data originated from the same distribution, but fail to generalize under distribution shifts. Graph invariant learning, aiming to capture generalizable graph structural patterns with labels under distribution shifts, is potentially a promising solution, but how to design attention mechanisms and positional and structural encodings (PSEs) based on graph invariant learning principles remains challenging. To solve these challenges, we introduce Graph Out-Of-Distribution generalized Transformer (GOODFormer), aiming to learn generalized graph representations by capturing invariant relationships between predictive graph structures and labels through jointly optimizing three modules. Specifically, we first develop a GT-based entropy-guided invariant subgraph disentangler to separate invariant and variant subgraphs while preserving the sharpness of the attention function. Next, we design an evolving subgraph positional and structural encoder to effectively and efficiently capture the encoding information of dynamically changing subgraphs during training. Finally, we propose an invariant learning module utilizing subgraph node representations and encodings to derive generalizable graph representations that can to unseen graphs. We also provide theoretical justifications for our method. Extensive experiments on benchmark datasets demonstrate the superiority of our method over state-ofthe-art baselines under distribution shifts. CCS Concepts • Mathematics of computing → Graph algorithms; • Computing methodologies → Neural networks.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 1e90ee9a-00e6-4cd4-aaf0-e6f9cc449ad6Builds on33
- Do Transformers Really Perform Badly for Graph Representation?Chengxuan Ying, Tianle Cai, Shengjie Luo, Shuxin Zheng et al.NeurIPS 2021 · 1,632 citations
- Measuring and Relieving the Over-Smoothing Problem for Graph Neural Networks from the Topological ViewDeli Chen, Yankai Lin, Wei Li, Peng Li et al.AAAI 2020 · 1,353 citations
- Recipe for a General, Powerful, Scalable Graph TransformerLadislav Rampásek, Michael Galkin, Vijay Prakash Dwivedi, Anh Tuan Luu et al.NeurIPS 2022 · 1,216 citations
- Out-of-Distribution Generalization via Risk Extrapolation (REx)David Krueger, Ethan Caballero, Jörn-Henrik Jacobsen, Amy Zhang et al.ICML 2021 · 1,163 citations
- Rethinking Graph Transformers with Spectral AttentionDevin Kreuzer, Dominique Beaini, William L. Hamilton, Vincent Létourneau et al.NeurIPS 2021 · 854 citations
Related papers
- Learning Invariant Graph Representations for Out-of-Distribution GeneralizationHaoyang Li, Ziwei Zhang, Xin Wang, Wenwu ZhuNeurIPS 2022 · 170 citations
- Unifying Graph Out-of-Distribution Generalization and Detection through Spectral Contrastive Invariant learningTianyin Liao, Ge Lan, Rui Chen, Ran Zhang et al.WWW 2026
- A Unified Invariant Learning Framework for Graph ClassificationYongduo Sui, Jie Sun, Shuyao Wang, Zemin Liu et al.KDD 2025 · 1 citation
- Towards OOD Generalization in Dynamic Graphs via Causal Invariant LearningXinxun Zhang, Pengfei Jiao, Mengzhou Gao, Tianpeng Li et al.AAAI 2026
- From Distribution to Geometry: Stable Graph Generalization via Invariant BarycentersHangyuan Du, Rong Wang, Weihong Zhang, Lu Bai et al.ICML 2026
