# Fence GAN: Towards Better Anomaly Detection

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

## Key facts

- Cited by 32 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 2 Apr 2019.

## Built on by (most cited first, 30 of 32)

- [Deep Graph-level Anomaly Detection by Glocal Knowledge Distillation](https://mlsanity.com/paper/2112.10063/) (2021)
- [Generative Semi-supervised Graph Anomaly Detection](https://mlsanity.com/paper/2402.11887/) (2024)
- [Applications of Generative Adversarial Networks in Anomaly Detection: A Systematic Literature Review](https://mlsanity.com/paper/2110.12076/) (2021)
- [Towards Unsupervised Open World Semantic Segmentation](https://mlsanity.com/paper/2201.01073/) (2022)
- [MemStream: Memory-Based Streaming Anomaly Detection](https://mlsanity.com/paper/2106.03837/) (2021)
- [Functional Anomaly Detection: a Benchmark Study](https://mlsanity.com/paper/2201.05115/) (2022)
- [Video Anomaly Detection via Spatio-Temporal Pseudo-Anomaly Generation : A Unified Approach](https://mlsanity.com/paper/2311.16514/) (2023)
- [Machine Learning in NextG Networks via Generative Adversarial Networks](https://mlsanity.com/paper/2203.04453/) (2022)
- [Anomaly Segmentation for High-Resolution Remote Sensing Images Based on Pixel Descriptors](https://mlsanity.com/paper/2301.13422/) (2023)
- [Re-using Adversarial Mask Discriminators for Test-time Training under Distribution Shifts](https://mlsanity.com/paper/2108.11926/) (2021)
- [Raising the Bar on the Evaluation of Out-of-Distribution Detection](https://mlsanity.com/paper/2209.11960/) (2022)
- [Elsa: Energy-based learning for semi-supervised anomaly detection](https://mlsanity.com/paper/2103.15296/) (2021)
- [Boundary of Distribution Support Generator (BDSG): Sample Generation on the Boundary](https://mlsanity.com/paper/2107.09950/) (2021)
- [Tail of Distribution GAN (TailGAN): Generative-Adversarial-Network-Based Boundary Formation](https://mlsanity.com/paper/2107.11658/) (2021)
- [Efficient Anomaly Detection Using Self-Supervised Multi-Cue Tasks](https://mlsanity.com/paper/2111.12379/) (2021)
- [Adversarial Attacks and Defenses in Machine Learning-Powered Networks: A Contemporary Survey](https://mlsanity.com/paper/2303.06302/) (2023)
- [Stop Throwing Away Discriminators! Re-using Adversaries for Test-Time Training](https://mlsanity.com/paper/2108.12280/) (2021)
- [Grad: Guided Relation Diffusion Generation for Graph Augmentation in Graph Fraud Detection](https://mlsanity.com/paper/2512.18133/) (2025)
- [Double-Adversarial Activation Anomaly Detection: Adversarial Autoencoders are Anomaly Generators](https://mlsanity.com/paper/2101.04645/) (2021)
- [unORANIC: Unsupervised Orthogonalization of Anatomy and Image-Characteristic Features](https://mlsanity.com/paper/2308.15507/) (2023)
- [GADY: Unsupervised Anomaly Detection on Dynamic Graphs](https://mlsanity.com/paper/2310.16376/) (2023)
- [GraphAnoGAN: Detecting Anomalous Snapshots from Attributed Graphs](https://mlsanity.com/paper/2106.15504/) (2021)
- [OMASGAN: Out-of-Distribution Minimum Anomaly Score GAN for Sample Generation on the Boundary](https://mlsanity.com/paper/2110.15273/) (2021)
- [Targeted Augmented Data for Audio Deepfake Detection](https://mlsanity.com/paper/2407.07598/) (2024)
- [AutoML for Multi-Class Anomaly Compensation of Sensor Drift](https://mlsanity.com/paper/2502.19180/) (2025)
- [Simple Perturbations Subvert Ethereum Phishing Transactions Detection: An Empirical Analysis](https://mlsanity.com/paper/2408.03441/) (2024)
- [ABounD: Adversarial Boundary-Driven Few-Shot Learning for Multi-Class Anomaly Detection](https://mlsanity.com/paper/2511.22436/) (2025)
- [New Perspective on Progressive GANs Distillation for One-class Novelty Detection](https://mlsanity.com/paper/2109.07295/) (2021)
- [Anomaly Detection using Capsule Networks for High-dimensional Datasets](https://mlsanity.com/paper/2112.13514/) (2021)
- [Enhancing Generative Networks for Chest Anomaly Localization through Automatic Registration-Based Unpaired-to-Pseudo-Paired Training Data Translation](https://mlsanity.com/paper/2207.10324/) (2022)

## Abstract (arXiv)

Anomaly detection is a classical problem where the aim is to detect anomalous data that do not belong to the normal data distribution. Current state-of-the-art methods for anomaly detection on complex high-dimensional data are based on the generative adversarial network (GAN). However, the traditional GAN loss is not directly aligned with the anomaly detection objective: it encourages the distribution of the generated samples to overlap with the real data and so the resulting discriminator has been found to be ineffective as an anomaly detector. In this paper, we propose simple modifications to the GAN loss such that the generated samples lie at the boundary of the real data distribution. With our modified GAN loss, our anomaly detection method, called Fence GAN (FGAN), directly uses the discriminator score as an anomaly threshold. Our experimental results using the MNIST, CIFAR10 and KDD99 datasets show that Fence GAN yields the best anomaly classification accuracy compared to state-of-the-art methods.
