Skip to content
ML Systems in Production18 min read

Why Models Decay in Production

Free lessoninteractive

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#

KindWhat changesExample
Covariate driftThe input distribution, P(X)A new marketing campaign brings in much younger applicants
Concept driftThe 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.

Loading simulation…

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).

PSI = Σᵢ (aᵢ − eᵢ) · ln(aᵢ / eᵢ)
eᵢ
the share of bin i in the training data (expected)
aᵢ
the share of bin i in production (actual)
Population Stability Index
python
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))
Output
0.228

What to monitor#

LayerSignalAvailable
InputsPSI per feature, missing values, out-of-range valuesImmediately
OutputsScore distribution, approval rateImmediately
PerformanceAUC, precision, recall against real labelsWhen labels arrive — possibly months later
BusinessDefaults, revenue, complaintsSlowest, 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.

Checkpoint

Every feature distribution is stable (PSI < 0.05), but precision drops sharply once the last three months of labels arrive. What most likely happened?

Checkpoint

Labels for your model only arrive 90 days after each prediction. What should you monitor daily?