How would you detect that the data coming into a production model has drifted away from what it was trained on, using a concrete statistical method?

technical-conceptual · Junior level · data-ml

What the interviewer is really asking

Assess whether the candidate can move beyond the abstract idea of drift to a concrete detection mechanism — comparing a recent window of feature values against a training/reference baseline with a metric like PSI or a KS test, and reasoning about thresholds.

What to say

What to avoid

Example answers

Strong: I'd keep a reference distribution from training and, on a schedule, compare a recent window of production data against it per feature. A common metric is PSI: under about 0.1 is stable, 0.1 to 0.2 is moderate, above 0.2 is a significant shift worth investigating. For continuous features you can also use a KS test and chi-square for categoricals. Doing it per feature tells me which input drifted, not just that something did, and I'd treat the thresholds as starting points to tune.

Weak: Drift is when the data changes over time so the model gets worse. I'd watch the data in production and if it looks different from training data we'd retrain the model on the newer data.

Want questions matched to your role? Paste a job title, job description, or CV and get a personalized set, or go Pro to unlock the full bank.