• Security

Deloitte Italy: Quantum Machine Learning for Digital Payments Fraud Detection

Deloitte

Deloitte Italy built a digital payments fraud detection solution using a hybrid quantum neural network on AWS, combining classical Keras layers with a 3-qubit PennyLane quantum layer and deploying the pipeline with Amazon Braket and SageMaker.

Key Outcome
On the public Kaggle credit card fraud dataset, the hybrid quantum model reached 0.92 fraud precision versus 0.86 for a comparable classical baseline, using slightly fewer parameters. Experiments ran on simulators; the design is hardware-ready via Braket.

The Problem

Digital payments fraud is a needle-in-a-haystack problem. In the public benchmark dataset Deloitte Italy used for this work, fraudulent transactions make up just 0.172% of the total: 492 fraud cases among 284,807 transactions. Models must catch those rare cases without drowning analysts in false positives, and they must keep working as fraud patterns drift.

Classical machine learning handles this well, but the field is actively exploring whether quantum machine learning layers can add value, particularly whether small quantum circuits embedded in neural networks can match or beat classical models with fewer trainable parameters. Deloitte Italy, working with AWS, built and published a complete fraud detection solution to test exactly that.

What Deloitte Italy Built

The solution, described in a July 2024 AWS Machine Learning Blog post co-authored with Deloitte, is a hybrid quantum neural network for detecting fraudulent digital payment transactions, designed as a plug-and-play system that can be pointed at real quantum hardware as it matures. The documented components:

  • A classical front end of two dense layers (32 and 9 nodes), with dropout at rate 0.3 and L1/L2 regularization
  • A quantum output layer of 3 qubits, built in PennyLane and using rotation gates (RY and Rot), CNOT entangling operations, and Pauli-Z measurements on qubits 0 and 2
  • Keras/TensorFlow for the classical layers and training loop, with PennyLane providing the quantum-classical bridge
  • An AWS production-style pipeline: Amazon Kinesis for ingestion, AWS Glue for ETL, S3 for storage, Amazon Braket for the quantum environment, SageMaker for model deployment, Redshift for analytics, and QuickSight for visualization

The hybrid model has 1,296 trainable parameters; the classical baseline it was compared against has 1,329. Training and testing used the open-source Kaggle credit card fraud dataset (September 2013 European card transactions, with features PCA-transformed for confidentiality).

Documented Results

At a classification threshold of 0.75, the published results were:

  • Hybrid quantum model: 1.00 precision on non-fraud, 0.92 precision on fraud, training loss 0.0353, validation loss 0.0119
  • Classical baseline: 1.00 precision on non-fraud, 0.86 precision on fraud

So on this dataset, the hybrid model detected fraud with higher precision than a comparable classical network while using slightly fewer parameters. An important caveat is equally documented: all experiments ran on PennyLane’s default.qubit simulator. The architecture is hardware-ready in the sense that swapping the device string for an Amazon Braket ARN would route the quantum layer to physical devices (Braket offers access to IonQ, Rigetti, IQM, QuEra, and OQC hardware), but the published numbers are simulator results.

A Simplified Illustration

The snippet below is a simplified educational illustration of how a hybrid Keras model with a PennyLane quantum layer can be assembled. It is not Deloitte’s actual code and does not reproduce their circuit or results; it shows the general pattern such solutions follow.

import pennylane as qml
import tensorflow as tf

n_qubits = 3
dev = qml.device("default.qubit", wires=n_qubits)

@qml.qnode(dev, interface="tf")
def quantum_layer(inputs, weights):
    # Encode classical activations as rotation angles
    qml.AngleEmbedding(inputs, wires=range(n_qubits), rotation="Y")
    # Trainable entangling block
    qml.StronglyEntanglingLayers(weights, wires=range(n_qubits))
    return [qml.expval(qml.PauliZ(w)) for w in range(n_qubits)]

weight_shapes = {"weights": (2, n_qubits, 3)}
qlayer = qml.qnn.KerasLayer(quantum_layer, weight_shapes, output_dim=n_qubits)

model = tf.keras.Sequential([
    tf.keras.layers.Dense(32, activation="relu"),
    tf.keras.layers.Dropout(0.3),
    tf.keras.layers.Dense(9, activation="relu"),
    qlayer,
    tf.keras.layers.Dense(1, activation="sigmoid"),
])
model.compile(optimizer="adam", loss="binary_crossentropy",
              metrics=[tf.keras.metrics.Precision()])
model.summary()

Training proceeds exactly as for any Keras model: gradients flow through the quantum layer via PennyLane’s automatic differentiation, and the whole network learns end to end.

Why This Case Matters

This is one of the more carefully scoped public examples of quantum machine learning in financial services. The claims are modest and checkable: a public dataset, a stated architecture, a like-for-like parameter budget, and explicit acknowledgment that results come from simulation. The interesting finding is not “quantum beats classical” in general, but that a tiny 3-qubit layer held its own and improved fraud precision within a matched parameter budget on one benchmark.

It also shows what enterprise quantum ML experimentation looks like in practice: the quantum component is a small piece inside a conventional cloud ML pipeline, built so that real hardware can be swapped in later without redesigning the system.

Learn more: Quantum Machine Learning

Sources