Energy-based Out-of-Distribution Detection for Graph Neural Networks
Qitian Wu, Yiting Chen, Chenxiao Yang, Junchi Yan
Abstract
Learning on graphs, where instance nodes are inter-connected, has become one of the central problems for deep learning, as relational structures are pervasive and induce data inter-dependence which hinders trivial adaptation of existing approaches that assume inputs to be i.i.d. sampled. However, current models mostly focus on improving testing performance of in-distribution data and largely ignore the potential risk w.r.t. out-of-distribution (OOD) testing samples that may cause negative outcome if the prediction is overconfident on them. In this paper, we investigate the under-explored problem, OOD detection on graph-structured data, and identify a provably effective OOD discriminator based on an energy function directly extracted from graph neural networks trained with standard classification loss. This paves a way for a simple, powerful and efficient OOD detection model for GNN-based learning on graphs, which we call GNNSAFE. It also has nice theoretical properties that guarantee an overall distinguishable margin between the detection scores for in-distribution and OOD samples, which, more critically, can be further strengthened by a learning-free energy belief propagation scheme. For comprehensive evaluation, we introduce new benchmark settings that evaluate the model for detecting OOD data from both synthetic and real distribution shifts (crossdomain graph shifts and temporal graph shifts). The results show that GNNSAFE achieves up to 17.0% AUROC improvement over state-of-the-arts and it could serve as simple yet strong baselines in such an under-developed area. The codes are available at https://github.com/qitianwu/GraphOOD-GNNSafe .
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 a3ee712a-77d8-4672-9e7d-742de72cbeafCited by top-tier papers56
- Simplifying and Empowering Transformers for Large-Graph RepresentationsQitian Wu, Wentao Zhao, Chenxiao Yang, Hengrui Zhang et al.NeurIPS 2023 · 318 citations
- Dream the Impossible: Outlier Imagination with Diffusion ModelsXuefeng Du, Yiyou Sun, Jerry Zhu, Yixuan LiNeurIPS 2023 · 114 citations
- Unleashing the Power of Graph Data Augmentation on Covariate Distribution ShiftYongduo Sui, Qitian Wu, Jiancan Wu, Qing Cui et al.NeurIPS 2023 · 63 citations
- Graph Out-of-Distribution Generalization via Causal InterventionQitian Wu, Fan Nie, Chenxiao Yang, Tianyi Bao et al.WWW 2024 · 58 citations
- How Does Unlabeled Data Provably Help Out-of-Distribution Detection?Xuefeng Du, Zhen Fang, Ilias Diakonikolas, Yixuan LiICLR 2024 · 39 citations
Builds on21
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Energy-based Out-of-distribution DetectionWeitang Liu, Xiaoyun Wang, John D. Owens, Yixuan LiNeurIPS 2020 · 2,213 citations
- WILDS: A Benchmark of in-the-Wild Distribution ShiftsPang Wei Koh, Shiori Sagawa, Henrik Marklund, Sang Michael Xie et al.ICML 2021 · 1,773 citations
- ReAct: Out-of-distribution Detection With Rectified ActivationsYiyou Sun, Chuan Guo, Yixuan LiNeurIPS 2021 · 733 citations
- Your classifier is secretly an energy based model and you should treat it like oneWill Grathwohl, Kuan-Chieh Wang, Jörn-Henrik Jacobsen, David Duvenaud et al.ICLR 2020 · 643 citations
Related papers
- Decoupled Graph Energy-based Model for Node Out-of-Distribution Detection on Heterophilic GraphsYuhan Chen, Yihong Luo, Yifan Song, Pengwen Dai et al.ICLR 2025
- Bounded and Uniform Energy-based Out-of-distribution Detection for GraphsShenzhi Yang, Bin Liang, An Liu, Lin Gui et al.ICML 2024 · 11 citations
- Graph Out-of-Distribution Detection Goes Neighborhood ShapingTianyi Bao, Qitian Wu, Zetian Jiang, Yiting Chen et al.ICML 2024 · 11 citations
- HyperGOOD: Towards Out-of-Distribution Detection in HypergraphsTingyi Cai, Yunliang Jiang, Ming Li, Changqin Huang et al.AAAI 2026
- From Subtle to Significant: Prompt-Driven Self-Improving Optimization in Test-Time Graph OOD DetectionLuzhi Wang, Xuanshuo Fu, He Zhang, Chuang Liu et al.AAAI 2026
