Zero-Shot Out-of-Distribution Detection with Outlier Label Exposure

Choubo Ding, Guansong Pang

Abstract

Vision-Language Models (VLMs) like CLIP have revolutionized zero-shot classification, yet they remain susceptible to overconfidence when encountering Out-of-Distribution (OOD) data. This paper introduces Outlier Label Exposure (OLE), a novel zero-shot framework designed to enhance the safety of VLMs by improving their ability to identify unknown samples. OLE utilizes a massive dictionary of outlier text labels to define the OOD space, refining them into "prototypes" and synthesizing "hard" boundary cases. Experimental results demonstrate that OLE achieves state-of-the-art performance across multiple benchmarks, significantly reducing false positive rates without requiring any training images.

Introduction

Deep learning models are notoriously overconfident. A model trained to recognize specific animal species may confidently misclassify a household appliance as a "dog" if it has never been exposed to the concept of an outlier. This is the core challenge of Out-of-Distribution (OOD) detection.

In the zero-shot setting, where pre-trained models like CLIP are used without further fine-tuning, this problem is exacerbated. Most existing methods attempt to detect OOD samples by looking exclusively at In-Distribution (ID) labels. However, because CLIP’s feature space is vast, OOD images often accidentally align with ID text prompts, leading to high-confidence errors. The authors of this paper argue that to effectively catch an outlier, the model must be exposed to what an outlier actually looks like—or, in the case of VLMs, what an outlier "sounds" like in the text embedding space.

Methodology

The OLE framework consists of three primary stages designed to map the OOD landscape using text as a proxy for visual data.

1. Outlier Label Exposure (OLE)

Instead of relying solely on ID labels (e.g., "dog," "cat"), the authors pull a massive list of approximately 11,000 common nouns from the internet to serve as "pseudo-OOD" prompts. This diverse vocabulary acts as a representative sample of the world outside the specific ID task.

2. Outlier Prototype Learning (OPL)

Raw labels are inherently noisy; some may be synonyms of ID classes (e.g., "canine" vs. "dog"), which could confuse the model's decision boundary. To mitigate this, the authors employ a Gaussian Mixture Model (GMM) to cluster the thousands of labels into a smaller, more manageable set of "pivotal prototypes." They then filter out any prototypes that are semantically too close to the ID classes, ensuring a clear distinction between known and unknown categories.

3. Hard Outlier Prototype Generation (HOPG)

The most difficult OOD samples are those that sit on the edge of the ID distribution, known as "near-OOD." To address this, the authors identify "fringe" ID class embeddings and use Mixup (linear interpolation) to blend them with outlier prototypes. This process creates synthetic "hard" prototypes that help calibrate the decision boundary specifically where the model is most likely to fail.

During inference, these prototypes are incorporated into the denominator of a softmax-like scoring function. If an image shows higher similarity to an outlier prototype than to any ID class, its ID score drops, and it is correctly rejected as OOD.

Experimental Results

The authors evaluated OLE using ImageNet-1K as the In-Distribution dataset and several standard benchmarks for OOD detection, including iNaturalist, SUN, Texture, and Places.

  • Large-Scale Benchmarks: On ImageNet-1K, OLE (when combined with CLIPN) reduced the FPR95 (False Positive Rate at a 95% True Positive Rate) from 31.10% to 24.12%.
  • iNaturalist Success: The method achieved a remarkable 0.89% FPR95 on the iNaturalist dataset, effectively solving the OOD task for that specific benchmark.
  • Hard OOD Challenges: On the ImageNet-O dataset—which contains adversarially filtered OOD samples—OLE improved the AUROC (Area Under the ROC Curve) to 86.95%, outperforming several methods that require few-shot training data.

Key Insights

  • Words as Proxies for Images: A central insight of this work is that in a multi-modal space like CLIP’s, visual OOD data is not strictly necessary for training. A sufficiently diverse set of words can effectively "occupy" the OOD space in the embedding manifold.
  • The Importance of the "Fringe": OOD detection is not just about identifying samples that are "far away" from the distribution; it is about defining the boundary. By targeting "fringe" ID classes for Mixup, OLE specifically addresses the near-OOD problem.
  • Lightweight Deployment: Unlike other state-of-the-art methods that require training additional encoders, OLE is a post-hoc strategy. It can be integrated into existing VLMs as a lightweight safety layer.

Conclusion

OLE provides a robust, zero-shot mechanism for improving the reliability of Vision-Language Models. By leveraging the semantic richness of text to define the boundaries of the unknown, the method offers a scalable path toward safer real-world deployment of AI models. While the method's performance is tied to the quality of the underlying VLM's embedding space, its success on hard OOD benchmarks suggests it is a significant step forward in zero-shot model calibration.

Reference: Ding, C., & Pang, G. (2024). Zero-Shot Out-of-Distribution Detection with Outlier Label Exposure. arXiv:2406.01170v1.

Summary updated

BibTeX
@inproceedings{ding2024zero,
  author = {Choubo Ding and Guansong Pang},
  title = {{Zero-Shot Out-of-Distribution Detection with Outlier Label Exposure}},
  booktitle = {IJCNN},
  year = {2024},
  url = {https://openreview.net/forum?id=hBsAsD9Vdq},
}
Figure