Anomaly Detection via Minimum Likelihood Generative Adversarial Networks

Chu Wang, Yan-Ming Zhang, Cheng-Lin Liu

TL;DR

This paper introduces a novel anomaly detection method using Generative Adversarial Networks (GANs) by focusing on the discriminator's ability to learn the boundary of normal data. They propose a "Minimum Likelihood" regularization to prevent the generator from collapsing to the normal data distribution and an ensemble approach to stabilize the discriminator, achieving improved performance on benchmark datasets.

What Problem Does This Paper Address?

Anomaly detection, the task of identifying unusual events or data points that deviate from normal behavior, is crucial in various fields like cybersecurity (network intrusion detection), fraud detection, and medical diagnostics. As datasets grow and computational power increases, deep learning methods have become increasingly popular for this task. However, existing deep learning approaches, particularly those based on GANs, often train the generator to mimic the normal data distribution. This can lead to issues where the generator produces samples too close to normal data, making it difficult for the discriminator to effectively distinguish anomalies, especially local ones with diverse densities and shapes. The paper aims to address this by proposing a GAN-based method that leverages the discriminator to explicitly learn the boundary of normality, rather than relying solely on the generator's output.

Methods

The core of the proposed method is a GAN-based anomaly detection framework that utilizes the discriminator to identify anomalies. Unlike traditional GANs where the generator tries to perfectly replicate the data distribution, this approach uses the discriminator to learn the boundary between normal and anomalous data.

Key novelties include:

  • Minimum Likelihood Regularization (MinLGAN): This technique is applied to the generator's training objective. It uses KL divergence to encourage the generator to produce samples that have low likelihood under the normal data distribution, preventing it from collapsing to the true data distribution. This ensures that the generator produces more "anomalous" samples relative to the normal data, aiding the discriminator in learning a clearer boundary.
  • Ensemble Learning for Discriminator Stability: GANs are known for their training instability. To combat this, the authors propose ensembling multiple discriminators. They introduce two ensemble strategies:
  • Ensemble GAN (EMinLGAN-1): The anomaly score is the average output of multiple discriminators.
  • Scaled Ensemble GAN (EMinLGAN-2): Anomaly scores are scaled and then averaged, aiming for faster convergence and better performance.

The anomaly score for a given data point is derived from the discriminator's output, reflecting its confidence about whether the input is normal or anomalous.

Datasets

The paper evaluates its proposed methods on two types of datasets:

  • Toy Datasets: Circle and Moon datasets are used for visualization to demonstrate the effect of the proposed KL divergence regularization on the generator's output.
  • Benchmark Datasets:
    • Cifar10: A standard image dataset used for anomaly detection experiments. The authors set up experiments where each of the 10 classes is treated as normal data, and all other classes are considered anomalies.
  • UCI Datasets: Several small datasets from the UCI repository, including KDD-A (KDDCUP99), COV-A/COV-B (Cover Type), and SHU-A (Shuttle), are used to evaluate performance on various anomaly detection scenarios.

Key Insights and Ideas

  • Shifting the Focus to the Discriminator: The paper highlights that for anomaly detection, it's more effective to train the discriminator to explicitly learn the boundary of normal data, rather than solely relying on the generator to perfectly mimic normality.
  • Preventing Generator Collapse with Minimum Likelihood: The "Minimum Likelihood" regularization is a clever way to ensure the generator doesn't become too good at producing normal data. By penalizing high likelihoods on normal data, it forces the generator to explore regions that are more likely to be anomalous, thereby improving the discriminator's ability to detect them.
  • Ensembling for Robustness: The instability of GAN training is a well-known issue. The proposed ensemble methods effectively mitigate this by combining the outputs of multiple discriminators, leading to more stable and reliable anomaly detection.
  • Ensemble Strategy Matters: The comparison between EMinLGAN-1 and EMinLGAN-2 suggests that the scaling and averaging strategy in EMinLGAN-2 leads to faster convergence and potentially better performance, indicating that how ensemble members are combined is important.

Key Results

The proposed MinLGAN and its ensemble variants (EMinLGAN-1, EMinLGAN-2) demonstrated significant improvements over existing anomaly detection methods on the Cifar10 and UCI datasets.

  • Cifar10: The paper reports improved ROC scores compared to baseline GAN, IFOREST, OCSVM, VAE, and AE. For instance, the average ROC score for MinLGAN was 0.657, with ensemble methods achieving even higher scores (0.687 for EMinLGAN-1 and 0.679 for EMinLGAN-2), outperforming the baseline GAN (0.641).
  • UCI Datasets: The methods achieved high performance across various UCI datasets, often outperforming or matching other state-of-the-art methods. For example, on KDD-A, all proposed methods achieved an ROC score of 0.993, while IFOREST and OCSVM showed weaker performance on COV-A.
  • Ensemble Convergence: Figures 2 and 3 show that ensemble methods stabilize and improve performance as the number of base discriminators increases, with EMinLGAN-2 converging faster.

Limitations and Future Work

  • Sensitivity to Hyperparameters: The paper acknowledges that the performance of MinLGAN can be sensitive to hyperparameters, particularly the regularization coefficient a. While they use a fixed a for experiments, further tuning might be necessary for optimal performance on different datasets.
  • GAN Training Instability: Despite the ensemble approach, GAN training can still be inherently unstable. The paper notes that some discriminator performances are much lower than the average due to these instabilities.
  • Future Work: The authors suggest that further research is needed to stabilize GAN training further and explore how to best handle the uncertainty of anomaly trajectories during training. They also mention that modifying the network structure could improve performance on specific challenging classes.

Summary updated

BibTeX
@inproceedings{wang2018anomaly,
  author = {Chu Wang and Yan-Ming Zhang and Cheng-Lin Liu},
  title = {{Anomaly Detection via Minimum Likelihood Generative Adversarial Networks}},
  booktitle = {ICPR},
  year = {2018},
  url = {https://openreview.net/forum?id=KFwoqHUzav},
}
Figure