Research map / Label-efficient and robust learning / OOD and anomaly detection
PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly 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 PromptAD, a one-class prompt learning method for few-shot industrial anomaly detection that builds negative prompts via semantic concatenation and enforces a margin via an explicit anomaly margin loss on a VV-CLIP backbone.
Problem
Automatically learning prompts for CLIP-based few-shot anomaly detection when only normal training samples are available; conventional many-class prompt learning fails in the one-class setting due to lack of negative samples and margin control.
Approach
Semantic concatenation turns learnable normal prompts into anomaly prompts by appending anomaly suffixes (manual and learnable) to create negatives, and an explicit anomaly margin loss controls the distance between normal and anomaly prompt features via a hyper-parameter; combined with VV-attention CLIP and WinCLIP+-style vision-guided memory scoring.
Key results
- PromptAD reaches 94.6% image-level and 95.9% pixel-level AUROC on MVTec under 1-shot, and first place in 11 of 12 few-shot image/pixel settings on MVTec and VisA.
- Ablation on MVTec 1-shot: semantic concatenation improves image-level AUROC from 81.5 to 90.4 and EAM adds about 0.9 points more.
- Under 1-shot, PromptAD beats WinCLIP+ on MVTec image-level AUROC by 1.3 points (93.1 to 94.6 for WinCLIP+ reference in Table 1).
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use PromptAD instead of RWDA | few-shot anomaly detection · MVTec 1-shot | image-level AUROC: 93.3±0.5 -> 94.6±1.7 | Helped |
| Use PromptAD instead of WinCLIP+ | few-shot anomaly detection · VisA 1-shot | image-level AUROC: 83.8±4.0 -> 86.9±2.3 | Helped |
| Use PromptAD instead of WinCLIP+ | few-shot anomaly detection · MVTec 1-shot | pixel-level AUROC: 95.2±0.5 -> 95.9±0.5 | Helped |
| Use PromptAD instead of FastRecon | few-shot anomaly detection · MVTec 4-shot | pixel-level AUROC: 97.0 -> 96.5±0.2 | Hurt |
| Add semantic concatenation to conventional prompt learning (ablation) | PromptAD · MVTec 1-shot | image-level AUROC: 81.5 -> 90.4 | Helped |
| Add semantic concatenation to conventional prompt learning (ablation) | PromptAD · VisA 1-shot | pixel-level AUROC: 85.5 -> 90.5 | Helped |
| Add explicit anomaly margin after semantic concatenation (ablation) | PromptAD · MVTec 1-shot | image-level AUROC: 90.4 -> 91.3 | Helped |
| Add explicit anomaly margin after semantic concatenation (ablation) | PromptAD · VisA 1-shot | pixel-level AUROC: 90.5 -> 91.8 | Helped |
| Fuse prompt-guided and vision-guided anomaly detection (ablation) | PromptAD · MVTec 1-shot | image-level AUROC: 91.3 -> 94.6 | Helped |
| Fuse prompt-guided and vision-guided anomaly detection (ablation) | PromptAD · VisA 1-shot | pixel-level AUROC: 91.8 -> 96.7 | Helped |
| Apply prompt learning to original CLIP (ablation) | CLIP · MVTec 1-shot | pixel-level AUROC: 22.5 -> 79.9 | Helped |
| Apply prompt learning to original CLIP (ablation) | CLIP · VisA 1-shot | pixel-level AUROC: 24.6 -> 80.4 | Helped |
Surprising findings
- Conventional many-class prompt learning (CoOp-style) as a baseline underperforms WinCLIP with manual prompts on image-level AD in the one-class setting.
Limitations
- Relies on the anomaly labels/text of the datasets to create manual anomaly suffixes
- Gap remains to latest full-shot methods such as PatchCore and SimpleNet
- Pixel-level results on MVTec 4-shot ranked second behind FastRecon
Experimental setup
Datasets: MVTec VisA
Benchmarks: MVTec VisA
Metrics: AUROC
Baselines: WinCLIP+ RWDA FastRecon SPADE PaDiM PatchCore CoOp
Builds on: CoOp CLIP WinCLIP CLIP Surgery MaskCLIP
Closest papers by meaning
- Bayesian Prompt Flow Learning for Zero-Shot Anomaly Detection (CVPR 2025 · similarity 0.89)
- Kernel-Aware Graph Prompt Learning for Few-Shot Anomaly Detection (AAAI 2025 · similarity 0.88)
- AnomalyGPT: Detecting Industrial Anomalies Using Large Vision-Language Models (AAAI 2024 · similarity 0.88)
- Toward Generalist Anomaly Detection via In-context Residual Learning with Few-shot Sample Prompts (CVPR 2024 · similarity 0.87)
- One-to-Normal: Anomaly Personalization for Few-shot Anomaly Detection (NeurIPS 2024 · similarity 0.86)
- AnomalyNCD: Towards Novel Anomaly Class Discovery in Industrial Scenarios (CVPR 2025 · similarity 0.86)
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.
