Few-Shot Anomaly Detection for Industrial Inspection

This direction is split into other directions: few-shot anomaly detection. Its last version stays readable and citable here.

Version 1 of 1142 papers155 conceptsfrozen 2026-10-04

In a perfect manufacturing world, every product would be identical. In the real world, anomalies—scratches on a smartphone screen, a missing screw in a gearbox, or a hairline crack in a turbine—are rare, unpredictable, and expensive to document. This creates a "data drought": traditional deep learning models require thousands of examples of defects to learn what to look for, but a well-run factory might only see a handful of failures a year.

Few-Shot Anomaly Detection (FSAD) is the research direction aimed at solving this "cold start" problem. The goal is to build systems that can identify and localize defects in a new product line after seeing as few as one to five "normal" examples.

Defining Normality through Feature Memory

The most intuitive way to detect an anomaly is to compare a new object against a "gold standard" of what it should look like. However, pixel-by-pixel comparison fails because of natural variations in lighting and positioning.

Instead, researchers like Karsten Roth and Joaquin Zepeda proposed PatchCore Towards Total Recall in Industrial Anomaly Detection. This approach uses a pre-trained neural network to extract "patches" of features from a few normal images. These features are stored in a "coreset" memory bank. When a new image arrives, the system checks if its patches exist in the memory bank. If a patch is too far from anything in the "normal" memory, it is flagged as an anomaly. This method works because mid-level features in pre-trained models are surprisingly robust at capturing the "texture" of normality without needing explicit training on the specific object.

Building on this, Guoyang Xie and Jinbao Wang introduced GraphCore Pushing the Limits of Fewshot Anomaly Detection in Industry Vision: Graphcore, which treats these patches as nodes in a graph. By modeling the spatial relationships between parts of an object, the system becomes rotation-invariant, allowing it to recognize a "normal" part even if the object is slightly tilted on the assembly line.

Synthesizing the Abnormal

If we don't have real examples of defects, why not invent them? A major pillar of FSAD involves pseudo-anomaly generation. By taking a normal image and artificially injecting "defects"—like blurred spots, noise, or patches from other images—researchers can train a model to distinguish between "clean" and "corrupted" data.

Jianan Ye and Qiufeng Wang developed SaliencyCut SaliencyCut: Augmenting Plausible Anomalies for Open-set Fine-Grained Anomaly Detection, which uses saliency maps to ensure these synthetic defects are placed in "plausible" locations on the object. Similarly, Zhenyu Yan 0004 and Qinliang Su proposed AnomalySD AnomalySD: Few-Shot Multi-Class Anomaly Detection with Stable Diffusion Model, which uses the inpainting capabilities of Stable Diffusion to "re-imagine" parts of an image. If the model’s re-imagined version of a patch differs significantly from the original, the original is likely anomalous.

Foundation Models as Generalist Detectors

The most recent shift in the field leverages Vision-Language Models (VLMs) like CLIP. These models have already "seen" millions of images and "read" their descriptions, giving them an inherent understanding of what a "crack" or "dent" looks like across many different materials.

Y.F. Cai and Bingke Zhu demonstrated this with AnomalyGPT AnomalyGPT: Detecting Industrial Anomalies Using Large Vision-Language Models. Instead of outputting a simple heat map, AnomalyGPT allows a user to ask, "Is there a scratch on this surface?" The model uses a single reference image to understand the "normal" state and then uses its internal language-vision knowledge to describe any deviations it finds.

This "training-free" philosophy is pushed further by FOUNDAD Foundation Visual Encoders Are Secretly Few-Shot Anomaly Detectors, where Guangyao Zhai and Benjamin Busam argue that the latent spaces of foundation models like DINOv2 are already naturally structured to separate anomalies. By simply attaching a lightweight "manifold projector," they can identify defects with 10x fewer parameters than previous specialized models.

Meta-Learning for Rapid Adaptation

For environments where product lines change daily, the system must "learn how to learn." This is the domain of Meta-Learning. Rather than training a model to detect a specific defect, researchers like Ahmed Frikha and Volker Tresp use frameworks like OC-MAML Few-Shot One-Class Classification via Meta-Learning.

By training on a wide variety of different industrial tasks, the model learns a set of initial weights that can be "fine-tuned" to a new, unseen product using just a few samples. This approach, also explored in Few-Shot Learning for Prescriptive Maintenance by Yang Zhao, ensures that the high cost of collecting failure data is mitigated by transferring knowledge from broader, more accessible datasets.

Papers in this version

Showing 60 of 142 papers.

History & citationVersion 1 · 2026-10-04

Split into other directions · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_few_shot_anomaly_detection_for_industria_4e72721d,
  title = {Few-Shot Anomaly Detection for Industrial Inspection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/few-shot-anomaly-detection-for-industrial-inspection/rdr_4e72721d0ecb4f10b5dd129f1136a8ee},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-21},
}

This exact version (version 1, frozen text):

@misc{lacuna_few_shot_anomaly_detection_for_industria_4e72721d_v1,
  title = {Few-Shot Anomaly Detection for Industrial Inspection},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/few-shot-anomaly-detection-for-industrial-inspection/rdr_4e72721d0ecb4f10b5dd129f1136a8ee/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-21},
}