Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Respecting Modality Gap in Post-hoc Out-of-distribution Detection with Pre-trained Vision-Language Models

About

Out-of-distribution (OOD) detection has emerged as a popular technique to enhance the reliability of machine learning models by identifying unexpected inputs from unknown classes. Recent progress in pre-trained vision-language models (VLMs) has enabled zero-shot OOD detection without access to in-distribution (ID) training data; in this setting, existing methods commonly treat text embeddings of class names as class prototypes. In this paper, we challenge the widely adopted text-as-prototype paradigm by theoretically showing that off-the-shelf textual prototypes are generally misaligned with the optimal visual prototypes, yielding an intrinsic modality gap that cannot be eliminated by prompt engineering alone. To mitigate this gap under the post-hoc constraint, this paper presents an online pseudo-supervised framework that directly learns class prototypes in the visual feature space using unlabeled test-time data streams and soft predictions from the pre-trained VLMs. We provide theoretical guarantees for the convergence of the online optimization procedure. Extensive experiments empirically demonstrate that our method achieves a new state of the art across a variety of OOD detection setups.

Yuanwei Hu, Bo Peng, Yadan Luo, Zhen Fang, Ling Chen, Jie Lu• 2026

Related benchmarks

TaskDatasetResultRank
Out-of-Distribution DetectionSUN OOD with ImageNet-1k In-distribution (test)
FPR@955
247
Out-of-Distribution DetectionImageNet-1k (ID) with 4 OOD datasets (iNaturalist, SUN, Places, Textures)
FPR9512.79
69
Out-of-Distribution DetectionImageNet-1k (ID) vs Textures (OOD) 1.0 (test)
AUC97.01
64
Out-of-Distribution DetectionCIFAR-100 ID Near-OOD Average OpenOOD v1.5
AUROC89.36
40
OOD DetectionOpenOOD CIFAR10 Near-OOD
AUROC95.72
36
OOD DetectionOpenOOD Far-OOD CIFAR10
AUROC99.83
30
Out-of-Distribution DetectionOpenOOD ImageNet-1k ID Far-OOD
AUROC97.67
30
Out-of-Distribution DetectionCIFAR-100 ID Far-OOD Average OpenOOD v1.5
AUROC96.9
24
Out-of-Distribution DetectioniNaturalist (OOD) / ImageNet-1k (ID) 1.0 (test)
AUROC99.88
24
Out-of-Distribution DetectionPlaces OOD ImageNet-1K ID 1.0 (test)
AUROC95.17
24
Showing 10 of 11 rows

Other info

Follow for update