Your model accuracy dropped 8% over 2 weeks — walk through your debugging process
Written by the mlprep team · Updated
Your model's accuracy dropped 8% over 2 weeks. Walk through your complete debugging process. How do you isolate the cause and decide whether to rollback, hotfix, or retrain?
Step 0: Validate the metric drop#
Before anything: confirm the drop is real and understand its shape.
- Is it all users or a segment? A drop in aggregate can hide a severe drop in one cohort masked by stable performance elsewhere.
- Is it a reporting bug? Check if the metric pipeline itself changed — dashboard code, logging schema, traffic routing that changed what's being measured.
- What's the temporal shape? A cliff (sudden drop at a specific timestamp) vs a gradual slide over 14 days suggests completely different root causes.
A cliff at a specific time → code deploy, pipeline change, infrastructure incident. A gradual slide → data drift, label distribution shift, feedback loop.
Step 1: Isolate serving infrastructure#
Rule out infrastructure before model or data:
- Is the model actually being called? Check request logs, model server metrics.
- Are features being computed correctly? Log feature values at serving time and compare distributions to training. Any feature with a sudden distribution shift is a candidate.
- Did a feature pipeline fail silently? Stale features (a real-time feature defaulting to null or a cached value from days ago) produce systematic errors without obvious error logs.
- Did a code deploy change preprocessing? Diff the serving code against the prior version.
This step catches a large fraction of production incidents. Feature pipeline failures masquerading as model degradation are common.
Step 2: Compare feature distributions#
Pull serving-time feature logs from before and after the drop. For each feature:
- Compute distribution statistics (mean, variance, null rate, quantiles)
- Compute Population Stability Index (PSI):
PSI = ∑(actual% - expected%) × ln(actual% / expected%). PSI > 0.2 signals significant shift. - Look for features that shifted suddenly — those are likely pipeline issues. Features that shifted gradually — those point to real-world distribution change.
Step 3: Segment error analysis#
Don't look only at aggregate performance. Slice by:
- User cohort (new users vs retained, mobile vs web, geography)
- Item/content type
- Traffic source
- Temporal patterns (time of day, day of week — especially for seasonality)
An 8% aggregate drop could be a 40% drop in one segment. Knowing which segment breaks the problem open — it often points directly to a data source that changed.
Step 4: Classify the root cause#
By now you have enough signal to classify:
| Pattern | Likely cause | |---------|-------------| | Sudden cliff, specific feature null rate spike | Feature pipeline failure | | Sudden cliff, coincides with deploy | Code regression in preprocessing | | Gradual, all features stable | Concept drift (label distribution changed) | | Gradual, specific features drifting | Covariate shift in input distribution | | Concentrated in one segment | Segment-specific data source issue | | Evaluation metric moved, not engagement | Metric proxy failure, not model failure |
Step 5: Rollback vs hotfix vs retrain#
Rollback (previous model version): when you have a clear code regression, serving bug, or pipeline failure. Fast (minutes), safe, but you lose any improvements from the new model. Best when the cause is identified and isolated.
Hotfix: patch the specific issue (fix the null feature, revert the preprocessing change) without rolling back the model. Faster than full retrain, but requires confidence the fix is complete and no other issues exist.
Retrain on recent data: when root cause is drift — real-world distribution changed and the model needs to adapt. Slower (hours to days), but the right answer for concept drift. Don't retrain until you've ruled out infrastructure issues — you'll train a model on bad data.
Do nothing (monitor): when the drop is within expected variance, seasonality explains it, or the root cause is external and temporary (holiday, news event).
Staff-level additions: blast radius and observability#
Before rollback, assess blast radius: what other models or downstream systems depend on this model's outputs? A ranking model feeds real-time bidding, A/B experiment allocation, and audit logging — rolling back affects all three.
Observability gaps are as important as the fix itself. If you couldn't detect this drop until 8% had accumulated, your monitoring is lagging. Post-incident: add feature distribution alerting, shadow model comparisons, and segment-level metric dashboards so the next drift is caught in hours, not weeks.
Senior/staff answer shape#
At senior/staff level, the answer should sound like incident command plus ML diagnosis:
- Stabilize: confirm severity, affected segments, user/business impact, and whether rollback is available.
- Triage: separate metric/logging bugs, serving regressions, feature pipeline failures, data drift, label drift, and product changes.
- Contain: rollback, disable a feature, lower traffic, switch to fallback, or add a threshold guardrail depending on blast radius.
- Diagnose: compare feature distributions, score distributions, calibration, error slices, label freshness, and recent deploys.
- Prevent recurrence: add monitors, ownership, runbooks, canaries, data contracts, and launch gates.
The important distinction: a rollback is appropriate for regressions, stale features, bad deploys, or broken pipelines. A retrain is appropriate for real distribution or concept drift. Retraining on corrupted data is a common senior-level failure mode.
Signals that change the decision#
- Sudden cliff at a timestamp: suspect deploy, pipeline, schema, feature default, routing, or metric change.
- Gradual decline: suspect drift, seasonality, feedback loops, market change, or label distribution shift.
- Segment-only drop: suspect a data source, geography, client version, cohort, or product surface.
- Stable offline eval but bad online behavior: suspect train-serve skew, delayed labels, or objective mismatch.
- Score distribution unchanged but outcome rate changed: suspect concept drift or label/metric definition change.
The key takeaway unlocks after you reveal an expert answer.
Key Takeaway
Debug in order: (1) validate metric is real and understand temporal shape; (2) check serving infrastructure — feature pipeline, null rates, code changes; (3) compare feature distributions using PSI; (4) segment error analysis to find the concentrated failure; (5) classify: pipeline failure → rollback/hotfix, drift → retrain. A cliff suggests a code or pipeline regression; a gradual slide suggests drift. Assess blast radius before rollback. Post-incident: close the observability gap that let 8% accumulate undetected.
Follow-up Questions to Test Yourself
Interviewers often pivot here once you cover the core concept.
- How do you compute Population Stability Index and what threshold triggers investigation?
- Your feature pipeline has 200 features. How do you prioritize which ones to check first?
- You identify concept drift as the cause. How do you decide how much recent data to retrain on — and how do you validate the retrained model before deploying?
How confident do you feel explaining this?
Track your understanding or flag it to revisit before your next loop.
Related Questions
Your offline metrics improved but A/B test shows nothing — how do you debug?
How do canary and shadow deployments reduce ML launch risk?
Your CTR model's calibration degrades months after launch — what causes it and how do you fix it?
How do you monitor a deployed model and detect drift?