Out-of-Distribution Detection with Positive and Negative Prompt Supervision Using Large Language Models
Zhixia He, Chen Zhao, Minglai Shao, Xintao Wu, Xujiang Zhao, Dong Li, Qin Tian, Linlin Yu
Abstract
Out-of-distribution (OOD) detection is committed to delineating the classification boundaries between in-distribution (ID) and OOD images. Recent advances in vision-language models (VLMs) have demonstrated remarkable OOD detection performance by integrating both visual and textual modalities. In this context, negative prompts are introduced to emphasize the dissimilarity between image features and prompt content. However, these prompts often include a broad range of non-ID features, which may result in suboptimal outcomes due to the capture of overlapping or misleading information. To address this issue, we propose Positive and Negative Prompt Supervision, which encourages negative prompts to capture inter-class features and transfers this semantic knowledge to the visual modality to enhance OOD detection performance. Our method begins with class-specific positive and negative prompts initialized by large language models (LLMs). These prompts are subsequently optimized, with positive prompts focusing on features within each class, while negative prompts highlight features around category boundaries. Additionally, a graph-based architecture is employed to aggregate semantic-aware supervision from the optimized prompt representations and propagate it to the visual branch, thereby enhancing the performance of the energy-based OOD detector. Extensive experiments on two benchmarks, CIFAR-100 and ImageNet-1K, across eight OOD datasets and five different LLMs, demonstrate that our method outperforms state-of-the-art baselines.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext fef1114c-3607-43ce-988b-9bfcdc1fb4cfBuilds on15
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- ReAct: Out-of-distribution Detection With Rectified ActivationsYiyou Sun, Chuan Guo, Yixuan LiNeurIPS 2021 · 733 citations
- Vision GNN: An Image is Worth Graph of NodesKai Han, Yunhe Wang, Jianyuan Guo, Yehui Tang et al.NeurIPS 2022 · 668 citations
- Scaling Out-of-Distribution Detection for Real-World SettingsDan Hendrycks, Steven Basart, Mantas Mazeika, Andy Zou et al.ICML 2022 · 653 citations
- What does a platypus look like? Generating customized prompts for zero-shot image classificationSarah M. Pratt, Ian Covert, Rosanne Liu, Ali FarhadiICCV 2023 · 343 citations
Related papers
- Out-of-Distribution Detection with Negative PromptsJun Nie, Yonggang Zhang, Zhen Fang, Tongliang Liu et al.ICLR 2024 · 48 citations
- Adaptive Prompt Learning via Gaussian Outlier Synthesis for Out-Of-Distribution DetectionYongkang Zhang, Dongyu She, Zhong ZhouICCV 2025 · 4 citations
- Learning Transferable Negative Prompts for Out-of-Distribution DetectionTianqi Li, Guansong Pang, Xiao Bai, Wenjun Miao et al.CVPR 2024
- Mind the Way You Select Negative Texts: Pursuing the Distance Consistency in OOD Detection with VLMsZhikang Xu, Qianqian Xu, Zitai Wang, Cong Hua et al.CVPR 2026 · 1 citation
- Negative Label Guided OOD Detection with Pretrained Vision-Language ModelsXue Jiang, Feng Liu, Zhen Fang, Hong Chen et al.ICLR 2024 · 73 citations
