Beyond Normal References: Discriminative Few-Shot Anomaly Detection
Title: Rethinking Reference Models: A Discriminative Approach to Few-Shot Anomaly Detection
Abstract:
This study addresses a practical scenario in few-shot anomaly detection (FSAD), which we term discriminative FSAD. In this setting, inference relies on a limited set of reference examples comprising both normal and anomalous instances. Current FSAD approaches typically utilize only normal data for normality matching, thereby overlooking the valuable discriminative signals present in anomalous references. Conversely, attempting to fit both types of references directly can lead to overfitting on the specific anomalies encountered during training. To resolve this, we propose IDEAL, a framework for intrinsic deviation learning. IDEAL exploits both reference categories to identify deviation patterns that characterize generalizable abnormality as departures from normality.
The IDEAL framework splits the learning process into two distinct innovations:
- Normal Variation Eraser: This component suppresses nuisance variations inherent in normal data that could otherwise generate noisy deviations. By filtering these out, it emphasizes deviation representations that are relevant to anomalies.
- Intrinsic Deviation Encoder: This module breaks down the denoised deviation representations into intrinsic deviation vectors, which isolate the most discriminative and orthogonal directions of deviation.
During inference, IDEAL evaluates the deviations between query samples and normal references, specifically those preserved after projection onto the learned intrinsic deviation vectors. This mechanism allows the model to generalize effectively to both seen and unseen anomalies. Comprehensive experiments across eight real-world datasets demonstrate that IDEAL consistently surpasses existing state-of-the-art FSAD methods in generalizing to unseen anomalies. The code and data will be accessible at https://github.com/mala-lab/IDEAL.
Source: arXiv Generated at: 2026-06-02 00:00:00 UTC




