ResearchTrend.AI
  • Papers
  • Communities
  • Events
  • Blog
  • Pricing
Papers
Communities
Social Events
Terms and Conditions
Pricing
Parameter LabParameter LabTwitterGitHubLinkedInBlueskyYoutube

© 2025 ResearchTrend.AI, All rights reserved.

  1. Home
  2. Papers
  3. 2505.15177
12
0

SpectralGap: Graph-Level Out-of-Distribution Detection via Laplacian Eigenvalue Gaps

21 May 2025
Jiawei Gu
Ziyue Qiao
Zechao Li
ArXivPDFHTML
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: \textit{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)un−1vn−1T\mathbf{X}-\left(\lambda_n-\lambda_{n-1}\right) \mathbf{u}_{n-1} \mathbf{v}_{n-1}^TX−(λn​−λn−1​)un−1​vn−1T​). 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.

View on arXiv
@article{gu2025_2505.15177,
  title={ SpectralGap: Graph-Level Out-of-Distribution Detection via Laplacian Eigenvalue Gaps },
  author={ Jiawei Gu and Ziyue Qiao and Zechao Li },
  journal={arXiv preprint arXiv:2505.15177},
  year={ 2025 }
}
Comments on this paper