XanaduAI / QHack2022

QHack—The one-of-a-kind quantum computing hackathon
https://qhack.ai
88 stars 125 forks source link

Enhanced Quantum Autoencoders for anomaly detection #129

Open baczyk1 opened 2 years ago

baczyk1 commented 2 years ago

Team Name:

Samras

Project Description:

We present an extensive study of Quantum Auto Encoders (QAE) from the application (1) and the theoretical side (2).

1) We investigate how QAE can be used in the task of anomaly detection for two datasets: breast cancer (BIO-QML challenge) and credit card transactions (Quantum Finance Challenge). We train QAEs architectures solely on the non-anomalous data. Then, given an anomaly datapoint coming from a different than learnt distribution, QAE provides non-faithful reconstruction, hence indication an anomaly appearance. We judge the reconstruction quality either using the fidelity test (suitable for simulations) and SWAP test (suitable for both simulations and QPU hardware). We extend previous work on anomaly detection using QAEs by employing for this task for the first time the enhanced autoencoder and the patch autoencoder. We obtain results showing in some cases up to 88% accuracy in identifying breast cancer and 91% in fraudulent transaction identification.

2) We detail a novel approach to building a quantum autoencoder that makes use of quantum entanglement as a resource to add an extra source of correlation between the compression and decompression process. We develop various conceptually different ideas: we let the encoder and decoder share Bell pairs, we entangle encoder and decoder qubits directly and we test what happens if we allow for both the encoder and decoder training contrary to the standard approach. So far, we have encountered an architecture that would provide statistically significant advantage.

Technical notes: We benchmark our approaches regarding 1) and 2) on MNIST hand-written digits dataset. To speed up the training for the financial data, we used Jax to multi-process the optimization step. For both the breast cancer and the credit card transactions dataset we run tests on IBM and Amazon hardware.

Presentation:

https://colab.research.google.com/drive/1qE2KCy4SBKtLRlL55SCjvZUf4IZaC2-y?usp=sharing

Source code:

https://github.com/VoicuTomut/Enhanced-Autoencoders-for-anomaly-detection

Which challenges/prizes would you like to submit your project for?

Bio-QML Challenge Quantum Finance Challenge Amazon Braket Challenge IBM Qiskit Challenge Hybrid Algorithms Challenge