OOD-GNN: Out-of-Distribution Generalized Graph Neural Network
Abstract
Graph neural networks (GNNs) have achieved impressive performance when testing and training graph data come from identical distribution. However, existing GNNs lack out-of-distribution generalization abilities so that their performance substantially degrades when there exist distribution shifts between testing and training graph data. To solve this problem, in this work, we propose an out-of-distribution generalized graph neural network (OOD-GNN) for achieving satisfactory performance on unseen testing graphs that have different distributions with training graphs. Our proposed OOD-GNN employs a novel nonlinear graph representation decorrelation method utilizing random Fourier features, which encourages the model to eliminate the statistical dependence between relevant and irrelevant graph representations through iteratively optimizing the sample graph weights and graph encoder. We further present a global weight estimator to learn weights for training graphs such that variables in graph representations are forced to be independent. The learned weights help the graph encoder to get rid of spurious correlations and, in turn, concentrate more on the true connection between learned discriminative graph representations and their ground-truth labels. We conduct extensive experiments to validate the out-of-distribution generalization abilities on two synthetic and 12 real-world datasets with distribution shifts. The results demonstrate that our proposed OOD-GNN significantly outperforms state-of-the-art baselines.
Benchmark Results
Tested on 9 datasets 12 baseline values reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
TU Dortmund
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | WL-MLP | 0.9792 | |
| 2 | MSH-GNN | 0.9640
±0.0070 | |
| 3 | CoCN | 0.8722
±0.0013 | |
| 23 | GCN | 0.8260
±0.0220 best reported | best at pub: Fast Graph Representation Learning with PyTorch Geometric (ICLR 2019) best today: Scalable Expressiveness through Preprocessed Graph Perturbations (2024) |
| 30 | GIN | 0.8220
±0.0210 best reported | best at pub: On the Equivalence between Graph Isomorphism Testing and Function Approximation with GNNs (NeurIPS 2019) best today: Scalable Expressiveness through Preprocessed Graph Perturbations (2024) |
| 39 | SAGPool | 0.6700
±0.0170 | prev best: Edge Contraction Pooling for Graph Neural Networks (2019) best today: Embedding Graphs on Grassmann Manifold (2022) Improvement within reported uncertainty; not highlighted. |
| 57 | TopKPool | 0.8140
±0.0094 best reported | best at pub: Memory-Based Graph Networks (ICLR 2020) best today: Embedding Graphs on Grassmann Manifold (2022) |
| 73 | FactorGCN | 0.8120
±0.0140 best reported | best at pub: Factorizable Graph Convolutional Networks (NeurIPS 2020) |
| 136 | GraphSAGE | 0.7970
±0.0170 | |
| 151 | MLP | 0.7920
±0.0240 | |
| 254 | PNA | 0.7473
±0.0109 best reported | best today: Beyond Message Passing: Neural Graph Pattern Machine (ICML 2025) |
| 314 | OOD-GNN | 0.6720
±0.0180 | This paper |
| 326 | GCN-virtual | 0.6150
±0.0160 | This paper |
| 342 | GIN-virtual | 0.5480
±0.0270 | This paper |
MoleculeNet
| # | Model | ROC-AUC ↑ | Paper |
|---|---|---|---|
| 1 | HIMP | 0.8740
±0.0050 | |
| 2 | GINE w/ VN | 0.8720
±0.0030 | |
| 3 | NaiveGINe+ K=3 w/ VN | 0.8700
±0.0040 | |
| 14 | GCN | 0.8400
±0.0040 best reported | best at pub: Graph convolutions that can finally model local structure (2020) |
| 24 | GIN | 0.8290
±0.0069 best reported | |
| 131 | GCN-virtual | 0.7750
±0.0090 | This paper |
| 135 | GraphSAGE | 0.7744
±0.0038 |
| # | Model | ROC-AUC ↑ | Paper |
|---|---|---|---|
| 1 | ProtoMol | 0.9140
±0.0030 | |
| 2 | MMSG | 0.9080
±0.0050 | |
| 3 | MemGNN | 0.9070 | |
| 43 | GIN | 0.8646
±0.0081 best reported | best at pub: Optimal Transport Graph Neural Networks (2020) |
| 64 | GCN | 0.7920
±0.0140 | prev best: Memory-Based Graph Networks (ICLR 2020) best today: Atom-Motif Contrastive Transformer for Molecular Property Prediction (2023) Improvement within reported uncertainty; not highlighted. |
| 82 | GraphSAGE | 0.8451 | |
| 174 | OOD-GNN | 0.8000 | This paper |
| 286 | GCN-virtual | 0.6890
±0.0700 | This paper |
| # | Model | ROC-AUC ↑ | Paper |
|---|---|---|---|
| 1 | MAGPrompt+ | 0.9432
±0.0238 | |
| 2 | CamS-LLaMA | 0.9420 | |
| 3 | SE(3)-I MPPH | 0.9400
±0.0210 | |
| 34 | GIN | 0.8875
±0.0049 best reported | |
| 38 | GCN | 0.8810
±0.0360 best reported | best at pub: Molecule Attention Transformer (NeurIPS 2020) |
| 57 | GraphSAGE | 0.8304
±0.0038 | |
| 207 | GCN-virtual | 0.6780
±0.0240 | This paper |
| # | Model | ROC-AUC ↑ | Paper |
|---|---|---|---|
| 1 | SE(3)-I MPPH | 0.9930
±0.0040 | |
| 2 | KA-GCN | 0.9920
±0.0050 | |
| 3 | KA-GAT | 0.9910
±0.0050 | |
| 19 | GCN | 0.9130
±0.0170 | prev best: Adaptive Graph Convolutional Neural Networks (AAAI 2018) |
| 31 | GCN-virtual | 0.8860
±0.0210 | This paper |
| 36 | GIN | 0.8810
±0.0250 | This paper |
| 238 | GraphSAGE | 0.5580
±0.0620 |
| # | Model | ROC-AUC ↑ | Paper |
|---|---|---|---|
| 1 | KA-GAT | 0.8470
±0.0020 | |
| 2 | KA-GCN | 0.8420
±0.0010 | |
| 3 | GraphKAN | 0.8370
±0.0010 | |
| 66 | GIN | 0.6403
±0.0104 best reported | |
| 125 | GCN | 0.5960
±0.0180 | prev best: Adaptive Graph Convolutional Neural Networks (AAAI 2018) Improvement within reported uncertainty; not highlighted. |
| 188 | GCN-virtual | 0.5980
±0.0150 | This paper |
| 227 | GraphSAGE | 0.5670
±0.0010 |
| # | Model | ROC-AUC ↑ | Paper |
|---|---|---|---|
| 1 | GeomGCL | 0.7630 | |
| 2 | LiGhT DeepGPT | 0.7570
±0.0110 | |
| 3 | CoMPT | 0.7550 | |
| 14 | GCN | 0.7350
±0.0020 best reported | best at pub: Graph convolutions that can finally model local structure (2020) |
| 32 | GIN | 0.7095
±0.0027 best reported | |
| 62 | GraphSAGE | 0.6775
±0.0041 | |
| 72 | GCN-virtual | 0.6670
±0.0050 | This paper |
| # | Model | RMSE ↓ | Paper |
|---|---|---|---|
| 1 | Graphormer-SPIS | 0.4840
±0.0050 | |
| 2 | Graphormer-SPD | 0.4920
±0.0040 | |
| 3 | conan-FGW | 0.5140
±0.0190 | |
| 7 | GCN | 0.5640
±0.0150 best reported | best at pub: Memory-Based Graph Networks (ICLR 2020) best today: On Structural Expressive Power of Graph Transformers (KDD 2023) |
| 18 | GraphSAGE | 0.6010
±0.0080 | |
| 25 | GIN | 0.6260
±0.0170 best reported | best at pub: Optimal Transport Graph Neural Networks (2020) best today: On Structural Expressive Power of Graph Transformers (KDD 2023) |
| 88 | GCN-virtual | 1.0200
±0.1000 | This paper |
| # | Model | RMSE ↓ | Paper |
|---|---|---|---|
| 1 | SE(3)-I MPPH | 0.3540
±0.0530 | |
| 2 | ECFP-4 + RF | 0.5600
±0.0660 | |
| 3 | GPSE + GPS | 0.6820 | |
| 61 | GCN-virtual | 2.1900
±0.1200 | This paper |
| 69 | GIN | 2.3460
±0.1220 best reported | |
| 77 | GCN | 2.6400
±0.2400 |
