Guidelines for the Selection, Calibration, and Evaluation of Post-hoc OOD Detectors in High-Dimensional Representations Generated by CNN and ViT Models in Image Recognition

Highlights • The performance of post-hoc OOD detectors is deep model type-specific. • Guidelines on the recommended post-hoc OOD detector for different CNN or ViT architectures are formulated. • The Mahalanobis OOD detector with pool covariance matrix should be discouraged; diagonal covariance matrices yield improved performance. • Evaluating OOD 2detectors using per-class AUROC reveals OOD generalization risks in deep model deployment. • Modern CNN and ViT models include ID classes with surprisingly poor OOD generalization, despite high overall AUROC in OOD detection benchmarks. Detecting out-of-distribution (OOD) examples is essential for using machine learning in safety-critical applications. Although many OOD methods have been proposed, the literature does not provide conclusive recommendations on which OOD detection method should be used in practice, as the performance of OOD detectors is benchmark-specific. We comprehensively analyzed the performance of parametric and nonparametric post-hoc OOD detectors in representation spaces generated by several lines of CNNs and ViT architectures. On this basis, we pointed out each deep model’s preferred post-hoc OOD detector(s), which consistently outperformed other detectors regardless of the OOD benchmark dataset. We analyzed the properties of the high-dimensional representations generated by different deep networks. We challenge the assumptions underlying the prominent Mahalanobis distance-based OOD detector with the pooled covariance matrix. We analyzed the impact of the simplifying assumptions (such as common vs. diagonal covariance matrices). We showed that the performance of the Mahalanobis method improves when more realistic simplifications are made, given the actual characteristics of the data. We also quantified the impact on OOD detection of the unreliable probability density estimation in high-dimensional data - as the Mahalanobis method relies on the MVN model fitted to sparse data. We show how this curse of dimensionality phenomenon affects the choice of the OOD detection threshold. Finally, we propose the extended metrics for evaluating the OOD detectors. Using these metrics, we show that many CNN and ViT models include classes with surprisingly poor OOD generalization despite high overall AUROC in OOD detection benchmarks.

Authors

Institutions

Publication Details

Journal
Expert Systems with Applications
Published
2026-03-01
DOI
https://doi.org/10.1016/j.eswa.2026.132191
Primary Topic
Advanced Neural Network Applications
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Guidelines for the Selection, Calibration, and Evaluation of Post-hoc OOD Detectors in High-Dimensional Representations Generated by CNN and ViT Models in Image Recognition

Tomasz Walkowiak, Henryk Maciejewski, Kamil Szyc, Szymon Datko
Expert Systems with Applications
Advanced Neural Network Applications
article

Guidelines for the Selection, Calibration, and Evaluation of Post-hoc OOD Detectors in High-Dimensional Representations Generated by CNN and ViT Models in Image Recognition

Tomasz Walkowiak, Henryk Maciejewski, Kamil Szyc, Szymon Datko
article en

Abstract

Highlights • The performance of post-hoc OOD detectors is deep model type-specific. • Guidelines on the recommended post-hoc OOD detector for different CNN or ViT architectures are formulated. • The Mahalanobis OOD detector with pool covariance matrix should be discouraged; diagonal covariance matrices yield improved performance. • Evaluating OOD 2detectors using per-class AUROC reveals OOD generalization risks in deep model deployment. • Modern CNN and ViT models include ID classes with surprisingly poor OOD generalization, despite high overall AUROC in OOD detection benchmarks. Detecting out-of-distribution (OOD) examples is essential for using machine learning in safety-critical applications. Although many OOD methods have been proposed, the literature does not provide conclusive recommendations on which OOD detection method should be used in practice, as the performance of OOD detectors is benchmark-specific. We comprehensively analyzed the performance of parametric and nonparametric post-hoc OOD detectors in representation spaces generated by several lines of CNNs and ViT architectures. On this basis, we pointed out each deep model’s preferred post-hoc OOD detector(s), which consistently outperformed other detectors regardless of the OOD benchmark dataset. We analyzed the properties of the high-dimensional representations generated by different deep networks. We challenge the assumptions underlying the prominent Mahalanobis distance-based OOD detector with the pooled covariance matrix. We analyzed the impact of the simplifying assumptions (such as common vs. diagonal covariance matrices). We showed that the performance of the Mahalanobis method improves when more realistic simplifications are made, given the actual characteristics of the data. We also quantified the impact on OOD detection of the unreliable probability density estimation in high-dimensional data - as the Mahalanobis method relies on the MVN model fitted to sparse data. We show how this curse of dimensionality phenomenon affects the choice of the OOD detection threshold. Finally, we propose the extended metrics for evaluating the OOD detectors. Using these metrics, we show that many CNN and ViT models include classes with surprisingly poor OOD generalization despite high overall AUROC in OOD detection benchmarks.

Expert Systems with Applications
Warsaw University of Technology (PL), AGH University of Krakow (PL)
Openalex Percentile: Top 5%
Advanced Neural Network Applications
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.