learn-ml-epistemology-with-phoebe / Leader session 2 of 6
Learn ML Epistemology with Phoebe · Leader session 2 of 6

Equally good, differently wrong

Run the Thornbury pipeline twenty times. Same data, same architecture, same training schedule. The only thing that differs is the random seed, which sets the initial weights and the order the examples arrive in. On held-out data the twenty models are close enough to be treated as one model, and in practice they are: somebody picks one, the review sees one number, the paperwork says the model was validated. Once the wards are reorganised those twenty pull apart by several times as much. They were never the same model. Nothing anyone looked at could have told them apart.

🔴 Hardest Whoever approves the deployment Anyone who signs off on a retrain 45 min
0-3 · Welcome 3-20 · Twenty models, one pipeline 20-40 · Build-along: which model did we approve 40-45 · Q&A
Part 0

Where session 1 left the argument

Session 1 ended with a held-out score of 0.949 that fell to 0.765 when an arrangement in the world expired, and with the observation that no amount of extra held-out data would have warned anybody. Tonight goes one level further down. It turns out the pipeline does not even return one model. It returns a family of models that agree almost exactly on the data you looked at and disagree substantially on the data you did not, and the choice between them is made by an arbitrary number nobody records. Session 3 is what happens to a measurement once people start selecting against it. The example is still Thornbury, the hospital group predicting which patients deteriorate within 24 hours.

Live = presented in the 45 minutes Self-study = the full depth, after class 🔍 Every diagram zooms

★ What you walk out with tonight. A working definition of underspecification you can use in a review, taken from the paper that named it. The Thornbury measurement: twenty seeds, a held-out spread of 0.019 and a shifted spread of 0.051 on the first draw, and a shifted spread larger than the held-out spread in all five draws. And the governance sentence that follows from it: "we validated the model" does not say which model was deployed, so a retrain with a new seed is a new model carrying the old paperwork.

LiveWhat underspecification actually says5 min▶

The term comes from D'Amour et al. (2020), "Underspecification Presents Challenges for Credibility in Modern Machine Learning". Their definition is worth reading slowly, because every word in it is load-bearing: "An ML pipeline is underspecified when it can return many predictors with equivalently strong held-out performance in the training domain." Not "a badly built pipeline". Not "a pipeline with a bug". A pipeline that does its job, returns a strong model, and could just as easily have returned a different strong model.

The consequence they state is the part that belongs in a review: "Predictors returned by underspecified pipelines are often treated as equivalent based on their training domain performance, but we show here that such predictors can behave very differently in deployment domains." Treated as equivalent is the phrase to sit with. Nobody decides to treat them as equivalent; it happens by default, because the only evidence on the table says they are.

This is not a quirk of one field. D'Amour et al. ran stress tests across computer vision, medical imaging, natural language processing, clinical risk prediction from electronic health records, and medical genomics. The paper carries forty authors, which is itself a signal of how much ground they had to cover to establish that the pattern was general rather than local.

Real world

At Thornbury the pipeline is fixed: 4,000 training patients, the same three inputs, the same small network, the same number of passes over the data. Run it twenty times and you get twenty models whose held-out accuracies sit inside a band 0.019 wide. Any one of them would pass the same review with the same slide.

Self-studyThe words used tonight4 min▶
  • Pipeline. Everything that turns data into a fitted model: the features, the architecture, the training schedule, the stopping rule. Fixed here, deliberately.
  • Seed. The arbitrary number that sets the initial weights and the order examples arrive in. The only thing that varies across the twenty models tonight.
  • Underspecification. A pipeline that can return many models with equally strong held-out performance which behave differently once deployed.
  • Spread. The distance between the best and worst of the twenty on one set. Held-out spread and shifted spread are measured on different sets, from the same twenty models.
  • Stress test. Scoring the family on data chosen to break a specific assumption, rather than on more data of the same kind. It separates models that a held-out set cannot.
  • Behavioural reliance. How much a model's answers move when one named feature is changed and nothing else is. Measured here by flipping the ward on every patient and counting changed predictions.
  • Data draw. One fresh sample of patients from the same world. Repeating a finding across draws is how you learn whether the finding is about the world or about the sample. Session 6 returns to this.
