This project reproduces the results of a published study on credit card fraud detection using deep learning methods. It evaluates the performance of 1D CNNs, 2D CNNs, and LSTM networks on two real-world imbalanced datasets.
Nguyen, Thanh Thi, et al.
Deep Learning Methods for Credit Card Fraud Detection.
arXiv preprint arXiv:2012.03754, 2020.
├── data/ # Dynamic retrieval from Kaggle
├── notebooks/
│ └── fraud_detection.ipynb
├── Report.pdf
└── README.md-
European Card Data (ECD)
Kaggle link
284,807 samples, 31 features (0.172% fraud) -
Small Card Data (SCD)
Kaggle link
3,075 samples, 12 features (14.6% fraud)
- Clone the repository
git clone https://github.com/yourusername/credit-card-fraud-naml.git cd credit-card-fraud-naml - Add your Kaggle credentials Save your kaggle.json token inside a .kaggle/ directory:
mkdir ~/.kaggle
cp path/to/kaggle.json ~/.kaggle/
chmod 600 ~/.kaggle/kaggle.json- Run the notebook Open and run the main notebook:
jupyter notebook notebooks/fraud_detection.ipynbThis project implements three neural network architectures, each evaluated on both the European Card Data (ECD) and Small Card Data (SCD) datasets. All models use binary cross-entropy loss and the Adam optimizer.
Designed for structured, sequential data like time series
Used after reshaping tabular data into 2D matrices (e.g., 5×6) to simulate spatial structure
Captures temporal dependencies and long-term patterns in transaction sequences
Each model was trained on balanced and imbalanced versions of the datasets using:
- Random Under-Sampling
- NearMiss
- SMOTE
Evaluation metrics include accuracy, precision, recall, and F1 score. EarlyStopping and learning rate callbacks were also used to improve generalization and avoid overfitting.
Federica Topazio