Conjugated Semantic Pool Improves OOD Detection with Pre-trained Vision-Language Models

Mengyuan Chen, Junyu Gao, Changsheng Xu

Abstract

Out-of-distribution (OOD) detection is a critical safety mechanism for machine learning models, preventing overconfident predictions on unseen data. While Vision-Language Models (VLMs) like CLIP have shown promise in zero-shot OOD detection by comparing images against a "semantic pool" of labels, performance often plateaus or degrades when using large, unrefined lexicons. This paper introduces the Conjugated Semantic Pool (CSP), a method that constructs OOD labels by combining broad superclasses with descriptive modifiers. By providing more effective "cluster centers" in the feature space, CSP achieves a 7.89% improvement in FPR95 over existing state-of-the-art methods on ImageNet-1k benchmarks.

Introduction

Modern machine learning models often suffer from overconfidence, assigning high-probability scores to images that do not belong to any known training category. In the context of Vision-Language Models (VLMs), zero-shot OOD detection typically involves measuring the alignment between an image and a set of candidate labels. If an image aligns more closely with a label from an OOD "semantic pool" than with any In-Distribution (ID) label, it is flagged as OOD.

However, expanding this semantic pool is not straightforward. Previous attempts to use massive dictionaries like WordNet have encountered a performance bottleneck. This research identifies the root causes of this failure—specifically the presence of synonyms and obscure terms—and proposes a novel label construction strategy to overcome them.

The Challenge of Semantic Lexicons

Simply increasing the size of the OOD label set does not guarantee better detection. The authors identify two primary reasons why large lexicons fail:

  1. Uncommon Words: Many words in comprehensive dictionaries are rarely "activated" by the model, contributing nothing to detection while increasing computational overhead.
  2. Synonyms and Redundancy: High semantic overlap between labels violates the independence required for effective statistical decision-making, leading to confusion and false positives.

Theoretical modeling of OOD detection as a series of independent Bernoulli random variables reveals an "inverted-V" trend: performance improves as the pool size increases, but only until the introduction of redundant or obscure labels begins to degrade the signal-to-noise ratio.

Methodology: Conjugated Semantic Pool (CSP)

To address these challenges, the authors propose the Conjugated Semantic Pool (CSP). Instead of relying on existing dictionaries, CSP "conjugates" new labels designed to act as broad attractors for OOD samples. The process involves two steps:

  1. Superclass Selection: Identifying broad, high-level terms such as "creature," "item," or "place" that encompass a wide variety of specific objects.
  2. Modifier Application: Adding descriptive adjectives (e.g., "white," "valuable," "communal") to these superclasses to create distinct semantic units like "white creature" or "valuable item."

These conjugated labels serve as "suitable cluster centers" for "homeless" OOD images—samples that do not naturally fit into specific ID categories. By using broad superclasses, the model increases the probability that an OOD sample will activate a label, while the modifiers ensure the labels remain semantically distinct from ID classes.

Experimental Evaluation

The CSP method was evaluated against a comprehensive suite of benchmarks using ImageNet-1k as the In-Distribution set. OOD datasets included iNaturalist, SUN, Places, and Textures. The researchers also tested the method on "Hard OOD" tasks (e.g., ImageNet-10 vs. ImageNet-20) and various domain shift sets like ImageNet-Sketch and ImageNet-A.

Key Results

  • Superior Accuracy: CSP achieved a 7.89% reduction in FPR95 (False Positive Rate at a 95% True Positive Rate) compared to the previous state-of-the-art method, NegLabel.
  • Robustness: The performance gains were consistent across multiple CLIP architectures, including ResNet-50, ViT-B/16, and ViT-L/14.
  • Efficiency: By using a curated set of conjugated labels rather than a massive dictionary, the method maintains high performance without the noise associated with large-scale lexicons.

Conclusion

The Conjugated Semantic Pool represents a significant shift in how we approach zero-shot OOD detection. By moving away from exhaustive dictionary lookups and toward the strategic construction of broad, modified semantic attractors, CSP provides a more robust framework for identifying unseen data. Future work may explore the optimization of ID label sets and the refinement of label selection processes to further enhance the reliability of vision-language models in open-world environments.

Summary updated

BibTeX
@inproceedings{chen2024conjugated,
  author = {Mengyuan Chen and Junyu Gao and Changsheng Xu},
  title = {{Conjugated Semantic Pool Improves OOD Detection with Pre-trained Vision-Language Models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=qqQFOcUEqM},
}
Figure