Mitigating the Modality Gap: Few-Shot Out-of-Distribution Detection with Multi-modal Prototypes and Image Bias Estimation

Yimu Wang, Evelien Riddell, Adrian Chow, Sean Sedwards, Krzysztof Czarnecki · DOI

Abstract

Vision-Language Models (VLMs) like CLIP are powerful tools for zero-shot tasks but face significant hurdles in Out-of-Distribution (OOD) detection due to the "modality gap." This gap refers to the spatial separation between image and text embeddings in the shared vector space. We present SUPREME, a few-shot tuning framework that leverages multi-modal prototypes and image-bias estimation to bridge this gap, significantly reducing false positives in OOD detection.

The Modality Gap Problem

In standard VLM-based OOD detection, an input image is compared against text prototypes (embeddings of class labels). However, image and text embeddings for the same concept rarely overlap perfectly. This "modality gap" often results in OOD images being spatially closer to In-Distribution (ID) text prototypes than the actual ID images are, leading to high false-positive rates where the model confidently misclassifies unknown objects as known ones.

Conceptual comparison between previous text-only prototype methods and the proposed multi-modal prototype approach.

As illustrated in Figure 1, traditional methods rely solely on text prototypes, which can leave OOD samples dangerously close to ID regions. By introducing image prototypes, SUPREME establishes a more robust boundary and a "buffer zone" to catch these samples.

The SUPREME Framework

The proposed SUPREME (mUlti-modal PRototypE-based MEthod) addresses these issues through technical innovations integrated into a few-shot finetuning pipeline, requiring as few as 16 images per class.

Overview of the SUPREME framework, including Biased Prompt Generation (BPG), Image-Text Consistency (ITC), and the Generalized Multi-modal Prototype Score ($S_{GMP}$).

1. Multi-modal Prototypes

Instead of relying exclusively on text labels, SUPREME calculates "image prototypes" by averaging the embeddings of training images. This dual-modality approach creates a more comprehensive representation of the class domain than text alone.

2. Biased Prompt Generation (BPG)

To mitigate overfitting in few-shot scenarios, SUPREME estimates the "domain bias" of the image distribution using a Gaussian model. This bias is used to "nudge" text prompts closer to the image domain during training, ensuring the model generalizes beyond the specific few-shot samples provided.

3. Image-Text Consistency (ITC)

The framework learns mapping functions to project images into the text domain and vice versa. By enforcing consistency between these cross-modal projections, SUPREME explicitly shrinks the modality gap, forcing the two embedding spaces into better alignment.

4. Generalized Multi-modal Prototype Score ($S_{GMP}$)

During inference, the model utilizes a weighted similarity score ($S_{GMP}$) that considers both original and mapped embeddings against both text and image prototypes. This multi-faceted comparison creates a highly discriminative boundary for identifying OOD samples.

Experimental Results

SUPREME was evaluated on standard benchmarks including ImageNet-1k (ID) against OOD datasets like iNaturalist, SUN, Places, and Texture.

  • Performance: SUPREME achieved a state-of-the-art FPR95 of 20.70% on ImageNet-1k, a significant improvement over the previous best few-shot method, NegPrompt (23.01%).
  • Hard OOD Tasks: In challenging scenarios like ImageNet-10 vs. ImageNet-20, SUPREME reduced the FPR95 to 4.10%, outperforming the MCM baseline (5.00%).
  • Efficiency: The method is highly efficient, adding only 0.46% more trainable parameters to the base CLIP model while maintaining constant-time ($O(1)$) inference complexity.

Conclusion

By explicitly modeling the modality gap and incorporating image-based prototypes, SUPREME transforms the liability of embedding misalignment into a structured advantage for OOD detection. While it requires a small amount of ID data, its superior performance and efficiency make it a robust solution for real-world vision-language applications.

Summary updated

BibTeX
@inproceedings{wang2026mitigating,
  author = {Yimu Wang and Evelien Riddell and Adrian Chow and Sean Sedwards and Krzysztof Czarnecki},
  title = {{Mitigating the Modality Gap: Few-Shot Out-of-Distribution Detection with Multi-modal Prototypes and Image Bias Estimation}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2026},
}
Figure