GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training

Samet Akcay, Amir Atapour-Abarghouei, Toby P. Breckon
5/17/2018
cs.CV

Official code: open-edge-platform/anomalib (5,992 stars, Apache-2.0, last commit 2026-05-03). 1 more implementation below.

Abstract

Anomaly detection is a classical problem in computer vision, namely the determination of the normal from the abnormal when datasets are highly biased towards one class (normal) due to the insufficient sample size of the other class (abnormal). While this can be addressed as a supervised learning problem, a significantly more challenging problem is that of detecting the unknown/unseen anomaly case that takes us instead into the space of a one-class, semi-supervised learning paradigm. We introduce such a novel anomaly detection model, by using a conditional generative adversarial network that jointly learns the generation of high-dimensional image space and the inference of latent space. Employing encoder-decoder-encoder sub-networks in the generator network enables the model to map the input image to a lower dimension vector, which is then used to reconstruct the generated output image. The use of the additional encoder network maps this generated image to its latent representation. Minimizing the distance between these images and the latent vectors during training aids in learning the data distribution for the normal samples. As a result, a larger distance metric from this learned data distribution at inference time is indicative of an outlier from that distribution - an anomaly. Experimentation over several benchmark datasets, from varying domains, shows the model efficacy and superiority over previous state-of-the-art approaches.

View on arXivView PDF

Code Implementations(2)

Apache-2.0

An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge inference.

5,992962CSS, MakoNov 2, 20215 months agoApache-2.0
anomaly-detectionanomaly-localizationanomaly-segmentationgetineural-network-compression+2 more
PyTorchMIT

GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training

888206Shell, PythonMay 1, 20183 years agoMIT
anomaly-detectionganpytorchsemi-supervised-learning

Similar Papers

Cite this paper

@article{akcay2018ganomaly,
  title  = {GANomaly: Semi-Supervised Anomaly Detection via Adversarial Training},
  author = {Samet Akcay and Amir Atapour-Abarghouei and Toby P. Breckon},
  year   = {2018},
  eprint = {1805.06725},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/1805.06725}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/1805.06725.svg)](https://codeofpaper.com/paper/1805.06725)

Discussion