Turn monitoring evidence into a testable replacement decision
Separate investigation triggers from model promotion, and use paired shadow evidence without mistaking mirrored predictions for a causal online experiment.
On this page
The question for today
What you’ll understand
- Define retraining triggers that first exclude broken observation and feature paths.
- Calculate a paired candidate-versus-incumbent loss difference and its sampling uncertainty.
- State what shadow traffic can and cannot establish before an online rollout.
A monitoring alert should enter a decision process with a diagnosis and an evidence requirement. Some alerts justify a pipeline repair, some justify collecting labels, and some justify training a replacement candidate. None automatically establishes that the new candidate should serve users. Separate the trigger for investigation, the decision to spend training resources, and the promotion gate. This separation prevents a noisy detector from becoming an uncontrolled deployment mechanism.
Require evidence for the remedy, not just the symptom
Before retraining, verify capture health, target definition, feature semantics, label completeness, and important policy changes. A persistent labeled degradation on supported cohorts is stronger evidence of a model problem than an unlabeled distance alone, but even that degradation needs a mechanism review. Record which populations changed, which metrics matter, and which corrective hypotheses will be tested. A recurring calendar change might justify a better training mixture; a missing feature source instead calls for restoration and perhaps a fallback. Preserve the incumbent and incident cohort for later comparison.
The candidate's training data must respect outcome availability and deployment-time feature availability. Using future repaired information in a historical replay can make a replacement look better than it could have been live. Keep training, tuning, calibration, and final evaluation roles separate, and prevent repeated candidate selection from turning the final gate into another tuning set. Resource cost, latency, safety constraints, and critical-slice regressions belong in the release decision alongside average task loss. A lower training objective alone says little about any of those requirements.
Shadow execution measures the candidate without selecting its action
A shadow path receives a controlled copy of requests while the incumbent continues to determine user-visible actions. Log candidate responses explicitly because a traffic mirror may discard response bodies. Isolate writes, payments, notifications, and other side effects; mirroring an HTTP request does not make its execution harmless. Record shadow coverage, timeouts, feature snapshots, artifact identities, and whether shared resources changed the incumbent's latency. A candidate that only succeeds on easy or fast requests should not be evaluated as if missing shadow outputs were representative.
Paired labels permit a loss comparison on the incumbent-generated request and outcome population when both predictors share the relevant target. Shadowing can reveal feature incompatibilities, numerical failures, score changes, and resource costs. It cannot directly measure how users would react to the candidate's different recommendations or decisions. If those actions change exposure or outcomes, a suitably designed online experiment or another identified evaluation method is required. Even latency measurements need comparable execution conditions: isolated shadow capacity and production contention answer different capacity questions.
Promote through a versioned gate and retain a rollback path
Define practical improvement or noninferiority margins and critical constraints before inspecting final results. Require enough relevant outcomes and report uncertain slices rather than treating lack of evidence as a pass. Store the evaluation dataset, scoring implementation, thresholds, candidate and incumbent artifacts, and the decision record together. A staged rollout then tests actual serving behavior, with monitored exposure and an explicit rollback criterion. Repeatedly checking a fixed-sample gate until it passes requires an appropriate sequential or selection-aware justification rather than relabeling every look as a fresh evaluation.
The optimizer instrument illustrates why a successful numerical training step is only one boundary. Reset, set η=0.50 and x₀=2, predict x₂=0.50 and f(x₂)=0.125, then take two Steps. Separately Reset, set η=2 and x₀=2, predict x₂=2 and f(x₂)=2, then take two Steps. The second setting alternates signs without reducing the quadratic objective. This exact one-variable recurrence has no data, labels, shadow requests, or deployment gate. Even the setting that lowers its objective provides no evidence of production quality or safe promotion.
Work it through
Use discordant pairs rather than two unrelated accuracy totals
A mature shadow cohort has 1,000 independent request–label pairs. The incumbent alone is wrong on thirty pairs, the candidate alone is wrong on ten, both are wrong on fifty, and both are correct on 910. Use binary error loss to calculate the paired mean difference and its estimated standard error.
The incumbent has 30+50=80 errors, or 8%; the candidate has 10+50=60 errors, or 6%. The paired differences are −1 on thirty requests, +1 on ten, and zero on the remaining 960.
The difference sum is −30+10=−20, giving Δ̂=−20/1,000=−0.02. The sum of squared differences is forty, so s²=(40−1,000×0.02²)/999=39.6/999≈0.0396396.
Estimated standard error is √(0.0396396/1,000)≈0.006296, about 0.63 percentage points. This estimate assumes independent pairs; a promotion claim also needs the predeclared margin, slice constraints, and a valid evaluation schedule.
The candidate reduces observed error by two percentage points on this paired cohort. Shadow evidence alone does not identify the effect of changing user-visible actions.
The living notebook
Explore the model
Interactive lab · optimization
Training-objective movement is only one gate
Reset, set η=0.50 and x₀=2, predict x₂=0.50 and f=0.125, then take two Steps. Separately Reset, set η=2 and x₀=2, predict x₂=2 and f=2, then take two Steps. Each Step advances one iteration of xₙ=(1−η)ⁿx₀. This quadratic optimizer has no production data or model-release evidence.
- Position x0
- 2
- Objective x²/2
- 2
- Iteration behavior
- Stable step
Gradient descent on f(x) = x²/2: xₙ = (1 − η)ⁿx₀. Playback advances two discrete iterations per second. Values outside |x| ≤ 4 are explicitly reported. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forTraining progress and replacement safety require different evidence.
Pause & reason
Check your understanding
Your turn
Try it yourself
On 200 paired requests, the candidate fixes twelve incumbent errors and introduces four new errors; all other correctness outcomes agree. Find the candidate-minus-incumbent mean error difference. If a critical slice worsens beyond its predeclared limit, does the aggregate improvement suffice for promotion?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Only discordant pairs contribute nonzero differences.
Compare with the solution
The difference is (4−12)/200=−0.04, a four-percentage-point observed error reduction. It does not override a failed critical-slice constraint. Inspect that slice's evidence and the predeclared gate, and obtain more or better evidence if needed. The observed average is one input to the release decision, not permission to bypass the other conditions.
Keep the idea
Take it with you
- Investigation, retraining, and promotion are separate decisions.
- Shadow execution needs response capture, side-effect isolation, and coverage accounting.
- Paired quality evidence does not replace causal online evidence when candidate actions change outcomes.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.