Why Models Decay in Production
A model is trained on the past and used on the future. When the world shifts, its accuracy falls — often without a single error in the logs.
What you will be able to do
- Explain why a model that never changes can still get worse
- Tell covariate drift from concept drift
- Choose what to monitor when labels arrive late
A credit-scoring model launches with an AUC of 0.86 on the test set. Six months later no code has changed, no server has gone down, there are no errors in the logs — and the default rate on the loans it approves has doubled. The model is not broken. The world changed.
Two kinds of shift#
| Kind | What changes | Example |
|---|---|---|
| Covariate drift | The input distribution, P(X) | A new marketing campaign brings in much younger applicants |
| Concept drift | The input-to-target relationship, P(y | X) | Interest rates rise; the same applicant profile now defaults more often |
Covariate drift can be detected at once, because you see the inputs every day. Concept drift is far slipperier: the inputs can look exactly the same, and the only evidence is the labels — which, for a loan, may not be known for months.
Measuring shift: PSI#
The most common industry measure of covariate drift on a single feature is the Population Stability Index. Bin the feature, then compare each bin's share at training time (e) with its share now (a).
- eᵢ
- the share of bin i in the training data (expected)
- aᵢ
- the share of bin i in production (actual)
import numpy as np expected = np.array([0.25, 0.25, 0.25, 0.25]) # at training timeactual = np.array([0.10, 0.20, 0.30, 0.40]) # this month psi = np.sum((actual - expected) * np.log(actual / expected))print(round(psi, 3))0.228What to monitor#
| Layer | Signal | Available |
|---|---|---|
| Inputs | PSI per feature, missing values, out-of-range values | Immediately |
| Outputs | Score distribution, approval rate | Immediately |
| Performance | AUC, precision, recall against real labels | When labels arrive — possibly months later |
| Business | Defaults, revenue, complaints | Slowest, and most important |
Because labels are often late, input and output signals are your early warning. They do not prove the model has degraded — they tell you when to start looking, long before the damage reaches a financial report.
Every feature distribution is stable (PSI < 0.05), but precision drops sharply once the last three months of labels arrive. What most likely happened?
Labels for your model only arrive 90 days after each prediction. What should you monitor daily?