ladderlore
  • Type a service name, like S3 or IAM.

Concept

Detecting data distribution shift

Tell covariate, label and concept shift apart, and pick a test that compares live data with the training baseline.

  • Covariate shift

    What changes
    Input distribution
    Example
    A new age group signs up
    How you see it
    Feature tests, no labels needed
  • Label shift

    What changes
    Share of each answer
    Example
    Fraud becomes rarer
    How you see it
    Prediction or label rates change
  • Concept drift

    What changes
    Input-to-answer link
    Example
    Buyers change what they want
    How you see it
    Quality metrics fall once labels arrive
Three shifts: what moves decides how you can see it.

1 / 2

  • Covariate shift

    What changes
    Input distribution
    Example
    A new age group signs up
    How you see it
    Feature tests, no labels needed
  • Label shift

    What changes
    Share of each answer
    Example
    Fraud becomes rarer
    How you see it
    Prediction or label rates change

2 / 2

  • Concept drift

    What changes
    Input-to-answer link
    Example
    Buyers change what they want
    How you see it
    Quality metrics fall once labels arrive
Three shifts: what moves decides how you can see it.
  • KS test

    Fits
    Continuous feature
    Reads as
    Largest gap between cumulative curves
  • PSI

    Fits
    Binned feature
    Reads as
    Under 0.1 stable, over 0.25 large shift
  • Chi-square

    Fits
    Categorical feature
    Reads as
    Category counts differ from baseline
  • JS divergence

    Fits
    Any distribution
    Reads as
    Symmetric distance, zero means equal
  • Embedding distance

    Fits
    Text and images
    Reads as
    How far new inputs sit from training
One test per feature type, always against the training baseline.

1 / 2

  • KS test

    Fits
    Continuous feature
    Reads as
    Largest gap between cumulative curves
  • PSI

    Fits
    Binned feature
    Reads as
    Under 0.1 stable, over 0.25 large shift
  • Chi-square

    Fits
    Categorical feature
    Reads as
    Category counts differ from baseline

2 / 2

  • JS divergence

    Fits
    Any distribution
    Reads as
    Symmetric distance, zero means equal
  • Embedding distance

    Fits
    Text and images
    Reads as
    How far new inputs sit from training
One test per feature type, always against the training baseline.

What it is

When live data stops looking like the training data, quality falls, often with no error and no alarm. Drift monitoring compares a recent window of serving data with a fixed baseline, usually the training set, one feature at a time.

Covariate shift: the inputs change, the link to the answer stays, for example a new customer group. Label shift: the share of each answer changes, for example fraud becomes rarer. Concept drift: the link itself changes, so the same input now deserves a different answer. The first two show without labels. Concept drift shows only when ground truth arrives and quality metrics fall.

What it is

Each test fits a feature type. The Kolmogorov-Smirnov (KS) test suits continuous features: it measures the largest gap between two cumulative distributions. The Population Stability Index (PSI) compares binned shares: below 0.1 is stable, 0.1 to 0.25 moderate, above 0.25 large. Chi-square compares category counts. Jensen-Shannon (JS) divergence is a symmetric distance, zero when the distributions match.

What it is

Text and images have no columns, so compare embeddings: embed recent inputs with the training-time model and measure the distance from the training embeddings, for example between the two centres. When a score crosses the threshold, alarm, check the upstream pipeline for a break, and retrain on fresh data if the shift is real.

Remember

  • KS: continuous. Chi-square: categories. PSI: binned shares. JS: distance.
  • Concept drift needs ground truth: watch model quality.

On the exam

  • “Inputs differ from training, no labels yet” points to covariate shift and a KS or PSI test.
  • “Same inputs, but customers now behave differently” points to concept drift, seen in falling quality.
  • “Compare a categorical feature, training versus production” points to chi-square.