Part 1 · covers the twenty models

Indistinguishable where you looked

10 min live

The cleanest way to see underspecification is to hold everything constant except the one thing nobody writes down. Twenty runs, one pipeline, twenty seeds. Then score all twenty twice: once on held-out patients from the collection year, once on patients from the year the wards were reorganised.

Twenty models. One pipeline. The seed is the only difference. Held out, collection year spread 0.019 mean accuracy 0.949 Shifted, deployment year spread 0.051, which is 2.7 times wider mean accuracy 0.765 0.75 0.80 0.85 0.90 0.95 Positions inside each band are illustrative. The band widths are the measured spreads. Data draw 1 of 5. Every one of the twenty would have been approved on the number to the right.
🔍 Click to zoom - a tight clump where the score was taken, a wide one where it was spent.
LiveThe seed is not a hyperparameter anybody argues about4 min▶

Teams argue about architecture, features and regularisation, and those arguments leave a trail: a decision log, a slide, a comparison table. The seed leaves nothing. It is the number a library picks when nobody supplies one, and it is not usually in the model card, the review pack or the change request. The twenty models tonight differ by exactly that and nothing else.

Which makes the finding awkward to file. It is not a data problem, because the data are identical. It is not an architecture problem, because the architecture is identical. It is a property of the pipeline as a whole: the training data plus the design constrain the model a great deal, and then they stop constraining it, and something arbitrary finishes the job.

LiveHow differently they behave, measured directly4 min▶

Accuracy is a summary, and two models can reach the same summary by different routes. A blunter instrument is to change one input and watch what happens. At Thornbury the test is to flip the ward on every patient, leave the two clinical signals alone, and count how many predictions change their answer.

Across the twenty seeds that number runs from 0.70 to 1.00. Some of these models change their mind about seven patients in ten when only the ward moves. Others change their mind about every single one. All of them scored about 0.949. If you had asked the review "how much does this model lean on the ward", the honest answer would have been "which of the twenty are you asking about", and nobody in the room would have had a way to tell.

Real world

A reliance of 1.00 and a reliance of 0.70 are different clinical objects. One of them changes its recommendation for every patient the moment a bed is reassigned. The other does so for most of them. Both are wearing the same accuracy figure, and the accuracy figure is what the approval was based on.

Self-studyWhy a tighter held-out band makes this worse, not better3 min▶

The instinct on seeing a held-out spread of 0.019 is relief: the pipeline is stable. On draw 4 the held-out spread is 0.003, which is tighter still, and it is the worst case in the whole table. The shifted spread there is 0.034, eleven times the held-out spread. The tighter the agreement where you looked, the more confidently the family will be treated as one model, and the less the agreement was telling you.

This is the same shape as session 1's point about buying a larger test set. Precision on the quantity you can measure is cheap and reassuring. It is not evidence about the quantity you care about, and when it is high it actively suppresses the question.

Part 2 · covers what holds and what does not

Five draws, one robust finding and one that is not

8 min live

One measurement is an anecdote. The bench was therefore repeated on five independent draws of patients from the same world, twenty models each. Two things come out of that table, and they have very different standing. Saying which is which out loud is most of the discipline being taught tonight.

Every row is a fresh draw of patients and a fresh set of twenty models. Draw Spread across 20 models, bars to scale Ratio corr(held, shifted) 1 held out 0.019 shifted 0.051 2.7x -0.89 2 held out 0.008 shifted 0.038 4.8x +0.03 3 held out 0.012 shifted 0.046 4.0x -0.87 4 held out 0.003 shifted 0.034 11.3x +0.09 5 held out 0.016 shifted 0.048 3.0x -0.75 Robust: the shifted bar is longer in five rows out of five, by 2.7 to 11.3 times. Not robust: the correlation column runs from -0.89 to +0.09 with no pattern. Held-out accuracy is close to uninformative about shifted accuracy, in either direction.
🔍 Click to zoom - one column repeats itself in every row and one column does not.
LiveThe finding that holds in five draws out of five4 min▶

