Out-of-Distribution (OoD) detection is important for building safe artificial intelligence systems. However, current OoD detection methods still cannot meet the performance requirements for practical deployment. In this paper, we propose a simple yet effective algorithm based on a novel observation: in a trained neural network, OoD samples with bounded norms well concentrate in the feature space. We call the center of OoD features the Feature Space Singularity (FSS), and denote the distance of a sample feature to FSS as FSSD. Then, OoD samples can be identified by taking a threshold on the FSSD. Our analysis of the phenomenon reveals why our algorithm works. We demonstrate that our algorithm achieves state-of-the-art performance on various OoD detection benchmarks. Besides, FSSD also enjoys robustness to slight corruption in test data and can be further enhanced by ensembling. These make FSSD a promising algorithm to be employed in real world. We release our code at \url{https://github.com/megvii-research/FSSD_OoD_Detection}.
翻译:在本文中,我们提出一个基于新发现观察的简单而有效的算法:在经过训练的神经网络中,带有封闭规范的OOD样本在特性空间中非常集中。我们称OOD中心为FSSD特征的特质(FSS),表示FSSD样本特征的距离。然后,OOD样本可以通过在FSSD上设定一个阈值来识别。我们对该现象的分析揭示了我们算法工作的原因。我们证明我们的算法在各种OOD检测基准上取得了最先进的性能。此外,FSSD在测试数据中也拥有轻微腐败的稳健性,并且可以通过聚合得到进一步的增强。这使得FSSD在现实世界中是一种有前途的算法。我们在url{https://github.com/megvii-research/FSSD_OoD_serveviion}发布我们的代码。