04
The comparison lab
Same six targets. Same scorer. Change what training reveals.
Two decoders you can inspect
This is a synthetic symbolic OCR analogue. It does not read pixels. We corrupt body digits 1 → l and 0 → O, leaving the page suffix unchanged. The baseline repairs every lowercase l to 1. The candidate repairs O to 0, and can also remember a labeled document body from training.
The candidate uses the document ID as a lookup key. If it has a template, it copies that body and appends the observed page suffix. Otherwise it uses its generic substitution rule. A template is learned only from admitted training labels; target references are used only for scoring.
Both protocols admit six training pages with matched reference lengths. Disjoint training uses G1–L1. Sibling-exposed training uses A1–F1. The targets remain A2–F2 throughout. The actual training content changes; the contrast is a deliberately constructed mechanism, not a measured causal effect for a real learned model.
LAB-001 · Every string and rule is invented and shipped in the canonical model.
Predict, switch, inspect
Before switching, predict: will the candidate’s template shortcut still work when training contains no document A–F? Compare the candidate string for A2 in both states. Then look at E2: is the overall loser worse on every document?
What crosses the split?
Synthetic strings, symbolic decoders. These scores do not describe a real OCR model.
Disjoint documents: 0 shared document IDs. Baseline 34.69%; candidate 40.82% corpus CER.
TrainingG1 · H1 · I1 · J1 · K1 · L1
Fixed targetsA2 · B2 · C2 · D2 · E2 · F2
Equal-document mean: baseline 31.11%; candidate 41.39%. Difference +10.28 pp.
A2 · trace the shortcut
- Observed
llO-2- Reference
110-2- Baseline
11O-2· 1 edit- Candidate
ll0-2· 2 edits
No A template exists. The candidate repairs O→0 and leaves both lowercase l characters.
| Training | Baseline corpus CER | Candidate corpus CER |
|---|---|---|
| Disjoint documents | 34.69% | 40.82% |
| Sibling pages | 34.69% | 0.00% |
New-document question; same targets, references and raw-codepoint scorer. Corpus bars use a shared 0–100% axis for this fixture only; CER can exceed 100% in general. Resampling cannot fix sibling exposure.
With siblings admitted, the candidate reproduces all target bodies. With disjoint documents, it falls back to its generic rule. The baseline never uses training templates, so its predictions and score do not move. The scorer has faithfully measured two different information conditions.
The lesson is not that group splitting always lowers scores, or that all template use is wrong. It is that the test’s information condition must match the intended deployment question.
Open the full record
These records expose the observed string, reference, both predictions, edit counts and reference lengths. In the sibling-exposed protocol the candidate prediction is exactly the reference for every target; the baseline is unchanged. Nothing is inferred from a hidden model call.
A2 · 5 reference characters
- Observed
llO-2- Reference
110-2- Baseline · both protocols
11O-21 edits · 20.00%- Candidate · disjoint
ll0-22 edits · 40.00%- Candidate · sibling
110-20 edits · 0.00%
B2 · 6 reference characters
- Observed
lllO-2- Reference
1110-2- Baseline · both protocols
111O-21 edits · 16.67%- Candidate · disjoint
lll0-23 edits · 50.00%- Candidate · sibling
1110-20 edits · 0.00%
C2 · 6 reference characters
- Observed
llOO-2- Reference
1100-2- Baseline · both protocols
11OO-22 edits · 33.33%- Candidate · disjoint
ll00-22 edits · 33.33%- Candidate · sibling
1100-20 edits · 0.00%
D2 · 8 reference characters
- Observed
llllOO-2- Reference
111100-2- Baseline · both protocols
1111OO-22 edits · 25.00%- Candidate · disjoint
llll00-24 edits · 50.00%- Candidate · sibling
111100-20 edits · 0.00%
E2 · 12 reference characters
- Observed
lOOOOOOOOO-2- Reference
1000000000-2- Baseline · both protocols
1OOOOOOOOO-29 edits · 75.00%- Candidate · disjoint
l000000000-21 edits · 8.33%- Candidate · sibling
1000000000-20 edits · 0.00%
F2 · 12 reference characters
- Observed
llllllllOO-2- Reference
1111111100-2- Baseline · both protocols
11111111OO-22 edits · 16.67%- Candidate · disjoint
llllllll00-28 edits · 66.67%- Candidate · sibling
1111111100-20 edits · 0.00%
To reproduce both protocols, run node lab/run.mjs from the project folder. The canonical model (local copy) is shared by the browser and the runnable lab. Its edit-distance routine and resampling checks are included. Now we can ask a different question: how much of a comparison depends on which documents happened to be sampled?