Choosing and Validating a Loan Default Model Under Regulation
Machine LearningModel answerLast updated
Compare logistic regression, random forests and boosted trees for predicting loan default, and explain how to validate them, treat rare defaults, and keep decisions explainable.
Scenario
A lender wants to replace its current underwriting score with a machine-learning model that estimates the probability that an applicant will default. The inputs are tabular: credit bureau attributes, application fields and internal account behavior. Only a small share of applicants (roughly 2-10%) ever default. The score will drive approval, credit limits and pricing, and it will feed expected-loss calculations. The lender operates under fair-lending and model-risk rules, so every decline must be explainable to the applicant and the model must pass independent validation.
Questions
- Compare logistic regression, random forest and gradient boosting for this task. Discuss strengths and weaknesses, and say which you would put into production and why.
- Describe how you would evaluate the candidate models. Which metrics, and what validation design?
- Explain how you would deal with the class imbalance.
- Explain how you would make the final model interpretable and compliant.
What a good answer covers
- A clear problem framing (target definition, how the score is used).
- A concrete comparison across accuracy, calibration, interpretability, constraints and governance.
- Metrics for ranking, probability accuracy, business impact, stability and fairness.
- A reasoned stance on resampling versus weighting versus threshold choice.
- Practical failure modes such as leakage, drift and selection bias.
Hints
Hint 1
Ask what the score is used for. If it feeds expected loss and pricing, ranking alone is not enough, so think about calibrated probabilities as well as discrimination.
Hint 2
How you split the data can matter more than which metric you report. Consider what differs between loans originated in different periods, and whether the outcome window has had time to mature.
Hint 3
Ask which of your metrics change when you rebalance classes, and which do not. Then consider what weighting or resampling does to predicted probabilities and how to repair it.
Hint 4
Think about what must be handed to a declined applicant and to a regulator: reason codes, sensible feature directions, and evidence of fairness testing. Which model families make that easy, and which need extra tooling?
Model answer
Medium Try it yourself first — then compare your approach, complexity and edge cases.
Framing
- Target: probability of default (PD), e.g. 90+ days past due within a fixed window (12-24 months) after origination.
- Use: approve/decline, line size and pricing, plus expected loss = PD x LGD x EAD. This means we need calibrated probabilities, not only a good ranking.
- Constraints: specific and accurate decline reasons, no protected attributes or their proxies, and independent model validation.
Comparing the three families
| Aspect | Logistic regression (often a WoE scorecard) | Random forest | Gradient boosting |
|---|---|---|---|
| Accuracy | Solid baseline, strong with good features | Usually better than LR | Usually best; often a few Gini points above LR |
| Interactions / nonlinearity | Manual (binning, interaction terms) | Automatic | Automatic |
| Calibration | Good with log-loss | Weak; probabilities pulled toward the middle | Reasonable, but verify and recalibrate if weighted |
| Interpretability | Native: coefficients, scorecard points, reason codes | Hard | Hard natively; workable with TreeSHAP |
| Monotonicity | Via binning and coefficient signs | Not natively | Supported through monotone constraints |
| Tuning / overfitting | Low risk | Robust | Needs careful tuning and early stopping |
| Governance burden | Lowest | High | Moderate to high |
| Deployment | Trivial, even in SQL | Large model | Fast, moderate size |
Recommendation. Build a WoE logistic scorecard as the benchmark, and a monotonic-constrained gradient boosting model as the challenger. Promote the challenger only if its lift is material and holds up in out-of-time testing, stability checks and fairness review. Random forest rarely wins: boosting usually beats it on accuracy, and it is worse on calibration and size.
Evaluation
Validation design first.
- Use out-of-time validation: train on older vintages, test on later ones. Random k-fold alone overstates performance because the economy and acquisition strategy drift.
- Make sure outcomes are fully matured and that no post-application information leaks into features.
Discrimination.
- ROC-AUC and Gini = 2 x AUC - 1.
- KS = max |F_bad(s) - F_good(s)|, the largest gap between cumulative score distributions of bads and goods. Report where it occurs.
- Lift and capture rates (e.g. "the riskiest 10% contain 40% of defaults"), and PR-AUC for imbalance.
Calibration.
- Reliability plots by decile, Brier score, and binomial or Hosmer-Lemeshow tests per rating grade.
- Predicted versus actual default rates by segment and by vintage.
Business metrics.
- Bad rate at a fixed approval rate, or approval rate at a fixed bad rate.
- Swap-set analysis: which applicants change decision between champion and challenger, and what their expected outcomes are.
- Profit curves to choose cutoffs.
Stability.
- Population Stability Index on the score (below 0.1 stable, 0.1-0.25 watch, above 0.25 investigate), feature-level drift checks, and Gini by vintage.
Fairness.
- Adverse impact ratios across protected groups (using proxy methods for testing only) and a search for less-discriminatory alternatives.
Caveat: selection bias. Outcomes exist only for approved applicants. Mention reject inference, or at least acknowledge the bias and use champion/challenger experiments where possible.
Class imbalance
A 5% default rate is usually not a problem to fix.
- AUC and KS do not change under class rebalancing.
- Log-loss models already output correct probabilities at the true base rate.
Preferred order:
- Train on the natural distribution and choose the cutoff from business costs (a missed default costs far more than a lost good customer).
- Class weights if the minority class is tiny or trees underfit it. Weighting shifts probabilities, so recalibrate with Platt or isotonic regression on a holdout, or apply a prior correction:
odds_true = odds_model x [pi/(1-pi)] / [pi_s/(1-pi_s)], where pi is the true default rate and pi_s the effective rate after reweighting. - Undersample goods for speed on very large data, with the same correction.
- SMOTE: be skeptical. It creates unrealistic synthetic applicants, distorts calibration, seldom helps tree ensembles, and is hard to defend to validators. If used, apply it only inside training folds, never before splitting.
Interpretability and compliance
- Logistic scorecards: coefficients and points map directly to reasons. A common scaling is 600 points at 50:1 odds with 20 points to double the odds.
- Boosting: use monotonic constraints (more delinquencies never lowers risk, more income never raises it) so that behavior is intuitive and stable, with small accuracy cost. Add TreeSHAP for global importance and per-applicant contributions, and ALE or partial dependence plots to check shapes.
- Adverse-action reasons: convert the top negative contributions into plain-language reason codes, and check they are stable and consistent (the same feature should not appear as both a reason for decline and a strength).
- Governance: document data lineage, feature rationale, assumptions, limitations, benchmark comparisons, and ongoing monitoring plans. Exclude protected attributes and scrutinize proxies such as geography.
Common mistakes
- Reporting random-split AUC and ignoring time.
- Using SMOTE or weights and then treating the outputs as true probabilities.
- Judging models on AUC alone while ignoring calibration, stability and explainability.
- Leaking future information through features like recent account status.
- Ignoring selection bias from approved-only outcomes.
- Using unconstrained SHAP explanations as reason codes without checking that they are coherent.
Summary answer
Start with a WoE logistic scorecard as the benchmark, challenge it with a monotonic GBM, evaluate out-of-time on discrimination, calibration, stability and fairness, keep the natural class distribution (recalibrating if weights are used), and ship the more complex model only if the gain is material and the explanations pass compliance review.