Out-of-distribution Detection in Medical Image Analysis: A survey

Zesheng Hong, Yubiao Yue, Yubin Chen, Huanjie Lin, Yuanmei Luo, Mini Han Wang, Weidong Wang, Jialong Xu, Xiaoqi Yang, Zhenzhang Li, Sihong XiearXiv 2024

Abstract

Computer-aided diagnostics has benefited from the development of deep learning-based computer vision techniques in these years. Traditional supervised deep learning methods assume that the test sample is drawn from the identical distribution as the training data. However, it is possible to encounter out-of-distribution samples in real-world clinical scenarios, which may cause silent failure in deep learning-based medical image analysis tasks. Recently, research has explored various out-of-distribution (OOD) detection situations and techniques to enable a trustworthy medical AI system. In this survey, we systematically review the recent advances in OOD detection in medical image analysis. We first explore several factors that may cause a distributional shift when using a deep-learning-based model in clinic scenarios, with three different types of distributional shift well defined on top of these factors. Then a framework is suggested to categorize and feature existing solutions, while the previous studies are reviewed based on the methodology taxonomy. Our discussion also includes evaluation protocols and metrics, as well as the challenge and a research direction lack of exploration.

The Problem of Silent Failure

Standard supervised learning relies on the "i.i.d. assumption": that training and test data come from the identical distribution. In clinical reality, this assumption is constantly violated. A model trained on high-quality CT scans from a university hospital might struggle when deployed on a noisy, low-dose scanner in a rural clinic. Or, a model trained to recognize five common skin conditions might confidently (and incorrectly) classify a rare melanoma as a harmless mole.

This survey addresses the "silent failure" of AI, where models provide high-confidence predictions on data they were never designed to handle. A critical first step in the field is clarifying the often-confused boundaries between OOD Detection (identifying data that doesn't belong), Anomaly Detection (finding pathology in healthy tissue), and Uncertainty Quantification (measuring a model's confidence).

Relationship between Anomaly Detection (AD), Out-of-distribution Detection (OoDD), and Uncertainty Quantification (UQ).

A Medical-Specific Taxonomy of Shifts

One of the primary contributions of this survey is the proposal of three distinct types of distributional shifts tailored specifically to the medical domain. Understanding these shifts is essential for building "trustworthy AI" that can trigger a human override when it encounters unfamiliar scenarios:

  • Contextual Shift: Encountering the "wrong" data entirely, such as a brain MRI being fed into a model trained for lung segmentation.
  • Semantic Shift: Encountering a new disease or class not seen during training. This is significantly harder to detect than contextual shifts because the anatomy may look familiar while the pathology is novel.
  • Covariate Shift: The right anatomy and disease are present, but the visual appearance differs due to scanner brands, lighting, or patient demographics (e.g., pediatric vs. adult populations).
The proposed medical OOD taxonomy illustrating contextual, semantic, and covariate shifts during inference.

Methodological Pillars of OOD Detection

The paper categorizes existing OOD detection solutions into five methodological pillars:

  1. Post-hoc Feature Process: These methods use a pre-trained model as a feature extractor. By analyzing the "latent space," techniques like Mahalanobis distance or Cosine similarity can determine if a new image sits too far away from training clusters. These remain state-of-the-art baselines, often achieving AUROC scores above 0.90 for contextual shifts.
  2. Learning-free Uncertainty Quantification (UQ): These use standard model outputs, such as Maximum Softmax Probability (MSP) or MC-Dropout, to estimate confidence without retraining.
  3. Learning-based Deterministic UQ: These models use special loss functions (like Evidential Deep Learning) to explicitly output uncertainty values in a single pass.
  4. OOD-aware Training: This involves "Outlier Exposure," where the model is intentionally shown non-medical or synthetic OOD images during training to learn the boundaries of the known distribution.
  5. Unsupervised Stand-alone Detectors: These use generative models like Autoencoders (AE) or Diffusion Models (DDPM). They learn to reconstruct "normal" data; if they cannot accurately reconstruct a new image, it is flagged as OOD.

Key Insights and Future Directions

Surprisingly, simple post-hoc methods often outperform complex, training-heavy uncertainty methods. They are "plug-and-play" and don't require retraining the base model. However, detecting subtle semantic shifts (new diseases) remains an unsolved challenge, with many models performing near random-guess levels.

Future research must address the multi-label gap, as patients often have co-occurring diseases, and improve computational efficiency. Many high-performing methods like Ensembles or Diffusion models are currently too slow for real-time clinical deployment. There is also a pressing need for "near-OOD" benchmarks that mimic subtle differences between clinical sites rather than using easy baselines like ImageNet.

Summary updated

BibTeX
@misc{hong2024out,
  author = {Zesheng Hong and Yubiao Yue and Yubin Chen and Huanjie Lin and Yuanmei Luo and Mini Han Wang and Weidong Wang and Jialong Xu and Xiaoqi Yang and Zhenzhang Li and Sihong Xie},
  title = {{Out-of-distribution Detection in Medical Image Analysis: A survey}},
  year = {2024},
  eprint = {2404.18279},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2404.18279},
}
Figure