Quantum Autoencoders Spot Fraud with Unprecedented Accuracy

Author: Denis Avetisyan


A new quantum machine learning approach dramatically improves the detection of credit card fraud, particularly in challenging, real-world scenarios.

Faced with the inherent challenge of identifying rare fraud patterns within severely imbalanced datasets, this work addresses the instability and noise sensitivity of existing quantum anomaly detection methods-which rely on reconstruction-by introducing FiD-QAE, an architecture leveraging fidelity-driven encoding and SWAP-test evaluation to achieve robust, quantum-consistent detection through an efficient 4-qubit design.
Faced with the inherent challenge of identifying rare fraud patterns within severely imbalanced datasets, this work addresses the instability and noise sensitivity of existing quantum anomaly detection methods-which rely on reconstruction-by introducing FiD-QAE, an architecture leveraging fidelity-driven encoding and SWAP-test evaluation to achieve robust, quantum-consistent detection through an efficient 4-qubit design.

This paper introduces FiD-QAE, a fidelity-driven quantum autoencoder demonstrating superior performance on imbalanced datasets and noisy data, suitable for near-term quantum devices.

Despite advancements in fraud detection, identifying rare and evolving fraudulent transactions within highly imbalanced datasets remains a significant challenge. This paper introduces ‘FiD-QAE: A Fidelity-Driven Quantum Autoencoder for Credit Card Fraud Detection’, a novel quantum machine learning architecture employing fidelity estimation to distinguish legitimate from fraudulent activity. Results demonstrate that FiD-QAE achieves robust performance across varying imbalance levels and under realistic quantum noise, with validation on IBM Quantum hardware. Could this fidelity-based approach offer a pathway toward more adaptable and resilient financial security systems in the age of quantum computing?


The Rising Cost of Digital Deception

The pervasive issue of credit card fraud constitutes a mounting economic burden, inflicting substantial losses on financial institutions, merchants, and individual consumers alike. Annual figures demonstrate a consistent upward trend, fueled by increasingly complex schemes and the digitization of commerce. This financial drain isn’t merely a matter of direct losses; it also necessitates significant investment in security infrastructure and fraud prevention measures. Beyond the monetary costs, fraud erodes consumer trust and can disrupt the stability of financial systems, highlighting the urgent need for proactive and inventive countermeasures. The scale of the problem demands not only improvements in detection technology, but also a holistic approach encompassing enhanced security protocols, consumer education, and international collaboration to effectively mitigate the risks and safeguard the global economy.

Conventional approaches to credit card fraud detection, reliant on rule-based systems and statistical analysis, are increasingly challenged by the evolving tactics of malicious actors. Fraudsters now employ sophisticated techniques – such as account takeover, synthetic identity creation, and the exploitation of data breaches – that mimic legitimate transactions, blurring the lines for traditional algorithms. Compounding this issue is the inherent class imbalance present in transaction data; the vast majority of transactions are genuine, while fraudulent activities represent a tiny fraction. This disparity biases many algorithms, leading to high false negative rates – failing to detect actual fraud – as the models are trained to prioritize the overwhelmingly common, non-fraudulent cases. Consequently, even minor increases in fraudulent activity can overwhelm these systems, necessitating the development of more sensitive and adaptive detection methods capable of accurately identifying anomalies within this skewed data landscape.

Effective mitigation of credit card fraud hinges on the deployment of robust anomaly detection systems capable of sifting through immense volumes of transaction data to identify unusual patterns. These systems move beyond simple rule-based checks, instead leveraging sophisticated algorithms – including machine learning models – to establish a baseline of normal behavior and flag deviations indicative of fraudulent activity. The challenge lies in discerning genuine anomalies from the noise inherent in legitimate, yet atypical, transactions. Successful implementation requires careful feature engineering, selecting relevant data points that highlight subtle differences between legitimate and fraudulent behavior, and the ability to adapt to evolving fraud techniques. Consequently, continuous model retraining and the incorporation of real-time feedback are crucial to maintain accuracy and minimize false positives, ultimately safeguarding both consumers and financial institutions.

Strong correlations between features V11, V14, and V4 with the fraud label indicate their potential as key indicators for fraud detection.
Strong correlations between features V11, V14, and V4 with the fraud label indicate their potential as key indicators for fraud detection.

Quantum Autoencoders: A Shift in Anomaly Detection

Quantum Autoencoders (QAEs) offer a potential advancement in anomaly detection through the utilization of quantum mechanical principles for data representation. Unlike classical autoencoders limited by exponential scaling with feature dimensionality, QAEs employ quantum states – specifically, superpositions and entanglement – to encode data in a Hilbert space. This allows for a potentially more compact and efficient representation of high-dimensional datasets. The core benefit lies in the ability of quantum systems to represent exponentially large feature spaces with a polynomial number of qubits, potentially leading to reduced computational complexity and improved detection rates for subtle anomalies that might be missed by classical methods. This is achieved by mapping classical data into quantum amplitudes, enabling the QAE to learn a compressed quantum representation of normal data patterns.

