What is data drift?
Data drift is a change over time in the statistical distribution of input data a model meets in production compared with its training data; for example, a shift in the age distribution or income range of applications reaching a credit model.
Unlike concept drift, where the input to outcome relationship changes, data drift changes the input distribution while that relationship may hold. Trackable from inputs alone without labels, it is often the first warning, though not every drift hurts performance.
- Topic
- Infrastructure and runtime
- Also known as
- covariate shift
How data drift works
- A reference distribution is set from training data or a stable period.
- Live data is compared with it at intervals using statistical tests or distribution distance measures per feature.
- For high-dimensional data, inputs can first be reduced to a lower-dimensional representation and compared with a two-sample test.
- When a threshold is crossed, the cause and the effect on performance are examined; the model is retrained if needed.
In more detail
Concrete drift metrics and the large sample trap
Practical drift monitoring relies on concrete metrics such as Population Stability Index (PSI), Kolmogorov-Smirnov (KS) test, Wasserstein distance, Jensen-Shannon divergence and Maximum Mean Discrepancy (MMD) for multivariate embeddings. Setting alert thresholds often combines statistical p-values with effect-size limits (for instance PSI > 0.2) because large production volumes make trivial shifts statistically significant.
Semantic drift in LLM and RAG systems
In modern LLM and RAG systems, data drift goes beyond tabular columns to semantic and embedding drift: user query topics, prompt lengths, language mix or retrieved document chunks shift over time. Teams track embedding-centroid distance, out-of-domain query rates and retrieval similarity score distributions to detect degradation before human feedback arrives.
Label shift and choosing the response
When evaluating drift, practitioners also distinguish label shift (prior probability shift, where outcome proportions P(Y) change while class-conditional inputs P(X|Y) stay fixed) from covariate shift P(X). Identifying whether the shift is covariate, label or concept drift determines whether re-weighting, threshold recalibration or full model retraining is needed.
Commonly confused terms
| Term | How it differs |
|---|---|
| Dataset shift | Dataset shift is the overarching taxonomy (Moreno-Torres et al., 2012) covering covariate shift, prior/label shift and concept shift. Data drift is commonly used in MLOps to refer specifically to input distribution shift P(X). |
| Training-serving skew | Training-serving skew is an engineering mismatch between how features are computed in training pipelines versus production (bugs, stale lookups, unit changes). Data drift is a genuine shift in the incoming real-world distribution over time, though both trigger drift alarms. |
Why data drift matters for on-premises AI
Machine learning systems tend to fail silently on unexpected inputs rather than raise errors; drift monitoring catches this silent decay early. A study comparing detection methods found that reducing dimensions with a pre-trained classifier then applying a two-sample test worked best across the shifts it examined. Pipeline errors, one common cause, require fixing the data rather than the model.
An energy distributor compares sensor data reaching its fault prediction model with the training period each week; spotting a sudden shift in one region's temperature readings, it traces a unit change from a sensor firmware update and fixes the pipeline.
Common questions
Does data drift always break the model?
No. Some drift does not affect performance, so its effect is checked separately after an alert.
How is data drift monitored?
The live input distribution is compared with training data at intervals using statistical tests and distribution distance measures.
Related terms
- Concept drift
- Model drift
- Model monitoring
- Embedding drift
- Out-of-distribution detection
- Continual learning
Sources
- Rabanser, Günnemann and Lipton, Failing Loudly: An Empirical Study of Methods for Detecting Dataset Shift, 2018
- Moreno-Torres et al., A unifying view on dataset shift in classification, Pattern Recognition, 2012
In the glossary: Glossary, A to D