On the use of Mahalanobis distance for out-of-distribution detection with neural networks for medical imaging
Not on the map. Why?
Abstract (arXiv)
Implementing neural networks for clinical use in medical applications necessitates the ability for the network to detect when input data differs significantly from the training data, with the aim of preventing unreliable predictions. The community has developed several methods for out-of-distribution (OOD) detection, within which distance-based approaches - such as Mahalanobis distance - have shown potential. This paper challenges the prevailing community understanding that there is an optimal layer, or combination of layers, of a neural network for applying Mahalanobis distance for detection of any OOD pattern. Using synthetic artefacts to emulate OOD patterns, this paper shows the optimum layer to apply Mahalanobis distance changes with the type of OOD pattern, showing there is no one-fits-all solution. This paper also shows that separating this OOD detector into multiple detectors at different depths of the network can enhance the robustness for detecting different OOD patterns. These insights were validated on real-world OOD tasks, training models on CheXpert chest X-rays with no support devices, then using scans with unseen pacemakers (we manually labelled 50% of CheXpert for this research) and unseen sex as OOD cases. The results inform best-practices for the use of Mahalanobis distance for OOD detection. The manually annotated pacemaker labels and the project's code are available at: https://github.com/HarryAnthony/Mahalanobis-OOD-detection.
Key facts. Cited by 15 papers in the map (data through 7 Oct 2026). Builds on 26 of its 33 references that are in the map. First posted on arXiv 4 Sep 2023.
Builds on
26 of 33 references.
References · 26
- 2014Explaining and Harnessing Adversarial Examplescited by 7,287
- 2015Dropout as a Bayesian Approximation: Representing Model Uncertainty in Deep Learningcited by 4,416
- 2016Simple and Scalable Predictive Uncertainty Estimation using Deep Ensemblescited by 3,888
- 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
- 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,472
- 2019CheXpert: A Large Chest Radiograph Dataset with Uncertainty Labels and Expert Comparisoncited by 1,410
- 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
- 2018Deep Anomaly Detection with Outlier Exposurecited by 939
- 2020A Unifying Review of Deep and Shallow Anomaly Detectioncited by 423
- 2018Confounding variables can degrade generalization performance of radiological deep learning modelscited by 374
- 2021Exploring the Limits of Out-of-Distribution Detectioncited by 283
- 2021A Simple Fix to Mahalanobis Distance for Improving Near-OOD Detectioncited by 206
14 more
- 2021DICE: Leveraging Sparsification for Out-of-Distribution Detectioncited by 166
- 2020Autoencoders for Unsupervised Anomaly Segmentation in Brain MR Images: A Comparative Studycited by 146
- 2022Denoising diffusion models for out-of-distribution detectioncited by 102
- 2018Unsupervised domain adaptation for medical imaging segmentation with self-ensemblingcited by 94
- 2022Unknown-Aware Object Detection: Learning What You Don't Know from Videos in the Wildcited by 70
- 2021Does Your Dermatology Classifier Know What It Doesn't Know? Detecting the Long-Tail of Unseen Conditionscited by 68
- 2022RankFeat: Rank-1 Feature Removal for Out-of-distribution Detectioncited by 52
- 2020Detecting Outliers with Foreign Patch Interpolationcited by 44
- 2021Confidence-based Out-of-Distribution Detection: A Comparative Study and Analysiscited by 34
- 2020Why is the Mahalanobis Distance Effective for Anomaly Detection?cited by 28
- 2020The challenges of deploying artificial intelligence models in a rapidly evolving pandemiccited by 12
- 2021Out of Distribution Detection and Adversarial Attacks on Deep Neural Networks for Robust Medical Image Analysiscited by 10
- 2019FRODO: Free rejection of out-of-distribution samples: application to chest x-ray analysiscited by 5
- 2020Generating Artificial Outliers in the Absence of Genuine Ones -- a Surveycited by 4
Built on by
Citing papers per year: 2024: 5; 2025: 4; 2026: 6.
15 papers.
Sort:
- 2025Mahalanobis++: Improving OOD Detection via Feature Normalizationcited by 30
- 2024Robust Conformal Volume Estimation in 3D Medical Imagescited by 4
- 2025COMPASS: Robust Feature Conformal Prediction for Medical Segmentation Metricscited by 4
- 2024Deciphering the Definition of Adversarial Robustness for post-hoc OOD Detectorscited by 2
- 2024Evaluating Reliability in Medical DNNs: A Critical Analysis of Feature and Confidence-Based OOD Detectioncited by 2
- 2024Robustness Testing of Black-Box Models Against CT Degradation Through Test-Time Augmentationcited by 1
- 2024Dimensionality Reduction and Nearest Neighbors for Improving Out-of-Distribution Detection in Medical Image Segmentationcited by 1
- 2025Subgroups Matter for Robust Bias Mitigationcited by 1
- 2025DIsoN: Decentralized Isolation Networks for Out-of-Distribution Detection in Medical Imagingcited by 0
- 2026Confidence-Uncertainty Boundary Calibration for Bayesian Deep Learning in Medical Image Analysiscited by 0
- 2026The Invisible Gorilla Effect in Out-of-distribution Detectioncited by 0
- 2026MM++: Post-Hoc Scale-Invariant Multilayer OOD Detection via Top-K Gated Feature Fusioncited by 0
- 2026Mitigating Shortcut Learning: Texture-Penalized Prototype Networks7 Sep 2026
- 2026Unified Multi-Layer Subspace Modeling for Cross-Domain OOD Detection6 Sep 2026
- 2026MaRS: Robust Out-of-Distribution Detection via Mahalanobis Residual Scoring21 Jun 2026
- 2026MM++: Post-Hoc Scale-Invariant Multilayer OOD Detection via Top-K Gated Feature Fusion15 Jun 2026
- 2026The Invisible Gorilla Effect in Out-of-distribution Detection23 Feb 2026
- 2026Confidence-Uncertainty Boundary Calibration for Bayesian Deep Learning in Medical Image Analysis12 Feb 2026
- 2025COMPASS: Robust Feature Conformal Prediction for Medical Segmentation Metrics26 Sep 2025
- 2025DIsoN: Decentralized Isolation Networks for Out-of-Distribution Detection in Medical Imaging10 Jun 2025
- 2025Subgroups Matter for Robust Bias Mitigation27 May 2025
- 2025Mahalanobis++: Improving OOD Detection via Feature Normalization23 May 2025
- 2024Evaluating Reliability in Medical DNNs: A Critical Analysis of Feature and Confidence-Based OOD Detection30 Aug 2024
- 2024Dimensionality Reduction and Nearest Neighbors for Improving Out-of-Distribution Detection in Medical Image Segmentation5 Aug 2024
- 2025Mahalanobis++: Improving OOD Detection via Feature Normalizationcited by 30
- 2024Robust Conformal Volume Estimation in 3D Medical Imagescited by 4
- 2025COMPASS: Robust Feature Conformal Prediction for Medical Segmentation Metricscited by 4
- 2024Deciphering the Definition of Adversarial Robustness for post-hoc OOD Detectorscited by 2
- 2024Evaluating Reliability in Medical DNNs: A Critical Analysis of Feature and Confidence-Based OOD Detectioncited by 2
- 2024Robustness Testing of Black-Box Models Against CT Degradation Through Test-Time Augmentationcited by 1
- 2024Dimensionality Reduction and Nearest Neighbors for Improving Out-of-Distribution Detection in Medical Image Segmentationcited by 1
- 2025Subgroups Matter for Robust Bias Mitigationcited by 1
- 2025DIsoN: Decentralized Isolation Networks for Out-of-Distribution Detection in Medical Imagingcited by 0
- 2026Confidence-Uncertainty Boundary Calibration for Bayesian Deep Learning in Medical Image Analysiscited by 0
- 2026The Invisible Gorilla Effect in Out-of-distribution Detectioncited by 0
- 2026MM++: Post-Hoc Scale-Invariant Multilayer OOD Detection via Top-K Gated Feature Fusioncited by 0
12 most cited of 15 All 15 (JSON)
- 2026Mitigating Shortcut Learning: Texture-Penalized Prototype Networks7 Sep 2026
- 2026Unified Multi-Layer Subspace Modeling for Cross-Domain OOD Detection6 Sep 2026
- 2026MaRS: Robust Out-of-Distribution Detection via Mahalanobis Residual Scoring21 Jun 2026
- 2026MM++: Post-Hoc Scale-Invariant Multilayer OOD Detection via Top-K Gated Feature Fusion15 Jun 2026
- 2026The Invisible Gorilla Effect in Out-of-distribution Detection23 Feb 2026
- 2026Confidence-Uncertainty Boundary Calibration for Bayesian Deep Learning in Medical Image Analysis12 Feb 2026
- 2025COMPASS: Robust Feature Conformal Prediction for Medical Segmentation Metrics26 Sep 2025
- 2025DIsoN: Decentralized Isolation Networks for Out-of-Distribution Detection in Medical Imaging10 Jun 2025
- 2025Subgroups Matter for Robust Bias Mitigation27 May 2025
- 2025Mahalanobis++: Improving OOD Detection via Feature Normalization23 May 2025
- 2024Evaluating Reliability in Medical DNNs: A Critical Analysis of Feature and Confidence-Based OOD Detection30 Aug 2024
- 2024Dimensionality Reduction and Nearest Neighbors for Improving Out-of-Distribution Detection in Medical Image Segmentation5 Aug 2024
12 newest of 15 All 15 (JSON)