Model drift
A Socratic walk-through of model drift — reasoned out one step at a time, not lectured.
The question we started with
THE QUESTION #Why does a model that nobody changed get worse over time?
A model is deployed. Its weights are frozen; the file's checksum is the same today as it was eighteen months ago. Nobody has retrained it, and the code around it has been stable. Its accuracy has fallen by nine points.
Something got worse while nothing changed. That sentence cannot be true as stated, so one of its two halves must be wrong — and the interesting question is which. What, exactly, was measured as "accuracy", and against what?
Reasoning it through
REASONING #Here is the step that unlocks it. A model is not a description of the world; it is a description of a sample of the world, taken at a particular moment. Accuracy is not a property the model carries around with it — it is a property of the pairing between the model and the data it is currently being shown. Freeze one side of that pair and the other side keeps moving.
So the model is not degrading. The relationship is. Which raises the useful question: what can move on the data side?
Three things, and they are worth separating because they call for different responses.
The inputs can change while the underlying rule holds. Your fraud model was fitted when most transactions came from desktop browsers, and now most come from phones; the mix of inputs has shifted, and the model is being asked more questions from regions of the space where it saw little training data. This is covariate shift.
The base rates can change. A model that classified one call in twenty as an escalation now faces a population where one in five is, perhaps because a product change altered who calls. Its calibrated thresholds were tuned against the old proportion, so the same scores now imply something different. This is prior shift.
Or — and this is the deepest one — the relationship between inputs and outcomes can itself change. The word "cloud" once implied weather in your support tickets and now implies hosting. The same input now genuinely warrants a different answer. That is concept drift, and no amount of reweighting old data will fix it, because the old labels have become wrong.
Now, before reaching for any of these, I would ask a deflating question. Are you sure the world changed, and not your pipeline? In practice, the most common cause of a sudden accuracy drop is not the slow drift of human behaviour at all. It is that an upstream team changed a units field from miles to kilometres, or started sending an empty string where they used to send a null, or renamed a category, or replaced the service that generated one of your features. The model then receives inputs that mean something different from what its training assumed — and this arrives as a step change overnight, not as a gentle decline. Distinguishing the two by their shape over time is the fastest diagnostic available.
And there is one more source, the one that makes drift a story about path dependence rather than weather. What if the model's own outputs change the data it will later be trained on?
The analogy
THE ANALOGY #Think of a map of a coastline, surveyed accurately and printed. The map does not deteriorate — the paper is fine, the ink is fine, every line is exactly where the surveyor put it. But sandbanks move, a channel silts up, a new jetty is built. Twenty years on, a navigator using it runs aground, and the fault lies neither in the map nor in the sailor. It lies in the assumption that a good description of a place stays good, when what was described is not the sort of thing that holds still.
the coastline is indifferent to the map, whereas a deployed model reshapes the very population it is measuring — ships steer where the chart says it is safe, and the traffic patterns the next survey observes have been created in part by the last chart.
Clarifying the model
THE MODEL #That last point deserves its own treatment, because it is the mechanism people miss. A model that acts on the world creates a feedback loop, and the loop biases the data.
A credit model approves some applicants and rejects others. Which applicants generate repayment outcomes you can later learn from? Only the approved. So the next training set is a sample selected by the current model's own beliefs, and the regions where it was wrongly pessimistic never get corrected, because it never sees the evidence. The same shape appears in recommendation, where the model determines what users are shown and therefore what they can click, and in fraud, where the adversary is deliberately searching for exactly the inputs your model handles badly.
Two misconceptions to correct gently. First, drift detected in the inputs is not the same as harm. Input distributions shift constantly for benign reasons, and a model can be entirely robust to a shift that a statistical test flags loudly. If you alert on input drift alone you will train your team to ignore alerts — so drift monitoring is a leading indicator whose value is that it arrives before the labels do, not a verdict.
Second, retraining is not automatically the remedy, and running it on a schedule can make things worse. If the recent data is contaminated by the feedback loop above, or if the labels are delayed and therefore mostly missing for the newest period, an automatic retrain will faithfully learn the bias. The honest practices are duller: keep a slice of randomly-handled traffic so you have unbiased outcomes to learn from, hold a stable reference set for comparison, watch the shape of the change to separate a pipeline break from real drift, and treat retraining as a change that must pass evaluation like any other.
A picture of it
THE PICTURE #How to readenter at the parallelogram with live traffic and take the first diamond, which separates the boring cause from the interesting one — an overnight step points at your own pipeline, not at the world. The middle diamond sorts the three genuine kinds of drift, all of which land in the stored reference history. The final diamond is where most teams go wrong: retraining without unbiased outcomes lands on the flagged node. Follow the arrow from the model's decisions back to the top — that back-edge is the loop, and it is why the data you will train on next was partly authored by the model you are trying to correct.
What became clearer
WHAT CLEARED #Nothing about the model got worse; the world it was fitted to moved out from under it, and in the cases that matter most the model helped move it. That reframing changes what you build: not a better model, but a standing comparison between the data of today and the data the model was fitted to, plus a deliberately preserved channel of unbiased outcomes so that tomorrow's correction is not made from evidence the model itself selected.
Where to go next
ONWARD #- Detecting shift in practice — population stability indices, two-sample tests, and why they alarm more often than they should.
- Training-serving skew: how feature computation differs between the training pipeline and the live one, and why it looks exactly like drift.
- Exploration policies that keep a small randomly-handled slice of traffic, and the ethical questions that raises in lending and medicine.
Key terms
TERMS #| Term | What it means |
|---|---|
| Covariate shift | the distribution of inputs changes while the relationship between input and outcome holds. |
| Prior shift | the base rate of the outcomes changes, altering what a given score implies. |
| Concept drift | the relationship between input and outcome itself changes, so previously correct labels become wrong. |
| Feedback loop | the model's own decisions determine which outcomes are later observed, biasing future training data. |
| Reference set | a fixed sample of the original data kept for comparison, so that today's inputs can be measured against what the model was actually fitted to. |
Every term the collection defines is gathered in the glossary.