arXiv:2505.18032cs.LGcs.CV2025-05ICML被引 39

通过特征归一化提升图像分布外检测效果

Mahalanobis++: Improving OOD Detection via Feature Normalization

  • 对预输出特征进行ℓ₂归一化,缓解特征范数差异问题
  • 在44个模型上实验显示性能显著且一致提升
  • 适合关注模型可靠性与安全性的研究者

在安全关键场景中,检测分布外(OOD)样本对部署可靠机器学习模型至关重要。基于预输出特征的马氏距离后处理方法在ImageNet规模的OOD检测中表现优异,但其性能在不同模型间波动显著。我们发现这一不一致性源于特征范数的强烈变化,导致马氏距离估计所依赖的高斯假设严重失效。实验表明,简单的ℓ₂归一化可有效缓解该问题,使数据更符合具有共享协方差矩阵的正态分布前提。在44种不同架构和预训练方案的模型上进行的广泛实验显示,ℓ₂归一化显著且一致地提升了传统马氏距离方法,并优于其他近期提出的OOD检测方法。

原文摘要 · Abstract (English)

Detecting out-of-distribution (OOD) examples is an important task for deploying reliable machine learning models in safety-critial applications. While post-hoc methods based on the Mahalanobis distance applied to pre-logit features are among the most effective for ImageNet-scale OOD detection, their performance varies significantly across models. We connect this inconsistency to strong variations in feature norms, indicating severe violations of the Gaussian assumption underlying the Mahalanobis distance estimation. We show that simple $\ell_2$-normalization of the features mitigates this problem effectively, aligning better with the premise of normally distributed data with shared covariance matrix. Extensive experiments on 44 models across diverse architectures and pretraining schemes show that $\ell_2$-normalization improves the conventional Mahalanobis distance-based approaches significantly and consistently, and outperforms other recently proposed OOD detection methods.

OOD检测特征归一化模型可靠性

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。