Enhanced Fraud Detection in Financial Transactions Using Hyperparameter-Tuned Random Forests
Shantanu Kumar · 2024
The surge in online transactions driven by ecommerce and digital payment systems has intensified the need for robust fraud detection mechanisms. Traditional rule-based systems are increasingly inadequate for addressing sophisticated and evolving fraud schemes. Current research has focused on leveraging machine learning (ML) techniques, such as logistic regression, decision trees, random forests, and boosting algorithms, to enhance fraud detection capabilities. However, challenges such as scalability, real-time processing, and data imbalance persist, often leading to high false-negative rates. This paper proposes a hyperparameter-tuned Random Forest model to address these challenges. The proposed model leverages the ensemble nature of random forests and optimal parameter tuning to effectively handle high-dimensional data and complex feature interactions. Doing so enhances detection accuracy and mitigates the risk of overfitting. Our comprehensive evaluation of various ML models, including Logistic Regression, Gaussian Naive Bayes, Decision Trees, and XGBoost, highlights the strengths and limitations of each approach. The results demonstrate that our hyperparameter-tuned Random Forest model achieves superior performance, with an accuracy of 99.94%, an F1 score of $\mathbf{9 9. 9 4 \%}$, and an ROC-AUC of $\mathbf{9 9. 9 4 \%}$. This model significantly outperforms others, including Logistic Regression $\mathbf{9 5. 4 0 \%}$, Gaussian Naive Bayes $\mathbf{9 3. 5 6 \%}$, Decision Tree $\mathbf{9 9. 5 1 \%}$, and XGBoost $\mathbf{9 6. 2 5 \%}$. These findings underscore the importance of model selection and tuning in developing reliable fraud detection systems. Our proposed model offers a robust and scalable solution for realtime fraud detection in e-commerce and financial applications, addressing critical gaps in current methodologies and paving the way for more secure and trustworthy digital transactions.