An Optimized Ensemble Learning Framework for Credit Card Fraud Detection with Explainable AI

Md. Abul Kalam Azad, Abm Yasir Arafat, Abdul Kadar Muhammad Masum, Yamina Islam, Md. Maruf Hassan, Dewan Md. Farid · 2025

The security and trust of electronic payment systems are threatened by the growing global issue of credit card fraud, which results in thousands of millions of dollars in financial losses annually. As digital transactions continue to rise, the need for accurate, efficient, and interpretable fraud detection systems has become more critical. A synthetic financial dataset generated by PaySim is employed to develop a machine learning framework that can accurately identify fraudulent transactions. The dataset was preprocessed to address data imbalance and improve data quality by manually selecting features, encoding labels, scaling with MinMax, and resampling with SMOTETomek. GridSearchCV and Particle Swarm Optimisation (PSO) were implemented to optimise model parameters and enhance predictive performance through hyperparameter optimisation. The predictions of three machine learning models were combined using a soft voting ensemble approach: Decision Tree (DT), K-Nearest Neighbours (KNN), and Random Forest (RF). Each model was trained independently. The ensemble model outperformed all individual classifiers, attaining an F1 Score of 99.84% and an outstanding accuracy of 99.96%. To enhance the model's transparency, SHAP (SHapley Additive exPlanations) was implemented to clarify the decision-making process and interpret feature contributions. The analysis of the most significant features in detecting fraudulent behaviour identified 'newbalanceOrig', 'oldbalanceOrg', and 'amount' as the most important. The proposed approach reliably resolves the credit card fraud detection task, effectively integrating explainable AI, hyperparameter optimisation, and ensemble learning.

Read the paper · More papers on PaperTik