Applying machine learning to enhance fraud detection in Kenyan digital banking

Loading...
Thumbnail Image

Date

Journal Title

Journal ISSN

Volume Title

Publisher

Strathmore University

Abstract

In Kenya, leading financial institutions have lost millions due to financial fraud. Financial fraud occurs when someone (for example, a client) loses their money or assets through deception. Despite the numerous benefits, electronic transactions have created space for malicious actors to take advantage of questionable security features to get away with financial fraud. Conventional techniques cannot address the challenges such transactions present. They are slow, costly, and inaccurate, making them unreliable in this new space. Machine Learning (ML) techniques offer hope regarding preventing these crimes from growing and wreaking havoc in the industry. They are fast, accurate, and can adapt through learning to prevent new crimes. This study investigated past fraudulent financial transactions in the Kenyan finance market, identified the attributes and features contributing to fraudulent financial transactions, and developed a reasonable approach that relies on ML techniques to detect fraudulent transactions early. The research evaluated algorithms that could assist in detecting and classifying transactions accurately, relying on datasets from the Kenya mobile banking sector. The Synthetic Minority Oversampling Technique (SMOTE) technique was used to address the data imbalance within this dataset. The dataset was split into training and test data, with feature extraction ensuring that this division was accurate and precise. Several algorithms were explored, and their performance was assessed. Before hyperparameter tuning, Random Forest achieved an Area Under the Curve (AUC) of 0.995 but failed to detect any fraudulent transactions (precision and recall for class 1 were 0.32 and 0.29, respectively), resulting in a macro F1-score of 0.63, while Logistic Regression reached a precision of 0.12 and recall of 0.65 for fraud with an overall accuracy of 73% and a macro F1-score of 0.52. After tuning, the optimized XGBoost model achieved an overall accuracy of 83%, with a fraud precision of 0.81, a recall of 0.86, and an F1-score of 0.83 for the minority class. In addition, XGBoost’s macro average F1-score improved to 0.83, and its log-loss decreased to 0.185, indicating better stability and balanced performance across classes. Adjusting the decision threshold further enhanced fraud detection, increasing recall to 0.95 with a corresponding precision of 0.74 and an F1-score of 0.83. Overall, these performance numbers confirm that XGBoost is the best-performing model for detecting fraudulent transactions in the study. Logistic regression was used to predict the outcome of events; random forest combined multiple decision trees to achieve a single result; Artificial Neural Network (ANN) assisted in recognizing patterns and solving common problems; The results showed that the algorithms efficiently and accurately detected financial fraud. Model selection was followed by training, model performance evaluation, and model tuning and optimization to enhance generalization ability. The model was validated by feeding it with actual transactions and assessing its efficacy in flagging fraud and non-fraud activities. The model was deployed behind a mobile and web application displaying the model evaluation results. Keywords: Cross-Industry Standard Process for Data Mining (CRISP-DM), XGBoost, SMOTE, ANN, Random Forest

Description

Full - text thesis

Keywords

Citation

Imendi, M. E. (2025). Applying machine learning to enhance fraud detection in Kenyan digital banking [Strathmore University]. https://hdl.handle.net/11071/16386

Endorsement

Review

Supplemented By

Referenced By