Efficient Quantum One-Class Support Vector Machines for Anomaly Detection Using Randomized Measurements and Variable Subsampling

Michael Kölle, Afrae Ahouzi, Pascal Debus, Elif Çetiner, Robert Müller, Daniëlle Schuman, Claudia Linnhoff-PopienarXiv 2024 · DOI

Introduction

Quantum Machine Learning (QML) holds significant promise for identifying complex patterns that elude classical computation. However, the field faces a major hurdle: scalability. Researchers from LMU Munich and Fraunhofer AISEC have recently proposed a novel framework to overcome these bottlenecks in the context of anomaly detection. By integrating randomized measurements, variable subsampling, and rotated feature bagging, they have developed a Quantum One-Class Support Vector Machine (OC-SVM) that scales linearly with data size, offering a practical path for real-world applications.

The Challenge of Scalability in Anomaly Detection

Anomaly detection is the task of identifying rare items or events that differ significantly from the majority of the data—often described as finding a "needle in a haystack." One-Class SVMs are a standard tool for this, but they encounter two primary "scaling walls" when moved to the quantum domain.

First, standard SVMs exhibit quadratic time complexity ($O(n^2)$) relative to the number of data points. As datasets grow, training time increases exponentially. Second, calculating quantum kernels—the measure of similarity between data points—typically requires expensive operations like "swap tests" or "inversion tests." These methods demand a high number of qubits and measurements, making them prohibitively costly as feature dimensions increase.

Mapping from input space to feature space via a quantum feature map for anomaly detection.

Proposed Methodology: A Hybrid Approach

To address these challenges, the authors introduce an ensemble-based model that combines three key techniques to achieve linear scaling in both data size and feature count.

1. Randomized Measurements (RM)

Instead of performing direct quantum state overlaps for every pair of data points, the RM approach measures quantum states in multiple random bases. The kernel is then estimated through classical post-processing. This shift moves the computational burden from quantum hardware to classical systems, significantly reducing the total number of required quantum measurements.

2. Variable Subsampling (VS)

To break the quadratic scaling of the SVM, the researchers employ an ensemble of smaller OC-SVMs trained on random subsets of the data. By varying the size of these subsets, the model improves its ability to generalize across different scales of "normal" behavior, effectively stabilizing the final prediction.

3. Rotated Feature Bagging (RFB)

Handling high-dimensional data often requires many qubits, which increases the complexity of randomized measurements. RFB projects data into a lower-dimensional space using a random rotation matrix before it enters the quantum circuit. This allows the model to capture correlations between all original features while using fewer qubits, bypassing the exponential cost typically associated with high-dimensional quantum feature maps.

Quantum circuits for feature mapping and standard kernel estimation methods like the inversion and swap tests.

Experimental Results and Insights

The researchers evaluated their "VS-RFB-RM" method using both synthetic benchmarks and a real-world Credit Card Fraud dataset.

  • Linear Scaling: The study empirically confirmed that the proposed method scales linearly with the number of training samples, successfully transforming the traditional quadratic bottleneck into a manageable linear one.
  • Efficiency Gains: The hybrid approach achieved a 90% reduction in training time and an 80% reduction in testing time compared to standard quantum kernel methods.
  • Superior Precision: On the Credit Card Fraud dataset, the RM-based ensembles consistently outperformed both classical RBF kernels and standard quantum kernels (using inversion tests) in terms of Average Precision.

A key insight from the study is the "Precision-Stability Trade-off." While randomized measurements can be "jittery" or high-variance, the use of ensembles through Variable Subsampling acts as a stabilizer, harnessing high precision while dampening noise.

Conclusion and Future Directions

This research demonstrates that quantum anomaly detection can be made scalable and efficient for large-scale datasets. While the current models show sensitivity to hyperparameter choices and random rotations, the path forward is clear. Future work will likely focus on refining ensemble combination functions, exploring learnable quantum feature maps, and investigating "classical shadow" techniques to further reduce error rates. By breaking the scaling walls of QML, this work brings quantum-enhanced anomaly detection one step closer to practical deployment in cybersecurity and finance.

Summary updated

BibTeX
@misc{kolle2024efficient,
  author = {Michael Kölle and Afrae Ahouzi and Pascal Debus and Elif Çetiner and Robert Müller and Daniëlle Schuman and Claudia Linnhoff-Popien},
  title = {{Efficient Quantum One-Class Support Vector Machines for Anomaly Detection Using Randomized Measurements and Variable Subsampling}},
  year = {2024},
  eprint = {2407.20753},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.20753},
}
Figure