Recent Advances in Out-of-Distribution Detection with CLIP-Like Models: A Survey

Chaohua Li, Enhao Zhang, Chuanxing Geng, Songcan ChenarXiv 2025

Abstract

Out-of-distribution detection (OOD) is a pivotal task for real-world applications that trains models to identify samples that are distributionally different from the in-distribution (ID) data during testing. Recent advances in AI, particularly Vision-Language Models (VLMs) like CLIP, have revolutionized OOD detection by shifting from traditional unimodal image detectors to multimodal image-text detectors. This shift has inspired extensive research; however, existing categorization schemes still rely solely on the availability of ID images, adhering to a unimodal paradigm. To better align with CLIP's cross-modal nature, we propose a new categorization framework rooted in both image and text modalities. Specifically, we categorize existing methods based on how visual and textual information of OOD data is utilized within image + text modalities, and further divide them into four groups: OOD Images Seen or Unseen, and OOD Texts Known or Unknown, across two training strategies. More importantly, we discuss open problems in CLIP-like OOD detection and highlight promising directions for future research.

Introduction

In the "closed-set" world of laboratory benchmarks, AI models assume that everything they encounter at test time belongs to the categories seen during training. In real-world deployments, such as autonomous driving or medical diagnosis, this assumption is often violated. A reliable system must distinguish between In-Distribution (ID) samples and Out-of-Distribution (OOD) samples to avoid making overconfident, incorrect predictions on unknown concepts.

Traditionally, OOD detection relied on unimodal image features. The rise of Vision-Language Models (VLMs) like CLIP (Contrastive Language-Image Pre-training) has introduced a "semantic bridge" between images and text, enabling models to leverage textual descriptions to define the boundaries of the known world.

Problem Formulation

The OOD detection task involves training a model on a specific ID dataset (e.g., ImageNet-1K) and evaluating its ability to reject samples from different distributions (e.g., iNaturalist, Places, or Texture) while maintaining high accuracy on ID test data.

Overview of the OOD detection setup, illustrating the relationship between In-Distribution (ID) training data and the various types of Out-of-Distribution (OOD) data encountered during testing.

A Multimodal Taxonomy for OOD Detection

Previous surveys categorized CLIP-based OOD methods based on the availability of ID images (e.g., zero-shot vs. few-shot). This paper argues that such a unimodal view is insufficient for VLMs. We propose a new taxonomy based on the availability of OOD information across both visual and textual modalities:

  1. Images Seen + Texts Known (IS+TK): These methods utilize "outlier exposure" by synthesizing OOD-like images (e.g., via feature mixing) and pairing them with specific OOD text prompts for fine-tuning.
  2. Images Unseen + Texts Known (IU+TK): This branch exploits CLIP’s textual interpretability by mining "negative labels" from large corpora or designing "not-a-class" prompts to define OOD space without physical outliers.
  3. Images Seen + Texts Unknown (IS+TU): These methods use visual cues, such as image backgrounds, to regularize the model without designing specific OOD textual concepts.
  4. Images Unseen + Texts Unknown (IU+TU): A minimalist approach using post-hoc scoring functions (e.g., Maximum Concept Matching) that require no retraining or prior knowledge of OOD characteristics.
The proposed taxonomy categorizes OOD detection methods into four quadrants based on whether OOD images are seen and whether OOD texts are known during the training phase.

Key Technical Insights

  • The Semantic Advantage: Unlike traditional models, CLIP-like models can "imagine" OOD categories through text. By adding prompts for "background" or "unknown," the model can reject samples based on semantic mismatch without ever seeing a physical outlier.
  • The Modality Gap: A recurring technical challenge is that CLIP’s image and text embeddings often occupy different regions of the feature space. Bridging this gap is essential for accurate OOD scoring.
  • Negative Prompting: Shifting the focus from "What is this?" to "What is this not?" has proven highly effective. Methods like CLIPN train models to explicitly identify negative semantics.

Challenges and Future Directions

The field has seen explosive growth, with publications in top venues increasing from one in 2021 to over 16 by early 2025. However, several open problems remain:

  • Information Leakage: Due to massive pre-training sets like LAION-400M, models may have already "seen" OOD test classes during initial training, potentially biasing benchmark results.
  • Data Noise: Noisy captions in pre-training data can distort the feature space, leading to unreliable detection in specialized domains like medicine.
  • Multi-label OOD: Real-world scenes often contain both ID and OOD objects simultaneously, a scenario current research rarely addresses.
  • Theoretical Grounding: There is a need for rigorous theoretical understanding of the modality gap and its fundamental impact on OOD boundaries.

Summary updated

BibTeX
@misc{li2025recent,
  author = {Chaohua Li and Enhao Zhang and Chuanxing Geng and Songcan Chen},
  title = {{Recent Advances in Out-of-Distribution Detection with CLIP-Like Models: A Survey}},
  year = {2025},
  eprint = {2505.02448},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2505.02448},
}
Figure