An Interpretability Analysis of Credit Default Prediction Using Random Forest with SHAP and LIME
Abstract
Credit default prediction has become an important application of machine learning in the banking and financial sector, as it helps financial institutions identify potential loan defaulters and support informed lending decisions. Although machine learning models often provide high predictive performance, many of them function as black-box system, making it difficult for financial analysts and decision-makers to understand the reasoning behind their predictions. This lack of transparency can reduce user trust, particularly in high-stakes financial applications where explainable decisions are essential. To address this challenge, this study explores the use of Explainable Artificial intelligence (XAI) techniques to improve the interpretability of credit default prediction. A Random Forest classifier was developed using a publicly available credit default dataset containing financial attributes such as employment status, bank balance, annual salary, and loan default status. The dataset was preprocessed and partitioned into training and testing sets before model development. To explain the prediction process, SHAP (Shapley Additive Explanations) and LIME (Local Interpretable Model-Agnostic Explanations) were integrated with the trained Random Forest model. SHAP was used to provide both global and local explanations by identifying the overall importance and contribution of individual features, while LIME generated instance-level explanations to illustrate how specific features influenced individual predictions. The explanation results were presented through visualizations, including feature importance plots, waterfall plots, and local explanation graphs, allowing a clearer understanding of the model's decision-making process. The findings demonstrate that the combined use of SHAP and LIME enhances the transparency and interpretability of the Random Forest model by providing complementary perspectives on feature contributions. This study highlights the practical value of explainable machine learning in developing more understandable, trustworthy, and accountable credit risk assessment systems for real-world financial decision-making.