A key challenge in graph out-of-distribution (OOD) detection lies in the absence of ground-truth OOD samples during training. Existing methods are typically optimized to capture features within the in-distribution (ID) data and calculate OOD scores, which often limits pre-trained models from representing distributional boundaries, leading to unreliable OOD detection. Moreover, the latent structure of graph data is often governed by multiple underlying factors, which remains less explored. To address these challenges, we propose a novel test-time graph OOD detection method, termed BaCa, that calibrates OOD scores using dual dynamically updated dictionaries without requiring fine-tuning the pre-trained model. Specifically, BaCa estimates graphons and applies a mix-up strategy solely with test samples to generate diverse boundary-aware discriminative topologies, eliminating the need for exposing auxiliary datasets as outliers. We construct dual dynamic dictionaries via priority queues and attention mechanisms to adaptively capture latent ID and OOD representations, which are then utilized for boundary-aware OOD score calibration. To the best of our knowledge, extensive experiments on real-world datasets show that BaCa significantly outperforms existing state-of-the-art methods in OOD detection.
翻译:图分布外检测的一个关键挑战在于训练阶段缺乏真实分布外样本。现有方法通常通过优化以捕捉分布内数据的特征并计算分布外得分,但这往往限制了预训练模型对分布边界的表征能力,导致分布外检测结果不可靠。此外,图数据的潜在结构常受多种底层因素支配,这一问题尚未得到充分探索。为解决这些挑战,我们提出了一种新颖的测试时图分布外检测方法BaCa,该方法通过双动态更新词典对分布外得分进行校准,无需对预训练模型进行微调。具体而言,BaCa通过估计图函数并仅利用测试样本实施混合策略,生成多样化的边界感知判别拓扑,从而无需引入辅助数据集作为离群样本。我们通过优先级队列与注意力机制构建双动态词典,自适应地捕捉潜在分布内与分布外表征,进而用于边界感知的分布外得分校准。据我们所知,在真实数据集上的大量实验表明,BaCa在分布外检测任务中显著优于现有最先进方法。