mlsanityData to 7 Oct 2026

Toward Generalist Anomaly Detection via In-context Residual Learning with Few-shot Sample Prompts

arXiv 2403.06495 ↗First posted 11 Mar 2024cs.CVcited by 88

Not on the map. Why?

Abstract (arXiv)

This paper explores the problem of Generalist Anomaly Detection (GAD), aiming to train one single detection model that can generalize to detect anomalies in diverse datasets from different application domains without any further training on the target data. Some recent studies have shown that large pre-trained Visual-Language Models (VLMs) like CLIP have strong generalization capabilities on detecting industrial defects from various datasets, but their methods rely heavily on handcrafted text prompts about defects, making them difficult to generalize to anomalies in other applications, e.g., medical image anomalies or semantic anomalies in natural images. In this work, we propose to train a GAD model with few-shot normal images as sample prompts for AD on diverse datasets on the fly. To this end, we introduce a novel approach that learns an in-context residual learning model for GAD, termed InCTRL. It is trained on an auxiliary dataset to discriminate anomalies from normal samples based on a holistic evaluation of the residuals between query images and few-shot normal sample prompts. Regardless of the datasets, per definition of anomaly, larger residuals are expected for anomalies than normal samples, thereby enabling InCTRL to generalize across different domains without further training. Comprehensive experiments on nine AD datasets are performed to establish a GAD benchmark that encapsulate the detection of industrial defect anomalies, medical anomalies, and semantic anomalies in both one-vs-all and multi-class setting, on which InCTRL is the best performer and significantly outperforms state-of-the-art competing methods. Code is available at https://github.com/mala-lab/InCTRL.

Key facts. Cited by 88 papers in the map (data through 7 Oct 2026). Builds on 56 of its 76 references that are in the map. First posted on arXiv 11 Mar 2024.

Builds on

56 of 76 references.

References · 56

  1. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2022Flamingo: a Visual Language Model for Few-Shot Learningcited by 4,337
  4. 2022Conditional Prompt Learning for Vision-Language Modelscited by 1,427
  5. 2021Towards Total Recall in Industrial Anomaly Detectioncited by 772
  6. 2022OFA: Unifying Architectures, Tasks, and Modalities Through a Simple Sequence-to-Sequence Learning Frameworkcited by 742
  7. 2020PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localizationcited by 591
  8. 2021DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detectioncited by 510
  9. 2022Unified-IO: A Unified Model for Vision, Language, and Multi-Modal Taskscited by 420
  10. 2022Anomaly Detection via Reverse Distillation from One-Class Embeddingcited by 419
  11. 2018GANomaly: Semi-Supervised Anomaly Detection via Adversarial Trainingcited by 409
  12. 2022SPot-the-Difference Self-Supervised Pre-training for Anomaly Detection and Segmentationcited by 397
