Production ML & MLOps

Training-Serving Skew

Training-serving skew happens when the data or transformations used during training differ from what the model receives in production. It is one of the most common reasons strong offline metrics collapse after launch.
  • Feature computation must match across environments
  • Prediction-time availability is the real constraint
  • Default values are behavior
  • Vocabulary and schema drift create silent bugs
  • Skew should be tested and monitored directly
Where skew enters
The same conceptual feature can become different data if computed through different paths.
Skew examples
Skew typeExampleImpact
Time leakageFeature includes events after prediction timeOffline score too optimistic
Preprocessing mismatchTraining lowercases text, serving does notDifferent tokens/features
Missing-value mismatchTraining drops nulls, serving fills zeroUnexpected production behavior
Category driftNew plan type unseen in trainingBad encodings or fallbacks
Unit changeMilliseconds become seconds upstreamPredictions become nonsense
Sources
  • Rules of Machine LearningTraining-serving skew
  • Made With MLData validation and monitoring
  • Machine Learning Crash CourseProduction ML systems