Supervised Anomaly Detection via Conditional Generative Adversarial Network and Ensemble Active Learning

Zhi Chen, Jiang Duan, Li Kang, Guoping QiuarXiv 2021

TL;DR

The authors introduce EAL-GAN, a supervised anomaly detection framework that uses a conditional Generative Adversarial Network (cGAN) with an ensemble of discriminators. By combining synthetic data generation with a novel active learning strategy, EAL-GAN effectively overcomes the dual hurdles of extreme class imbalance and high labeling costs, consistently outperforming state-of-the-art methods across 20 real-world datasets.

What Problem Does This Paper Address?

Anomaly detection is a "needle in a haystack" problem. In real-world scenarios like fraud detection or medical diagnosis, anomalies are rare, diverse, and expensive to label. This leads to two major issues:

  1. Class Imbalance: Supervised models often become biased toward the "normal" majority class, failing to catch rare anomalies.
  2. Labeling Scarcity: Obtaining enough ground-truth anomalies to train a robust detector is often prohibitively expensive.

While unsupervised methods exist, they frequently flag "noise" or uninteresting data as anomalies because they lack task-specific guidance. Supervised methods are better but struggle when the training data is highly skewed. EAL-GAN aims to bridge this gap by using generative modeling to "fill in" the missing anomalies and active learning to make every human label count.

Methods

The core of the paper is the Ensemble Active Learning Generative Adversarial Network (EAL-GAN). Its architecture deviates from standard GANs in several clever ways:

  • One Generator vs. Multiple Discriminators: Instead of a single competition, one generator ($G$) faces an ensemble of $m$ discriminators ($D_1, \dots, D_m$). This forces the generator to produce more diverse and realistic samples to fool the entire group.
  • Multi-Task Discriminators: Each discriminator has two "heads":
  • An Adversarial Classifier ($C$): Distinguishes real data from generated "fake" data.
  • An Auxiliary Classifier ($\phi$): The actual anomaly detector, which classifies input as "Normal" or "Anomaly."
  • Ensemble Learning Loss: The authors designed a novel loss function inspired by boosting. It uses "modulating factors" that assign higher weights to samples misclassified by previous discriminators in the ensemble, ensuring the models complement each other's deficiencies.
  • Active Ensemble Learning: To reduce labeling costs, the system uses an active sampling strategy. It identifies unlabeled real-world samples that the discriminator ensemble is most uncertain about (scores near 0.5). Only these highly informative samples are sent to humans for labeling.
Fig. 1. The network structures of the proposed EAL-GAN.G: Generator, Di: the i-th discriminator (1 ≤i ≤m), C: adversarial classifier in the discriminator that distinguishes the real data from fake, φ: anomaly detector that predicts whether an input data is an anomaly. FC: Fully connected layer; ReLU: ReLU activation; ⊕: inner product between two vectors.

Datasets

The researchers evaluated EAL-GAN on a massive scale:

  • 20 Real-World Benchmarks: Ranging from small sets like Lympho (148 instances) to massive ones like Donors (over 600,000 instances). These cover diverse domains including finance, healthcare, and image recognition.
  • Synthetic Datasets: Created to test specific data distributions, including single-cluster, multi-cluster, and multi-density scenarios to see how the model handles varying levels of complexity.

Key Insights and Ideas

  • Synthetic Data is "Real" Enough: One of the most striking findings is that anomaly detectors trained only on EAL-GAN's generated data performed nearly as well as those trained on real data. This suggests the cGAN captures the underlying distribution of anomalies exceptionally well.
  • Regularization through Competition: The multi-task nature of the discriminators acts as a powerful regularizer. By forcing the network to solve three tasks simultaneously (real/fake, normal/anomaly, and competing with $G$), the model becomes highly resistant to overfitting.
  • Efficiency via Active Learning: The model achieves state-of-the-art performance by labeling as little as 5% of the data in each mini-batch. This drastically reduces the human effort required to build a high-performing system.
  • Stability: GANs are notoriously unstable to train. The authors found that the ensemble approach stabilizes the learning process, providing a more consistent signal to the generator.

Key Results

EAL-GAN was compared against 9 state-of-the-art (SOTA) methods, including deep learning models like DevNet and traditional ensembles like iForest.

  • AUC Improvements: EAL-GAN outperformed the best deep learning detector by 5.7% and the best traditional detector by 16.4% on average across all datasets.
  • Gmean Improvements: The gains in Gmean (which accounts for accuracy on both classes) were even more dramatic, ranging from 37.9% to 52.5% over SOTA competitors.
  • Statistical Significance: Nemenyi and Wilcoxon tests confirmed that EAL-GAN's performance gains are statistically significant, particularly on large-scale datasets where traditional unsupervised methods often fail to scale.
Critical difference diagrams showing EAL-GAN's statistical superiority over other methods.

Limitations and Future Work

While powerful, EAL-GAN has some constraints:

  • Generator Depth: The authors noted that increasing the generator beyond 5 layers led to vanishing gradient problems, especially on high-dimensional data like the Arrhythmia dataset.
  • Data Diversity: The diversity of the generated anomalies is still ultimately bounded by the diversity of the initial small pool of real anomalies.
  • Future Directions: The authors suggest exploring "Top-K training" to automatically discard low-quality generated samples during the GAN training process, which could further sharpen the anomaly detection boundary.

Summary updated

BibTeX
@misc{chen2021supervised,
  author = {Zhi Chen and Jiang Duan and Li Kang and Guoping Qiu},
  title = {{Supervised Anomaly Detection via Conditional Generative Adversarial Network and Ensemble Active Learning}},
  year = {2021},
  eprint = {2104.11952},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2104.11952},
}
Figure