This project, by Erik Staszewski under the supervision of David Redmond for Equal1, seeks to implement and extend quantum computing techniques for credit card fraud detection. The primary objective is to construct and compare the performance of a classical Graph Neural Network (GNN) with a Quantum Graph Neural Network (QGNN) for binary classification of fraudulent and non-fraudulent credit card transactions.
Currently, the quantum components are being simulated using NVIDIA CUDA backends, hence the slower operation time. Once Equal1's new quantum hardware is released, these quantum operations will run with performance times comparable to, or exceeding, their classical counterparts, enabling real-time quantum-enhanced machine learning with improved results.
Performance is evaluated using precision, recall, and
GNN Model
- The GNN model consists of 3 GraphSAGE or GCN convolutional layers, each followed by batch normalization, and a GeLU actiation.
- A dense layer maps the final embeddings to a single scalar output, followed by a sigmoid activation for fraud classification.
- The GNN model is trained for 100 epochs, optimized with Adam, has BCELoss as the loss function, a weight-decay of
$1e^{-4}$ , and a learning rate of 0.01.
QGNN Model
- The QGNN model consists of a single SGConv layer, followed by ReLU actication.
- A single-qubit quantum layer is used, implementing RX and RY gates, followed by a dense layer, and a sigmoid activation for fraud classification.
- The QGNN BCELoss model is trained for 220 epochs, optimized using Adam, has BCELoss as the loss function, a weight decay of
$1e^{-4}$ , and a learning rate of 0.01. - The QGNN FocalLoss model is trained for 280 epochs, optimized using Adam, has FocalLoss as the loss function with any Alpha value and a Gamma value of 5.5, and a learning rate of 0.01
The results are shown below. As shown below, the QGNN BCELoss model outperforms both GNN models in all metrics, and the QGNN FocalLoss model outperforms the QGNN BCELoss model in three metrics.
| Metric | GNN | QGNN | ||
|---|---|---|---|---|
| GraphSAGE | GCN | SGConv | ||
| BCELoss | BCELoss | FocalLoss | ||
| Precision Score | 86.45% | 86.27% | 86.62% | 87.25% |
| Recall Score | 82.21% | 80.98% | 83.44% | 79.75% |
|
|
84.28% | 83.54% | 85.00% | 83.33% |
| ROC AUC | 95.65% | 96.59% | 96.79% | 97.91% |
| PR AUC | 78.68% | 74.90% | 80.80% | 80.98% |
Note
Best results are shown in bold.
This project includes both a classical Graph Neural Network (GNN) and a hybrid Quantum Graph Neural Network (QGNN) for credit card fraud detection. The QGNN uses a simulated quantum circuit based on NVIDIA's CUDA-Q framework.
- Equal1's Bell-1 Quantum Computer for high-speed QGNN results
- OS: Linux
- Python 3.9, 3.10, or 3.11 (for CUDA-Q simulation)
- NVIDIA GPU with CUDA support (for CUDA-Q simulation)
Clone the Repository:
git clone https://github.com/estasz/GNN-QGNN-FraudDetection.git
cd GNN-QGNN-FraudDetectionOpen the file:
jupyter notebook GNN-QGNN.ipynbAnd run the model. Feel free to add your own dataset.
This repository is licensed under the Apache 2.0 License. The source code is free to use, modify, and distribute under the terms of this license. Use of the trained models may be subject to additional terms as defined by Equal1.