In every draw the shifted spread is larger than the held-out spread, by between 2.7 and 11.3 times. Models that are indistinguishable where you looked are distinguishable where you did not. That sentence is the whole of underspecification stated as a measurement, and it is stable enough to build a policy on.

What it buys you in a review is a specific expectation. Whatever agreement the validation showed between candidate models, expect several times more disagreement once anything about the world changes. The held-out set is the setting in which the family looks most alike, by construction, because that is the set the pipeline was tuned against.

LiveThe finding that does not hold, and why it is being told to you anyway5 min▶

The correlation between a model's held-out accuracy and its shifted accuracy runs from -0.89 on draw 1 to +0.09 on draw 4. There is no pattern in that column. The honest reading is the flat one: held-out accuracy does not predict shifted accuracy, and it does not reliably anti-predict it either. It is close to uninformative about it.

The tempting sentence, and the one to refuse, is "the best model on the held-out set is the worst under shift". It is vivid, it sounds like wisdom, and one draw of this bench supported it beautifully before another draw destroyed it. Practitioner session 9 tells that story in full; tonight the point is only that the sentence is not available, and neither is its opposite.

What to do with a number you cannot use. The correlation column is not a failed measurement, it is a finding about how much a single measurement is worth. A leader who has seen this table asks a different question of any single-run result: was it repeated on fresh data, and did it come out the same way. Session 6 turns that into the question you ask before approving anything.

LiveThe governance consequence, in one sentence4 min▶

Here is the version for a board paper. "We validated the model" does not identify which model was deployed. The validation identifies the pipeline and a performance band. Inside that band sits a family of models with behavioural reliance on a single feature ranging from 0.70 to 1.00, and the member of the family that shipped was chosen by an unrecorded number.

The direct operational consequence is about retraining. A retrain on refreshed data with a new seed returns a different member of the family, and it will pass the same validation with a similar number, because that is what the band means. So the change is invisible to the control that is supposed to catch changes. The paperwork carries over; the behaviour does not have to.

None of this makes retraining wrong. It makes "unchanged performance" the wrong evidence that nothing changed. What would be evidence is the behavioural measure: does the new model lean on the same features by the same amount as the one it replaces.

Self-studyWhere the term came from and how far it reaches3 min▶

D'Amour et al. did not find this in one domain and generalise. They built stress tests in computer vision, medical imaging, natural language processing, clinical risk prediction from electronic health records, and medical genomics, and found the same shape in each: strong and equivalent held-out performance, divergent behaviour once the deployment conditions moved. Forty authors on one paper is what covering that much ground costs.

Cite it as D'Amour et al. A short author list invented for convenience will be wrong, and on a paper with this many contributors it is also unfair. Thornbury is a much smaller and fully controlled version of the same experiment, which is why every relationship in it can be checked against what the model actually learned.

Part 3 · build-along

Find out which model you approved

20 min build-along

No laptop. Take the model you brought from session 1's homework and establish, out loud, whether anybody in the room can identify the individual model in production as opposed to the pipeline that produced it. The answer is usually no, and the useful part is discovering exactly where the trail stops.

Ask for the seed. Literally: what random seed produced the model currently serving. If the answer is "it is in the code somewhere" or "we did not set one", write that down. It is not a failing, it is the normal state, and it is the fact the rest of the exercise depends on.

Ask how many candidates the pipeline produced. From session 1's homework you should have a number. Ask what separated the one that shipped from the runner-up, and whether anybody kept the runner-up.

Ask for the band, not the number. Instead of "what is the accuracy", ask what the best and worst of those candidates scored. The width of that band is your held-out spread. Expect several times more disagreement under any change in the world.

Name the feature you would flip. Pick the one input whose meaning depends on a current arrangement: a site code, a channel, a region, a supplier, a form version. That is your ward.

Ask for the reliance measure, and be ready for silence. If we changed only that feature on every record, what fraction of predictions would change. If nobody knows, you have found the measurement that would have distinguished the family members, and it has never been taken.

Write the retrain clause. One sentence for the model's documentation: a retrain is approved on unchanged performance plus an unchanged reliance measure on the named feature, not on performance alone. This is the sentence that stops a new model inheriting the old paperwork.

