arXiv:2505.15177cs.LG2025-05IJCAI被引 8

利用拉普拉斯特征值差距检测图数据中的异常样本,无需训练即可用。

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

  • 通过特征值差距调整高阶特征,捕捉图结构异常
  • 在多个基准数据集上达到当前最优性能
  • 无需训练、可直接嵌入现有模型,适合部署场景

图级分布外(OOD)检测对图神经网络在真实场景中的应用至关重要。本文观察到,分布内(ID)与分布外(OOD)图样本在拉普拉斯矩阵最大与次大特征值之间的关系存在显著差异:OOD样本常表现出异常的谱间隙(即最大与次大特征值之差)。基于此,我们提出SpecGap,一种高效的后处理式图级OOD检测方法。SpecGap通过将与次大特征值相关的分量按谱间隙缩放后从高阶特征中减去(形式为:$/mathbf{X}-ig(λ_n-λ_{n-1}ig) /mathbf{u}_{n-1} /mathbf{v}_{n-1}^T$),实现对异常图的识别。该方法在多个基准数据集上表现优异,并通过大量消融实验与理论分析验证了其有效性。作为无参数的后处理方法,SpecGap无需额外训练或模型修改,可轻松集成至现有图神经网络模型中。

原文摘要 · Abstract (English)

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., $\mathbf{X}-\left(λ_n-λ_{n-1}\right) \mathbf{u}_{n-1} \mathbf{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.

图神经网络异常检测谱分析

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。