mlsanityData to 7 Oct 2026

Retrieval-Augmented Prompt for OOD Detection

arXiv 2508.10556 ↗First posted 14 Aug 2025cs.CV cs.AIcited by 0

On the map: Retrieval-augmented generation → Privacy and security of RAG

Abstract (arXiv)

Out-of-Distribution (OOD) detection is crucial for the reliable deployment of machine learning models in-the-wild, enabling accurate identification of test samples that differ from the training data distribution. Existing methods rely on auxiliary outlier samples or in-distribution (ID) data to generate outlier information for training, but due to limited outliers and their mismatch with real test OOD samples, they often fail to provide sufficient semantic supervision, leading to suboptimal performance. To address this, we propose a novel OOD detection method called Retrieval-Augmented Prompt (RAP). RAP augments a pre-trained vision-language model's prompts by retrieving external knowledge, offering enhanced semantic supervision for OOD detection. During training, RAP retrieves descriptive words for outliers based on joint similarity with external textual knowledge and uses them to augment the model's OOD prompts. During testing, RAP dynamically updates OOD prompts in real-time based on the encountered OOD samples, enabling the model to rapidly adapt to the test environment. Our extensive experiments demonstrate that RAP achieves state-of-the-art performance on large-scale OOD detection benchmarks. For example, in 1-shot OOD detection on the ImageNet-1k dataset, RAP reduces the average FPR95 by 7.05% and improves the AUROC by 1.71% compared to previous methods. Additionally, comprehensive ablation studies validate the effectiveness of each module and the underlying motivations of our approach.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Placed in Privacy and security of RAG, one of 15 directions in Retrieval-augmented generation. Builds on 29 of its 37 references that are in the map. First posted on arXiv 14 Aug 2025.

Builds on

29 of 37 references.

References · 29

  1. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  2. 2017mixup: Beyond Empirical Risk Minimizationcited by 5,155
  3. 2016A Baseline for Detecting Misclassified and Out-of-Distribution Examples in Neural Networkscited by 2,362
  4. 2021Learning to Prompt for Vision-Language Modelscited by 2,269
  5. 2013Describing Textures in the Wildcited by 2,110
  6. 2018A Simple Unified Framework for Detecting Out-of-Distribution Samples and Adversarial Attackscited by 1,472
  7. 2017Enhancing The Reliability of Out-of-distribution Image Detection in Neural Networkscited by 1,325
  8. 2020Energy-based Out-of-distribution Detectioncited by 1,296
  9. 2022Planning-oriented Autonomous Drivingcited by 1,068
  10. 2022Out-of-Distribution Detection with Deep Nearest Neighborscited by 596
  11. 2022ViM: Out-Of-Distribution with Virtual-logit Matchingcited by 404
  12. 2021On the Importance of Gradients for Detecting Distributional Shifts in the Wildcited by 338
17 more
  1. 2022Delving into Out-of-Distribution Detection with Vision-Language Representationscited by 215
  2. 2022Extremely Simple Activation Shaping for Out-of-Distribution Detectioncited by 212
  3. 2021Zero-Shot Out-of-Distribution Detection Based on the Pre-trained Model CLIPcited by 151
  4. 2023CLIPN for Zero-Shot OOD Detection: Teaching CLIP to Say Nocited by 130
  5. 2023Non-Parametric Outlier Synthesiscited by 129
  6. 2020ATOM: Robustifying Out-of-distribution Detection Using Outlier Miningcited by 116
  7. 2022POEM: Out-of-Distribution Detection with Posterior Samplingcited by 108
  8. 2023LoCoOp: Few-Shot Out-of-Distribution Detection via Prompt Learningcited by 107
  9. 2023Dream the Impossible: Outlier Imagination with Diffusion Modelscited by 77
  10. 2023Scaling for Training Time and Post-hoc Out-of-distribution Detection Enhancementcited by 77
  11. 2022Unknown-Aware Object Detection: Learning What You Don't Know from Videos in the Wildcited by 70
  12. 2024Negative Label Guided OOD Detection with Pretrained Vision-Language Modelscited by 66
  13. 2023ID-like Prompt Learning for Few-Shot Out-of-Distribution Detectioncited by 42
  14. 2023Diversified Outlier Exposure for Out-of-Distribution Detection via Informative Extrapolationcited by 38
  15. 2025A Survey on Knowledge-Oriented Retrieval-Augmented Generationcited by 34
  16. 2024Self-Calibrated Tuning of Vision-Language Models for Out-of-Distribution Detectioncited by 15
  17. 2024Out-Of-Distribution Detection with Diversification (Provably)cited by 6

Built on by

Not cited yet.

Similar, not cited

Close in wording, no citation either way

  1. 2026TTL: Test-time Textual Learning for OOD Detection with Pretrained Vision-Language Models
  2. 2024Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detection
  3. 2025Out-of-Distribution Detection with Positive and Negative Prompt Supervision Using Large Language Models
  4. 2024Local-Prompt: Extensible Local Prompts for Few-Shot Out-of-Distribution Detection
  5. 2025Harnessing Large Language and Vision-Language Models for Robust Out-of-Distribution Detection
  6. 2026Vision Also You Need: Navigating Out-of-Distribution Detection with Multimodal Large Language Model
  7. 2024LAPT: Label-driven Automated Prompt Tuning for OOD Detection with Vision-Language Models
  8. 2023On the Powerfulness of Textual Outlier Exposure for Visual OoD Detection