A Geometry-Based View of Mahalanobis OOD Detection

Denis Janiak, Jakub Binkowski, Tomasz Jan Kajdanowicz
Proceedings of the 43rd International Conference on Machine Learning, PMLR 306:50747-50778, 2026.

Abstract

Out-of-distribution (OOD) detection is critical for reliable deployment of vision models, and Mahalanobis-based detectors remain strong baselines. However, their performance varies widely across modern pretrained representations, making it unclear which feature-space properties determine success or failure. Across diverse foundation-model backbones and Mahalanobis variants, we show that performance is highly representation-dependent and can shift substantially with pretraining data and fine-tuning. We link this variability to in-distribution geometry and identify a two-term ID summary that consistently tracks Mahalanobis OOD behavior across detectors: within-class spectral structure and local intrinsic dimensionality. Finally, we introduce radially scaled $\ell_2$ normalization, $\phi_\beta(z)=z/\|z\|^\beta$, a direction-preserving transformation that changes feature radii and exposes a different ID geometry to the same quadratic detector. Selecting $\beta$ from ID-only geometry signals generally outperforms fixed normalization baselines.

Cite this Paper


BibTeX
@InProceedings{pmlr-v306-janiak26a, title = {A Geometry-Based View of {M}ahalanobis {OOD} Detection}, author = {Janiak, Denis and Binkowski, Jakub and Kajdanowicz, Tomasz Jan}, booktitle = {Proceedings of the 43rd International Conference on Machine Learning}, pages = {50747--50778}, year = {2026}, editor = {Zhang, Tong and Dudik, Miroslav and Jaggi, Martin and Agarwal, Alekh and Li, Sharon and Schuurmans, Dale and Zhu, Jerry and Berkenkamp, Felix and Dong, Hanze and Bietti, Alberto}, volume = {306}, series = {Proceedings of Machine Learning Research}, month = {06--11 Jul}, publisher = {PMLR}, pdf = {https://raw.githubusercontent.com/mlresearch/v306/main/assets/janiak26a/janiak26a.pdf}, url = {https://proceedings.mlr.press/v306/janiak26a.html}, abstract = {Out-of-distribution (OOD) detection is critical for reliable deployment of vision models, and Mahalanobis-based detectors remain strong baselines. However, their performance varies widely across modern pretrained representations, making it unclear which feature-space properties determine success or failure. Across diverse foundation-model backbones and Mahalanobis variants, we show that performance is highly representation-dependent and can shift substantially with pretraining data and fine-tuning. We link this variability to in-distribution geometry and identify a two-term ID summary that consistently tracks Mahalanobis OOD behavior across detectors: within-class spectral structure and local intrinsic dimensionality. Finally, we introduce radially scaled $\ell_2$ normalization, $\phi_\beta(z)=z/\|z\|^\beta$, a direction-preserving transformation that changes feature radii and exposes a different ID geometry to the same quadratic detector. Selecting $\beta$ from ID-only geometry signals generally outperforms fixed normalization baselines.} }
Endnote
%0 Conference Paper %T A Geometry-Based View of Mahalanobis OOD Detection %A Denis Janiak %A Jakub Binkowski %A Tomasz Jan Kajdanowicz %B Proceedings of the 43rd International Conference on Machine Learning %C Proceedings of Machine Learning Research %D 2026 %E Tong Zhang %E Miroslav Dudik %E Martin Jaggi %E Alekh Agarwal %E Sharon Li %E Dale Schuurmans %E Jerry Zhu %E Felix Berkenkamp %E Hanze Dong %E Alberto Bietti %F pmlr-v306-janiak26a %I PMLR %P 50747--50778 %U https://proceedings.mlr.press/v306/janiak26a.html %V 306 %X Out-of-distribution (OOD) detection is critical for reliable deployment of vision models, and Mahalanobis-based detectors remain strong baselines. However, their performance varies widely across modern pretrained representations, making it unclear which feature-space properties determine success or failure. Across diverse foundation-model backbones and Mahalanobis variants, we show that performance is highly representation-dependent and can shift substantially with pretraining data and fine-tuning. We link this variability to in-distribution geometry and identify a two-term ID summary that consistently tracks Mahalanobis OOD behavior across detectors: within-class spectral structure and local intrinsic dimensionality. Finally, we introduce radially scaled $\ell_2$ normalization, $\phi_\beta(z)=z/\|z\|^\beta$, a direction-preserving transformation that changes feature radii and exposes a different ID geometry to the same quadratic detector. Selecting $\beta$ from ID-only geometry signals generally outperforms fixed normalization baselines.
APA
Janiak, D., Binkowski, J. & Kajdanowicz, T.J.. (2026). A Geometry-Based View of Mahalanobis OOD Detection. Proceedings of the 43rd International Conference on Machine Learning, in Proceedings of Machine Learning Research 306:50747-50778 Available from https://proceedings.mlr.press/v306/janiak26a.html.

Related Material