Introduction
Anomaly detection is a critical task in domains such as airport security and industrial quality control, where identifying rare "threats" or "defects" is a "needle in a haystack" problem. Traditional supervised learning often fails due to extreme data imbalance—normal instances vastly outnumber anomalous ones. This paper proposes a novel Generative Adversarial Network (GAN) architecture that learns the distribution of "normality" to identify deviations as anomalies.
Proposed Methodology
The authors introduce a unary classification model trained exclusively on non-anomalous data. The architecture incorporates several key innovations to improve reconstruction accuracy and training stability:
- Generator with Dense Skip Connections: Unlike standard U-Nets, this model utilizes dense convolutional skip connections. This design helps the decoder better leverage features from the encoder, narrowing the semantic gap and producing high-fidelity reconstructions of normal images.
- Self-Attention Augmented Discriminator: Standard convolutional layers are limited to local receptive fields. By adding a self-attention mechanism, the discriminator can evaluate global structural consistency, which is vital for detecting anomalies that manifest as valid objects in invalid configurations.
- Spectral Normalization: Applied to both the generator and discriminator, this technique stabilizes training and prevents mode collapse, allowing the model to converge significantly faster than previous state-of-the-art methods.
- Multi-Part Loss Function: The model optimizes a weighted combination of adversarial loss, contextual loss (L1 norm), and latent loss to ensure the reconstructed image and its internal representations closely match the input.
Datasets and Evaluation
The model was rigorously evaluated across three diverse benchmarks to test its generalizability:
- MVTec AD: A specialized industrial inspection dataset containing 15 categories of objects and textures with various manufacturing defects.
- SIXray: A massive dataset of over 1 million high-resolution X-ray security images. It is characterized by extreme imbalance, with prohibited items like guns or knives appearing in less than 1% of the data.
- CIFAR-10: Used in a "1-vs-all" setup to benchmark general computer vision anomaly detection.
Key Results and Insights
The proposed model consistently outperformed prior GAN-based approaches like GANomaly and Skip-ganomaly:
- Performance Gains: On the MVTec AD dataset, the model achieved an average Area Under the Curve (AUC) of 0.945, a 21% improvement over some baselines. On the challenging SIXray dataset, it improved AUC by 4.6% and boosted Recall by up to 11%.
- Reconstruction as a Proxy: The core principle is that a model expert at reconstructing "normal" data will naturally fail to reconstruct "abnormal" features. This failure serves as a robust anomaly signal.
- Prioritizing Recall: In security contexts, missing a threat (False Negative) is far more dangerous than a False Positive. The authors specifically optimized the model to maximize recall, ensuring higher detection rates for prohibited items.
Conclusion and Future Work
By combining dense skip connections with self-attention and spectral normalization, the authors developed a GAN-based anomaly detection framework that is both stable and highly effective at identifying subtle defects and global structural threats. Future research will focus on reducing the computational overhead of self-attention and integrating explicit threat localization to pinpoint exactly where an anomaly occurs within an image.
Summary updated