LearnQuestion bank

Distinguish covariate shift, prior (label) shift and concept drift, with an example of each from payments or delivery.

ML engineeringTechnicalEasy

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Covariate shift: P(x) changes while P(y|x) stays stable; example: payments model trained in one market sees a new market/device/merchant mix.
  • Prior/label shift: P(y) changes while P(y|x) stays stable; example: fraud wave raises fraud prevalence, or delivery surge raises failed-delivery rate.
  • Concept drift: P(y|x) changes; example: fraudsters adapt so the same transaction features imply different risk, or a new restaurant layout changes prep time for the same order.
  • Detection differs: feature distributions for covariate, label prevalence for prior, residuals/calibration/segment performance for concept.
  • Response differs: reweight/validate for covariate, recalibrate/adjust thresholds for prior, retrain/re-engineer for concept.
  • Check upstream bugs first: schema, units, timezone/currency, missingness, logging, or label-definition changes can masquerade as drift.

In full

The core distinction is which probability changes: covariate shift changes P(x), prior/label shift changes P(y), and concept drift changes P(y|x). In payments, covariate shift is a new market or device/merchant mix where the same transaction features still imply the same fraud risk; prior shift is a fraud wave that raises fraud prevalence without changing the conditional relationship; concept drift is fraudsters adapting so identical features now imply different risk. In delivery, covariate shift is a new region or order mix, prior shift is a surge in failed or express deliveries, and concept drift is a new restaurant layout or kitchen workflow making the same order predict a different prep time. Detection should match the cause: compare input distributions for covariate shift, monitor label prevalence for prior shift, and watch residuals, calibration, and segment-level performance for concept drift. Responses should also differ: reweight or validate for covariate shift, recalibrate or adjust thresholds for prior shift, and retrain or re-engineer features for concept drift. Before calling it drift, verify upstream data: schema changes, units, timezone/currency handling, missingness, logging, or label-definition changes can look like drift but are pipeline bugs.

Checked against sources by an independent AI reviewer.

What a strong answer covers

  • Covariate: P(x) changes (new market).
  • Prior: P(y) changes (fraud wave).
  • Concept: P(y|x) changes (fraudsters adapt; a new restaurant layout changes prep time).
  • Each needs different detection and response; also mentions upstream data bugs that masquerade as drift.

Common mistakes

  • calling every metric change “concept drift”
  • ignoring seasonality.