38 more
  1. 2019Uninformed Students: Student-Teacher Anomaly Detection with Discriminative Latent Embeddingscited by 386
  2. 2021Pix2seq: A Language Modeling Framework for Object Detectioncited by 345
  3. 2022Images Speak in Images: A Generalist Painter for In-Context Visual Learningcited by 317
  4. 2023WinCLIP: Zero-/Few-Shot Anomaly Classification and Segmentationcited by 311
  5. 2020Sub-Image Anomaly Detection with Deep Pyramid Correspondencescited by 297
  6. 2019Deep Semi-Supervised Anomaly Detectioncited by 290
  7. 2020Multiresolution Knowledge Distillation for Anomaly Detectioncited by 285
  8. 2020Learning Memory-guided Normality for Anomaly Detectioncited by 278
  9. 2023AnomalyCLIP: Object-agnostic Prompt Learning for Zero-shot Anomaly Detectioncited by 270
  10. 2022Visual Prompting via Image Inpaintingcited by 248
  11. 2020Patch SVDD: Patch-level SVDD for Anomaly Detection and Segmentationcited by 212
  12. 2020Classification-Based Anomaly Detection for General Datacited by 210
  13. 2023SegGPT: Segmenting Everything In Contextcited by 193
  14. 2022A Unified Sequence Interface for Vision Taskscited by 152
  15. 2019Segmentation-Based Deep-Learning Approach for Surface-Defect Detectioncited by 145
  16. 2021Student-Teacher Feature Pyramid Matching for Anomaly Detectioncited by 145
  17. 2022Registration based Few-Shot Anomaly Detectioncited by 133
  18. 2023VadCLIP: Adapting Vision-Language Models for Weakly Supervised Video Anomaly Detectioncited by 121
  19. 2020Old is Gold: Redefining the Adversarially Learned One-Class Classifier Training Paradigmcited by 115
  20. 2022Catching Both Gray and Black Swans: Open-set Supervised Anomaly Detectioncited by 104
  21. 2022Language Models are General-Purpose Interfacescited by 96
  22. 2021Divide-and-Assemble: Learning Block-wise Memory for Unsupervised Anomaly Detectioncited by 83
  23. 2018Learning Representations of Ultrahigh-dimensional Data for Random Distance-based Outlier Detectioncited by 79
  24. 2022UViM: A Unified Modeling Approach for Vision with Learned Guiding Codescited by 77
  25. 2019Attention Based Glaucoma Detection: A Large-scale Database and CNN Modelcited by 75
  26. 2023Pushing the Limits of Fewshot Anomaly Detection in Industry Vision: Graphcorecited by 75
  27. 2024A Survey on Visual Anomaly Detection: Challenge, Approach, and Prospectcited by 69
  28. 2021Deep One-Class Classification via Interpolated Gaussian Descriptorcited by 67
  29. 2020Few-shot Scene-adaptive Anomaly Detectioncited by 62
  30. 2021A Hierarchical Transformation-Discriminating Generative Model for Few Shot Anomaly Detectioncited by 60
  31. 2019Deep Weakly-supervised Anomaly Detectioncited by 59
  32. 2023Open-Vocabulary Video Anomaly Detectioncited by 57
  33. 2021Constrained Contrastive Distribution Learning for Unsupervised Anomaly Detection and Localisation in Medical Imagescited by 45
  34. 2023Diversity-Measurable Anomaly Detectioncited by 41
  35. 2018Automatic Classification of Defective Photovoltaic Module Cells in Electroluminescence Imagescited by 35
  36. 2023Anomaly Detection under Distribution Shiftcited by 35
  37. 2021SQUID: Deep Feature In-Painting for Unsupervised Anomaly Detectioncited by 34
  38. 2023Focus the Discrepancy: Intra- and Inter-Correlation Learning for Image Anomaly Detectioncited by 32

50 most cited of 56 All 56 (JSON)

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 20; 2025: 38; 2026: 30.

88 papers.

Sort:

By area:

  1. 2025Towards Zero-Shot Anomaly Detection and Reasoning with Multimodal Large Language Modelscited by 54
  2. 2025Exploring Intrinsic Normal Prototypes within a Single Image for Universal Anomaly Detectioncited by 47
  3. 2024ARC: A Generalist Graph Anomaly Detector with In-Context Learningcited by 46
  4. 2024MMAD: A Comprehensive Benchmark for Multimodal Large Language Models in Industrial Anomaly Detectioncited by 46
  5. 2024Learning Transferable Negative Prompts for Out-of-Distribution Detectioncited by 43
  6. 2024Weakly Supervised Video Anomaly Detection and Localization with Spatio-Temporal Promptscited by 40
  7. 2024Deep Graph Anomaly Detection: A Survey and New Perspectivescited by 40
  8. 2024Generalized Out-of-Distribution Detection and Beyond in Vision Language Model Era: A Surveycited by 36
  9. 2024Do LLMs Understand Visual Anomalies? Uncovering LLM's Capabilities in Zero-shot Anomaly Detectioncited by 35
  10. 2025AdaptCLIP: Adapting CLIP for Universal Visual Anomaly Detectioncited by 28
  11. 2024Deep Learning for Video Anomaly Detection: A Reviewcited by 27
  12. 2024MANTA: A Large-Scale Multi-View and Visual-Text Anomaly Detection Dataset for Tiny Objectscited by 26
