liveBook · Manning

Drift

As explained in Machine Learning System Design

Model drift is a change over time in a machine learning model’s behavior or performance caused by changes in its inputs, relationships, or operating environment.

A purchase prediction model can work well for its original users but struggle after a new advertising campaign brings in a different audience. The service and its data pipeline may still be working correctly; what has changed is how well the model fits its operating environment. section 14.4 section 14.4.1

Model drift, also called model decay or staleness, is degradation in model performance over time. It can arise from changes in inputs or in the relationships the model learned. Some models remain useful for years; others need frequent retraining. section 14.4

Distinguish two kinds of change when investigating drift:

  • Data drift changes the inputs the model encounters, such as a shift toward a new geographic or demographic segment. The model may still work well on data resembling its training set. section 14.4.1
  • Concept drift changes the relationship between inputs and expected outcomes. It can occur even when individual input distributions look much the same. section 14.4 section 14.6
Figure 14.7 With a concept drift, identical inputs may lead to new expected outputs; with a data drift, incoming data changes while the model is not adapted.
figure

The comparison shows how changed inputs differ from changed expected outputs for the same inputs. section 14.4

Drift can follow a crisis or legislation change, expansion into a new market, or changes in user behavior. A model can also influence its own environment: recommendations based on popularity may make already-popular items even more popular. section 14.4

Monitor for both early signals and actual performance changes:

  • Compare quality metrics with historical baselines, and check performance by segment when ground truth is available. A healthy overall score can hide problems in a particular population. section 14.4 section 14.4.3
  • When labels arrive late, use input and prediction drift as proxy signals. Track feature or output statistics, statistical tests, or distance metrics; a proxy change calls for investigation rather than proving a quality decline. section 14.4.3

Before pressing the retrain button, investigate and choose a response:

  • Separate genuine drift from data-quality problems such as schema changes, entry errors, or upstream model problems. For genuine shifts, plot affected feature distributions and consult domain experts; examine feature-output relationships if concept drift is suspected. section 14.4.4
  • If performance has declined, reassess the model, add relevant data or features, retrain on updated data, or build a model for a new segment. For concept drift, consider weighting recent data more heavily or dropping older data when sufficient new data exists. section 14.4.4 section 14.6
  • Plan a backup for cases where the main model is unreliable. Monitoring should provide enough context to decide whether to retrain, rebuild, or use that backup. section 14.4.3

Fallbacks for retail demand prediction

An inventory system can monitor for feature drift and data-quality problems and switch models when alarms trigger. Its fallback sequence uses a model based on a subset of important features, then time-series models less dependent on external features, and finally the previous week’s sales adjusted for expected events and holidays. section 13.5.1

External feature extractors add another dependency: an unversioned update can change embeddings unexpectedly, while an unchanged extractor can lose value as data drifts. Validate external models and monitor and update features over time. section 11.1.3

How Machine Learning System Design covers it

How deep it goes
Distinguishes drift types and outlines monitoring, diagnosis, retraining, and fallback choices without exhaustively covering every response scenario.
Examples
Illustrates drift through a new advertising audience, popularity-driven recommendations, and retail demand prediction fallbacks.
What you can do after
Diagnose/debug drift by checking quality, comparing performance and distributions, and selecting retraining, rebuilding, or fallback responses.
How it connects
Connects data drift and concept drift with data quality, model monitoring, feedback loops, and retraining.

Also explained in

Compare how 13 books explain drift →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Machine Learning System Design. The section links point to the parts of the book it draws on.