arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2402.18162cs.CV
收藏

使用神经激活先验进行分布外检测

Out-of-Distribution Detection using Neural Activation Prior

School of Computer Science, Fudan University(复旦大学计算机科学学院)

Weilin Wan, Weizhong Zhang, Quan Zhou, Fan Yi, Cheng Jin

AI总结:

本文提出神经激活先验(NAP),利用全局池化前通道内少数神经元的大响应概率差异,设计新评分函数实现即插即用的分布外检测,在CIFAR和ImageNet上达到最优性能,并扩展至Transformer。

摘要:

分布外检测(OOD)是机器学习模型在现实世界中部署以处理未见场景的关键技术。在本文中,我们首先提出了一种简单而有效的神经激活先验(NAP)用于OOD检测。我们的神经激活先验基于一个关键观察:对于完全训练好的神经网络全局池化层之前的某个通道,由分布内(ID)样本激活的少数神经元产生大响应的概率显著高于由OOD样本激活的概率。一个直观的解释是,对于在ID数据集上完全训练的模型,每个通道在检测ID数据集中的特定模式时都会发挥作用,当在输入样本中检测到该模式时,少数神经元可以被大响应激活。然后,我们提出了一种基于该先验的新评分函数,以突出这些强激活神经元在OOD检测中的作用。我们的方法是即插即用的,不会导致ID数据分类的任何性能下降,并且不需要额外的训练或来自训练或外部数据集的统计数据。注意,以前的方法主要依赖于神经网络的全局池化后特征,而我们利用的通道内分布信息会被全局池化算子丢弃。因此,我们的方法与现有方法是正交的,可以在各种应用中有效地与它们结合。实验结果表明,我们的方法在CIFAR基准和ImageNet数据集上达到了最先进的性能,这证明了所提出的先验的强大能力。最后,我们将我们的方法扩展到Transformer,实验发现表明NAP也可以显著提高Transformer上OOD检测的性能,从而证明了这种先验知识的广泛适用性。

英文摘要:

Out-of-distribution detection (OOD) is a crucial technique for deploying machine learning models in the real world to handle the unseen scenarios. In this paper, we first propose a simple yet effective Neural Activation Prior (NAP) for OOD detection. Our neural activation prior is based on a key observation that, for a channel before the global pooling layer of a fully trained neural network, the probability of a few neurons being activated with a large response by an in-distribution (ID) sample is significantly higher than that by an OOD sample. An intuitive explanation is that for a model fully trained on ID dataset, each channel would play a role in detecting a certain pattern in the ID dataset, and a few neurons can be activated with a large response when the pattern is detected in an input sample. Then, a new scoring function based on this prior is proposed to highlight the role of these strongly activated neurons in OOD detection. Our approach is plug-and-play and does not lead to any performance degradation on ID data classification and requires no extra training or statistics from training or external datasets. Notice that previous methods primarily rely on post-global-pooling features of the neural networks, while the within-channel distribution information we leverage would be discarded by the global pooling operator. Consequently, our method is orthogonal to existing approaches and can be effectively combined with them in various applications. Experimental results show that our method achieves the state-of-the-art performance on CIFAR benchmark and ImageNet dataset, which demonstrates the power of the proposed prior. Finally, we extend our method to Transformers and the experimental findings indicate that NAP can also significantly enhance the performance of OOD detection on Transformers, thereby demonstrating the broad applicability of this prior knowledge.

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

↑