Authors: Emanuele Casciaro, Fabio Mascherpa, Alfonso Amendola, Filippo Caruso
Organizations: Department of Physics and Astrophysics, University of Florence, Via Sansone, 1, Sesto Fiorentino, 50019, Italy · DICOX/C High Performance Computing Center of Excellence, DIT Digital & Information Technology, Eni S.p.A., Via Emilia 1, San Donato Milanese, 20097, Italy
Anomaly detection on small and unbalanced datasets remains very challenging in machine learning, although this scenario is common in several domains, including healthcare, cybersecurity, finance, and energy. Data augmentation and generative AI may mitigate training-data scarcity, but they often fall short because anomalies are, by definition, unpredictable, rare, and highly diverse events compared to high-probability normal data. Overfitting to pseudo-anomalies, model collapse, high-dimensional data, uninterpretable black-box models, and validation challenges are typical issues limiting their practical applicability. In this context, quantum machine learning may provide a promising and more sustainable avenue because it can enable more interpretable models with far fewer trainable parameters and smaller datasets, implementable on energy-efficient quantum hardware. Here, we propose a novel two-step hybrid classical--quantum architecture for sequential data and test it on a realistic scenario in the global energy-transition domain, i.e., automated anomaly detection in large-scale photovoltaic plants. The achieved generalization capability and competitive prediction accuracy may pave the way for new hybrid learning models able to exploit the continuously increasing power of cloud-available and more sustainable quantum accelerators integrated with more traditional energy-hungry High Performance Computing resources.
Figures & tables
Figure 1: Current level of the first string of panels sampled over the course of the experiments. The peaks represent daytime activity, while the inactive regions are associated with nighttime.
Figure 2: Per-class feature distribution: due to the sane data being distributed all over the feature space, it is difficult to correctly identify the different types of fault instances.
Figure 3: Different hybrid interactions analyzed: no interactions (left) is compared against a hybrid model where the quantum layer is employed only at the classification level (ours, center), or from the beginning of the training (right). The black and red lines represent the flow of the input during the first and second training phase.
Figure 4: Anomaly detection over the last day of sampling. Both classic (left) and hybrid model (right) perform well, with the hybrid model avoiding some misclassification at the start of the sequence.
Figure 5: Accb of each configuration of ansatz construction: without changing the measurement of the circuit (in our case ⟨Zi⟩ ), the family of states ∣ψ(x;θ)⟩ associated with the circuit can have a great impact on the output of the layer, affecting the classification performances.
Figure 6: Circuit representation of the feature map encoding a sequence of d=3 dimensional data of length T=4 . Using different embedding strategies is possible to reduce the amount of qubits required for each element of the sequence, at the expense of a deeper circuit.
Figure 7: Ansatz used during the training: the data is encoded through the angle embedding ∣x⟩=⊗iRX(xi)∣0⟩ and processed using a variational layer.
Figure 8: Training scheme of the proposed architecture: once the autoencoder learns a suitable representation of the data, the decoder is replaced by the hybrid classifier.
Data incidence (%)
Sane
S. Circuit
Degradation
O. Circuit
Obscuration
All Anomalies
0.847
0.004
0.008
0.004
0.137
0.153
Table 1: Per-class distribution of each type of anomaly. The Sane state makes up for almost all the dataset size.
Model
Acc
Accb
F1
#Parameters
AE + QNN Classifier (ours)
0.9952
0.989
0.9955
82
Hybrid AE + Classical Classifier
0.7796
0.5
0.8617
18
AE + Classical Classifier
0.9956
0.9877
0.9959
≈4400 1
Table 2: Experiment results for the binary prediction task. Our proposed model and its classical counterpart perform similarly well, while the HAE model fails to reliably detect anomalies.
Model
Acc
Accb
F1
#Parameters
AE + QNN Classifier (ours)
0.9357
0.9761
0.9418
109
Hybrid AE + Classical Classifier
0.8515
0.9293
0.8789
45
AE + Classical Classifier
0.8784
0.9549
0.9005
≈4400
Table 3: Classification scores in the AC task of the proposed models: while the HAE model has fewer parameters in the classifier with respect to our model, it shares a similar parametrized structure in the encoder.
Model
Sane
S. Circuit
Degradation
O. Circuit
Obscuration
AE + QNN Classifier (ours)
0.9481
0.9967
0.974
1
0.9653
AE + Classical Classifier
0.8881
0.9967
0.9846
1
0.9734
Table 4: Per-class accuracy score of the best performing models: our solution is less prone to flagging sane instances as anomalous data, resulting in a low false-positive count.
Encoding Layer
#
Strategy
Entanglement
1
AEX(x)
No entanglement
2
AEX(x3)AEX(x2)AEX(x)
No entanglement
3
Controlled AEX(x)
Ring connectivity
4
Controlled AEσ(x)
Ring connectivity
Table 5: Encoding and variational strategies used in the construction of the ansatz; each encoding is tested in combination with every variational layer proposed. AEa(⋅) denotes the angle encoding with respect to the axis a , with σ indicating a general Pauli axis.
A core task in quantum anomaly detection is to compute an anomaly score that quantifies how strongly a test quantum state deviates from a given quantum dataset assumed to be normal. Classically, principal component analysis (PCA) for centered data computes the anomaly score by evaluating the test sample relative to the subspace spanned by the selected leading eigenvectors. However, for quantum data that lack a standard centering, explicitly recovering principal eigenvectors, constructing full Gram matrices, or loading quantum-random-access-memory-style data can be more costly than estimating the anomaly score itself. To avoid these costs, we propose Quantum Spectral Anomaly Detection (QSPADE), which computes PCA-like anomaly scores directly from the spectrum of the average state of the normal dataset. By replacing hard PCA rank selection with a smooth, temperature-controlled spectral threshold, QSPADE makes near-threshold spectral components contribute partially to the anomaly score. This makes the score vary continuously rather than jump when a borderline component is included or excluded, and makes it less sensitive to noise or arbitrary hard cutoffs near the threshold. In the zero-temperature limit, QSPADE recovers the hard-projector PCA score. The proposed measurement-based quantum detector can be calibrated with a sample complexity independent of the data dimension. Numerical simulations show that QSPADE behaves like kernel-PCA on encoded classical data and detects changes across a transverse-field Ising transition without predefined order parameters. Consequently, QSPADE gives an efficient framework for both quantum-kernel anomaly detection on encoded classical data and the monitoring of quantum-native systems where diagnostic observables are unknown.
Yewei Yuan, Michele Minervini, Mark M. Wilde +1
Global College, Shanghai Jiao Tong University, Shanghai 200240, China · School of Electrical and Computer Engineering, Cornell University, Ithaca, New York 14850, United States · Shanghai Jiao Tong University, Shanghai 200240, China +1
Unmanned aerial vehicles (UAVs) are cyber-physical systems whose attack surface spans networked avionics and on-board sensor fusion: a compromised GPS or battery module can mimic a benign mission segment and evade naive anomaly detectors. We present a leakage-free evaluation of quantum machine learning for UAV anomaly detection on the multi-sensor TLM:UAV benchmark. Three contributions support the study. (i) A group-aware temporal protocol (B2) partitions the dataset into ten contiguous TimeUS blocks and evaluates over ten seeds, eliminating the inflation produced by random stratified splits that mix neighbouring samples. (ii) A three-mode feature audit (full/loose/strict) quantifies how much accuracy stems from instantaneous physical signals versus contextual proxies (cumulative energy, battery state, GPS trajectory). (iii) A hybrid XGBoost + Data Reuploading (DRU) classifier is benchmarked against five paired non-linear controls (raw, PCA, polynomial-2, random-RBF, and an untrained DRU map) under identical budgets. The standalone DRU does not consistently match the strongest classical baseline across seeds; however, the trained-DRU hybrid is the only model whose mean F1 macro shifts upward from full to strict (+0.05), a directional signal that the per-seed standard deviations prevent from being interpreted as a statistically established difference. The trained-DRU hybrid also records the lowest mean false-alarm rate under proxy-free evaluation, subject to the inter-seed variance reported. We frame this as an incremental, reproducible quantum-enhanced hybrid benefit, and provide an open Qiskit 2.x implementation as a benchmark for cybersecurity analytics in NISQ-era aerospace systems.
Carlos A. Durán Paredes, Javier E. León Calderón, Nicolás Sánchez Perea +2
Corporation for Aerospace Initiatives, Research and Innovation (CASIRI), Popayán, Colombia · Department of Electronics Engineering, Universidad Nacional de Colombia, Manizales, Colombia. · Department of Electronics Engineering, Universidad del Cauca, Popayán, Colombia. +1
Negative Selection Algorithms (NSAs), inspired by the self/non-self discrimination mechanism of the human immune system, have been widely employed in anomaly detection. However, their effectiveness is often constrained by the efficiency of detector generation. This paper presents the Quantum Genetic Negative Selection Algorithm (QGNSA), a novel approach that integrates a Quantum Genetic Algorithm (QGA) into the EvoSeedRNSA algorithm, replacing its classical evolutionary optimization process. The proposed method exploits quantum superposition and probabilistic amplitude adjustment to enhance search space exploration and convergence efficiency in the detector generation process. Empirical evaluations using the Metaverse Financial Transactions Dataset demonstrate that QGNSA achieves superior anomaly detection accuracy compared to its classical counterpart while maintaining robustness under varying hyperparameter configurations. The experimental results highlight the potential advantages of quantum computing in artificial immune systems, particularly in high-dimensional anomaly detection tasks. Future research will focus on further optimizing quantum circuit design, deploying the algorithm on real quantum hardware, and exploring hybrid quantum-classical approaches for improved computational efficiency.