Research map / Label-efficient and robust learning / OOD and anomaly detection
ID-like Prompt Learning for Few-Shot Out-of-Distribution Detection
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Proposes ID-like prompt learning for few-shot OOD detection: crops ID images, uses CLIP similarity to mine ID-like outliers, and learns ID and OOD text prompts on a frozen CLIP-B/16.
Problem
Few-shot OOD detection struggles to separate the most challenging OOD samples that resemble in-distribution data, especially without auxiliary outlier datasets and with only a few ID samples.
Approach
Generate ID-like outliers from random crops of ID images by filtering with CLIP similarity to class prompts (high similarity = ID, low = outlier), then learn a set of learnable OOD prompts alongside ID prompts with a cross-entropy-style outlier loss plus a prompt diversity regularizer, using CLIP frozen except text embeddings.
Key results
- 4-shot ImageNet-1k OOD detection averages 26.08% FPR95 and 94.36% AUROC, a 12.16% FPR95 reduction and 2.76% AUROC gain over the best baseline (LoCoOp).
- 1-shot setting achieves 27.69% average FPR95 and 94.29% AUROC on ImageNet-1k.
- On SUN as OOD, the method underperforms LoCoOp (42.03% vs 33.06% FPR95 in 4-shot), which the authors attribute to ID-class samples mislabeled as OOD in SUN.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use ID-like prompt learning instead of LoCoOp | Few-shot CLIP-B/16 OOD detection · ImageNet-1k average OOD, one-shot | FPR95: 42.32 -> 27.69 | Helped |
| Use ID-like prompt learning instead of LoCoOp | Few-shot CLIP-B/16 OOD detection · ImageNet-1k average OOD, four-shot | AUROC: 91.60 -> 94.36 | Helped |
| Use ID-like prompt learning instead of LoCoOp | Few-shot CLIP-B/16 OOD detection · ImageNet-1k average OOD, four-shot | FPR95: 38.24 -> 26.08 | Helped |
| Use ID-like prompt learning instead of LoCoOp | Few-shot CLIP-B/16 OOD detection · ImageNet-1k ID; SUN OOD, one-shot | FPR95: 33.27 -> 44.02 | Hurt |
| Use ID-like prompt learning instead of LoCoOp | Few-shot CLIP-B/16 OOD detection · ImageNet-1k ID; SUN OOD, four-shot | AUROC: 93.24 -> 91.64 | Hurt |
| Generate ID-like outliers from ID samples instead of using auxiliary outliers (ablation) | ID-like Prompt Learning · ImageNet-1k average OOD, four-shot | AUROC: 86.15 -> 96.66 | Helped |
| Generate ID-like outliers from ID samples instead of using Gaussian noise (ablation) | ID-like Prompt Learning · ImageNet-1k average OOD, four-shot | FPR95: 57.15 -> 16.38 | Helped |
| Increase generated-outlier training from one-shot to four-shot (ablation) | ID-like Prompt Learning · ImageNet-1k average OOD | AUROC: 95.12 -> 96.66 | Helped |
| Increase the number of OOD prompts (ablation) | ID-like Prompt Learning · ImageNet-100 OOD detection | AUROC | Helped |
| Use prompt learning rather than full-model fine-tuning (ablation) | Few-shot CLIP OOD detection · ImageNet-100 OOD detection, one-shot and four-shot | AUROC | Helped |
Surprising findings
- About 145 of 400 sampled SUN images actually belong to ImageNet ID classes, suggesting the SUN OOD benchmark is contaminated.
- Fine-tuning the full model performs worse than prompt learning in the few-shot setting on the same generated outliers.
Limitations
- Performs poorly on SUN, where many OOD labels are noisy and contain ID-class content.
- Number of OOD prompts is fixed at 100 rather than one per ID class.
- Hard-coded hyperparameters (M=256 crops, Q=32, C=100) and reliance on CLIP similarity for outlier selection.
Experimental setup
Datasets: ImageNet-1k ImageNet-100 iNaturalist Places Texture SUN
Benchmarks: ImageNet-1k OOD (iNaturalist, Places, Texture) SUN OOD
Metrics: FPR95 AUROC ID accuracy
Baselines: MSP Energy ODIN Fort/MSP VOS NPOS CLIPN MCM CoOp LoCoOp
Builds on: CoOp MCM LoCoOp VOS
Closest papers by meaning
- Adaptive Multi-prompt Contrastive Network for Few-shot Out-of-distribution Detection (ICML 2025 · similarity 0.92)
- Envisioning Outlier Exposure by Large Language Models for Out-of-Distribution Detection (ICML 2024 · similarity 0.91)
- Image Background Serves as Good Proxy for Out-of-distribution Data (ICLR 2024 · similarity 0.89)
- Enhancing the Power of OOD Detection via Sample-Aware Model Selection (CVPR 2024 · similarity 0.89)
- Learning with Mixture of Prototypes for Out-of-Distribution Detection (ICLR 2024 · similarity 0.89)
- Exploiting Discrepancy in Feature Statistic for Out-of-Distribution Detection (AAAI 2024 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
