A Benchmark and Evaluation for Real-World Out-of-Distribution Detection Using Vision-Language Models

Shiho Noda, Atsuyuki Miyai, Qing Yu, Go Irie, Kiyoharu Aizawa

TL;DR

This paper introduces three new benchmarks (ImageNet-X, ImageNet-FS-X, and Wilds-FS-X) to better evaluate Out-of-Distribution (OOD) detection methods, especially those leveraging Vision-Language Models like CLIP. They found that current methods, while performing well on existing benchmarks, struggle significantly with more realistic OOD scenarios involving subtle semantic shifts and covariate shifts, highlighting a need for more robust evaluation.

What Problem Does This Paper Address?

Ensuring the safety and reliability of AI models in real-world applications is paramount. A key challenge is "Out-of-Distribution" (OOD) detection: identifying when a model encounters data that is fundamentally different from what it was trained on. This is crucial because models can make confident but incorrect predictions on OOD data. While many OOD detection methods have been developed, particularly those using powerful Vision-Language Models (VLMs) like CLIP, existing benchmarks have become saturated. This means performance differences between methods are minimal, making it hard to discern which approaches are truly superior or to understand their specific strengths and weaknesses. The authors argue that current benchmarks often present overly large distribution shifts or fail to adequately capture the nuances of real-world OOD scenarios, such as subtle semantic differences between classes or variations in image quality and style (covariate shifts).

Methods

The core contribution of this paper is the introduction of three novel OOD detection benchmarks designed to address the limitations of existing ones. These benchmarks are built with specific evaluation criteria in mind:

  • Semantic Similarity: How close are the OOD classes to the in-distribution (ID) classes semantically?
  • Distribution Shifts: The paper considers two types of shifts:
  • Semantic Shift (Class Shift): Differences in class labels.
  • Covariate Shift (Feature Distribution Shift): Differences in image characteristics (e.g., style, quality, lighting, camera angle).
  • Real-World Alignment: How well do the datasets reflect actual deployment scenarios?

The proposed benchmarks are:

  1. ImageNet-X: Focuses on challenging semantic shifts by carefully splitting ImageNet-1k classes based on their hierarchical structure (using WordNet) to create ID and OOD sets with closely related labels. This aims to make OOD detection harder by reducing the semantic gap.
  2. ImageNet-FS-X: Extends ImageNet-X by incorporating covariate shifts. It uses ImageNet-1k as the base and adds covariate-shifted versions of the ID data (e.g., ImageNet-V2, ImageNet-R, ImageNet-C) during evaluation. This allows for a systematic analysis of both semantic and covariate shift impacts.
  3. Wilds-FS-X: Brings the evaluation closer to real-world scenarios by leveraging datasets from the Wilds [17] benchmark (specifically iWildCam and FMoW). This benchmark naturally incorporates covariate shifts that occur in real-world applications, providing a more comprehensive testbed.

The authors then evaluate several state-of-the-art CLIP-based OOD detection methods (both zero-shot and few-shot) across these new benchmarks.

Datasets

  • Training Data: ImageNet-1k is used as the primary in-distribution (ID) dataset for constructing the new benchmarks.
  • Evaluation Datasets:
    • ImageNet-X: A newly constructed benchmark derived from ImageNet-1k, focusing on fine-grained semantic shifts.
  • ImageNet-FS-X: A newly constructed benchmark that builds upon ImageNet-X by incorporating covariate-shifted versions of ImageNet (ImageNet-V2, ImageNet-R, ImageNet-C) for evaluation.
  • Wilds-FS-X: A newly constructed benchmark using datasets from the Wilds [17] benchmark, specifically iWildCam and FMoW, to simulate real-world scenarios with natural covariate shifts.

Key Insights and Ideas

  • Existing Benchmarks are Too Easy: Conventional OOD detection benchmarks, often using large semantic gaps, have reached performance saturation, making it difficult to differentiate between modern methods.
  • Subtle Semantic Shifts are Hard: Creating OOD detection tasks with closely related classes (like "dalmatian" vs. "Great Pyrenees") significantly challenges current methods.
  • Covariate Shifts Hurt Performance: Introducing variations in image style, quality, or corruption (covariate shifts) leads to a noticeable drop in OOD detection performance, even for powerful models like CLIP.
  • Few-Shot Learning Can Introduce Bias: While few-shot learning can improve classification accuracy, it can also lead to a performance bias towards the specific covariate distribution of the training data, making methods less robust to shifts.
  • No Single Winner: Across the proposed challenging benchmarks, no single OOD detection method consistently outperformed others, indicating that different methods have varying sensitivities to semantic and covariate shifts.
  • Real-World is Tough: The Wilds-FS-X benchmark, designed to mimic real-world conditions, proved to be particularly challenging, with significantly lower performance across the board.

Key Results

  • Performance Ranking Changes: When comparing results on conventional benchmarks versus the proposed ImageNet-X, the ranking of OOD detection methods shifted, suggesting that new benchmarks reveal different strengths.
  • Covariate Shift Impact: Performance drops significantly when covariate shifts are introduced (e.g., ImageNet-X vs. ImageNet-FS-X). For instance, ImageNet-C (corruption) resulted in AUROC scores more than 20% lower than ImageNet-1k for some methods.
  • Wilds-FS-X is Highly Challenging: Classification accuracy on the ID portion of Wilds-FS-X was low for many methods, and OOD detection performance remained close to baseline for some, especially on the FMoW dataset.
  • Zero-shot vs. Few-shot: While few-shot methods sometimes improved classification accuracy on Wilds-FS-X, zero-shot methods sometimes performed better on OOD detection, suggesting a trade-off.

Limitations and Future Work

  • Limitations: The paper acknowledges that even with the new benchmarks, there's still room for improvement in OOD detection methods, especially for real-world scenarios. The performance bias introduced by few-shot learning and the inherent biases in pre-trained models like CLIP are highlighted as areas of concern.
  • Future Work: The authors encourage the community to move beyond existing benchmarks and adopt more challenging, real-world-aligned evaluations. Future research should focus on developing methods that are more robust to both semantic and covariate shifts, and on better understanding the interplay between pre-trained model biases and additional training strategies. The proposed benchmarks are intended to guide this future research.

Summary updated

Abstract

Out-of-distribution (OOD) detection is a task that detects OOD samples during inference to ensure the safety of deployed models. However, conventional benchmarks have reached performance saturation, making it difficult to compare recent OOD detection methods. To address this challenge, we introduce three novel OOD detection benchmarks that enable a deeper understanding of method characteristics and reflect real-world conditions. First, we present ImageNet-X, designed to evaluate performance under challenging semantic shifts. Second, we propose ImageNet-FS-X for full-spectrum OOD detection, assessing robustness to covariate shifts (feature distribution shifts). Finally, we propose Wilds-FS-X, which extends these evaluations to real-world datasets, offering a more comprehensive testbed. Our experiments reveal that recent CLIP-based OOD detection methods struggle to varying degrees across the three proposed benchmarks, and none of them consistently outperforms the others. We hope the community goes beyond specific benchmarks and includes more challenging conditions reflecting real-world scenarios. The code is https://github.com/hoshi23/OOD-X-Benchmarks.
BibTeX
@misc{noda2025benchmark,
  author = {Shiho Noda and Atsuyuki Miyai and Qing Yu and Go Irie and Kiyoharu Aizawa},
  title = {{A Benchmark and Evaluation for Real-World Out-of-Distribution Detection Using Vision-Language Models}},
  year = {2025},
  eprint = {2501.18463},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.18463},
}
Figure