SpectralGap: Graph-Level Out-of-Distribution Detection via Laplacian Eigenvalue Gaps
Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence. Main Track. Pages 5244-5252.
https://doi.org/10.24963/ijcai.2025/584
Keywords
- Machine Learning: ML: Open-World/Open-Set/OOD Learning
Abstract
The task of graph-level out-of-distribution (OOD) detection is crucial for deploying graph neural networks in real-world settings. In this paper, we observe a significant difference in the relationship between the largest and second-largest eigenvalues of the Laplacian matrix for in-distribution (ID) and OOD graph samples: OOD samples often exhibit anomalous spectral gaps (the difference between the largest and second-largest eigenvalues). This observation motivates us to propose SpecGap, an effective post-hoc approach for OOD detection on graphs. SpecGap adjusts features by subtracting the component associated with the second-largest eigenvalue, scaled by the spectral gap, from the high-level features (i.e., X - (λn - λn-1) u_n-1 v_n-1^T). SpecGap achieves state-of-the-art performance across multiple benchmark datasets. We present extensive ablation studies and comprehensive theoretical analyses to support our empirical results. As a parameter-free post-hoc method, SpecGap can be easily integrated into existing graph neural network models without requiring any additional training or model modification.
@inproceedings{ijcai2025p584,
title = {SpectralGap: Graph-Level Out-of-Distribution Detection via Laplacian Eigenvalue Gaps},
author = {Gu, Jiawei and Qiao, Ziyue and Li, Zechao},
booktitle = {Proceedings of the Thirty-Fourth International Joint Conference on
Artificial Intelligence, {IJCAI-25}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {James Kwok},
pages = {5244--5252},
year = {2025},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2025/584},
url = {https://doi.org/10.24963/ijcai.2025/584},
}
TY - CPAPER TI - SpectralGap: Graph-Level Out-of-Distribution Detection via Laplacian Eigenvalue Gaps AU - Gu, Jiawei AU - Qiao, Ziyue AU - Li, Zechao T2 - Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence, IJCAI-25 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2025 SP - 5244 EP - 5252 DO - 10.24963/ijcai.2025/584 UR - https://doi.org/10.24963/ijcai.2025/584 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: