Lune

ICLR2025Top-tier venue

One-for-All Few-Shot Anomaly Detection via Instance-Induced Prompt Learning

Wenxi Lv, Qinliang Su, Wenchao Xu

Abstract

Anomaly detection methods under the 'one-for-all' paradigm aim to develop a unified model capable of detecting anomalies across multiple classes. However, these approaches typically require a large number of normal samples for model training, which may not always be fulfilled in practice. Few-shot anomaly detection methods can address scenarios with limited data but require a tailored model for each class, following the 'one-for-one' paradigm. In this paper, we first proposed a one-for-all few-shot anomaly detection method with the assistance of vision-language models. Unlike previous CLIP-based methods that learn fixed prompts for each class, our method learns a class-shared prompt generator to adaptively generate suitable prompts for each instance. The prompt generator is trained by aligning the prompts with the visual space and utilizing guidance from general textual descriptions of normality and abnormality. In addition, we further propose a method to address the problem of how to retrieve valid similar features from the visual memory bank under the one-for-all paradigm. Extensive experimental results on MVTec and VisA demonstrate the superiority of our method in few-shot anomaly detection task under the one-forall paradigm. Our code is available in https://github.com/Vanssssry/ One-For-All-Few-Shot-Anomaly-Detection .

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

8 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Foundation Visual Encoders Are Secretly Few-Shot Anomaly Detectors cites Towards Total Recall in Industrial Anomaly Detection
  • Foundation Visual Encoders Are Secretly Few-Shot Anomaly Detectors cites Anomaly Detection via Reverse Distillation from One-Class Embedding
  • Foundation Visual Encoders Are Secretly Few-Shot Anomaly Detectors cites Learning Transferable Visual Models From Natural Language Supervision
  • Conditional Prompt Learning for Vision-Language Models cites Learning Transferable Visual Models From Natural Language Supervision
  • RAID: Retrieval-Augmented Anomaly Detection cites Towards Total Recall in Industrial Anomaly Detection
  • RAID: Retrieval-Augmented Anomaly Detection cites Learning Transferable Visual Models From Natural Language Supervision
  • AF-CLIP: Zero-Shot Anomaly Detection via Anomaly-Focused CLIP Adaptation cites Towards Total Recall in Industrial Anomaly Detection
  • AF-CLIP: Zero-Shot Anomaly Detection via Anomaly-Focused CLIP Adaptation cites Anomaly Detection via Reverse Distillation from One-Class Embedding
  • AF-CLIP: Zero-Shot Anomaly Detection via Anomaly-Focused CLIP Adaptation cites BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models
  • AF-CLIP: Zero-Shot Anomaly Detection via Anomaly-Focused CLIP Adaptation cites Learning Transferable Visual Models From Natural Language Supervision
  • SubspaceAD: Training-Free Few-Shot Anomaly Detection via Subspace Modeling cites Towards Total Recall in Industrial Anomaly Detection
  • SubspaceAD: Training-Free Few-Shot Anomaly Detection via Subspace Modeling cites Anomaly Detection via Reverse Distillation from One-Class Embedding
  • SubspaceAD: Training-Free Few-Shot Anomaly Detection via Subspace Modeling cites Learning Transferable Visual Models From Natural Language Supervision
  • Normal-Abnormal Guided Generalist Anomaly Detection cites Towards Total Recall in Industrial Anomaly Detection
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers8

  1. AF-CLIP: Zero-Shot Anomaly Detection via Anomaly-Focused CLIP AdaptationQingqing Fang, Wenxi Lv, Qinliang SuACM MM 2025 · 17 citations
  2. Normal-Abnormal Guided Generalist Anomaly DetectionYuexin Wang, Xiaolei Wang, Yizheng Gong, Jimin XiaoNeurIPS 2025 · 16 citations
  3. SubspaceAD: Training-Free Few-Shot Anomaly Detection via Subspace ModelingCamile Lendering, Erkut Akdag, Egor BondarauCVPR 2026 · 12 citations
  4. Foundation Visual Encoders Are Secretly Few-Shot Anomaly DetectorsGuangyao Zhai, Yue Zhou, Xinyan Deng, Lars Heckler-Kram et al.ICLR 2026 · 9 citations
  5. RAID: Retrieval-Augmented Anomaly DetectionMingxiu Cai, Zhe Zhang, Gaochang Wu, Tianyou Chai et al.CVPR 2026 · 2 citations

Builds on21

  1. Learning Transferable Visual Models From Natural Language SupervisionAlec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh et al.ICML 2021 · 47,906 citations
  2. BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language ModelsJunnan Li, Dongxu Li, Silvio Savarese, Steven C. H. HoiICML 2023 · 7,873 citations
  3. Conditional Prompt Learning for Vision-Language ModelsKaiyang Zhou, Jingkang Yang, Chen Change Loy, Ziwei LiuCVPR 2022 · 1,438 citations
  4. Towards Total Recall in Industrial Anomaly DetectionKarsten Roth, Latha Pemula, Joaquin Zepeda, Bernhard Schölkopf et al.CVPR 2022 · 1,301 citations
  5. Anomaly Detection via Reverse Distillation from One-Class EmbeddingHanqiu Deng, Xingyu LiCVPR 2022 · 701 citations

Related papers

  1. PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly DetectionXiaofan Li, Zhizhong Zhang, Xin Tan, Chengwei Chen et al.CVPR 2024
  2. Bidirectional Multimodal Prompt Learning with Scale-Aware Training for Few-Shot Multi-Class Anomaly DetectionYujin Lee, Sewon Kim, Daeun Moon, Seoyoon Jang et al.CVPR 2026
  3. SimCLIP: Refining Image-Text Alignment with Simple Prompts for Zero-/Few-shot Anomaly DetectionChenghao Deng, Haote Xu, Xiaolu Chen, Haodi Xu et al.ACM MM 2024 · 10 citations
  4. AdaptCLIP: Adapting CLIP for Universal Visual Anomaly DetectionBin-Bin Gao, Yue Zhou, Jiangtao Yan, Yuezhi Cai et al.AAAI 2026 · 21 citations
  5. Do LLMs Understand Visual Anomalies? Uncovering LLM's Capabilities in Zero-shot Anomaly DetectionJiaqi Zhu, Shaofeng Cai, Fang Deng, Beng Chin Ooi et al.ACM MM 2024 · 30 citations
Dusk over the sea between two cliffs drawn in fine vertical lines