Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Mahalanobis++: Improving OOD Detection via Feature Normalization

About

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.

Maximilian Mueller, Matthias Hein• 2025

Related benchmarks

TaskDatasetResultRank
Out-of-Distribution DetectionSUN OOD with ImageNet-1k In-distribution (test)
AUROC88.9
267
Out-of-Distribution DetectionImageNet-1k ID iNaturalist OOD
FPR955.15
143
Out-of-Distribution DetectionOpenOOD average of NINCO, iNat, SSB-Hard, OpenImages-O, Textures
FPR @ 95%27.1
130
Out-of-Distribution DetectionOpenImage-O
AUROC93.12
117
Out-of-Distribution DetectionImageNet--
113
Out-of-Distribution DetectionImageNet-1k Textures ID OOD
AUROC89.26
96
Out-of-Distribution DetectionNINCO
AUROC86.62
92
Out-of-Distribution DetectionImageNet-1K OOD Average
AUROC86.83
71
OOD DetectionOpenImage-O
FPR@9520.35
64
OOD DetectionNINCO
FPR9550.29
57
Showing 10 of 55 rows

Other info

Follow for update