Conference on Lasers and Electro-Optics Europe & European Quantum Electronics Conference (CLEO/Europe-EQEC)
Anomaly Detection Based on Quantum Autoencoder
Siqi Li, Zikun Zhang, Xun Zhu, Yanni Ou, Kun Xu
Abstract
Quantum autoencoder (QAE) is a key tool in quantum machine learning and can be applied to areas such as dimensionality reduction and feature extraction [1]. Anomaly detection identifies deviations from normal patterns, which is crucial yet challenging due to the need to detect risks while minimizing false positives [2]. We propose a QAE-based anomaly detection scheme using an optical quantum neural network. Figure 1 (A) shows the basic structure of the QAE: the encoder compresses the input quantum state into a low-dimensional latent space, and the decoder reconstructs the original quantum state from the latent space. QAE-based anomaly detection works by learning the low-dimensional features of normal data and minimizing its reconstruction error. Normal data can be well reconstructed, while anomalous data exhibits a larger reconstruction error. When the reconstruction error of test data exceeds a set threshold, it is classified as anomalous. We constructed the QAE using an optical quantum neural network consisting of 50:50 beam splitters and controllable phase shifters [3]. Due to the unitary matrix property, only the encoder needs to be trained, and the decoder is simply the conjugate transpose of the encoder. To compress an N-dimensional quantum state$\rho$into${K}$dimensions, efficient compression can be achieved by minimizing the expectation value of the projection onto the trash state, given by$C(\theta,\phi)=Tr\left(PU(\theta,\phi)\rho U^+(\theta,\phi)\right)$[4]. Here,$P=(I_{K}\oplus\vert 0\rangle^{\otimes N-K}\langle 0\vert ^{\otimes(N-K)})$represents the projection onto the trash state,$I_{K}$is the K-dimensional identity matrix,$\vert 0\rangle^{\otimes(N-K)}\text{is}$the trash state,$Tr$denotes the trace,$U(\theta,\phi)$is the encoder with adjustable parameters, and$U\dagger(\theta_,\phi)$is the decoder. We only need to train the encoder during the training process, and the decoder is simply its conjugate transpose.