Learning Transferable Negative Prompts for Out-of-Distribution Detection
Tianqi Li, Guansong Pang, Xiao Bai, Wenjun Miao, Jin Zheng
Abstract
Existing prompt learning methods have shown certain capabilities in Out-of-Distribution (OOD) detection, but the lack of OOD images in the target dataset in their training can lead to mismatches between OOD images and In-Distribution (ID) categories, resulting in a high false positive rate. To address this issue, we introduce a novel OOD detection method, named 'NegPrompt', to learn a set of negative prompts, each representing a negative connotation of a given class label, for delineating the boundaries between ID and OOD images. It learns such negative prompts with ID data only, without any reliance on external outlier data. Further, current methods assume the availability of samples of all ID classes, rendering them ineffective in open-vocabulary learning scenarios where the inference stage can contain novel ID classes not present during training. In contrast, our learned negative prompts are transferable to novel class labels. Experiments on various Im-ageNet benchmarks show that NegPrompt surpasses stateof-the-art prompt-learning-based OOD detection methods and maintains a consistent lead in hard OOD detection in closed-and open-vocabulary classification scenarios. Code is available at https:// github.com/ mala-lab/ negprompt.
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 d3725fca-b3d1-432c-99dc-420c2a3269a4Cited by top-tier papers35
- AdaNeg: Adaptive Negative Proxy Guided OOD Detection with Vision-Language ModelsYabin Zhang, Lei ZhangNeurIPS 2024 · 30 citations
- Self-Calibrated Tuning of Vision-Language Models for Out-of-Distribution DetectionGeng Yu, Jianing Zhu, Jiangchao Yao, Bo HanNeurIPS 2024 · 26 citations
- CountGD++: Generalized Prompting for Open-World CountingNiki Amini-Naieni, Andrew ZissermanCVPR 2026 · 14 citations
- ANTS: Adaptive Negative Textual Space Shaping for OOD Detection via Test-Time MLLM Understanding and ReasoningWenjie Zhu, Yabin Zhang, Xin Jin, Wenjun Zeng et al.CVPR 2026 · 12 citations
- AdaSCALE: Adaptive Scaling for OOD DetectionSudarshan RegmiICML 2026 · 9 citations
Builds on29
- Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu et al.ICCV 2021 · 31,683 citations
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn et al.ICLR 2021 · 21,477 citations
- Supervised Contrastive LearningPrannay Khosla, Piotr Teterwak, Chen Wang, Aaron Sarna et al.NeurIPS 2020 · 7,049 citations
- Adding Conditional Control to Text-to-Image Diffusion ModelsLvmin Zhang, Anyi Rao, Maneesh AgrawalaICCV 2023 · 6,759 citations
Related papers
- Out-of-Distribution Detection with Negative PromptsJun Nie, Yonggang Zhang, Zhen Fang, Tongliang Liu et al.ICLR 2024 · 48 citations
- Out-of-Distribution Detection with Positive and Negative Prompt Supervision Using Large Language ModelsZhixia He, Chen Zhao, Minglai Shao, Xintao Wu et al.AAAI 2026
- CLIPN for Zero-Shot OOD Detection: Teaching CLIP to Say NoHualiang Wang, Yi Li, Huifeng Yao, Xiaomeng LiICCV 2023 · 171 citations
- Adaptive Prompt Learning via Gaussian Outlier Synthesis for Out-Of-Distribution DetectionYongkang Zhang, Dongyu She, Zhong ZhouICCV 2025 · 4 citations
- Adaptive Multi-prompt Contrastive Network for Few-shot Out-of-distribution DetectionXiang Fang, Arvind Easwaran, Blaise GenestICML 2025
