AD-CGAN: Contrastive Generative Adversarial Network for Anomaly Detection

Published: 01 Jan 2022, Last Modified: 30 Sept 2025ICIAP (1) 2022EveryoneRevisionsBibTeXCC BY-SA 4.0
Abstract: Anomaly detection (AD), a fundamental challenge in machine learning, aims to find samples that do not belong to the distribution of the training data. Among unsupervised anomaly detection models, models based on generative adversarial networks show promising results. These models mainly rely on the rich representations learned from the normal training data to find anomalies. However, their performance is bounded by the limitations of GANs, known as mode collapse, in learning complex training distribution. This work presents a new GAN-based anomaly detection model with a combination of contrastive learning to mitigate the negative effect of mode collapse in more complex distributions. Our unsupervised Anomaly Detection model based on Contrastive Generative Adversarial Network, AD-CGAN, contrasts a sample with local feature maps of itself instead of only contrasting the given sample with other instances as in conventional contrastive learning approaches. Contrastive loss in AD-CGAN helps the model learn more discriminative representations of normal samples. Furthermore, we consider a new normality score to target anomalous samples. The normality score is defined on the encoded representations of samples obtained from the model. Extensive experiments showed AD-CGAN outperforms its counterparts on multiple benchmarks with a significant improvement in ROC-AUC over the previously proposed reconstruction-based approaches.
Loading