Separate a data defect from a changed population
Investigate quality regressions with versioned evidence, slice-aware rates, controlled replay, and explicit containment decisions.
On this page
The question for today
What you’ll understand
- Contain affected publications while preserving the evidence needed for diagnosis.
- Decompose aggregate quality changes into slice rates and population weights.
- Use controlled replay and lineage to test competing mechanism hypotheses.
A model's missing-feature alert jumps overnight. The producer changed, the traffic mix shifted, and the validator was also upgraded. Reverting the latest code may help, or may merely hide a legitimate population change. Quality triage starts by identifying the affected artifacts and preserving comparable evidence, then testing hypotheses about the mechanism. A useful incident response protects consumers while resisting the temptation to convert one correlated dashboard change into a proven root cause.
Contain the impact and preserve reproducible evidence
Identify which datasets, partitions, time windows, policy versions, and training runs may be affected. Use explicit lineage and pinned artifacts to bound the investigation, while noting capture gaps rather than assuming the graph is exhaustive. Depending on the contract, stop publication, quarantine a suspect partition, or keep consumers on a known acceptable version. Preserve source snapshots, failed records under appropriate access controls, validator output, and code/configuration identities before cleanup overwrites them. A representative diagnostic sample should retain the fields needed to explain the failure without unnecessarily spreading sensitive data into incident chat or logs.
Confirm that the alert itself uses the same rule and denominator as the prior baseline. A validator upgrade can start counting NULL differently; a parsing change can exclude failed rows before profiling; a dashboard can switch from all submitted examples to accepted examples. These changes can move a metric without improving or damaging the actual input in the way its label suggests. Verify collection and aggregation before assigning blame. Record an initial hypothesis set, such as parser defect, source corruption, join fanout, population shift, or measurement change, and identify observations that would discriminate between them.
Compare slices before interpreting the headline
Break down quality by relevant producer, schema version, collection source, label class, language, and time boundary. A higher overall failure fraction can occur even when each slice's rate is unchanged, if a high-failure slice becomes more common. That is still operationally important for the model, but it asks a different question: why did the population mix change, and was that expected? Do not automatically discard a difficult cohort to restore the aggregate number. That can conceal an ingestion error or create a training selection bias while making the quality dashboard look better.
Keep structural failures separate from statistical drift and training-serving skew. A new but valid category can reflect a real source change; an impossible unit or broken parse may indicate a producer defect. TensorFlow Data Validation illustrates distinct schema, drift, and skew checks, whose thresholds and environments require deliberate configuration. An alert is evidence that a defined comparison changed, not proof of its cause. Examine the exact examples and transformation stages that produce the difference. Likewise, a model score drop can arise from label or cohort changes even when all type and range constraints pass.
Test a mechanism using controlled replay
Replay pinned inputs through old and new transformations while holding relevant dependencies fixed, then compare the intermediate stage where outputs first diverge. Record tokenizer, schema, lookup table, policy, and environment versions so a supposedly controlled experiment does not change several factors at once. For a join problem, inspect key multiplicity and matched rows; for a unit change, inspect a known reference record; for missingness, distinguish absent source data from a failed extraction. A rollback can be a useful containment action without proving that the rolled-back component caused the original incident.
The matrix lab offers a tiny controlled transformation example. For each separate view, Reset, set both diagonal scale a and shear b, predict the final map, then inspect. Compare a=1, b=0 with a=2, b=0: the selected transformation doubles the first coordinate while preserving the second. The readouts describe the selected final matrix even while playback interpolates its geometry. This is not a dataset profiler or causal diagnosis engine. Its limited teaching role is to make a single changed transformation explicit, in contrast to comparing two pipeline runs whose inputs, code, and population all changed together.
Work it through
A changed mixture can move the aggregate rate
Source A has a stable 1% failure rate and source B a stable 10% rate. Before an incident, a1000-row batch contains 900 A rows and 100 B rows; afterward it contains 100 A rows and 900 B rows. Assume the counts of failures exactly match these rates for this arithmetic.
Before the shift, failures are 9 from A and 10 from B, totaling 19/1000=1.9%.
After the shift, failures are 1 from A and 90 from B, totaling 91/1000=9.1%. Neither source’s within-slice failure rate changed in this example.
The aggregate increased by 7.2 percentage points because the weights changed. Investigate whether the changed source mix is expected or a pipeline defect; the arithmetic alone cannot decide that operational question.
The headline regression is real, but it does not establish a new within-source parser defect. Slice rates and population weights lead to a more precise next investigation.
The living notebook
Explore the model
Interactive lab · matrix
Change one selected transformation at a time
For each separate view: Reset, set both a and b, predict the final transform, then inspect. Compare a=1, b=0 with a=2, b=0 in A=[[a, b],[0, 1]]. The first coordinate doubles and the second is unchanged. Playback interpolates geometry; readouts always describe the selected final matrix.
- Area scale · det A
- 1.4
- Singular values · σmax, σmin
- 1.597, 0.876
- Condition number · κ₂(A)
- 1.823
The selected matrix is A = [[a,b],[0,1]]. Playback interpolates geometry between the identity and A; readouts always describe A. Its determinant is a and its singular values come from AᵀA. Positive a makes every supported matrix invertible. This two-dimensional family is not a general eigensolver or a learned network. 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 forThis two-dimensional transform is not a data-quality or root-cause solver. It illustrates a controlled mechanism change, whereas an uncontrolled before/after pipeline comparison can mix several causes.
Pause & reason
Check your understanding
Your turn
Try it yourself
An assessed 2000-row cohort had 20 invalid rows before and 200 afterward. Compute the absolute percentage-point change and relative multiplier. What evidence would distinguish a changed transformation from changed inputs?
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Calculate each fraction first, then hold one factor fixed during replay.
Compare with the solution
The rates are 1% and 10%, a9-percentage-point increase and a10× relative multiplier. Neither number proves causality. Replaying the same pinned inputs through the two transformation versions with other dependencies fixed can test the transformation hypothesis.
Keep the idea
Take it with you
- Contain publication impact while preserving versioned diagnostic evidence.
- Aggregate rates mix population weights with within-slice behavior.
- Controlled replay and stage-level observations test mechanisms more strongly than chronology alone.
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.