# Few-Shot Anomaly Detection with Adversarial Loss for Robust Feature Representations

arXiv: https://arxiv.org/abs/2312.03005 · HTML: https://mlsanity.com/paper/2312.03005/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- Builds on 18 of its 28 references that are in the map.
- First posted on arXiv 4 Dec 2023.

## Builds on (most cited first, 18 of 18)

- [Generative Adversarial Networks](https://mlsanity.com/paper/2203.00667/) (2022)
- [Domain-Adversarial Training of Neural Networks](https://mlsanity.com/paper/1505.07818/) (2015)
- [Towards Total Recall in Industrial Anomaly Detection](https://mlsanity.com/paper/2106.08265/) (2021)
- [ADVENT: Adversarial Entropy Minimization for Domain Adaptation in Semantic Segmentation](https://mlsanity.com/paper/1811.12833/) (2018)
- [PaDiM: a Patch Distribution Modeling Framework for Anomaly Detection and Localization](https://mlsanity.com/paper/2011.08785/) (2020)
- [Unsupervised Anomaly Detection with Generative Adversarial Networks to Guide Marker Discovery](https://mlsanity.com/paper/1703.05921/) (2017)
- [DRAEM -- A discriminatively trained reconstruction embedding for surface anomaly detection](https://mlsanity.com/paper/2108.07610/) (2021)
- [Domain Adaptive Faster R-CNN for Object Detection in the Wild](https://mlsanity.com/paper/1803.03243/) (2018)
- [GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training](https://mlsanity.com/paper/1805.06725/) (2018)
- [Sub-Image Anomaly Detection with Deep Pyramid Correspondences](https://mlsanity.com/paper/2005.02357/) (2020)
- [A Unified Model for Multi-class Anomaly Detection](https://mlsanity.com/paper/2206.03687/) (2022)
- [Same Same But DifferNet: Semi-Supervised Defect Detection with Normalizing Flows](https://mlsanity.com/paper/2008.12577/) (2020)
- [Registration based Few-Shot Anomaly Detection](https://mlsanity.com/paper/2207.07361/) (2022)
- [Modeling the Distribution of Normal Data in Pre-Trained Deep Features for Anomaly Detection](https://mlsanity.com/paper/2005.14140/) (2020)
- [DSR -- A dual subspace re-projection network for surface anomaly detection](https://mlsanity.com/paper/2208.01521/) (2022)
- [Divide-and-Assemble: Learning Block-wise Memory for Unsupervised Anomaly Detection](https://mlsanity.com/paper/2107.13118/) (2021)
- [A Hierarchical Transformation-Discriminating Generative Model for Few Shot Anomaly Detection](https://mlsanity.com/paper/2104.14535/) (2021)
- [AnoSeg: Anomaly Segmentation Network Using Self-Supervised Learning](https://mlsanity.com/paper/2110.03396/) (2021)

## Built on by (most cited first, 5 of 5)

- [Few-Shot Anomaly Detection via Category-Agnostic Registration Learning](https://mlsanity.com/paper/2406.08810/) (2024)
- [PA-CLIP: Enhancing Zero-Shot Anomaly Detection through Pseudo-Anomaly Awareness](https://mlsanity.com/paper/2503.01292/) (2025)
- [Prototypical Learning Guided Context-Aware Segmentation Network for Few-Shot Anomaly Detection](https://mlsanity.com/paper/2512.15319/) (2025)
- [CLIP-FSAC++: Few-Shot Anomaly Classification with Anomaly Descriptor Based on CLIP](https://mlsanity.com/paper/2412.03829/) (2024)
- [Quantized FCA: Efficient Zero-Shot Texture Anomaly Detection](https://mlsanity.com/paper/2510.15602/) (2025)

## Abstract (arXiv)

Anomaly detection is a critical and challenging task that aims to identify data points deviating from normal patterns and distributions within a dataset. Various methods have been proposed using a one-class-one-model approach, but these techniques often face practical problems such as memory inefficiency and the requirement of sufficient data for training. In particular, few-shot anomaly detection presents significant challenges in industrial applications, where limited samples are available before mass production. In this paper, we propose a few-shot anomaly detection method that integrates adversarial training loss to obtain more robust and generalized feature representations. We utilize the adversarial loss previously employed in domain adaptation to align feature distributions between source and target domains, to enhance feature robustness and generalization in few-shot anomaly detection tasks. We hypothesize that adversarial loss is effective when applied to features that should have similar characteristics, such as those from the same layer in a Siamese network's parallel branches or input-output pairs of reconstruction-based methods. Experimental results demonstrate that the proposed method generally achieves better performance when utilizing the adversarial loss.
