用特征与决策边界夹角检测分布外数据,效果优于主流方法。
Out-of-Distribution Detection with Relative Angles
- 以分布内特征均值为参考,计算特征与决策边界的相对夹角。
- 在9个ImageNet模型上5次最低误报率,平均表现最佳。
- 对对比学习模型效果好,支持简单加和集成,适合实际部署。
真实场景中深度学习系统常遭遇分布外(OOD)数据,理想模型应拒绝决策。现有最优方法多依赖特征距离(如k近邻、到决策边界的距离),忽视或低效利用分布内统计信息。本文提出一种基于相对夹角的新度量方法,从分布内特征均值视角出发,衡量特征与决策边界之间的夹角,作为区分ID与OOD数据的有效判别因子。我们在9个ImageNet预训练模型上评估该方法,结果表明:在5个模型中实现最低误报率(FPR),整体平均FPR最优,且在所有模型中始终位列前三。此外,我们验证了对比学习表征的优势,ResNet SCL与CLIP架构均表现优异。最后,证明该得分具备尺度不变性,可通过简单求和实现有效集成。代码已开源:https://github.com/berkerdemirel/ORA-OOD-Detection-with-Relative-Angles。
原文摘要 · Abstract (English)
Deep learning systems deployed in real-world applications often encounter data that is different from their in-distribution (ID). A reliable model should ideally abstain from making decisions in this out-of-distribution (OOD) setting. Existing state-of-the-art methods primarily focus on feature distances, such as k-th nearest neighbors and distances to decision boundaries, either overlooking or ineffectively using in-distribution statistics. In this work, we propose a novel angle-based metric for OOD detection that is computed relative to the in-distribution structure. We demonstrate that the angles between feature representations and decision boundaries, viewed from the mean of in-distribution features, serve as an effective discriminative factor between ID and OOD data. We evaluate our method on nine ImageNet-pretrained models. Our approach achieves the lowest FPR in 5 out of 9 ImageNet models, obtains the best average FPR overall, and consistently ranking among the top 3 across all evaluated models. Furthermore, we highlight the benefits of contrastive representations by showing strong performance with ResNet SCL and CLIP architectures. Finally, we demonstrate that the scale-invariant nature of our score enables an ensemble strategy via simple score summation. Code is available at https://github.com/berkerdemirel/ORA-OOD-Detection-with-Relative-Angles.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。