Your offline metrics improved but A/B test shows nothing — how do you debug?
Written by the mlprep team · Updated
Your model improves NDCG by 2% in offline evaluation but shows no movement in the A/B test. Walk me through your debugging checklist.
The gap is common and has multiple causes#
Offline metrics improving without online lift is one of the most common failure modes in production ML. It's not necessarily your model — it might be your evaluation, your experiment design, or a mismatch in what you're measuring.
Category 1: Offline evaluation problems#
Evaluation set is stale or unrepresentative: if your offline eval set was collected months ago, user behavior has shifted and the model optimized for that distribution. Recent data shows no improvement.
Metric measures the wrong thing: NDCG is a ranking quality metric. If the A/B metric is watch time or session length, a ranker that orders items well by historical relevance labels doesn't necessarily maximize engagement. The model optimized for the wrong proxy.
Offline labels are biased: labels derived from clicks are position-biased. A model that's better at ranking items shown at high positions (which got more clicks) will look better offline without actually surfacing more relevant content.
Evaluation is on easy cases: NDCG improvement might come entirely from queries where the model was already good. Evaluation sliced by difficulty may show no improvement on hard or cold-start queries — exactly the queries where improvement matters most.
Category 2: Experiment design problems#
Insufficient statistical power: a 2% NDCG lift may correspond to a very small effect size on the primary A/B metric. The experiment needs more traffic or time to detect it. Compute required sample size before launching. Check if confidence intervals include 0 — "no movement" might be "effect not yet detectable."
Novelty effect or ramp-up: users in the treatment arm may behave differently initially due to unfamiliarity. Short experiments (less than 1-2 weeks) can miss steady-state behavior.
Dilution: the experiment covers 5% of traffic but the model change only affects 10% of requests (e.g., only logged-in users on mobile). The actual treatment effect is diluted by unaffected requests. Analyze the subpopulation where the model actually changed behavior.
Implementation bug: model is deployed but not actually being called. Feature store returning stale features. Wrong model version serving. Always validate that the treatment arm is actually different — log model scores and check distributions.
Category 3: Metric misalignment#
Proxy metric vs business metric: NDCG measures ranking quality given historical relevance. But if users don't engage with highly-ranked content (low CTR overall for that content type), good ranking doesn't move engagement metrics.
Short-term vs long-term: better recommendations may reduce binge-watching today but improve long-term retention. A 2-week A/B test misses this. Retention cohort analysis needed.
Cannibalization: the improved model surfaces content that users engage with but then immediately leaves the platform (e.g., linking out). Session metrics drop. The model is working as intended but optimizing against itself.
The debugging playbook#
- Validate deployment: confirm treatment model is live, features are fresh, serving logs show different score distributions between treatment and control.
- Check stat power: compute minimum detectable effect for your experiment. If your effect is below MDE, the experiment isn't sensitive enough.
- Slice by affected population: restrict analysis to requests where the model change is relevant (query type, user segment, content type).
- Check metric alignment: does NDCG historically correlate with your A/B primary metric? If not, you're optimizing the wrong thing offline.
- Extend runtime: one week is often too short for behavioral effects to stabilize.
- Add surrogate metrics: track position of engaged items, click rank, not just aggregate engagement.
Senior/staff answer shape#
Start by separating model quality, experiment validity, and business impact. A senior answer should not assume the model failed just because the A/B test was flat. I would say:
- First prove treatment is meaningfully different: model version, feature freshness, score distribution, candidate overlap, ranking deltas, and affected-request rate.
- Then prove the experiment could have detected the expected effect: sample size, MDE, guardrail metrics, dilution, ramp period, and novelty effects.
- Then test whether offline NDCG is a valid surrogate: historical correlation with online metrics, segment-level lift, label bias, and whether the offline eval represents current traffic.
- Finally decide whether to iterate, relabel, change the objective, or launch to a targeted segment where lift is real.
The staff-level move is to build an offline-to-online calibration loop. Track every launched model's offline metric deltas, online metric deltas, affected traffic share, and segment behavior. Over time, this tells you whether a +2% NDCG gain usually predicts business lift or whether your offline metric is mostly optimizing a proxy artifact.
Common traps#
- Treating "no lift" as "bad model" before checking deployment and power.
- Averaging over all traffic when only a small segment was affected.
- Optimizing offline clicks without correcting position bias or exposure bias.
- Ignoring guardrails: a model can improve CTR while hurting diversity, latency, complaints, revenue quality, or long-term retention.
- Launching from a statistically flat result because the offline metric improved.
The key takeaway unlocks after you reveal an expert answer.
Key Takeaway
Offline-online gap has three root causes: (1) offline eval problems — stale data, biased labels, wrong metric, unrepresentative set; (2) experiment design — insufficient power, diluted treatment, implementation bugs; (3) metric misalignment — optimizing a proxy that doesn't drive the business metric. Debug in order: validate deployment → check statistical power → slice by affected population → verify metric correlation → extend runtime.
Follow-up Questions to Test Yourself
Interviewers often pivot here once you cover the core concept.
- How do you compute minimum detectable effect for an A/B test and decide whether your experiment has enough power?
- What are surrogate metrics and how do you validate that a surrogate metric reliably predicts the business metric before relying on it for launch decisions?
- You find that NDCG improvement comes entirely from power users but the A/B test primary metric is averaged across all users. How do you surface this to stakeholders?
How confident do you feel explaining this?
Track your understanding or flag it to revisit before your next loop.
Related Questions
Your model accuracy dropped 8% over 2 weeks — walk through your debugging process
How do canary and shadow deployments reduce ML launch risk?
When should an ML system use human review instead of full automation?
How would you design a RAG system that answers questions over a company's internal documents?