Monitoring & Observability for ML Systems
You'll be able to:
You can design a monitoring strategy for a production ML system that catches both code bugs AND model decay, and explain why service uptime and prediction quality require separate alerting.
Opening When a machine learning model is deployed to production, it's not just code bugs that can cause issues – model decay and data drift can also lead to inaccurate predictions and business losses. In fact, many ML systems can degrade noticeably within weeks to months of deployment due to these issues. Understanding how to monitor and observe your ML system is crucial to catching these problems before they impact your customers.
What is Monitoring & Observability for ML Systems?
Monitoring and observability are two related but distinct concepts in the context of machine learning systems. Monitoring refers to the process of collecting and analyzing data about a system's performance, usually with the goal of detecting anomalies or issues. Observability, on the other hand, is the ability to understand what is happening within a system by looking at its external outputs.
Non-Obvious Production Insight: Separate Alerting for Service Uptime and Prediction Quality
While it may seem obvious to monitor both service uptime and prediction quality, many teams make the mistake of using the same alerting thresholds for both. However, these two metrics serve different purposes and require separate attention. Service uptime is critical for ensuring that your system is available to users, while prediction quality is essential for maintaining trust in your model's outputs.
A good analogy for explaining this to a non-technical stakeholder is to compare it to a restaurant. Just as a restaurant needs to ensure that its doors are open and customers can be seated (service uptime), it also needs to focus on serving high-quality food (prediction quality). If the food is bad, customers will leave negative reviews and stop coming back, even if the doors are always open.
What to Monitor: Four Groups, Four Routes
Take the mission's credit-scoring model. Group the monitors by what they catch and by who acts on them:
| Group | Example metrics | Threshold set from | Route |
|---|---|---|---|
| Service health | p99 latency and error rate of the scoring endpoint | The service-level objective | Page on-call |
| Input data drift | Null rate per field; population stability index (PSI) per key feature against the training sample | Schema rules for nulls, types and units; PSI above 0.25 (a long-standing credit-scoring convention, not a law) | Page if a schema rule breaks; otherwise a same-day ticket to the model owner |
| Prediction quality | Distribution of output scores; approval rate; early delinquency on recent loans | Several weeks of the metric's own baseline variation | Ticket to the model owner |
| Business outcome | Default rate and losses by monthly loan cohort | Risk appetite agreed with the credit committee | Monthly review, not a pager |
Swipe sideways to see every column →
Non-Obvious Production Insight: The Label Arrives Months Late
In credit, the true label is whether the loan defaults. The EU's regulatory definition of default (CRR Article 178) counts a borrower as in default when they are judged unlikely to pay or are more than 90 days past due, so for most loans the number you most want, accuracy on real outcomes, cannot be confirmed until at least three months after the decision. Input-drift and score-distribution monitors are therefore the early warning, early delinquency is the first partial label, and cohort default rates are the confirmation. A team that watches only the confirmed outcome learns about a broken model a quarter after the damage is done.
Set each threshold from the metric's own history, not a round number. If the approval rate normally moves by about a point a week, a five-point move is a signal and a one-point move is noise. Anything that pages someone must be actionable in the middle of the night. Drift that needs analysis belongs in a ticket.
Failure Modes
| Failure Mode | Root Cause | Observable Signal |
|---|---|---|
| Drifting Data | Changes in input data distribution not detected or addressed | Model performance degrades over time, with increasing errors on new data |
| Model Staleness | Model not retrained or updated regularly | Prediction quality decreases as the model becomes outdated |
| Data Leak | Sensitive information exposed through model outputs or logs | Unintended disclosure of sensitive data to users or third parties |
Swipe sideways to see every column →
Stakeholder Communication
To explain the importance of monitoring and observability for ML systems to a non-technical stakeholder, you can use analogies like:
- "Imagine our ML system is like a car. We need to monitor its performance (speed, fuel efficiency) and observe its behavior (oil levels, tire pressure) to ensure it runs smoothly and doesn't break down."
- "Think of our model as a doctor. Just as a doctor needs to monitor a patient's vital signs and adjust treatment accordingly, we need to monitor our model's performance and adjust its parameters to maintain high accuracy."
Self-Check
- Given a scenario where your ML system is experiencing a sudden drop in prediction quality, which component would you investigate first and why?
- Your colleague proposes using the same alerting threshold for both service uptime and prediction quality. What is the flaw in this approach, and what would you use instead?
- Suppose your model is deployed to production and starts producing inconsistent results. Which failure mode (Drifting Data, Model Staleness, or Data Leak) might be responsible, and how would you investigate further?
Curated Materials
1.3hThe deep work happens here — the lesson is your briefing.
Live on aiqbench
This lesson's subject on the rest of the site, today.
In the news, last 30 days
- QLoRA Fine-Tuning on One RTX 4090 Doubled Qwen's Working Blender ScriptsTowards Data Science ·
- EWC-IA3: Adapter Geometry Determines Forgetting in Continual Parameter-Efficient Fine-TuningarXiv ·
- Beyond Refusal: Auditing Internal Representations After Safety Fine-Tuning in Romanized HindiarXiv ·
Test your knowledge
5 questions in 100 seconds, on a page of its own. Read everything above first.
Test your knowledge →Module Mission
25–35 minFor a credit-scoring model, list 5 metrics you would monitor in production. Group them by: service health, prediction quality, input data drift, downstream business outcome. For each, specify the alert threshold and what triggers it.
Loading your work…