Banking
Modern credit risk modelling: the use of machine learning algorithms
Logistic regression scorecards are transparent but blind to non-linear patterns. Tree-based models see them, at a cost in interpretability. This is what each algorithm brings, and what governance has to catch up with.
Credit scorecards remain a key part of how lenders assess risk. Built using methods like logistic regression, they offer transparency and consistency, and have become standard across retail and commercial lending. But as lenders work with more complex borrower data and aim to make faster, more tailored decisions, traditional scorecards are increasingly being supplemented by machine learning models.
The shift towards machine learning models has been much faster in origination, monitoring and collections than in regulatory capital models: the European Banking Authority (EBA) observed in 2021 that the IRB models that institutions were using to calculate credit risk capital "do not differ materially from the approaches used 15 to 20 years ago when the first Basel Accord was put in place".1
Why move beyond logistic regression?
Most scorecards are based on logistic regression, a linear model that estimates the probability of default from a set of manually engineered features. Its main benefit is simplicity: each input contributes in a clear, weighted way to the outcome.
Linear models make strong assumptions, though. They don’t handle non-linear relationships well, and they miss interactions between variables unless those interactions are modelled explicitly. This is where tree-based machine learning models offer a real advantage, and where the regulatory constraint begins. Article 171(1)(a) and (b) of the Capital Requirements Regulation (CRR) sets the criteria for assigning an exposure to a grade or pool, and the EBA’s reading is that this "may constrain the use of models where you do not have a clear economic link between the input and the output variables".1
Key machine learning models in credit scoring
Random forest
A random forest is an ensemble method that builds multiple decision trees from bootstrapped samples of the data. Each tree votes on the outcome, and the final prediction is the average for regression, or the majority vote for classification.
- Strengths: robust to overfitting, a good baseline model, and a strong performer on high-dimensional data.
- Drawbacks: less interpretable than a single decision tree, and relatively slow on large datasets.
Gradient boosting machines
Gradient boosting machines (GBMs) build trees sequentially, each new tree correcting the errors of the ones before it. That makes them flexible and powerful. Two implementations dominate.
XGBoost (extreme gradient boosting) is known for speed and performance. It minimises a loss function using a convex optimisation algorithm and includes a regularisation term that penalises model complexity to reduce overfitting. It’s widely used in production credit risk models.
LightGBM (light gradient boosting machine) is optimised for speed and memory efficiency. It grows trees leaf-wise rather than level-wise, and uses gradient-based one-side sampling to evaluate information gain efficiently, skipping data points with small gradients. That improves training speed and sometimes accuracy, at the risk of overfitting if it isn’t tuned properly.
These boosting models have become the standard for many machine learning credit scoring applications, thanks to their predictive accuracy and their ability to model complex, non-linear relationships.
Benefits of machine learning models
Khandani, Kim and Lo (2010)
Consumer credit-risk models via machine-learning algorithms
View source ↗- Predictive performance: tree-based models generally rank borrowers by risk more accurately than linear models, measured on ROC AUC or Gini, the two standard measures of how well a model separates defaulters from non-defaulters. The gain shows up most in segments with thin credit files or limited traditional data. One 2010 study measured what that is worth on a commercial book: applying non-linear, non-parametric models to customer transaction and bureau data, it estimated savings of 6 to 25% of total losses on conservative assumptions about the cost of cutting credit lines.2
- Automatic handling of interactions: GBMs capture interactions between features that would need to be specified by hand in a regression-based scorecard.
- Flexible feature input: machine learning models are more tolerant of skewed distributions, outliers, and missing values. They can use raw or minimally transformed inputs, which speeds up development.
- Feature importance: complex as they are, these models still offer useful insight through feature importance metrics, highlighting which variables most influence predictions.
- Better credit decisions: with sharper segmentation and risk ranking, lenders can approve marginal applications more confidently, price more competitively, and reduce false declines. That means higher profits and wider financial inclusion.
Interpretability
Explainability is often the primary barrier to using machine learning models in regulated lending. Tools such as Shapley additive explanations (SHAP) help. SHAP assigns an importance value to each feature for a given prediction, which makes account-level explanations possible: not just which variables matter across the portfolio, but why this applicant received this score.
SHAP is one of five techniques the EBA names, alongside graphical tools, feature importance measures, local explanations such as LIME (local interpretable model-agnostic explanations) and anchors, and counterfactual explanations.1 The graphical tools come in two forms: partial dependence plots show the effect on the average prediction, and individual conditional expectations show the effect on a single one.
The EBA’s 2023 follow-up report recorded what 14 consultation respondents said they use: Shapley values led at 40%, ahead of enhanced reporting and documentation of the model methodology at 28%, graphical tools at 20%, and sensitivity analysis at 8%.3
The reason SHAP leads that list is a result rather than a fashion. A 2017 proof established that among methods explaining a prediction as a sum of feature contributions, the Shapley value is the only one satisfying local accuracy, missingness and consistency together.4 Consistency is the one that matters to a validator: if a model change increases a feature’s marginal contribution, its attribution cannot decrease, so the direction of an explanation stays trustworthy from one model version to the next.
Model governance and fairness
Machine learning models must meet the same governance standards as traditional scorecards: clear documentation, robust validation, and regular monitoring for performance drift or data shifts.
Fairness is an equally important part of governance. Because these models learn from historical data, they can unintentionally reinforce biases that exist in it. Fairness checks, such as evaluating model outcomes across different groups, should be part of both development and ongoing monitoring. The Prudential Regulation Authority (PRA) gives this a formal foothold: under Principle 1 of SS1/23, a firm’s assessment of model complexity may consider the use of unstructured data alongside interpretability, explainability and transparency, and "the potential for designer or data bias".5 Bias is therefore an input to how the model is tiered, not only a test it has to pass.
What’s next? Neural networks
As lenders collect richer data, neural networks may represent the next step. They can learn highly complex, non-linear relationships without manual feature engineering, and they suit high-dimensional or sequential data such as transaction histories particularly well.
Adoption of neural networks remains thin, though, held back by interpretability challenges, longer training times, and heavier governance requirements. The EBA’s 2023 survey of where machine learning sits in IRB work suggests the realistic near-term role. Use is selective and early-stage, with PD risk differentiation the dominant case. Random forests and gradient boosting trees are used mainly for selecting risk drivers and preparing input data rather than as the primary estimation engine, and in validation the main use is challenger models and robustness analysis.3 There is a data reason for that split: risk differentiation can rest on shorter time series, whereas risk quantification needs the long-run averages the CRR’s five-year minimums require. Advances in explainability tooling and cheaper compute change the calculation, but they do not change the observation period.
Final thoughts
Machine learning isn’t a replacement for traditional credit scoring. It’s an extension.
Models like XGBoost, LightGBM, and random forests uncover patterns and relationships that linear models can’t, which leads to stronger credit decisions and more tailored risk management. For institutions looking to push further, neural networks may offer more predictive power still, especially as explainability tools improve.
The key to successful adoption lies not just in the models themselves, but in governance, explainability, and the alignment of machine learning development with broader risk policies. The EBA offers a test a model owner can apply directly: avoid complexity in the modelling approach that is not justified by a significant improvement in predictive capacity. It names three in particular, and each is a question worth asking of any candidate model.
Does it carry an excessive number of drivers, or drivers with no significant predictive information? Does it use unstructured data where conventional data offers similar predictive power? Are its modelling choices more complex than simpler approaches that yield similar results?
Approached that way, machine learning improves a lender’s ability to manage credit risk. Approached as a performance contest, it buys a rounding point of Gini and a validation problem.
Frequently asked questions
If tree-based models predict better, why do lenders still build logistic regression scorecards?
Because the regulatory framework rewards a traceable economic link between an input and an output, and logistic regression supplies one by construction. The EBA put the consequence bluntly in its 2021 discussion paper on machine learning for internal ratings-based models: IRB models then in use "do not differ materially from the approaches used 15 to 20 years ago when the first Basel Accord was put in place". That is not inertia so much as the binding constraint. Article 171(1)(a) and (b) of the CRR requires criteria for assigning an exposure to a grade or pool, and the EBA notes this "may constrain the use of models where you do not have a clear economic link between the input and the output variables".
What actually differs between XGBoost and LightGBM?
Both build trees sequentially, each correcting the errors of the ones before it, and the difference is how each one grows and searches. XGBoost adds a regularisation term that penalises model complexity, which is what keeps a deep ensemble from memorising the development sample. Our piece on elastic net regularisation covers the same idea applied to a linear scorecard. LightGBM grows trees leaf-wise rather than level-wise and uses gradient-based one-side sampling, skipping observations with small gradients when evaluating information gain, which is where its speed and memory advantage comes from. The trade-off is real: leaf-wise growth finds better splits and overfits more readily if the model is not tuned for it.
Are machine learning models allowed in regulatory capital models?
Nothing prohibits them, and the CRR requirements they have to satisfy are demanding enough that most banks have kept them out. The EBA's discussion paper names the pressure points precisely. Article 174(e) requires institutions to complement statistical models with human judgement and human oversight, an obligation the EBA reads as demanding that staff be able to assess whether the selected risk drivers contribute to the risk assessment in line with their economic meaning. That is harder to demonstrate when a driver's marginal contribution is not monotonic. Article 179(1)(a) requires estimates to be plausible and intuitive, and the EBA observes that machine learning models "can result in non-intuitive estimates". And the data requirements bite: Article 180(1)(a) with 180(1)(h) requires a historical observation period of at least five years for at least one data source for PD, and Articles 181(1)(j) and 181(2) require a minimum of five years for LGD, which alternative data sources frequently cannot reach back to.
Which explainability tools do supervisors expect to see?
The EBA names five in its discussion paper, and the list is worth treating as the expected toolkit: graphical tools, meaning partial dependence plots for the effect on the average prediction and individual conditional expectations for the effect on a specific one; feature importance measures; Shapley values; local explanations such as LIME and anchors; and counterfactual explanations. The EBA’s 2023 follow-up report then recorded what 14 consultation respondents said they use: Shapley values led at 40%, followed by enhanced reporting and documentation of the model methodology at 28%, graphical tools at 20%, and sensitivity analysis at 8%.
Why is SHAP the tool that has won out?
Because it is the only one of its class with a uniqueness result behind it. Lundberg and Lee showed in 2017 that among methods explaining a prediction as a sum of feature contributions, the Shapley value is the only one satisfying local accuracy, missingness and consistency at the same time. Consistency is the property that matters most in a regulated setting: if a model change increases a feature's marginal contribution, its attribution cannot decrease, so attribution direction stays trustworthy across model versions. Subsequent work by the same authors gave tree ensembles an exact algorithm that runs in polynomial time, which is what makes the method practical on a large boosted ensemble.
Where are banks actually using machine learning in IRB work today?
Not usually as the model that produces the number. The EBA's 2023 follow-up found use to be selective and early-stage, with PD risk differentiation the dominant case and LGD, EAD and ELBE applications less common. Within development, random forests and gradient boosting trees are used mainly for selecting risk drivers and preparing input data, meaning missing-value imputation, text mining and clustering, rather than as the primary estimation engine. In validation, the main use is challenger models and robustness analysis. There is a data reason for the split: risk differentiation can rest on shorter time series, whereas risk quantification needs the long-run averages that the CRR's five-year minimums require.
How much complexity can a model justify?
Only as much as it earns. The EBA's recommendation is that institutions "avoid unnecessary complexity in the modelling approach if it is not justified by a significant improvement in the predictive capacities", and it names three things to avoid specifically: an excessive number of explanatory drivers or drivers with no significant predictive information; unstructured data where more conventional data offers similar predictive capacity; and overly complex modelling choices where simpler approaches yield similar results. A gradient boosting model that beats the scorecard by a rounding error has not made its case.
Are neural networks used in credit scoring?
Rarely, and the barriers are governance rather than mathematics. They learn complex non-linear relationships without manual feature engineering and suit sequential data such as transaction histories, which is exactly the direction lenders’ data is heading. Our piece on deep feature synthesis covers automating that feature engineering step. What holds them back is that they sit at the high-complexity end of the range the EBA is most cautious about, they take longer to train, and every explainability and validation requirement above applies to them more heavily. The realistic near-term use is the one the EBA already records for tree models: a challenger, or a feature-discovery step feeding a model that a validator can trace.
How should fairness be tested in a machine learning credit model?
Fairness testing belongs in development and in ongoing monitoring, not in a one-off sign-off, because a model trained on historical decisions can reproduce the patterns in them. The PRA gives it a foothold in the model risk framework: under Principle 1 of SS1/23, a firm's assessment of model complexity may consider the use of unstructured data alongside interpretability, explainability and transparency, and "the potential for designer or data bias". In practice that means comparing model outcomes across groups at development, repeating the comparison on the live population, and being able to show which features drove any divergence, which is where the account-level attribution from SHAP earns its keep a second time.
Sources
- 1 EBA/DP/2021/04. Discussion Paper on machine learning for IRB models View source ↗
- 2 Khandani, Kim and Lo (2010). Consumer credit-risk models via machine-learning algorithms View source ↗
- 3 EBA. Follow-up report on machine learning for IRB models View source ↗
- 4 Lundberg and Lee (2017). A Unified Approach to Interpreting Model Predictions View source ↗
- 5 PRA SS1/23. Model risk management principles for banks View source ↗