Monitoring & drift

Data drift (PSI, KS test) vs concept drift vs delayed labels, shadow deployments, retraining triggers. Models rot silently — monitoring is the product.

About 21 min read3-question knowledge check

The mental model

A model in production is a photograph of a world that keeps moving. You trained on last quarter's customers, prices, and fraud patterns; production keeps aging away from that snapshot every day. Monitoring is the smoke detector that tells you the photo no longer matches the room — *before* the fire, not after. The uncomfortable truth interviewers are probing for: models rot silently. Unlike a service that throws a 500 when it breaks, a model that has drifted keeps returning confident predictions that are quietly wrong. There is no exception, no stack trace — just a metric you cannot see yet because the labels have not arrived.

The reason monitoring *is* the product, not an add-on, is the label-delay problem. In many real systems (fraud, credit, churn) you learn whether a prediction was right weeks later — a chargeback, a default, a cancellation. So you cannot watch accuracy in real time; by the time accuracy drops, you have been serving bad decisions for a month. Monitoring's job is to catch the cause — a shift in the inputs — long before the effect — a drop in the metric — becomes measurable.

Three distinct things get lumped together as "drift," and separating them is the whole skill. Data drift (covariate shift): the input distribution moved — a payment provider re-coded merchant categories, so a feature's histogram shifts. The model still maps X→y correctly, but it is now seeing X it never trained on. Concept drift: the relationship X→y itself changed — the same transaction that was legitimate last year is now fraud because attackers adapted; the inputs can look identical. Label delay: you simply do not know the outcome yet. A data shift can be measured immediately from inputs, though whether it actually hurts the model is only confirmed once labels arrive; concept drift often cannot be seen in inputs at all, which is why input monitoring is necessary but not sufficient.

The full lesson continues with 15 more sections
  • Deep dive
  • Internal architecture
  • Real-world use cases
  • Best practices
  • Common mistakes
  • Performance
  • Security
  • Production troubleshooting
  • Advantages & disadvantages
  • Alternatives
  • Interview expectations
  • Interview questions
  • Facts to remember
  • Cheat sheet
  • Quick revision