EXPLAINABLE AI (XAI) FOR LOAN APPROVAL AND CREDIT RISK PREDICTION

Authors

  • Dr. Mohammed Sharfuddin, Nadia Mujeeb Author

DOI:

https://doi.org/10.62643/

Abstract

Financial institutions across the world rely heavily on machine learning models to decide whether a loan application should be approved or rejected. Models such as XGBoost (eXtreme Gradient Boosting) give very accurate predictions on this kind of structured, tabular data, which is exactly why banks and non-banking financial companies have started using them at a large scale for credit scoring. The problem is that these models work like a black box. They give a decision but they do not explain why that decision was made, which leaves both the loan applicant and the bank employee with no clear reason behind an approval or a rejection. This project tries to solve that exact problem by building a complete Explainable Artificial Intelligence, or XAI, based credit risk prediction system. The system combines a well-tuned XGBoost classifier with three different explanation techniques, namely SHAP (SHapley Additive exPlanations), LIME (Local Interpretable Model-agnostic Explanations) and DiCE (Diverse Counterfactual Explanations) counterfactuals, so that every prediction made by the model can be explained from more than one angle. The model is trained and tested on the German Credit dataset, which has been extended to ten thousand records so that the training process is more robust and closer to a real world scenario. Before training, the raw data goes through a proper preprocessing pipeline that handles categorical encoding, feature scaling and class balancing using SMOTE, since the number of defaulters in the original dataset is quite low compared to the number of approved applicants. Once the model is trained, SHAP is used to find out which features matter the most across the whole dataset as well as for one particular applicant, LIME is used to build a small local model around a single prediction so that it becomes easy to interpret, and DiCE is used to tell a rejected applicant the smallest possible change in their profile that would flip the decision to an approval. All three of these explanation methods are also benchmarked against each other on faithfulness, stability and the time they take to compute, so that the strengths and weaknesses of each method are clearly visible rather than just assumed. Apart from explainability, this project also checks whether the model is being fair to different age groups. Fairlearn and AIF360 are used to compute metrics such as demographic parity difference, equalised odds difference and disparate impact ratio, and a reweighing step is applied afterwards to reduce any bias that is found. Finally, the entire pipeline, starting from data loading and going all the way to explanation generation and fairness auditing, is packaged inside an interactive, multi tab Streamlit dashboard where a user can upload an applicant’s data and instantly see the prediction, the explanation behind it and the fairness status of the model. The final system supports the right to explanation principle mentioned in data protection laws like the GDPR and shows that high accuracy and model transparency are not two opposite goals, they can be achieved together using tools that are completely open source and free to use.

Downloads

Published

09-09-2026

How to Cite

EXPLAINABLE AI (XAI) FOR LOAN APPROVAL AND CREDIT RISK PREDICTION. (2026). International Journal of Engineering Research and Science & Technology, 22(3), 1708-1727. https://doi.org/10.62643/