COOD: Concept-based Zero-shot OOD Detection

Zhendong Liu, Yi Nian, Henry Peng Zou, Li Li, Xiyang Hu, Yue Zhao · OpenReview

Abstract

How can models effectively detect out-of-distribution (OOD) samples in complex, multi-label settings without extensive retraining? Existing OOD detection methods struggle to capture the intricate semantic relationships and label co-occurrences inherent in multi-label settings, often requiring large amounts of training data and failing to generalize to unseen label combinations. While large language models have revolutionized zero-shot OOD detection, they primarily focus on single-label scenarios, leaving a critical gap in handling real-world tasks where samples can be associated with multiple interdependent labels. To address these challenges, we introduce COOD, a novel zero-shot multi-label OOD detection framework. COOD leverages pre-trained vision-language models, enhancing them with a concept-based label expansion strategy and a new scoring function. By enriching the semantic space with both positive and negative concepts for each label, our approach models complex label dependencies, precisely differentiating OOD samples without the need for additional training. Extensive experiments demonstrate that our method significantly outperforms existing approaches, achieving approximately 95% average AUROC on both VOC and COCO datasets, while maintaining robust performance across varying numbers of labels and different types of OOD samples.

Introduction

Most Out-of-Distribution (OOD) detection research focuses on single-label scenarios: determining if an image belongs to a specific class (In-Distribution, ID) or is entirely unrelated (OOD). However, the real world is inherently multi-label. A medical image might contain multiple conditions, or an autonomous vehicle might encounter a scene with a car, a pedestrian, and a stray animal simultaneously.

Multi-label OOD detection is significantly harder for two primary reasons. First, semantic overlap causes OOD objects to share features with multiple ID classes. For example, an Okapi (OOD) looks like a hybrid of a Giraffe and a Zebra (both ID). Traditional methods often fail to distinguish these "near-OOD" cases. Second, label co-occurrence creates complex dependencies that existing models struggle to capture, making it difficult to define a clear boundary for what constitutes a "valid" distribution of labels.

Methodology: Concept-based Label Expansion

COOD introduces a zero-shot pipeline that leverages the power of Large Language Models (LLMs) and Vision-Language Models (VLMs) like CLIP to identify OOD samples without additional training. The framework operates through several key steps:

  1. Concept Generation: Instead of relying on a single word (e.g., "Dog"), the authors use GPT-4 to generate Positive Concepts (fine-grained features like "four legs" or "wagging tail") and Negative Concepts (semantically distant labels mined from WordNet, like "spork" or "okapi").
  2. Embedding Computation: The framework uses CLIP to project the input image and these expanded concept sets into a shared semantic space.
  3. Top-k Mean Similarity: To make the model robust to noise, it calculates the average similarity of the image to the top-$k$ most relevant concepts in each set.
  4. Novel Scoring Function: The core of COOD is its ID scoring function: $$S_{ID}(I) = [\mu_k(B, I) - \mu_k(\mathcal{P}, I)] + [\mu_k(B, I) - \mu_k(\mathcal{N}, I)]$$ Where $B$ represents base labels, $\mathcal{P}$ represents positive concepts, and $\mathcal{N}$ represents negative concepts. This function penalizes the score if the image aligns too closely with specific sub-features without being the actual class, or if it aligns with semantically distant, known-OOD concepts.
Conceptual diagram of COOD's approach: ID labels (stars) are expanded into concepts (circles), allowing OOD samples (squares) in the semantic intersection to be identified.

Key Insights: The "Okapi" Problem

The paper highlights that OOD samples in multi-label settings are often not "far" from the data in a simple visual sense. Instead, they are frequently "combinations of known concepts." By breaking labels down into fine-grained features (Positive Concepts), the model can see why an image is OOD even if it looks familiar.

The 'Okapi' problem: An OOD sample sharing fine-grained concepts with multiple In-Distribution classes.

This approach also provides significant interpretability. Because the model relies on explicit concepts (like "traffic lights" or "vertebrate"), researchers can visualize which concepts are "firing" to understand why a specific image was flagged as OOD. Furthermore, despite the complex concept expansion, the model maintains high efficiency, processing approximately 800 images per second on a single GPU.

Experimental Results

COOD was evaluated using a variety of challenging benchmarks, including Pascal VOC and MS-COCO for In-Distribution data, and Textures (far-OOD), Filtered ImageNet-22K (near-OOD), and NINCO for Out-of-Distribution data.

  • State-of-the-Art Performance: COOD achieved approximately 95% AUROC on both VOC and COCO datasets.
  • Superiority over Baselines: It significantly outperformed existing methods like NegLabel and MCM, particularly in reducing the False Positive Rate (FPR@95). For instance, on Pascal VOC, it reduced the FPR95 from ~35% (NegLabel) to ~24%.
  • Robustness: The method maintained high performance across different backbones (ResNet and ViT) and varying numbers of labels.

Conclusion

COOD demonstrates that zero-shot multi-label OOD detection is highly effective when leveraging concept-based expansions. By enriching the semantic space with both positive and negative concepts, the framework precisely differentiates OOD samples without the need for additional training. While the quality of detection currently depends on the LLM's descriptive capabilities, future work focusing on domain specialization and automated vocabulary learning promises to further extend the reach of this robust detection framework.

Summary updated

BibTeX
@article{liu2026cood,
  author = {Zhendong Liu and Yi Nian and Henry Peng Zou and Li Li and Xiyang Hu and Yue Zhao},
  title = {{COOD: Concept-based Zero-shot OOD Detection}},
  journal = {Trans. Mach. Learn. Res.},
  year = {2026},
}
Figure