Quantum Autoencoders (QAEs) utilize amplitude encoding to map classical data into a quantum state. This process represents each data point’s features as the probability amplitude of a quantum state vector. Specifically, a classical $n$-dimensional vector is encoded into a quantum state of $n$ qubits, where each qubit’s amplitude is proportional to the corresponding feature value. This allows the QAE to represent a high-dimensional classical dataset with a potentially lower-dimensional quantum state, achieving data compression. The QAE then learns to reconstruct the input quantum state, effectively learning a compressed representation of normal transaction patterns. The efficiency of this encoding scheme stems from the exponential scaling of the Hilbert space with the number of qubits, enabling the representation of large datasets with a manageable quantum resource.

The efficacy of quantum autoencoders in anomaly detection relies on the principle that transactions significantly differing from the training data will produce larger reconstruction errors. During training, the QAE learns a compressed quantum representation of normal transactions, minimizing the difference between the input and the reconstructed output. When presented with an anomalous transaction, the learned quantum circuit will be unable to accurately reconstruct the input, resulting in a demonstrably higher error rate – quantified by metrics such as mean squared error – compared to normal transactions. This discrepancy serves as an indicator of potentially fraudulent activity, allowing for the identification of outliers within a dataset. The magnitude of the reconstruction error is therefore directly proportional to the degree of deviation from the learned normal behavior.

Classical autoencoders compress input data into a lower-dimensional latent space and then reconstruct it, aiming to replicate the original data as accurately as possible.
Classical autoencoders compress input data into a lower-dimensional latent space and then reconstruct it, aiming to replicate the original data as accurately as possible.

FiD-QAE: A Fidelity-Driven Approach to Fraud Detection

FiD-QAE is a novel quantum autoencoder designed for anomaly detection that fundamentally differs from traditional approaches by prioritizing reconstruction fidelity. The model encodes input data into a lower-dimensional quantum state and then attempts to reconstruct the original state. Anomaly detection is performed by evaluating the degree of similarity between the input and reconstructed states; higher fidelity indicates a legitimate transaction, while significant deviation suggests a fraudulent one. This prioritization of fidelity as the primary metric for anomaly scoring distinguishes FiD-QAE and forms the basis of its fraud detection capabilities, as opposed to methods relying on distance-based metrics or classification boundaries.

The FiD-QAE model employs the SWAP test to quantify the fidelity between input and reconstructed quantum states, providing a precise metric for anomaly detection. The SWAP test calculates the overlap between the two states, yielding a value between 0 and 1 that directly corresponds to their similarity; higher values indicate greater fidelity and, therefore, a lower likelihood of anomaly. This measurement is crucial because even small deviations in the reconstructed state, indicative of fraudulent activity, are accurately captured by the SWAP test’s sensitivity to state overlap. Unlike traditional reconstruction error metrics, the SWAP test provides a robust and physically meaningful assessment of state similarity, improving the precision of anomaly identification within the quantum autoencoder.

Evaluation of the FiD-QAE model was conducted on the IBM Quantum Runtime, yielding a 92% accuracy in differentiating between fraudulent and legitimate transactions. This performance is further characterized by a precision of 90%, indicating a low rate of false positives, and a recall of 83%, representing the model’s ability to correctly identify fraudulent instances. The resulting F1-score of 87% provides a balanced measure of precision and recall, demonstrating the model’s overall effectiveness in fraud detection. These metrics were obtained through experimentation and represent the model’s performance on a defined dataset within the IBM Quantum Runtime environment.

Performance benchmarking of the FiD-QAE model was conducted against established classical machine learning techniques, specifically Logistic Regression, and quantum algorithms including the Quantum Support Vector Machine (QSVM). Evaluations were performed utilizing a hardware configuration of only 4 qubits, demonstrating the model’s capacity to achieve competitive results with limited quantum resources. This constraint highlights the potential for practical implementation on near-term quantum devices, while still providing a robust comparison against both classical and existing quantum approaches to fraud detection.

The FiD-QAE model achieved a Matthews Correlation Coefficient (MCC) of 0.753 in testing. The MCC is a balanced measure used to evaluate binary classification models, particularly useful when dealing with imbalanced datasets, and considers true and false positives and negatives. A value of 0.753 indicates strong discriminatory power, surpassing the generally accepted threshold of 0.6 for a reasonably good classification and demonstrating the model’s capability to reliably differentiate between fraudulent and legitimate transactions beyond random chance. This metric provides a more robust evaluation than simple accuracy, especially given the potential imbalance in fraud detection datasets where legitimate transactions typically far outnumber fraudulent ones.

The Fidelity-based Quantum Anomaly Detection (FiD-QAE) method trains a parameterized quantum circuit to compress input states and identify anomalies by classifying transactions as fraudulent or non-fraudulent based on fidelity to reference states, optimizing circuit parameters through a SWAP test and classical optimization.
The Fidelity-based Quantum Anomaly Detection (FiD-QAE) method trains a parameterized quantum circuit to compress input states and identify anomalies by classifying transactions as fraudulent or non-fraudulent based on fidelity to reference states, optimizing circuit parameters through a SWAP test and classical optimization.

