Skip to content
mlmentorship

Your offline metric improved but the online metric got worse. Debug it.

Separate experiment validity, delivered treatment and product outcomes before attributing an online regression to the model.

Published · 8 min read ·Core ·Intermediate

Product & experimentation · active recall

Practice before you read

20 minutes. Define the decision first, then design the measurement and enumerate validity threats.

Product & experimentation · closed-book attempt

Your offline metric improved but the online metric got worse. Debug it.

Define the decision first, then design the measurement and enumerate validity threats.

Problem

Context. A report compares offline and online changes, while the separate delivery fixture below includes users receiving fallback instead of treatment. Task. Define the compared metrics, assess delivered treatment, and choose the next test that distinguishes measurement, serving, and modeling explanations. State any immediate containment needed before investigating further. Constraints. Preserve assignment denominators and separate assigned users from successfully served users. Check relative versus absolute changes, label maturity, and metric meaning; the supplied aggregates alone do not identify a causal defect. A report says offline quality improved 8% while the online primary metric declined 2%. Check each metric's denominator, baseline and relative-change definition before comparing them. In a separate hypothetical delivery fixture, A serves 1,000 assigned users and records 800 successes. B delivers the new model to 900 users, recording 738 successes. Its other 100 users receive fallback, with 40 successes. Where should the next discriminating check focus?

20:00recommended time

Closing or reloading clears the scratchpad. Only score, weak rubric dimensions, attempt count, and retry date can be stored locally.

30-second answer map

Order the investigation so each check eliminates an entire layer of causes before forming a narrower model-quality hypothesis.

Verify the observation, trace actual delivery, then test the product-effect hypothesis

Verify the observation, trace actual delivery, then test the product-effect hypothesisFirst check assignment, denominators, instrumentation, and label maturity. Then replay actual serving versions and trace latency, errors, and fallback. Only after validity and delivery checks test a model or feedback hypothesis. B's delivered branch scores 82%, yet fallback lowers its assigned-user rate below A. Removing fallback changes the estimand; delivered-only success is not causal proof. Contain harm and remeasure any repair.Contain harm and retain evidence;check in this order?1. Valid observation?Assignment, denominators,instrumentation, labelmaturity?2. Actual delivery?Replay model, feature andcandidate versions; inspectlatency and fallback?3. Product effect?After checks pass, test onemodel or feedbackhypothesisExact delivery toy: one commonthousand-user scaleA: 800 successes among 1,000 assignedB's routing branches still containevery assigned user900 delivered: 738 successes; 82%conditional rate100 fallback: 40 successes; 40%conditional rateMerge successes, but keep theoriginal 1,000-user denominatorB: 778 of 1,000; 77.8% versus A's80.0%The delivered-only comparisondiscards routing-selected users. Itcannot prove a causal modelimprovement.Join fallback reasons to latency andversion records. A repair still needscontrolled product measurement.
Read it this way: First check assignment, denominators, instrumentation, and label maturity. Then replay actual serving versions and trace latency, errors, and fallback. Only after validity and delivery checks test a model or feedback hypothesis. B's delivered branch scores 82%, yet fallback lowers its assigned-user rate below A. Removing fallback changes the estimand; delivered-only success is not causal proof. Contain harm and remeasure any repair. Does excluding fallback users preserve the originally assigned estimand?
Full interview answer 8 min read
Reading depth

Investigate why an offline model improvement accompanies an online product regression without assuming the model itself caused the gap.

Problem

Context. A report compares offline and online changes, while the separate delivery fixture below includes users receiving fallback instead of treatment.

Task. Define the compared metrics, assess delivered treatment, and choose the next test that distinguishes measurement, serving, and modeling explanations. State any immediate containment needed before investigating further.

Constraints. Preserve assignment denominators and separate assigned users from successfully served users. Check relative versus absolute changes, label maturity, and metric meaning; the supplied aggregates alone do not identify a causal defect.

A report says offline quality improved 8% while the online primary metric declined 2%. Check each metric’s denominator, baseline and relative-change definition before comparing them.

In a separate hypothetical delivery fixture, A serves 1,000 assigned users and records 800 successes. B delivers the new model to 900 users, recording 738 successes. Its other 100 users receive fallback, with 40 successes. Where should the next discriminating check focus?

Picture

Keep assigned users in the product denominator while tracing delivery branches separately.

The missing 100 users change which arm wins

The missing 100 users change which arm winsBoth illustrative arms contain 1,000 assigned users. A has 800 successes. B routes 900 users to the model, with 738 successes, and 100 to fallback, with 40 successes. The 900-to-100 strip is proportional. B therefore has 778 successes, 77.8 percent overall, despite 82 percent among model-delivered users.Illustrative: 1,000 assigned users in eacharmA: 800 successes / 1,000 = 80%all 1,000 assignedB: delivery is part of the treatment900 model100738 successes40 fallback successes(738 + 40) / 1,000 = 77.8%82% model-only != 77.8% assigned-userresult
The denominator is everyone assigned, including fallback users. B has 738 + 40 successes, so 77.8% loses to 80%. These counts are illustrative.
Check: How can B's model succeed at 82% while B's assigned-user outcome is worse than A's 80%?
Reference drawing

Verify the observation, trace actual delivery, then test the product-effect hypothesis

