🤖 AI Summary
Graph Neural Networks (GNNs) exhibit limited out-of-distribution (OOD) generalization due to their implicit i.i.d. assumption over training and test graphs. Method: We systematically evaluate Graph Transformers (GTs) and GT-MPNN hybrids under diverse distribution shifts, benchmarking against standard Message-Passing Neural Networks (MPNNs). We propose a model-agnostic post-hoc analysis framework that quantifies domain alignment and class separability to uncover OOD generalization mechanisms, and develop a standardized OOD evaluation benchmark with integrated domain generalization algorithms. Results: GTs significantly outperform MPNNs on OOD generalization—even without specialized robustness techniques—demonstrating superior intrinsic robustness and generalization capability. This validates the critical advantage of self-attention mechanisms in capturing structural invariances essential for graph-level OOD generalization.
📝 Abstract
Deep learning on graphs has shown remarkable success across numerous applications, including social networks, bio-physics, traffic networks, and recommendation systems. Regardless of their successes, current methods frequently depend on the assumption that training and testing data share the same distribution, a condition rarely met in real-world scenarios. While graph-transformer (GT) backbones have recently outperformed traditional message-passing neural networks (MPNNs) in multiple in-distribution (ID) benchmarks, their effectiveness under distribution shifts remains largely unexplored.
In this work, we address the challenge of out-of-distribution (OOD) generalization for graph neural networks, with a special focus on the impact of backbone architecture. We systematically evaluate GT and hybrid backbones in OOD settings and compare them to MPNNs. To do so, we adapt several leading domain generalization (DG) algorithms to work with GTs and assess their performance on a benchmark designed to test a variety of distribution shifts. Our results reveal that GT and hybrid GT-MPNN backbones consistently demonstrate stronger generalization ability compared to MPNNs, even without specialized DG algorithms.
Additionally, we propose a novel post-training analysis approach that compares the clustering structure of the entire ID and OOD test datasets, specifically examining domain alignment and class separation. Demonstrating its model-agnostic design, this approach not only provided meaningful insights into GT and MPNN backbones. It also shows promise for broader applicability to DG problems beyond graph learning, offering a deeper perspective on generalization abilities that goes beyond standard accuracy metrics. Together, our findings highlight the promise of graph-transformers for robust, real-world graph learning and set a new direction for future research in OOD generalization.