arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.23677cs.CVcs.AI
收藏

原型融合:一种无需训练的多层OOD检测方法

Prototype Fusion: A Training-Free Multi-Layer Approach to OOD Detection

Missouri University of Science and Technology(密苏里科技大学);Washington State University(华盛顿州立大学)

Shreen Gul, Mohamed Elmahallawy, Ardhendu Tripathy, Sanjay Madria

AI总结:

本文提出无需训练的多层方法用于检测分布外样本,通过聚合多层特征生成紧凑的ID原型,利用余弦相似度作为检测分数,提升鲁棒性和泛化能力。

摘要:

深度学习模型越来越多地应用于安全关键应用,其中可靠的分布外(OOD)检测对于确保鲁棒性至关重要。现有方法主要依赖神经网络的倒数第二层激活,假设它们封装了最信息丰富的内部表示。在本工作中,我们重新审视这一假设,表明中间层编码了同样丰富且具有判别性的信息用于OOD检测。基于这一观察,我们提出了一种简单而有效的模型无关方法,利用多层内部表示。我们的方案聚合连续卷积块的特征,计算类级均值嵌入,并应用L_2规范化以形成紧凑的ID原型,捕捉类语义。在推理过程中,测试特征与这些原型之间的余弦相似度作为OOD分数--ID样本表现出对至少一个原型的强亲和力,而OOD样本则保持均匀距离。在最先进的OOD基准上,针对多种架构的广泛实验表明,我们的方法实现了鲁棒、架构无关的性能和强大的泛化能力。值得注意的是,它将AUROC提高了多达4.41%,并将FPR降低了13.58%,突显多层特征聚合作为强大的却未被探索的信号,挑战了基于倒数第二层的方法主导地位。我们的代码可在:https://github.com/sgchr273/cosine-layers.git获取。

英文摘要:

Deep learning models are increasingly deployed in safety-critical applications, where reliable out-of-distribution (OOD) detection is essential to ensure robustness. Existing methods predominantly rely on the penultimate-layer activations of neural networks, assuming they encapsulate the most informative in-distribution (ID) representations. In this work, we revisit this assumption to show that intermediate layers encode equally rich and discriminative information for OOD detection. Based on this observation, we propose a simple yet effective model-agnostic approach that leverages internal representations across multiple layers. Our scheme aggregates features from successive convolutional blocks, computes class-wise mean embeddings, and applies L_2 normalization to form compact ID prototypes capturing class semantics. During inference, cosine similarity between test features and these prototypes serves as an OOD score--ID samples exhibit strong affinity to at least one prototype, whereas OOD samples remain uniformly distant. Extensive experiments on state-of-the-art OOD benchmarks across diverse architectures demonstrate that our approach delivers robust, architecture-agnostic performance and strong generalization for image classification. Notably, it improves AUROC by up to 4.41% and reduces FPR by 13.58%, highlighting multi-layer feature aggregation as a powerful yet underexplored signal for OOD detection, challenging the dominance of penultimate-layer-based methods. Our code is available at: https://github.com/sgchr273/cosine-layers.git.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