MDGAN: Boosting Anomaly Detection Using Multi-Discriminator Generative Adversarial Networks

Yotam Intrator, Gilad Katz, Asaf ShabtaiarXiv 2018

TL;DR

This paper introduces MDGAN, a novel Generative Adversarial Network (GAN) architecture designed to improve anomaly detection. By employing two discriminators – one for sample validity and another as an autoencoder for reconstruction error – MDGAN effectively generates realistic "normal" data samples that help train more robust anomaly detectors.

What Problem Does This Paper Address?

Anomaly detection is a critical but challenging task in machine learning. The primary hurdles are the scarcity of anomalous data for training and the difficulty in defining all possible types of anomalies. While autoencoders have emerged as promising unsupervised anomaly detectors, their performance can be limited by the diversity and quantity of "normal" training data. Existing GANs have been used to generate more training data for classifiers, but their application to one-class anomaly detection (where only normal data is available for training) has been limited, partly due to the challenge of generating "valid" anomalous samples and the need for generated samples to be realistic in certain domains.

Methods

The core innovation is the Multi-Discriminator GAN (MDGAN) architecture. It combines a generator (G) with two discriminators:

  • Discriminator D1: A dense neural network tasked with distinguishing between real and generated "normal" samples. Its goal is to ensure generated samples are indistinguishable from real data, making them "valid."
  • Discriminator D2: An autoencoder that acts as the anomaly detector. Its objective is to accurately reconstruct any input sample (real or generated).

The generator (G) is trained to satisfy two seemingly conflicting goals: fool D1 by producing realistic samples, and produce samples that D2 can reconstruct well, thereby improving D2's anomaly detection capabilities. This dual objective forces the generator to create more complex and diverse "normal" samples, pushing the autoencoder to become better at identifying deviations.

A "warm-up" period is introduced where D2 is initially trained only on real data, and G and D1 are trained adversarially. This is hypothesized to prevent D2 from being "thrown off" by potentially unrealistic samples generated in the early stages of training.

Datasets

The authors evaluated MDGAN on ten diverse datasets, including:

  • NSL-KDD
  • Pendigit
  • Video injection
  • Annthyroid
  • Forest cover
  • Breast cancer
  • CPU
  • Ailerons
  • SWaT
  • Yeast

These datasets were sourced from the OpenML and Outlier Detection Datasets (ODDS) repositories and represent binary classification problems where anomalies are the minority class. Some datasets had pre-defined partitions, while others were partitioned by the authors.

Key Insights and Ideas

  • Reconciling Conflicting Goals: MDGAN's key insight is that by using two discriminators with different objectives, the generator can be trained to produce samples that are both realistic (fooling D1) and useful for anomaly detection (reconstructible by D2).
  • The "Warm-up" Dilemma: The "warm-up" period for D2, where it's trained only on real data initially, surprisingly did not always improve performance. The authors suggest that samples generated during warm-up might be too similar to real data, hindering the generator's ability to create novel, "unexpected" samples that would better train the autoencoder.
  • Slower Convergence = Better Results: The study found that better-performing MDGAN runs often exhibited slower convergence of the generator's loss with respect to the autoencoder (D2). This suggests that when the autoencoder struggles more to reconstruct generated samples, it leads to a more robust anomaly detector.
  • D1 as a Regulator: The dense discriminator (D1) appears to act as a regulator, guiding the generator towards producing more "valid" samples. Higher D1 loss on generated samples correlated with improved overall performance.

Key Results

  • MDGAN outperformed a widely-used benchmark autoencoder on seven out of ten datasets, with statistically significant improvements in AUC (Area Under the ROC Curve) and AUC PRC (Precision-Recall Curve).
  • For AUC, MDGAN showed an average improvement of up to 11.4% (Yeast dataset) compared to the baseline.
  • For AUC PRC, improvements were even more pronounced, reaching up to 44.8% (Forest cover dataset).
  • The "warm-up" strategy did not consistently yield better results, and in some cases, led to performance degradation.
  • The paper notes that MDGAN is better suited for high-dimensional spaces, where generating additional samples is more challenging.

Limitations and Future Work

  • Warm-up Strategy: The authors acknowledge that the warm-up strategy's effectiveness is complex and requires further investigation. They hypothesize that overly similar generated samples during warm-up might be detrimental.
  • Training Time: The MDGAN architecture may require longer training times to achieve optimal performance compared to standard GANs.
  • Future Directions: The authors plan to explore:
  • More advanced training strategies, including dynamically weighting discriminators.
  • Architectures with more discriminators to handle more complex constraints.
  • Using MDGAN for generating adversarial samples.
  • Applying the approach to additional domains.

Summary updated

BibTeX
@misc{intrator2018mdgan,
  author = {Yotam Intrator and Gilad Katz and Asaf Shabtai},
  title = {{MDGAN: Boosting Anomaly Detection Using Multi-Discriminator Generative Adversarial Networks}},
  year = {2018},
  eprint = {1810.05221},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1810.05221},
}
Figure