Credit Card Fraud Detection: Comparing Random Forest and XGBoost Models with Explainable AI Interpretations
摘要
This study investigates the application of machine learning and Explainable Artificial Intelligence (XAI) techniques in credit card fraud detection. We compared Random Forest and XGBoost classifiers using a dataset of 284,807 transactions, with Random Forest demonstrating superior performance in fraud detection precision (0.86 vs 0.83) and overall accuracy (0.9995 vs 0.9866). To address the interpretability challenge inherent in complex models, we employed SHAP (SHapley Additive exPlanations) and LIME (Local Interpretable Model-agnostic Explanations) techniques to interpret the Random Forest model. The SHAP analysis provided a global perspective on feature importance, consistently identifying V12 and V14 as the most influential features across all predictions. Complementing this, the LIME analysis offered localized explanations for individual predictions, highlighting how specific feature values contribute to classifying transactions as fraudulent. For instance, in one examined case, features V12 ≤ −5.58, V14 ≤ −6.90, and V17 ≤ −5.27 were key indicators leading to a 99% probability of fraud prediction. Our findings demonstrate the synergy between advanced machine learning and XAI methods in enhancing both the accuracy and interpretability of fraud detection models. The convergence of insights from both SHAP and LIME techniques not only validates the model’s consistency but also significantly enhances its trustworthiness. By making the model’s decision-making process transparent and understandable, these techniques play a crucial role in building user confidence and supporting informed decision-making in high-stakes financial environments.