What is distribution shift between training and production data, and why does it matter?

Quick Overview

Asks what distribution shift between training and production data is and why it hurts deployed models. Tests whether you can separate covariate shift, label shift and concept drift, detect each with or without labels, and pick a fitting mitigation.

What is distribution shift between training and production data, and why does it matter?

Role: Data Scientist

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What is distribution shift between training and production data, and why does it matter? ```hint Factor the joint distribution Write the joint distribution of inputs and labels as a product of two terms, in both possible orders, and ask which term changes in each kind of shift. ``` ```hint Labels arrive late Think about what you can monitor on the day traffic changes, before any ground-truth labels come back. ``` ### What a Strong Answer Covers - A precise definition and the main types, each stated as which distribution changes and which stays fixed. - Why shift hurts a deployed model, covering both accuracy and calibration. - How to detect shift with and without labels, and how to set alert thresholds that mean something. - Mitigation options matched to the type of shift. - How to tell real shift apart from a bug in the serving pipeline. ### Follow-up Questions - With millions of rows per day, a KS test flags every feature as shifted. How would you set up alerts instead? - How would you correct a classifier's probabilities if only the class prior changed? - How can a model's own decisions create a shift in its future training data? - How would you estimate importance weights for covariate shift without modeling each density separately?

Overview: Asks what distribution shift between training and production data is and why it hurts deployed models. Tests whether you can separate covariate shift, label shift and concept drift, detect each with or without labels, and pick a fitting mitigation.

Nov 24, 2026
mediumData ScientistOtherMachine Learning
0
0

What is distribution shift between training and production data, and why does it matter?

What a Strong Answer Covers Guidance

  • A precise definition and the main types, each stated as which distribution changes and which stays fixed.
  • Why shift hurts a deployed model, covering both accuracy and calibration.
  • How to detect shift with and without labels, and how to set alert thresholds that mean something.
  • Mitigation options matched to the type of shift.
  • How to tell real shift apart from a bug in the serving pipeline.

Follow-up Questions Guidance

  • With millions of rows per day, a KS test flags every feature as shifted. How would you set up alerts instead?
  • How would you correct a classifier's probabilities if only the class prior changed?
  • How can a model's own decisions create a shift in its future training data?
  • How would you estimate importance weights for covariate shift without modeling each density separately?