Verify the observation, trace actual delivery, then test the product-effect hypothesisFirst check assignment, denominators, instrumentation, and label maturity. Then replay actual serving versions and trace latency, errors, and fallback. Only after validity and delivery checks test a model or feedback hypothesis. B's delivered branch scores 82%, yet fallback lowers its assigned-user rate below A. Removing fallback changes the estimand; delivered-only success is not causal proof. Contain harm and remeasure any repair.Contain harm and retain evidence;check in this order?1. Valid observation?Assignment, denominators,instrumentation, labelmaturity?2. Actual delivery?Replay model, feature andcandidate versions; inspectlatency and fallback?3. Product effect?After checks pass, test onemodel or feedbackhypothesisExact delivery toy: one commonthousand-user scaleA: 800 successes among 1,000 assignedB's routing branches still containevery assigned user900 delivered: 738 successes; 82%conditional rate100 fallback: 40 successes; 40%conditional rateMerge successes, but keep theoriginal 1,000-user denominatorB: 778 of 1,000; 77.8% versus A's80.0%The delivered-only comparisondiscards routing-selected users. Itcannot prove a causal modelimprovement.Join fallback reasons to latency andversion records. A repair still needscontrolled product measurement.
Derivation
The missing 100 users change which arm winsBoth illustrative arms contain 1,000 assigned users. A has 800 successes. B routes 900 users to the model, with 738 successes, and 100 to fallback, with 40 successes. The 900-to-100 strip is proportional. B therefore has 778 successes, 77.8 percent overall, despite 82 percent among model-delivered users.Illustrative: 1,000 assigned users in eacharmA: 800 successes / 1,000 = 80%all 1,000 assignedB: delivery is part of the treatment900 model100738 successes40 fallback successes(738 + 40) / 1,000 = 77.8%82% model-only != 77.8% assigned-userresult
The denominator is everyone assigned, including fallback users. B has 738 + 40 successes, so 77.8% loses to 80%. These counts are illustrative.
Check: How can B's model succeed at 82% while B's assigned-user outcome is worse than A's 80%?
Read it this way: First check assignment, denominators, instrumentation, and label maturity. Then replay actual serving versions and trace latency, errors, and fallback. Only after validity and delivery checks test a model or feedback hypothesis. B's delivered branch scores 82%, yet fallback lowers its assigned-user rate below A. Removing fallback changes the estimand; delivered-only success is not causal proof. Contain harm and remeasure any repair. Does excluding fallback users preserve the originally assigned estimand?

Calculate, then test a cause

A’s rate is ; the difference is , or percentage points. This is not the prompt’s separate reported relative change. The delivered-model rate conditions on routing and does not identify a causal model improvement.

First: verify the observation

  1. Contain harm under declared rollback conditions; preserve logs and versions.
  2. Check assignment, exposure, sample ratios, instrumentation, uncertainty, delayed outcomes and novelty or seasonality.
  3. Replay production inputs through the actual model, feature, candidate and preprocessing versions.
  4. Inspect latency, errors, fallback and differences by user, item, time and surface.
  5. After validity and delivery pass, test a specific model-quality or feedback hypothesis.
HypothesisPredicted observationCheap discriminating checkNext action
Latency triggers fallbackFallback rises on slow requestsJoin routing reasons with latency/version recordsContain; repair and measure again
Preprocessor is staleSame raw input yields different featuresCompare versioned feature snapshotsFix parity before retraining

Record actual results and rollback conditions alongside the hypothesis. These observations can localize delivery faults; they do not prove fallback is the only cause. Restoring delivery needs a new controlled measurement of product effects.

Change the population or label source

1. Only new users regress

Picture and change: compare feature defaults, candidate coverage and exposure using new-user traces.

Check: a replay matching returning users but failing new users localizes the next parity test.

Use when: a specific slice explains the aggregate change; do not jump directly to general drift.

2. Labels came from the old ranker

Picture and change: inspect logged exposure support and negative sampling after delivery checks. Use independent judgments or justified randomized exploration.

Check: an unexposed item with no click is not an observed negative.

Use when: the previous policy selected the evaluation population.

Failure and transfer

Immediate retraining changes the model while a stale serving preprocessor remains deployed, obscuring the fault.

What can shadow replay establish?

Check your answer

Prediction-path parity on replayed inputs, not how users respond to a changed live policy.

The main cause families

Objective mismatch: a better proxy such as clicks or NDCG need not improve satisfaction or the declared user outcome.

Evaluation bias: inspect time/label leakage, repeated entities, biased negatives and unrepresentative data.

Skew: check feature definitions, freshness, defaults, preprocessing, versions and candidates.

System effects: latency, downstream load, inventory diversity and fallbacks can change product outcomes.

Feedback: exposure changes future labels; users, suppliers and adversaries may adapt.

Distinguish evidence types

Counterfactual estimates require exposure support and justified assumptions. Long-term holdbacks need valid assignment, enough duration and consideration of interference. Neither is a universal substitute for controlled product measurement.

Keep the investigation falsifiable

Compare permissioned sampled inputs and outputs without exposing sensitive data. Predeclare what result changes the next action, then improve the evaluation that missed the fault.

Common follow-ups

New-user regression needs slice-specific parity checks. For noisy delayed outcomes, wait for mature cohorts and use the planned uncertainty method. Keep running only within authorized risk limits and predeclared monitoring/stopping rules, not because offline quality improved.

Related: delayed and selective labels, point-in-time correctness, causal inference, and A/B testing for ML.