In automated inspection, medical diagnosis, and system monitoring, identifying the "unknown" is a high-stakes challenge. Traditional anomaly detection (AD) algorithms typically rely on one of two paradigms: unsupervised one-class learning, which requires thousands of normal examples to map the boundaries of standard behavior, or supervised learning, which requires extensive, balanced logs of historical defects.
In real-world deployments, however, systems face a cold-start problem. Industrial manufacturing lines experience frequent product changeovers where collecting massive datasets for every new item is prohibitively slow and expensive, as noted by Xie et al.. In medical imaging or root-cause analysis of system failures, abnormal events are inherently rare, meaning models must operate under extreme data scarcity, often with fewer than ten reference examples (Tian et al.; Orchard et al.).
Few-shot anomaly detection (FSAD) bridges this gap. The core challenge is geometric: in a high-dimensional feature space, a handful of points cannot reliably define a robust manifold of "normality." If the boundary is drawn too tightly, natural variations cause false positives; if it is drawn too loosely, subtle anomalies go unnoticed. Modern FSAD frameworks overcome this limitation through three core mechanisms: leveraging foundation model priors, learning category-agnostic relational tasks, and shaping boundaries with sparse negative anchors.
Repurposing Pre-trained Manifolds
Instead of attempting to learn a data distribution from scratch using a few samples, a highly effective strategy is to inherit a continuous, robust representation of the world from large-scale foundation models.
The authors of FOUNDAD demonstrate that large-scale foundation visual encoders implicitly encode the distance to a natural image manifold. In this paradigm, the severity of an anomaly correlates directly with its distance from this pre-trained manifold. By training a lightweight, non-linear projector on a minimal set of normal target images, the model can map features back onto this manifold, establishing a robust baseline without heavy parameter tuning.
Standard One-Class AD:
[Few Normal Points] ---> Attempts to draw a tight boundary ---> High Risk of Overfitting
Foundation Manifold Projection (e.g., FOUNDAD):
[Pre-trained Natural Image Manifold] <--- Project Few Target Points <--- Measure Distance to Manifold
This concept of utilizing structural contrast over data volume is further supported by Liznerski et al.. Their work reveals that a standard binary classifier exposed to even a single, random outlier image can outperform complex unsupervised methods. This indicates that the diversity of the outlier corpus is less critical than establishing a clear contrast against the normal distribution. To maximize this contrast when real defects are unavailable, frameworks like CLIP-FSAC synthesize anomalies directly within the pre-trained feature space of models like CLIP, allowing the system to generalize effectively from a handful of normal instances (Zuo et al.).
Category-Agnostic Relational Comparison
A second core intuition shifts the objective from representation learning (memorizing what a specific object looks like) to relational comparison (learning how components align or interact). If a model excels at comparing images generally, it can detect anomalies in completely novel categories without additional training.
In RegAD, the authors frame few-shot anomaly detection as an image registration task (Huang et al.). The model is trained across various categories to align different views of identical objects. At test time, when introduced to an entirely new product line with only a few normal reference images, the model attempts to register the unseen test image against the references. Any structural deviation or spatial misalignment immediately flags a localized anomaly.
Test Image: [ Component A ] -> [ Missing Part ]
| |
Registration: v v (Misalignment / Anomaly)
Reference Image: [ Component A ] -> [ Component B ]
Rather than relying on global alignment, other approaches focus on local geometric structures. Xie et al. treat individual image patches as nodes within a Graph Neural Network (GNN). By extracting rotation-invariant features and modeling the spatial relationships between these patches, their framework (GraphCore) builds a robust topological map of normality from as few as one to eight samples, ensuring that localized defects disrupt the graph's expected connectivity.
Boundary Calibration via Dual-Guidance
When a small number of both normal and abnormal samples are accessible, purely unsupervised methods fail to exploit the valuable signal of known defects, while fully supervised methods collapse due to data scarcity (Zhao et al.; Cai et al.). FSAD addresses this by using dual-guidance or contrastive scoring to calibrate decision boundaries.
As shown by Tian et al., integrating a small set of abnormal samples (fewer than 40) into a contrastive scoring framework significantly improves a model's ability to isolate subtle anomalies, such as polyps in medical screenings. This dual-guidance mechanism is expanded to cross-domain settings by Wang et al., whose generalist framework (NAGL) uses a minimal reference set of both normal and abnormal samples to help the model distinguish true defects from benign environmental or domain variations.
When real-world abnormal samples are entirely absent, models can generate synthetic negative anchors. By introducing pseudo-anomalies via frequency-domain manipulations (Bai et al.) or utilizing Normalizing Flows to simulate out-of-distribution uncertainty (Zhu et al.), these frameworks construct artificial boundaries. This calibration process ensures that even when data is scarce, the model maintains a precise, localized definition of what constitutes a deviation from the norm.
Key Foundational Work
Recurrent neural network-based fault detector for aileron failures of aircraft (2017) — contributed 1 concept elements to this direction.
Few-Shot Anomaly Detection for Polyp Frames from Colonoscopy (2020) — contributed 1 concept elements to this direction.