Home / Machine Learning

Model and Data Drift

By Updated

Simulate the passage of time. Watch how a perfectly trained model degrades in production as the underlying data distribution slowly drifts away from the training baseline.

0
System Status

HEALTHY (Month 0)

Model accurately fits the current production data. No drift detected.
Production Environment
Live Data
Deployed Model
True Pattern
Production Timeline
0 Months

Deployed Model Error

Mean Squared Error against current live data. If this spikes, the model is failing. 0.000
Last Trained Month 0

Overview

Drift is a change in the data a deployed model receives, the outcomes it predicts, or the relationship between them. Monitoring can reveal changes that deserve investigation, but a shift alone does not prove model performance has fallen.

Three kinds of change

  • Covariate shift: the input distribution (P(X)) changes while the relationship between inputs and outcomes is assumed stable. For example, a customer base may become younger.
  • Label or prior shift: the outcome prevalence (P(Y)) changes, such as a higher rate of fraud. This can alter calibration and the best decision threshold.
  • Concept drift: the conditional relationship P(Y | X) changes. The same inputs now lead to different outcomes, perhaps because customer behavior or policy changed.

In practice, these changes can occur together. A model’s measured performance may also fall because of data-quality, software, or serving changes. Drift is a signal to investigate, not a diagnosis or automatic command to retrain.

See the relationship move

Select Concept Drift in the visualizer and use Simulate Time. The underlying relationship changes over time while the deployed model stays fixed, so its error grows. Use Retrain model to compare how fitting to newer data changes the result. The demonstration is deliberately simple: in a real system, retraining helps only if recent labels are available, representative, and reliable.

Monitor predictions and outcomes

Log the model version, prediction time, inputs allowed by policy, prediction, and eventual outcome. Compare input and score distributions with a reference period to spot changes early; these checks need no labels, but cannot tell whether accuracy changed. When labels arrive, monitor the task metric and confusion matrix over time, including important subgroups.

Define investigation thresholds from the system’s normal variation and business risk rather than treating one statistic as a universal alarm. Check data collection, feature pipelines, class prevalence, calibration, and performance before retraining. Record the training window and evaluation results so a new model can be compared with the deployed one and rolled back if needed.

Common mistakes with Model and Data Drift

  • Calling every input shift a failure: covariates can move while performance remains adequate.
  • Waiting only for labels: outcome labels may be delayed, so input monitoring can provide an early warning.
  • Retraining automatically on a drift alert: noisy or unrepresentative recent data can make a model worse.
  • Checking only aggregate performance: subgroup changes can disappear in an overall average.

Sources and next steps

Predict, then reveal

About to run: set Time (Months) to its maximum (24). Before it does — what happens to the readout?

Committing to an answer first is the point — the reveal runs the experiment on the visualisation above and reads the real value back, so nothing here is scripted.

Recall check

0 of 3

Say the answer out loud before you reveal it — recalling it is what makes it stick, and rereading it is not.

  1. What does this module say about “Three kinds of change”?

  2. What does this module say about “See the relationship move”?

  3. What does this module say about “Sources and next steps”?

Cheat sheet

Model and Data Drift

Fast-forward through production and watch a well-trained model decay as incoming data drifts away from what it learned.

MACHINE LEARNING · vizlearn.in/machine_learning/model_and_data_drift.html

About the author

Ashish Jangra builds and maintains VizLearn. Every module here is written and the visualisation behind it hand-built, so the numbers in a readout come from the same code that draws the picture. Corrections are genuinely welcome and get priority over everything else — if a page states something wrong, or an animation misrepresents what the algorithm does, get in touch.