Module 6 · step 2 of 4 · Monitoring and drift

Understand drift

Data drift versus concept drift, how PSI measures a change in the inputs and where to read it in mlflow.

Concept8 min

In this step you learn the two kinds of drift and find where mlflow shows them. It matters because drift is the usual reason a good model slowly stops being good, and reading its score wrongly leads either to ignored problems or to false alarms.

The idea

A model learns from a snapshot of the past and then works in a world that keeps moving.

Data drift means the inputs change: customers are younger, prices are higher, a form gains a new option. The rule connecting inputs to outcome may still hold, but the model now sees regions where it had few examples.

Concept drift means the relationship between inputs and target changes. The same customer profile used to mean "stays" and now means "leaves", because a competitor launched a cheaper plan. The inputs look identical, so you cannot see it in them.

Data drift needs only the inputs the endpoint receives, so mlflow can measure it by itself. Concept drift needs true outcomes, which arrive late (you learn whether a customer churned weeks later). That is why input drift is the early warning, and why it is a warning, not proof that predictions are wrong.

The Population Stability Index (PSI) compares one feature in two windows. The reference values are split into buckets and PSI sums how much each bucket's share changed. It is zero when nothing moved and grows as shares move apart. A common reading: below 0.1 stable, 0.1 to 0.2 a moderate shift, above 0.2 a significant shift. These are conventions, not laws. With few values, random noise alone can push PSI over 0.2, which is why a feature is scored only with enough values.

Step by step

  1. Open your deployment and select the Monitor tab. In Drift thresholds, read PSI threshold (all features): it defaults to 0.2.
  2. Read Reference size (predictions) and Current window (predictions). The reference is the first predictions logged after the current model went live, and it does not slide, so a slow, steady shift keeps showing instead of becoming the new normal. The current window is the most recent predictions.
  3. Look at Min. values per feature and the line "Scoring starts after N one-row predictions since this model went live; M logged so far."
  4. Find Per-feature overrides and Add override: this is how you give one volatile feature its own threshold without relaxing the others.
  5. Select Deployments > Health. In Drift monitoring, a report row shows its severity, Drifted features and Avg PSI. Open a report to see the Feature drift snapshot, with each feature's kind and score.
  6. Look for a feature marked not monitored: one where no category holds at least 5% of the reference values (an ID, for example) cannot be scored by PSI. Categorical features get a PSI on category frequencies plus Cramer's V, between 0 and 1.

The demo cannot log enough predictions to score drift and cannot save thresholds, so some of these panels stay empty. The layout is the same in a full workspace, where only workspace admins can save thresholds or press Check now.

Common mistakes

  • Reading drift as an error rate. Drift says the inputs moved, not that the model is wrong.
  • Setting the window or the minimum too small. The app blocks the extreme case ("Min. values per feature cannot exceed the reference or current window size"), but small values still bring false alarms.
  • Averaging away a problem. A few key features can drift strongly while the average looks calm, so read the Feature drift snapshot feature by feature.
  • Ignoring concept drift because input checks look clean. Compare predictions with true outcomes when they arrive.

As a data scientist

Treat PSI as a smoke detector, not a verdict: when it fires, look at the feature, the dates and the business context before acting. Choose thresholds by the cost of a false alarm against a missed shift, and use per-feature overrides for inputs that move by nature, such as seasonal ones. Read Drift for the PSI computation with a worked example, and Monitoring for the wider picture.

Checkpoint

You should see the Drift thresholds panel with PSI threshold (all features) at 0.2 by default, and be able to say which of the two kinds of drift the app can measure on its own.

Theory to read next

Read in the docs