Abstract
Anomaly detection is used for identifying data that deviate from "normal" data patterns. Its usage on classical data finds diverse applications in many important areas such as finance, fraud detection, medical diagnoses, data cleaning, and surveillance. With the advent of quantum technologies, anomaly detection of quantum data, in the form of quantum states, may become an important component of quantum applications. Machine-learning algorithms are playing pivotal roles in anomaly detection using classical data. Two widely used algorithms are the kernel principal component analysis and the one-class support vector machine. We find corresponding quantum algorithms to detect anomalies in quantum states. We show that these two quantum algorithms can be performed using resources that are logarithmic in the dimensionality of quantum states. For pure quantum states, these resources can also be logarithmic in the number of quantum states used for training the machine-learning algorithm. This makes these algorithms potentially applicable to big quantum data applications.
Introduction
In the classical world, anomaly detection is vital for spotting credit card fraud, diagnosing rare diseases, or identifying network intruders. As we move toward a "quantum internet" and large-scale quantum computing, we face a new challenge: how do we detect "bad" or "anomalous" quantum data?
Anomalies in quantum systems might arise from faulty hardware, decoherence, or even malicious interference. Traditionally, identifying an outlier state would require quantum state tomography—a process that involves measuring a state so many times that you can reconstruct its full mathematical description. However, tomography is notoriously expensive; the number of measurements required scales exponentially with the number of qubits. This paper, authored by Nana Liu and Patrick Rebentrost, introduces a way to detect anomalies natively on a quantum computer without the "brute force" overhead of tomography.
Methods
The authors translate two specific classical frameworks into the quantum language: Kernel Principal Component Analysis (KPCA) and One-Class Support Vector Machines (SVM).
- Quantum Kernel PCA: This method identifies the "normal" subspace of a training set of quantum states. To check if a new state is an anomaly, the algorithm measures its "distance" from this normal subspace.
- Quantum One-Class SVM: This approach finds a "hyperplane" in a high-dimensional feature space that best encloses the normal training data. New data points falling far from this hyperplane are flagged as anomalies.
To perform these algorithms, the authors utilize technical innovations such as Density Matrix Exponentiation, which allows the computer to treat training data as Hamiltonians, and Modified Swap Tests to extract the necessary phase information for data centering.
Key Insights and Scaling
The most profound insight is that you don't need to know what a quantum state is to know it's an outlier. By using the states themselves as input to a quantum circuit, the algorithm bypasses the exponential cost of classical reconstruction.
For a training set of $M$ unknown quantum states in a $d$-dimensional Hilbert space, the researchers proved that for pure states, the resource requirements (gates and measurements) scale as $O(\text{poly}(\log M, \log d))$. This provides an exponential speedup in dimensionality compared to classical methods and allows for the processing of massive training sets with only logarithmic resource scaling.
Results and Proximity Measures
The algorithms successfully derive quantum "proximity measures"—mathematical functions that output a value between 0 and 1, where higher values indicate a higher likelihood that a state is an anomaly. These measures are mapped directly to the success probability of the quantum circuits shown above. Both algorithms achieve a runtime that is logarithmic in the dimensionality ($d$), providing a significant advantage for big quantum data applications.
Limitations and Future Work
While promising, these speedups assume that training states can be provided or generated efficiently. If the states are "hard" to create, that cost might impact the overall speedup. Additionally, the efficiency of the matrix inversion steps often relies on the kernel matrix being relatively low-rank.
Future work may move beyond "point" anomalies to study contextual anomalies (states that are only anomalous in a certain sequence) and collective anomalies (groups of states that are anomalous only when viewed together), further securing the future of quantum information processing.
Summary updated