# A Hierarchical Transformation-Discriminating Generative Model for Few Shot Anomaly Detection

**Authors:** Shelly Sheynin, Sagie Benaim, Lior Wolf  
**arXiv:** [2104.14535](https://arxiv.org/abs/2104.14535)  
**Date:** 2021-04-29  
**Summary page:** https://www.summarizepaper.com/en/paper/2104.14535v1/

## Key points

- Anomaly detection involves identifying unusual samples in data
- Few-shot anomaly detection in images is a challenge where only a few images are given at training
- Researchers developed a novel approach that leverages a hierarchical generative model to capture the multi-scale patch distribution of each training image
- The method incorporates image transformations and scale-specific patch discriminators to distinguish between real and fake patches of the image and different transformations applied to those patches
- Anomaly score is obtained by aggregating the patch-based votes of the correct transformation across scales and image regions
- The method outperforms recent baseline methods in both one-shot and few-shot settings, as demonstrated through experiments on datasets such as Paris, CIFAR10, MNIST, FashionMNIST, and MVTec for defect detection.
- Overall, their work presents an innovative solution for detecting anomalies with limited training data using hierarchical generative models enhanced with image transformations and scale-specific discriminators.

## Summary

The task of anomaly detection involves identifying unusual samples in data. To address the challenge of few-shot anomaly detection in images, where only a few images are given at training, researchers Shelly Sheynin, Sagie Benaim, and Lior Wolf have developed a novel approach that leverages a hierarchical generative model to capture the multi-scale patch distribution of each training image. This method incorporates image transformations and scale-specific patch discriminators to distinguish between real and fake patches of the image and different transformations applied to those patches. The resulting anomaly score is obtained by aggregating the patch-based votes of the correct transformation across scales and image regions. In their experiments on datasets such as Paris, CIFAR10, MNIST, FashionMNIST, and MVTec for defect detection, the authors demonstrate that their method outperforms recent baseline methods in both one-shot and few-shot settings. Overall, their work presents an innovative solution for detecting anomalies with limited training data using hierarchical generative models enhanced with image transformations and scale-specific discriminators.
