{"type":"ScholarlyArticle","title":"SpectralGap: Graph-Level Out-of-Distribution Detection via Laplacian Eigenvalue Gaps","authors":[{"name":"Jiawei Gu","slug":"jiawei-gu","given":"Jiawei","family":"Gu","affiliation":""},{"name":"Ziyue Qiao","slug":"ziyue-qiao","given":"Ziyue","family":"Qiao","affiliation":""},{"name":"Zechao Li","slug":"zechao-li","given":"Zechao","family":"Li","affiliation":""}],"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.","doi":"10.24963/ijcai.2025/584","url":"https://ijcai.org/proceedings/2025/584","pdf":"https://ijcai.org/proceedings/2025/0584.pdf","markdown":"https://ijcai.org/proceedings/2025/584.md","bibtex":"https://ijcai.org/proceedings/2025/bibtex/584","volume":{"slug":"2025","title":"Proceedings of the Thirty-Fourth International Joint Conference on Artificial Intelligence","short_title":"IJCAI 2025","url":"https://ijcai.org/proceedings/2025/","year":2025,"location":"Montreal, Canada","dates":"16-22 August 2025","editors":"James Kwok","isbn":"978-1-956792-06-5","publisher":"International Joint Conferences on Artificial Intelligence Organization","doi_prefix":"10.24963/ijcai.2025"},"section":"Machine Learning","track":"Main Track","number":584,"pages":{"first":5244,"last":5252},"keywords":["Machine Learning: ML: Open-World/Open-Set/OOD Learning"],"videos":[],"references":[],"license_note":"Copyright International Joint Conferences on Artificial Intelligence."}