Generative adversarial networks (GANs) are a machine learning framework comprising a generative model for sampling from a target distribution and a discriminative model for evaluating the proximity of a sample to the target distribution. GANs exhibit strong performance in imaging or anomaly detection. However, they suffer from training instabilities, and sampling efficiency may be limited by the classical sampling procedure. We introduce variational quantum–classical Wasserstein GANs (WGANs) to address these issues and embed this model in a classical machine learning framework for anomaly detection. Classical WGANs improve training stability by using a cost function better suited for gradient descent. Our model replaces the generator of WGANs with a hybrid quantum–classical neural net and leaves the classical discriminative model unchanged. This way, high-dimensional classical data only enters the classical model and need not be prepared in a quantum circuit. We demonstrate the effectiveness of this method on a credit card fraud dataset. For this dataset our method shows performance on par with classical methods in terms of the F1 score. We analyze the influence of the circuit ansatz, layer width and depth, neural net architecture parameter initialization strategy, and sampling noise on convergence and performance.
Introduction
Anomaly detection is the task of identifying rare, irregular data points in a dataset, which differ significantly from the majority of samples in the dataset. This is critical in many domains including medical diagnosis, network intrusion detection, fraud detection, industrial damage detection or monitoring sensors and detectors.
A variety of methods have been proposed for anomaly detection based on probabilistic models, clustering, reconstruction, finding domain boundaries, or tensor networks. Some of these methods have been adapted to coherent quantum algorithms. Recently, Schlegl et al. have proposed generative adversarial networks (GANs) as a promising classical method for anomaly detection. Their method, AnoGAN, calculates an anomaly score for an unseen sample and can also flag the features that contribute most to the overall anomaly score. This is important for explaining the model’s decision and can contribute to mitigating biases.
A GAN is an unsupervised machine learning framework comprising a generative model and a discriminative model. Unsupervised methods are well suited when labelling the data is very costly. GANs use implicit generative models. These types of models only require sampling access to the model distribution, not an explicit probability density. An implicit generative model can sample efficiently from a learned model distribution. The discriminative model of the GAN learns to distinguish between generated and real data samples. Both models are parameterized by neural nets and trained concurrently.
Quantum computers are conjectured to sample efficiently from distributions that are difficult for classical computers, and there is strong experimental evidence in favor of this conjecture. This makes quantum computers – potentially even noisy intermediatescale quantum (NISQ) devices – an interesting candidate for improving implicit generative models. Consequently, a number of authors have proposed and implemented experimentally various flavors of quantum GANs.
Training unsupervised methods such as GANs is often computationally hard and the learned distribution is restricted by the expressivity of the generative model. To address these issues we applied recent advances in GANs to the AnoGAN anomaly detection method and extended the resulting generative model with a hybrid quantum-classical neural net trained via a variational algorithm.
[…]
To continue reading, please download the full article.
Authors

Dr Daniel Herr, Quantum Machine Learning Expert
d-fine

Dr Benjamin Obert, Senior Manager
d-fine

Dr Matthias Rosenkranz