The one-sentence version to take into a meeting. "Our validation certifies the pipeline and a performance band; it does not identify the model in production, so before we retrain I want the reliance measure on [feature] for the old and the new one." A team that can produce those two numbers knows which model it has. A team that cannot has a band and a hope.

Check yourself

Three questions

Twenty Thornbury models differ only by their random seed. On draw 4 the held-out spread is 0.003, the tightest in the table. What does that tightness tell you?

Draw 4 has the tightest held-out agreement and the largest ratio in the table. Agreement on the set the pipeline was tuned against is the setting in which the family looks most alike, so a small held-out spread makes the family more likely to be treated as one model, not less likely to behave as many.

Across the five draws the correlation between held-out and shifted accuracy runs from -0.89 to +0.09. What is the defensible conclusion?

A single draw produced -0.89 and a memorable rule to go with it, and another draw returned +0.09 and removed it. The column has no pattern, which is a real finding about how little one run is worth. Option A is exactly the sentence that did not survive.

Your team proposes a routine retrain on refreshed data. Validation will be repeated and must clear the same accuracy bar. What is the gap in that control?

The validation certifies the pipeline and a band, and every member of the family sits inside the band by definition. Reliance on the named feature ran from 0.70 to 1.00 across seeds at identical accuracy, so the behavioural measure is the thing to compare before and after, not the score.

Homework

Before session 3

30 min

Find out how many times your team has scored a model against the same evaluation set. Not how many models were trained, which you asked last time, but how many times that one set has been looked at: thresholds tuned on it, variants compared on it, a decision revisited after a disappointing result. Ask for a rough count and whether the set has ever been retired and replaced. The answer is usually larger than anybody expects and nobody is in trouble for it. Session 3 measures what that count costs, and the answer is smaller than the folklore says.

Sources covered

What tonight maps to

✓ D'Amour et al. (2020), "Underspecification Presents Challenges for Credibility in Modern Machine Learning" The definition and the deployment consequence, both verbatim, and the five domains their stress tests cover. Forty authors, cited as D'Amour et al.
✓ Twenty seeds, one pipeline, measured Held-out spread 0.019 against shifted spread 0.051 on draw 1; mean held-out 0.949 and mean shifted 0.765.
✓ What is robust across five draws The shifted spread exceeds the held-out spread in five rows out of five, by 2.7 to 11.3 times.
✓ What is not robust, stated as such The correlation swings from -0.89 to +0.09. No claim that the best held-out model is the worst under shift.
✓ Behavioural reliance on the ward Flipping the ward on every patient changes 0.70 to 1.00 of predictions depending on the seed, at the same accuracy.
◐ The finding that did not survive one more draw Named in a clause tonight. Practitioner session 9 tells it in full, including how to test a claim before publishing it.
◐ What selecting on a set costs Session 3 measures it, against the field evidence that argues against alarm.
· Memorization, random labels and double descent Not covered by design. learn-deep-learning-with-phoebe session 05 owns how a network can fit noise and what the interpolation threshold means.
· Leak mechanics inside one validation Not covered by design. learn-model-risk-with-phoebe p3 owns target leakage as a validation finding.

Session 2 cheat sheet

The definitionA pipeline is underspecified when it can return many predictors with equivalently strong held-out performance.
Only the seed differsSame data, same architecture, same schedule. Twenty models, and the trail stops at a number nobody records.
0.019 against 0.051Draw 1: the shifted spread is 2.7 times the held-out spread. Across five draws, 2.7 to 11.3 times.
Robust in 5 of 5Indistinguishable where you looked, distinguishable where you did not. Build policy on this one.
Not robustcorr(held, shifted) runs -0.89 to +0.09. Held-out accuracy is close to uninformative about shifted accuracy.
Tighter is not saferThe tightest held-out spread, 0.003, sits with the largest ratio, 11.3 times.
Reliance 0.70 to 1.00Flip the ward, count changed predictions. Same score, very different clinical objects.
The governance line"We validated the model" does not say which model shipped. A new seed is a new model with the old paperwork.