Memory Augmented Generative Adversarial Networks for Anomaly Detection

Ziyi Yang,Teng Zhang,Iman Soltani Bozchalooi,Eric Darve
DOI: https://doi.org/10.48550/arXiv.2002.02669
2020-02-07
Abstract:In this paper, we present a memory-augmented algorithm for anomaly detection. Classical anomaly detection algorithms focus on learning to model and generate normal data, but typically guarantees for detecting anomalous data are weak. The proposed Memory Augmented Generative Adversarial Networks (MEMGAN) interacts with a memory module for both the encoding and generation processes. Our algorithm is such that most of the \textit{encoded} normal data are inside the convex hull of the memory units, while the abnormal data are isolated outside. Such a remarkable property leads to good (resp.\ poor) reconstruction for normal (resp.\ abnormal) data and therefore provides a strong guarantee for anomaly detection. Decoded memory units in MEMGAN are more interpretable and disentangled than previous methods, which further demonstrates the effectiveness of the memory mechanism. Experimental results on twenty anomaly detection datasets of CIFAR-10 and MNIST show that MEMGAN demonstrates significant improvements over previous anomaly detection methods.
Machine Learning
What problem does this paper attempt to address?
### What problems does this paper attempt to solve? This paper aims to solve the key challenges in anomaly detection. Specifically, traditional anomaly detection algorithms mainly focus on learning and generating models of normal data, but have weak capabilities in detecting abnormal data and lack strong guarantees. Therefore, the authors proposed **Memory Augmented Generative Adversarial Networks (MEMGAN)** to enhance the effectiveness of anomaly detection. #### Main problems 1. **Limitations of existing methods**: - Classic anomaly detection algorithms usually only focus on modeling and generating normal data, but have weak guarantees for detecting abnormal data. - Deep generative models (such as GANs) can learn the distribution of normal data well, but their optimization objectives are not specifically designed for anomaly detection, resulting in less - than - ideal performance in anomaly detection tasks. 2. **The role of the memory - enhancement mechanism**: - By introducing an external memory module, most of the encoded normal data are located inside the convex hull formed by the memory units, while the abnormal data are isolated outside. - This geometric structure ensures that the normal data can be well reconstructed, while the abnormal data cannot be well reconstructed, thus providing a stronger guarantee for anomaly detection. 3. **Improving interpretability and disentanglement**: - The memory units in MEMGAN are more interpretable and disentangled than previous methods, which further proves the effectiveness of the memory mechanism. #### Solutions - **Memory - enhanced bidirectional GAN**: By introducing an external memory module and interacting with it during the encoding and generation processes, most of the encoded normal data are located inside the convex hull of the memory units, while the abnormal data are isolated outside. - **Loss function design**: Including memory projection loss, cycle - consistency loss, and mutual - information loss, ensuring that the memory units can effectively represent normal data and maintain high quality and interpretability in the generation space. - **Theoretical analysis**: Through theoretical analysis, it is proved that the support of the encoded normal data is a convex polyhedron, and the optimal memory unit is the vertex of this polyhedron, thus providing strong theoretical support for anomaly detection. In conclusion, MEMGAN significantly improves the effectiveness of anomaly detection and provides more powerful theoretical guarantees by introducing an external memory module and optimizing its loss function.