38 more
  1. 2024Large Language Models for Anomaly and Out-of-Distribution Detection: A Surveycited by 24
  2. 2024Zero-shot Generalist Graph Anomaly Detection with Unified Neighborhood Promptscited by 24
  3. 2024ResAD: A Simple Framework for Class Generalizable Anomaly Detectioncited by 24
  4. 2024Fine-grained Abnormality Prompt Learning for Zero-shot Anomaly Detectioncited by 22
  5. 2024Learning Feature Inversion for Multi-class Anomaly Detection under General-purpose COCO-AD Benchmarkcited by 15
  6. 2025MultiADS: Defect-aware Supervision for Multi-type Anomaly Detection and Segmentation in Zero-Shot Learningcited by 12
  7. 2025MetaUAS: Universal Anomaly Segmentation with One-Prompt Meta-Learningcited by 12
  8. 2025Normal-Abnormal Guided Generalist Anomaly Detectioncited by 10
  9. 2026VisualAD: Language-Free Zero-Shot Anomaly Detection via Vision Transformercited by 10
  10. 2025Taming Vision-Language Models for Medical Image Analysis: A Comprehensive Reviewcited by 9
  11. 2025DictAS: A Framework for Class-Generalizable Few-Shot Anomaly Segmentation via Dictionary Lookupcited by 9
  12. 2025Foundation Models and Transformers for Anomaly Detection: A Surveycited by 8
  13. 2026From Few-Shot to Zero-Shot: Towards Generalist Graph Anomaly Detectioncited by 8
  14. 2025One-to-Normal: Anomaly Personalization for Few-shot Anomaly Detectioncited by 7
  15. 2025INP-Former++: Advancing Universal Anomaly Detection via Intrinsic Normal Prototypes and Residual Learningcited by 7
  16. 2025AF-CLIP: Zero-Shot Anomaly Detection via Anomaly-Focused CLIP Adaptationcited by 7
  17. 2025Dinomaly2: A Unified Framework for Unsupervised Image Anomaly Detectioncited by 6
  18. 2025Commonality in Few: Few-Shot Multimodal Anomaly Detection via Hypergraph-Enhanced Memorycited by 6
  19. 2024Zero-Shot Out-of-Distribution Detection with Outlier Label Exposurecited by 5
  20. 2024Small Object Few-shot Segmentation for Vision-based Industrial Inspectioncited by 5
  21. 2025Foundation Visual Encoders Are Secretly Few-Shot Anomaly Detectorscited by 5
  22. 2026Towards One-for-All Anomaly Detection for Tabular Datacited by 5
  23. 2025Continual-MEGA: A Large-scale Benchmark for Generalizable Continual Anomaly Detectioncited by 4
  24. 2025DP-DGAD: A Generalist Dynamic Graph Anomaly Detector with Dynamic Prototypescited by 4
  25. 2026One Language-Free Foundation Model Is Enough for Universal Vision Anomaly Detectioncited by 4
  26. 2024Bidirectional Multimodal Prompt Learning with Scale-Aware Training for Few-Shot Multi-Class Anomaly Detectioncited by 3
  27. 2025Foundation Models for Anomaly Detection: Vision and Challengescited by 3
  28. 2025Crane: Context-Guided Prompt Learning and Attention Refinement for Zero-Shot Anomaly Detectioncited by 3
  29. 2025Learning Event Completeness for Weakly Supervised Video Anomaly Detectioncited by 3
  30. 2025Towards Fine-Grained Vision-Language Alignment for Few-Shot Anomaly Detectioncited by 3
  31. 2025MuSc-V2: Zero-Shot Multimodal Industrial Anomaly Classification and Segmentation with Mutual Scoring of Unlabeled Samplescited by 3
  32. 2026Weakly Supervised Video Anomaly Detection with Anomaly-Connected Components and Intention Reasoningcited by 3
  33. 2026Dual Distillation for Few-Shot Anomaly Detectioncited by 3
  34. 2024SOWA: Adapting Hierarchical Frozen Window Self-Attention to Visual-Language Models for Better Anomaly Detectioncited by 2
  35. 2025A Comprehensive Survey for Real-World Industrial Defect Detection: Challenges, Approaches, and Prospectscited by 2
  36. 2025ResAD++: Towards Class Agnostic Anomaly Detection via Residual Feature Learningcited by 2
  37. 2026VTFusion: A Vision-Text Multimodal Fusion Network for Few-Shot Anomaly Detectioncited by 2
  38. 2026AnomalyVFM -- Transforming Vision Foundation Models into Zero-Shot Anomaly Detectorscited by 2

50 most cited of 88 All 88 (JSON)

Similar, not cited

Close in wording, no citation either way

  1. 2023AnomalyGPT: Detecting Industrial Anomalies Using Large Vision-Language Models
  2. 2024FADE: Few-shot/zero-shot Anomaly Detection Engine using Large Vision-Language Model
  3. 2024PromptAD: Learning Prompts with only Normal Samples for Few-Shot Anomaly Detection
  4. 2024VL4AD: Vision-Language Models Improve Pixel-wise Anomaly Detection
  5. 2025IAD-GPT: Advancing Visual Knowledge in Multimodal Large Language Model for Industrial Anomaly Detection
  6. 2025CoPS: Conditional Prompt Synthesis for Zero-Shot Anomaly Detection
  7. 2026Analyzing VLM-Based Approaches for Anomaly Classification and Segmentation
  8. 2024VMAD: Visual-enhanced Multimodal Large Language Model for Zero-Shot Anomaly Detection