Lesson 8.4: Challenger models and documentation
Test a challenger against a champion with a paired comparison and power calculation, choose on more than AUC, and document and govern the model.
By the end of this lesson you will be able to set up a champion-challenger test, work out how much data a fair comparison needs, judge a challenger on a set of criteria beyond a single accuracy figure, and write the documentation that lets someone else understand, rebuild and challenge a model. You will calculate the number of bad loans needed to detect a given improvement in AUC, the number of loans per arm needed to detect a difference in bad rates in a live test, a weighted score for choosing between two models, and the content of a model development document, an inventory entry and a change log. You should have read Lessons 6.3, 8.1 and 8.3, which compared a boosted model with the scorecard, set out validation and covered monitoring. The arithmetic is standard errors, squares and a few multiplications, and the examples continue the scorecard of Modules 6 to 8.
Every lender that uses a credit model faces two long-run questions. Is a better model available? And could anyone, including the people who built this one, explain tomorrow what the model is, why it was built that way and how it has been changed? The first is answered by running challengers against the current model. The second by documentation and governance. Both are dull work done well, and neglecting either has ended careers and, in some well-known failures, banks.
Champion and challenger
The model in production is the champion. A new candidate is the challenger. The champion-challenger approach is simple: run both on the same data, compare them honestly, and promote the challenger only if it is clearly better by criteria agreed in advance. There are three levels of test, in increasing cost and realism.
Level · How it works · Strengths · WeaknessesOffline · Score a historical holdout with both models and compare · Cheap, fast, no customer impact · Cannot capture changes in behaviour caused by a new policy. Limited by sample size
Shadow · Both models score live applications. Only the champion makes decisions. The challenger's scores are recorded · Tests the challenger on the live population and data, with no risk · Only shows how the challenger would have ranked, and outcomes still take a year. No data on applicants the champion rejected
Live split · A share of applicants, say 10 per cent, is decided by the challenger · Measures real outcomes including the effect of different decisions · Needs large volumes and time, and exposes the lender to any weakness in the challenger
Most lenders start offline, move to shadow for promising challengers and use a live split only for major changes, with limits on the share of volume and the credit exposure.
The offline comparison
Lesson 8.1 gave the offline comparison of the scorecard and the boosted model on the 3,000-loan holdout, with 313 bad loans.
Scorecard (champion) AUC: 0.692.
Boosted model (challenger) AUC: 0.709.
Difference: 0.017. Standard error of the difference by paired bootstrap: 0.0081. The 95 per cent range runs from −0.0005 to +0.033.
The challenger looks better, and the evidence is only on the edge of conclusive. How much data would it take to settle the question?
How much data does a fair comparison need?
The standard error of the AUC difference shrinks with the square root of the number of bad loans. Quadruple the bad loans, and the standard error halves. We can turn that into a sample size for a given improvement we want to be able to detect.
To detect a true difference of size d with a test at the 5 per cent level (two-sided) and 80 per cent power, which means an 80 per cent chance of detecting the difference if it is real, the standard error of the difference must be no larger than d ÷ (1.96 + 0.84) = d ÷ 2.80. The standard error at our sample of 313 bad loans is 0.0081. Because standard error scales as one over the square root of the number of bad loans, the number needed is:
> Bad loans needed = current bad loans × (current standard error × 2.80 ÷ d)²
For the difference we have seen, d = 0.017: (0.0081 × 2.80 ÷ 0.017)² = (0.0227 ÷ 0.017)² = 1.78, so we need about 313 × 1.78 = 557 bad loans, roughly 78 per cent more than we have. For smaller differences the requirement grows quickly.
True AUC difference to detect · Bad loans needed (80% power)0.020 · about 403
0.017 · about 557
0.010 · about 1,610
0.005 · about 6,440
Predict first: a challenger improves the AUC by only 0.005, a small but possibly useful gain. A lender has 1,000 bad loans in its test data. Can it reliably tell whether that challenger is better? Decide before reading on.
No. Detecting a difference of 0.005 needs about 6,440 bad loans, more than six times as many. With 1,000 bad loans, the standard error of the difference is about 0.0081 × √(313 ÷ 1,000) = 0.0045, so a true difference of 0.005 is about one standard error and would often be missed or would show up by chance. The lender should not claim a win or a loss on such a sample, and it would be honest to say the data cannot tell the models apart at that level.
The live split: why it takes so long
A live test compares real outcomes, such as the bad rate among approved applicants under each model. The question is the same: how many loans does it take to tell two bad rates apart?
For two groups with bad rates p₁ and p₂, a test at the 5 per cent level with 80 per cent power needs, in each group:
> n per group = (1.96 + 0.84)² × [ p₁(1 − p₁) + p₂(1 − p₂) ] ÷ (p₁ − p₂)²
Suppose the champion's bad rate among approved loans is 7.0 per cent and the challenger's is expected to be 6.5 per cent, an improvement of half a point. Then:
p₁(1 − p₁) = 0.07 × 0.93 = 0.0651 and p₂(1 − p₂) = 0.065 × 0.935 = 0.0608.
Numerator: 7.84 × (0.0651 + 0.0608) = 7.84 × 0.1259 = 0.987.
Denominator: 0.005² = 0.000025.
n = 0.987 ÷ 0.000025 = about 39,500 approved loans in each group.
That is a large number. For a bigger improvement the requirement drops fast.
Bad rates compared · Difference · Approved loans needed in each group7.0% against 6.5% · 0.5 points · about 39,500
7.0% against 6.0% · 1.0 point · about 9,500
7.0% against 5.0% · 2.0 points · about 2,200
Consider what this means for a lender that approves 20,000 loans a year and sends 10 per cent, 2,000 loans, to the challenger. At a 2-point improvement it would detect a winner in about a year, and at a half-point improvement it would never know. A realistic improvement of a good challenger over a good champion is often under a point. So lenders use live tests for checking that nothing has gone wrong (is the challenger's approval rate and early delinquency sane?) and for strategy tests that are expected to have large effects, and they rely on offline tests and leading indicators for fine comparisons.
Choosing between models: more than accuracy
Even if the challenger wins on accuracy, the choice is not automatic. A credit model has to be explained, monitored, run and defended, and these have costs. A sensible way to choose is the weighted decision matrix of Lesson 2 of the Decision Making track: set the criteria and weights first, then score each model.
An illustration for the scorecard (champion) and the boosted model (challenger), with scores from 1 to 10 that are judgements of a hypothetical review committee:
Criterion · Weight · Champion (scorecard) · Challenger (boosted)Ranking power (AUC, KS) · 30 · 7 · 8
Calibration quality · 15 · 8 · 7
Stability over time · 15 · 8 · 6
Explainability and reason codes · 20 · 9 · 5
Cost and operational simplicity · 10 · 9 · 5
Fairness testing and governance · 10 · 8 · 6
Weighted score · 100 · 8.00 · 6.45
The calculations: champion = 0.30 × 7 + 0.15 × 8 + 0.15 × 8 + 0.20 × 9 + 0.10 × 9 + 0.10 × 8 = 2.10 + 1.20 + 1.20 + 1.80 + 0.90 + 0.80 = 8.00. Challenger = 0.30 × 8 + 0.15 × 7 + 0.15 × 6 + 0.20 × 5 + 0.10 × 5 + 0.10 × 6 = 2.40 + 1.05 + 0.90 + 1.00 + 0.50 + 0.60 = 6.45.
The challenger is better on ranking and worse on the rest, so on these weights it loses. The result is sensitive to the weights, as such matrices are: if ranking power carried a weight of 60 and explainability only 5, the challenger would catch up. The point of writing the weights in advance is that the debate happens about the weights and not after the scores are known. The sensible outcomes are to keep the champion, to add an interaction term to it (Lesson 6.3) and to keep the challenger running in shadow.
Documentation
A model without documentation exists only in the heads of its developers, and they leave. Good documentation lets a stranger understand why the model exists, rebuild it, test it, run it and change it, which is the basis of validation, audit and regulation. It should be written as the work is done, not afterwards.
The model development document
A development document has a standard structure. For the scorecard of Modules 5 to 8, each section would contain the following.
Section · What it contains · Example from this course1. Purpose and scope · The decision supported, the product, the population, the limits of use · Application scoring for personal loans up to ₹5 lakh. Not for corporate or secured lending
2. Data · Sources, time window, definitions of good and bad, exclusions, sample sizes, quality checks · 10,000 loans, 1,000 bad (10.0 per cent). Bad defined as 90 days past due within 12 months. 7,000 development and 3,000 holdout
3. Methodology · Binning, weight of evidence, selection, model form, scaling · Fine and coarse classing, WoE, IV above 0.02, logistic regression, PDO 20 at 600 for 30 to 1
4. Variables · List of characteristics, bins, WoE, IV, coefficients and signs, correlations · Five characteristics. Utilisation and enquiries correlated at 0.63
5. Performance · Results on development and holdout, with ranges · Holdout AUC 0.692 (95 per cent range 0.66 to 0.73), KS 0.285, Gini 0.388
6. Calibration · Predicted against observed, test results, recalibration · Hosmer-Lemeshow 14.5 against a critical value of 15.5. Observed 313 against 295 expected
7. Validation results · Findings of independent review and responses · Five findings, three medium. Conditions of approval
8. Assumptions and limitations · What the model assumes and where it should not be used · Additive form. 313 bad loans in the holdout. Synthetic data
9. Implementation · Scorecard table, system, testing, reconciliation · Points table of Lesson 6.2. Production scores matched development on all test cases
10. Monitoring plan · Metrics, thresholds, frequency, owners, escalation · PSI, CSI, observed over predicted, AUC, approval rate. Thresholds of Lesson 8.3
11. Change log · Dated list of changes, with reasons and approvals · See below
Quality tests for documentation. Can a competent analyst, with the document and the data, reproduce the model and its performance figures? Can a reader find the definition of bad, the bin edges and the coefficients without asking anyone? Does it state what the model should not be used for? Does it record the weaknesses honestly? A document that only lists strengths is not credible.
The model inventory
Large lenders keep a register of every model in use: the model inventory. An entry looks like this.
Field · Entry for the scorecardModel name and ID · Personal loan application scorecard, PL-APP-03
Owner · Head of retail credit analytics
Developer and validator · Analytics team (development), model risk team (validation)
Purpose and use · Approve, refer or decline applications for unsecured personal loans
Materiality tier · Tier 1 (high): drives approval of the main retail book
Portfolio covered · ₹4,000 crore of exposure
Version and date · v1.2, in production since 1 October
Last validation and next due · Validated in September, next due in 12 months
Open findings · Findings 1, 2 and 5, due within six months
Monitoring · Monthly pack. Latest status: PSI red, calibration green
Dependencies · Credit bureau feed, application form fields, rules engine
The tier reflects materiality. A model that decides a large part of the loan book is Tier 1 and receives the most frequent validation, the most senior approval and the strictest change control. A small, low-impact model is Tier 3 and gets lighter treatment. A typical tiering considers the exposure affected, how automated the decisions are and the consequence of error.
Version control and change management
Models change. Each change should be recorded, classified and approved. A useful classification is:
Minor change. A tweak with negligible effect, such as a typo or a data-source rename. Logged, approved by the model owner.
Recalibration. Adjusting levels but not the ranking, as in Lesson 7.5. Validated lightly, approved by the model risk committee.
Redevelopment. New variables, new bins or a new model form. Treated as a new model, fully validated and approved before use.
Retirement. The model is withdrawn when it is no longer used or is replaced.
A change log entry has a date, a version number, a description, the reason, the evidence (such as the test results), the approver and the effective date.
> Change log, PL-APP-03. v1.0, 12 March: initial release. v1.1, 20 June: recalibrated, log-odds shift of +0.40 after back-test (Hosmer-Lemeshow 56.6), approved by Model Risk Committee on 18 June. v1.2, 1 October: cut-off moved from 570 to 580 after profit review (Lesson 7.4 sensitivity), approved by Credit Policy Committee.
Reproducibility
The best documentation is backed by an audit trail that lets the whole build be re-run. That means keeping the code under version control, recording the exact data snapshot, the random seeds and the software versions, and saving the outputs. A small script can write a "model card" with these details whenever a model is built.
python
import hashlib
import json
import platform
import sys
from datetime import date
import numpy as np
import pandas as pd
import sklearn
def filehash(path):
h = hashlib.sha256()
with open(path, "rb") as f:
for chunk in iter(lambda: f.read(1 << 20), b""):
h.update(chunk)
return h.hexdigest()[:16]
def buildmodelcard(modelid, version, datapath, seed, metrics, coefficients, thresholds):
return {
"modelid": modelid,
"version": version,
"builton": str(date.today()),
"datafile": datapath,
"datasha256prefix": filehash(datapath),
"randomseed": seed,
"python": sys.version.split()[0],
"platform": platform.platform(),
"pandas": pd.version,
"numpy": np.version,
"scikitlearn": sklearn.version,
"performance": metrics, # for example {"holdoutauc": 0.692, "ks": 0.285}
"coefficients": coefficients,
"monitoringthresholds": thresholds,
}
card = buildmodelcard(
"PL-APP-03", "1.2", "development.csv", 20261113,
{"holdoutauc": 0.692, "holdoutks": 0.285, "gini": 0.388},
{"intercept": 2.218, "util": 0.532, "enq": 0.696, "home": 0.955, "income": 0.967, "history": 0.987},
{"psiamber": 0.10, "psired": 0.25, "calibrationband": [0.85, 1.15]},
)
with open("modelcardPL-APP-03v1.2.json", "w") as f:
json.dump(card, f, indent=2)
A file like this, stored with the model, answers the question "exactly what was this built from?" years later.
Machine learning models need more
For a boosted or other flexible model, the documentation adds the hyperparameters (number and depth of trees, learning rate), the method of tuning, the results of explainability analysis, the monotonic constraints, the tests for fairness and the plan for retraining. Because such models are harder to explain, the burden of documentation is higher, not lower.
Governance: who decides
Behind the documents there is a structure of people and committees. A common arrangement is called three lines of defence.
1. First line: the business and model developers and owners, who build and use the model and are responsible for its day-to-day performance.
2. Second line: independent model validation and risk management, who challenge the first line and set the standards.
3. Third line: internal audit, who check that the whole process works.
A model risk committee approves new models, recalibrations and exceptions, reviews monitoring reports and tracks open findings. Supervisors in many countries issue guidance on model risk management, and lenders are expected to show that their practice meets it. The details differ by country and change, so a practitioner should read the guidance that applies to the lender's own regulator.
A worked example: promoting a challenger
The risk committee reviews the boosted model as a challenger for the scorecard.
1. Offline evidence. AUC 0.709 against 0.692, a difference of 0.017 with a paired range of −0.0005 to +0.033. The scorecard with an interaction term gets 0.707. At an 80 per cent approval rate the bad rates among approved are 7.54 and 7.46 per cent.
2. Power. Detecting a gain of 0.017 needs about 557 bad loans against 313, so more data are required for a firm conclusion. Detecting a half-point bad-rate gap in a live test would need about 39,500 approved loans per arm, which the lender cannot supply in a year.
3. Weighted criteria. Champion 8.00, challenger 6.45 on the weights agreed beforehand.
4. Governance. The boosted model would need a full redevelopment validation, new documentation of its tuning and explainability, a fairness analysis and a higher operating cost.
5. Decision. Keep the scorecard as champion. Add the utilisation-history interaction to it as a redevelopment (version 2.0), expected to deliver most of the gain. Run the boosted model in shadow mode for six months to see whether its edge holds in live data. Re-examine when 600 bad loans are available in the test sample.
6. Record. The decision, the evidence, the weights and the reasoning go into the model inventory and the committee minutes.
The decision was not "boosted models are bad". It was that, on this evidence, the cost and risk of the change were not justified, and that a cheaper change captured most of the benefit.
Common mistakes
Declaring a winner on a small difference. Check the sample size and the paired standard error.
Planning a live test without a power calculation. It may never reach a conclusion.
Choosing on accuracy alone. Explainability, stability, cost and fairness matter.
Setting the weights after seeing the scores. Fix them in advance.
Writing documentation afterwards. Details are forgotten and gaps are filled with guesses.
Documenting only strengths. Record assumptions and limitations honestly.
Having no inventory or tiering. Nobody knows what models exist or which matter most.
Letting changes go unrecorded. An unlogged change is an unvalidated model.
Key takeaways
A champion-challenger process compares a new model with the production one at three levels: offline, shadow and live split.
Detecting an AUC difference needs bad loans in proportion to the inverse square of the difference. With a paired standard error of 0.0081 at 313 bad loans, a gain of 0.017 needs about 557, 0.010 needs about 1,610 and 0.005 needs about 6,440.
A live test of bad rates needs about 39,500 approved loans per arm for a half-point gap (7.0 against 6.5 per cent), 9,500 for one point and 2,200 for two points.
Choose between models with weights written in advance. In the example the champion scored 8.00 and the challenger 6.45, because the challenger's ranking gain was outweighed by explainability, stability and cost.
A development document covers purpose, data, method, variables, performance, calibration, validation, limitations, implementation, monitoring and a change log.
An inventory with materiality tiers, version control and a classified change process keeps every model known and controlled.
Record the data snapshot, seeds and versions so that any build can be reproduced.
Check yourself
1. A challenger's AUC gain is expected to be 0.010. The paired standard error at 400 bad loans is 0.0072. How many bad loans are needed for 80 per cent power?
400 × (0.0072 × 2.80 ÷ 0.010)² = 400 × (2.016)² = 400 × 4.06 = about 1,626.
2. Why does a live test of a half-point improvement in bad rate need so many loans?
The bad rate is a small proportion with a lot of random variation, and the number of loans needed rises with the inverse square of the gap, so small gaps need very large samples.
3. Name three criteria other than accuracy for choosing between a scorecard and a boosted model.
For example explainability and reason codes, stability over time, cost and operational simplicity, fairness testing and governance burden.
4. What is the difference between a recalibration and a redevelopment for governance?
A recalibration adjusts levels but not the ranking and needs lighter review. A redevelopment changes variables, bins or form, is treated as a new model and needs full validation.
5. Why record the data snapshot hash and random seed with a model?
To make the build reproducible: someone can later re-run the same code on the same data and obtain the same model, which supports validation and audit.
Try this
Compare a challenger and document a model. Set aside fifty to sixty minutes.
1. Take two models scored on the same holdout, such as the scorecard and a boosted model from Module 6, or invent two sets of scores. Compute both AUCs and a paired bootstrap standard error for the difference.
2. Compute the bad loans needed to detect the difference you found and a difference half as large, using the formula. Check with the simulator.
3. Compute the loans per arm needed in a live test for a gap in bad rate of 1 point on a bad rate you choose. Write what that would mean for your lender's volume.
4. Write six criteria and weights, in advance, for choosing between the two models. Score both models and compute the weighted totals. Test the sensitivity by changing two weights.
5. Draft the development document headings for your model with one or two lines in each section, and mark the sections where you cannot yet answer.
6. Write an inventory entry and a change log entry for your model. Choose a tier and justify it in one sentence.
7. Write a five-sentence recommendation to a model risk committee: whether to promote the challenger, the evidence on accuracy and power, the other criteria, the next step (for example shadow mode) and the conditions for revisiting.
A good result is a paired comparison with a power calculation, a weighted choice with written weights, a documentation outline with gaps marked and a recommendation that fits the evidence. With Modules 5 to 8 you can now build a scorecard, measure it, monitor it and govern it. Module 9 turns to the early warning signals that show stress in a portfolio before defaults arrive.
Tags: Credit Risk Analytics Challenger Models Model Documentation Model Governance Sample Size