Graph Out-of-Distribution (OOD) detection aims to identify whether a test graph deviates from the distribution of graphs observed during training, which is critical for ensuring the reliability of Graph Neural Networks (GNNs) when deployed in open-world scenarios. Recent advances in graph OOD detection have focused on test-time training techniques that facilitate OOD detection without accessing potential supervisory information (e.g., training data). However, most of these methods employ a one-pass inference paradigm, which prevents them from progressively correcting erroneous predictions to amplify OOD signals. To this end, we propose a \textbf{S}elf-\textbf{I}mproving \textbf{G}raph \textbf{O}ut-\textbf{o}f-\textbf{D}istribution detector (SIGOOD), which is an unsupervised framework that integrates continuous self-learning with test-time training for effective graph OOD detection. Specifically, SIGOOD generates a prompt to construct a prompt-enhanced graph that amplifies potential OOD signals. To optimize prompts, SIGOOD introduces an Energy Preference Optimization (EPO) loss, which leverages energy variations between the original test graph and the prompt-enhanced graph. By iteratively optimizing the prompt by involving it into the detection model in a self-improving loop, the resulting optimal prompt-enhanced graph is ultimately used for OOD detection. Comprehensive evaluations on 21 real-world datasets confirm the effectiveness and outperformance of our SIGOOD method. The code is at https://github.com/Ee1s/SIGOOD.
翻译:图分布外(OOD)检测旨在判断测试图是否偏离训练阶段观测到的图分布,这对于确保图神经网络在开放世界场景中部署时的可靠性至关重要。近年来,图OOD检测的研究进展主要集中在测试时训练技术上,这些技术能够在无需访问潜在监督信息(如训练数据)的情况下促进OOD检测。然而,现有方法大多采用单次推理范式,无法通过渐进修正错误预测来增强OOD信号。为此,我们提出一种**自优化图分布外检测器(SIGOOD)**——一种将持续自学习与测试时训练相结合的无监督框架,用于实现高效的图OOD检测。具体而言,SIGOOD通过生成提示构建提示增强图,以放大潜在的OOD信号。为优化提示,SIGOOD设计了能量偏好优化损失函数,该函数利用原始测试图与提示增强图之间的能量差异。通过将提示嵌入检测模型并参与自优化循环的迭代优化,最终将生成的最优提示增强图用于OOD检测。在21个真实数据集上的综合实验验证了SIGOOD方法的有效性与优越性。代码开源地址:https://github.com/Ee1s/SIGOOD。