Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

LAPT: Label-driven Automated Prompt Tuning for OOD Detection with Vision-Language Models

About

Out-of-distribution (OOD) detection is crucial for model reliability, as it identifies samples from unknown classes and reduces errors due to unexpected inputs. Vision-Language Models (VLMs) such as CLIP are emerging as powerful tools for OOD detection by integrating multi-modal information. However, the practical application of such systems is challenged by manual prompt engineering, which demands domain expertise and is sensitive to linguistic nuances. In this paper, we introduce Label-driven Automated Prompt Tuning (LAPT), a novel approach to OOD detection that reduces the need for manual prompt engineering. We develop distribution-aware prompts with in-distribution (ID) class names and negative labels mined automatically. Training samples linked to these class labels are collected autonomously via image synthesis and retrieval methods, allowing for prompt learning without manual effort. We utilize a simple cross-entropy loss for prompt optimization, with cross-modal and cross-distribution mixing strategies to reduce image noise and explore the intermediate space between distributions, respectively. The LAPT framework operates autonomously, requiring only ID class names as input and eliminating the need for manual intervention. With extensive experiments, LAPT consistently outperforms manually crafted prompts, setting a new standard for OOD detection. Moreover, LAPT not only enhances the distinction between ID and OOD samples, but also improves the ID classification accuracy and strengthens the generalization robustness to covariate shifts, resulting in outstanding performance in challenging full-spectrum OOD detection tasks. Codes are available at \url{https://github.com/YBZh/LAPT}.

Yabin Zhang, Wenjie Zhu, Chenhang He, Lei Zhang• 2024

Related benchmarks

TaskDatasetResultRank
Image ClassificationImageNet-1k (val)--
1453
OOD DetectionImageNet-1K OOD (Average: OpenImage-O, Texture, iNaturalist, ImageNet-O) 1.0 (test)
AUROC94.68
61
Out-of-Distribution DetectionImageNet-1k Textures ID OOD
AUROC91.06
59
OOD DetectionImageNet SUN
FPR@9519.12
43
Out-of-Distribution DetectionOpenOOD Near-OoD average v1.5
AUROC0.8263
39
Out-of-Distribution DetectionOpenOOD Far-OoD average v1.5
AUROC94.26
39
OOD DetectionImageNet-1k ID Places OOD
AUROC92.01
35
Out-of-Distribution DetectionImageNet-1K (ID) vs Textures (OOD) (test)
FPR9540.32
34
OOD DetectioniNaturalist (OOD) / ImageNet-1k (ID) 1.0 (test)
FPR951.16
33
OOD DetectionImageNet-1k ID iNaturalist OOD
AUROC99.63
19
Showing 10 of 14 rows

Other info

Follow for update