Navigating the Realities of Quantum Noise

Quantum computations, while promising significant advancements in fields like anomaly detection, are inherently vulnerable to noise. Unlike classical bits which exist as definite 0 or 1 states, qubits-the fundamental units of quantum information-can exist in a superposition of both, making them susceptible to disturbances from their environment. These disturbances, manifesting as various types of quantum noise, introduce errors into the computation, potentially degrading the accuracy of anomaly detection algorithms. Even minor environmental factors, such as electromagnetic radiation or temperature fluctuations, can disrupt the delicate quantum states, leading to incorrect results and hindering the reliable identification of unusual patterns within complex datasets. This susceptibility necessitates the development of noise-mitigation strategies and robust quantum algorithms to ensure the practicality and trustworthiness of quantum-enhanced anomaly detection.

The fidelity-driven quantum anomaly detection model, FiD-QAE, exhibits remarkable resilience against the detrimental effects of quantum noise, a significant challenge in practical quantum computation. Testing on real quantum hardware demonstrates FiD-QAE maintains a hardware accuracy of 86.6% and an impressively high hardware recall of 98.3%, even when subjected to considerable noise. This level of performance signifies a substantial advancement in the field, suggesting that reliable anomaly detection is achievable despite the inherent fragility of quantum states and the limitations of current quantum devices. The model’s ability to preserve accuracy and recall in noisy conditions highlights its potential for real-world applications where perfect quantum coherence is unlikely.

The model’s inherent robustness against quantum noise stems from a combination of its fidelity-driven approach and efficient data compression techniques. By prioritizing the preservation of high-fidelity quantum states during computation, the model minimizes the propagation of errors introduced by noisy qubits. Furthermore, the ability to effectively compress the input data reduces the overall quantum circuit complexity, lessening the cumulative effect of qubit decoherence and gate inaccuracies. This strategic combination not only maintains a high level of performance in noisy environments but also offers a pathway towards scalable quantum anomaly detection, as it reduces the demands on error correction and improves the feasibility of implementation on near-term quantum devices.

A detailed examination of the model’s performance under varying levels of quantum noise confirms its inherent robustness. The analysis systematically introduced noise, simulating realistic hardware imperfections, and measured the resulting impact on anomaly detection accuracy and recall. Results indicate a remarkably stable performance profile; even with substantial noise present, the model maintains a high degree of fidelity in identifying anomalous data. This suggests the model’s internal mechanisms-particularly its fidelity-driven data compression-effectively mitigate the effects of noisy qubits, preserving the integrity of the quantum information and enabling reliable anomaly detection despite environmental disturbances. The study provides quantitative evidence supporting the claim that this approach offers a significant advantage in practical quantum anomaly detection scenarios.

The F1-score of FiD-QAE decreases with increasing noise probability across different quantum noise models.
The F1-score of FiD-QAE decreases with increasing noise probability across different quantum noise models.

The pursuit of enhanced fraud detection, as demonstrated by this novel Quantum Autoencoder, hinges on a surprisingly human element. The model prioritizes ‘fidelity’ – a measure of reconstruction accuracy – effectively acknowledging that even the most sophisticated algorithms are only as reliable as their ability to accurately represent the underlying data. As Albert Einstein observed, “The definition of insanity is doing the same thing over and over and expecting different results.” This rings true; traditional fraud detection often repeats the same analytical patterns, failing to adapt to evolving fraudulent behaviors. FiD-QAE, by focusing on fidelity, attempts to break this cycle, offering a more robust approach to identifying anomalies within imbalanced datasets – a critical step towards mitigating the predictable flaws in current systems.

Where Do Things Go From Here?

This work, with its emphasis on fidelity, nudges at a familiar truth: people don’t choose the optimal solution, they choose what feels okay. A model that perfectly identifies fraud is less useful if it also flags a significant portion of legitimate transactions; the cost of being wrong looms larger than the reward of being right. The pursuit of ‘fidelity’ isn’t about mathematical perfection, it’s about building a system that aligns with human tolerance for error-a surprisingly low bar, historically.

The challenge, predictably, isn’t the quantum mechanics. It’s the data itself. Imbalanced datasets will remain a persistent nuisance, a reflection of the fact that honest transactions vastly outnumber fraudulent ones. Future efforts will likely focus less on squeezing marginal gains from the quantum autoencoder and more on clever pre-processing techniques – essentially, artfully distorting reality to make the signal clearer. The algorithm isn’t the problem, it’s the human tendency to generate so much… normality.

One suspects the real breakthrough won’t come from a more complex quantum circuit, but from a better understanding of the biases embedded within the data. After all, people don’t seek profit-they seek reassurance. A model that feels secure, even if imperfect, will always be preferred to one that is perfectly accurate but inspires distrust. The art, as always, lies in managing perception.


Original article: https://arxiv.org/pdf/2512.12689.pdf

Contact the author: https://www.linkedin.com/in/avetisyan/

See also:

2025-12-17 00:20