Seven invented records. Five questions each. One stubborn distinction: prefix provenance and objective direction are separate axes.
Applied-ML field guideTOY fixtures, sourced boundariesNo score or outcome claim
Five Prefix Autopsies
A diagnostic casebook for on-policy distillation
Here is the first training record on the desk:
Is this on-policy distillation?
Not enough information appears in the rendered answer alone. In this record, the missing fact is decisive: a teacher decoded 22 <EOS> earlier, and the sequence was stored before this student update. The student is learning now, but it did not generate the continuation it is learning on.
That distinction is the center of this casebook. We will examine seven invented training records through the same five questions. By the end, you should have a practical way to describe a record without letting one attractive label do five different jobs.
This is a diagnostic reading experience, not a benchmark or learner study. Its experimental premise—that repeated classification of matched near misses may help practical distinction-making—is unproven. Completing the final set does not establish mastery, retention, or real-world performance.
Evidence key
SOURCE means a claim is supported by the linked primary paper or official record, within the stated scope.
DERIVED means arithmetic or a transparent consequence of disclosed inputs.
TOY means an invented prompt, probability, completion, score, or mixture. No item with this label is a real model run.
INFERRED means a bounded interpretation of a cited objective or algorithm.
UNRESOLVED means the record lacks information needed for a faithful equality or method claim.
All readable word pieces in the dossiers are illustrative; they do not assert production tokenizer boundaries. Probability-vector cases explicitly assume aligned teacher/student token support.
The autopsy sheet
Every dossier uses CASE-FRAME-001 in the same order:
Who generated this prefix? Record the prompt source separately from the continuation source.
What exactly did the teacher supply? A hard target, a dense distribution, a subset of probabilities, a sequence-level likelihood signal, or one scalar score?
Which loss is computed where? Name the visited state or sequence, the objective, and the KL direction when there is one.
Does sampling receive a gradient? Separate no draw, a detached discrete draw, a differentiable local distribution loss, and score-function credit.
What changes next? Usually the student parameters—not the recorded token, prefix, or teacher values.
This is not merely a checklist. Removing one field collapses cases that train differently. A dense teacher vector does not reveal who generated its prefix. A reverse KL does not reveal whether its state was fixed. A sampled token does not reveal how its probability enters the estimator.
A faithful GKD-style step can likewise be read as five distinct operations: sample or select a state source, record the visited prefix, evaluate teacher and student at that prefix, construct a loss, then update the student. This decomposition follows Agarwal et al.’s algorithm; it should not be read as a claim about universal wall-clock scheduling. [SOURCE + INFERRED · OPD-CL-004] (author manuscript v3, Algorithm 1)
CASE-FIG-001
The five-tray autopsy sheet
INFERRED Every dossier answers all five questions. The specimen column uses CASE-DOS-03.
If omitted: A method name gets mistaken for provenance.
CASE-DOS-03fixed x; fresh B; visited xB
02
What exactly did the teacher supply?
Required evidence
Payload and support
Answer kinds
hard target / dense vector / subset / scalar
If omitted: Feedback richness gets mistaken for freshness.
CASE-DOS-03dense [A,B] vector at xB
03
Which loss is computed where?
Required evidence
State or sequence + objective + reduction
Answer kinds
hard NLL / local KL / policy-gradient objective
If omitted: KL direction overwrites the state source.
CASE-DOS-03forward KL at x and xB
04
Does sampling receive a gradient?
Required evidence
Draw and estimator semantics
Answer kinds
no draw / detached / score-function credit
If omitted: A draw is confused with a loss or update.
CASE-DOS-03draw detached; local Sθ differentiable
05
What changes next?
Required evidence
Trainable target + held-fixed record
Answer kinds
usually student parameters
If omitted: Generation is mistaken for parameter change.
CASE-DOS-03student parameters only
Relationship: all five answers belong to one training record, but none substitutes for another.
Dossier 01 — The teacher wrote the answer
CASE-DOS-01 · TOY · CASE-CL-016
Prompt: “Write only the sum: 17 + 5 =”. Before student training, a teacher decoder stores 22 <EOS>. At each stored position, the record retains only the selected target token. It does not retain the teacher’s probability for alternatives.
Autopsy question
Finding
1. Who generated this prefix?
The prompt is fixed. Continuation prefixes after the first target token come from the stored teacher-decoded sequence, not from the student being updated.
2. What did the teacher supply?
One hard decoded token at each position: the stored sequence, not a dense probability vector.
3. Which loss is computed where?
Hard-target token negative log-likelihood/cross-entropy on the fixed teacher path.
4. Does sampling receive a gradient?
There is no current-student trajectory draw. The teacher’s earlier decoding created data; it is not a differentiable path through the current student.
5. What changes next?
Student parameters change to increase the stored targets’ likelihood. The stored sequence and teacher do not change in this update.
Diagnosis: basic/mode-approximation SeqKD-style hard-target training on a fixed teacher-decoded sequence. It is not on-policy student-prefix distillation for the student now being updated.
Tempting wrong label: “It is on-policy because the student is updated immediately.” Update timing does not rewrite continuation provenance.
Evidence seal. Kim and Rush’s basic SeqKD construction approximates the teacher sequence distribution with a high-scoring decoded output, then trains the student on the resulting generated dataset. This supports the diagnosis above, but it does not establish that every later method called “sequence KD” uses exactly one beam output. [SOURCE · CASE-CL-001] (Kim & Rush, EMNLP 2016, §3.2, pp. 1319–1320)
Now change one thing: keep the stored path, but ask the teacher for more information.
Dossier 02 — Same prefix, fuller teacher payload
CASE-DOS-02 · TOY · CASE-CL-016
Reuse the arithmetic prompt and fixed teacher-decoded prefixes from Dossier 01. At each same fixed prefix, query the teacher for a full next-token distribution over a declared, aligned toy vocabulary.
Autopsy question
Finding
1. Who generated this prefix?
The same fixed/teacher-generated record as Dossier 01. Denser feedback does not change its source.
2. What did the teacher supply?
A dense probability distribution over every token in the aligned toy vocabulary at that prefix.
3. Which loss is computed where?
A declared token-distribution discrepancy—forward KL in this dossier—at each fixed stored prefix, followed by the declared position reduction.
4. Does sampling receive a gradient?
No student sampling constructs these prefixes. Gradients flow through student probabilities in the local distribution loss, not through the fixed record.
5. What changes next?
Student parameters change to reduce the discrepancy on the fixed states. Teacher probabilities and stored prefixes remain fixed for the update.
Diagnosis: dense full-distribution distillation on fixed prefixes; still not on-policy state sampling.
Tempting wrong label: “Full teacher probabilities make the record on-policy.” Feedback richness and prefix provenance occupy different fields.
In Agarwal et al.’s supervised token-level KD expression, the teacher and student distributions are compared on prefixes from a fixed dataset. The equation can carry dense teacher information without turning those prefixes into student-generated states. [SOURCE + INFERRED · CASE-CL-002] (Agarwal et al., author manuscript v3, Eqs. 2–3)
Controlled pair 01 — Hard versus dense, provenance held fixed
Field
Dossier 01
Dossier 02
Prompt and prefix source
Fixed teacher-decoded path
The same fixed path
Teacher payload
One decoded target token
Full aligned-vocabulary distribution
Local training object
Hard-target NLL/cross-entropy
Forward KL / equivalent cross-entropy up to teacher-only terms
Current-student rollout
None
None
What the comparison isolates
Feedback granularity
Feedback granularity
[INFERRED · CASE-PAIR-01] A hard target discards the teacher’s allocation over alternatives; a dense vector retains it. Neither payload makes the fixed state on-policy.
The next record changes provenance for real: the student chooses the branch.
Dossier 03 — The student takes the branch; forward KL follows
CASE-DOS-03 · OPD-TOY-001 · TOY · CASE-CL-016
Begin with fixed prompt x and an aligned toy vocabulary [A, B]. At x, the student assigns [0.75, 0.25] to [A, B]. Supply the uniform value u=0.8. Because the cumulative interval for A ends at 0.75, the categorical draw is B, and the next visited prefix is xB.
At the two visited states, the fixture contains:
State
Student [A,B]
Teacher [A,B]
x
[0.75, 0.25]
[0.50, 0.50]
xB
[0.60, 0.40]
[0.90, 0.10]
Every number is invented. The behavior snapshot that draws B is declared to be the current student for this local record. That declaration matters: text produced by an older student is not automatically on-policy for a later update.
Autopsy question
Finding
1. Who generated this prefix?
The prompt x is fixed; the current student samples continuation token B. Thus xB is a student-visited on-policy prefix under the disclosed snapshot.
2. What did the teacher supply?
A dense distribution over the same [A,B] support at each visited prefix.
3. Which loss is computed where?
Forward KL, teacher-to-student, at x and xB; the two local losses are averaged.
4. Does sampling receive a gradient?
The discrete draw B is detached in this GKD-style toy. The student still receives gradients through its differentiable probability vector in the local losses.
5. What changes next?
A later optimizer step would change student parameters using the selected local loss. The realized draw, recorded prefixes, and teacher vectors remain fixed for that update.
Diagnosis: GKD-style on-policy prefix distillation with a forward-KL objective under this local detached-draw contract.
Tempting wrong label: “Forward KL means off-policy.” It does not. KL direction tells us how distributions are compared, not who generated xB.
Agarwal et al.’s on-policy loss samples a completion from the student and evaluates teacher and student token distributions on its intermediate prefixes; the paper’s Eq. 4 uses forward KL. Its algorithm separately chooses the student-data fraction and the divergence. [SOURCE · OPD-CL-001, OPD-CL-002, OPD-CL-003, CASE-CL-003] (official ICLR 2024 record; author manuscript v3, §3.1 and Eq. 4)
A fixed prompt set is compatible with this: prompt x can come from a fixed collection while the continuation and later prefixes come from the student. [SOURCE · OPD-CL-006] (Agarwal et al., §3 and Eq. 4)
There is one more fixed record in the fixture: xA, from a teacher-demonstration comparison. It is displayed later, but it is not part of this student-visited path and must not enter the canonical mean.
CASE-FIG-002
One rollout trace, five distinct operations
SOURCE + INFERRED Workflow order does not create a gradient through the discrete draw.
1
Student samples
At fixed rollout start x, S(.|x)=[0.75,0.25] and u=0.8 selects B.
TOY · detached draw
2
Visited prefix
Append realized B to form xB. This continuation state is fresh-student under the disclosed snapshot.
PROVENANCE · xB
3
Teacher evaluates
At that same xB, T(.|xB)=[0.9,0.1]. Teacher allocation is not ground truth.
SAME PREFIX · xB
4
Local objective
At recorded states, forward and reverse KL are alternative objective choices. The canonical mean includes fixed start x and visited xB; xA is comparison only.
DERIVED · x + xB
5
Student update
An optimizer would consume the selected local objective. This arithmetic fixture executes no optimizer step.
NOT EXECUTED
⊣ no gradient through realized B in this local toy; student probability terms in the selected loss remain differentiable
Held fixed for the hypothetical local update: teacher values, realized B, and the recorded prefixes. Only student parameters would change.
Dossier 04 — Same student branch; reverse the discrepancy
CASE-DOS-04 · OPD-TOY-001 · TOY · CASE-CL-016
Reuse everything from Dossier 03: prompt x, current-student draw B, visited prefix xB, both student vectors, both teacher vectors, detached draw, and unweighted two-position reduction. Change only the local divergence from teacher-to-student to student-to-teacher.
Autopsy question
Finding
1. Who generated this prefix?
The student generated the continuation that formed xB; provenance is unchanged.
2. What did the teacher supply?
The same dense [A,B] distributions at the same student-visited states.
3. Which loss is computed where?
Reverse KL, student-to-teacher, at x and xB, followed by the same unweighted mean.
4. Does sampling receive a gradient?
The discrete draw remains detached in this local fixture. Gradients flow through the student distribution terms in the reverse-KL loss.
5. What changes next?
A later optimizer step would change student parameters according to those local losses. Prefix provenance and the observed draw do not change.
Diagnosis: GKD-style on-policy prefix distillation with reverse KL under the same local detached-draw contract.
Tempting wrong label: “This is on-policy because reverse KL is on-policy.” Dossier 03 is the counterexample: it is equally on-policy with forward KL.
GKD treats divergence choice and student-data fraction as separate controls and includes reverse KL among its divergence variants. That supports this pairing; it does not imply reverse KL is universally preferable. [SOURCE · OPD-CL-003, CASE-CL-004, CASE-CL-017] (Agarwal et al., §3.1 “Choice of Divergence” and §4)
Controlled pair 02 — Forward versus reverse, provenance held fixed
Field
Dossier 03
Dossier 04
Student draw and visited path
u=0.8 → B → xB
Same
Prefix provenance
Fresh current-student continuation
Same
Teacher payload
Dense [A,B] vectors at x and xB
Same
Sampling semantics
Detached discrete draw; local distribution gradient
Same
Deliberate change
Forward D_KL(T ∥ S)
Reverse D_KL(S ∥ T)
[DERIVED · CASE-PAIR-02] Both records are on-policy on the provenance axis. Only the weighting inside the discrepancy changes.
CASE-FIG-003
State or behavior provenance × objective family
SOURCE + DERIVED Move on one axis without silently moving on the other. Mixed entries name their subtype; empty cells mean “not represented here,” not impossible.
State / behavior provenance ↓ / objective →
Hard target
Dense forward KL
Dense reverse KL
Scalar reward
Sequence reverse KL
Partial / top-k
Fixed / teacher-generated
CASE-DOS-01
CASE-DOS-02
OPD-XFER-A
—
—
—
Fresh student-generated
—
CASE-DOS-03 OPD-XFER-B
CASE-DOS-04
CASE-DOS-06 CASE-XFER-001-B
—
—
Mixed provenance — subtype required
—
CASE-DOS-05 fixed/student states
—
—
CASE-DOS-07 teacher/student behavior sampler
—
Unresolved without freshness
—
—
—
—
—
CASE-XFER-002
Fixed / teacher-generated
CASE-DOS-01 · hard target
CASE-DOS-02 · dense forward KL
OPD-XFER-A · dense reverse KL
Fresh student-generated
CASE-DOS-03 · dense forward KL
CASE-DOS-04 · dense reverse KL
CASE-DOS-06 / CASE-XFER-001-B · scalar reward
Mixed provenance — subtype required
CASE-DOS-05 · fixed/student states · dense forward KL
[SOURCE · OPD-CL-003, CASE-CL-003, CASE-CL-004] These are the conventional KL definitions used in the GKD paper. They are asymmetric; if the weighting distribution has positive mass where the denominator distribution has zero mass, the divergence is infinite rather than silently clipped. (Agarwal et al., §2)
Rendering contract. The displayed equations are the canonical LaTeX source. The site should render them with semantic MathML, for example through KaTeX’s HTML+MathML output, and retain the nearby prose as the no-script/print interpretation. Do not replace them with raster images. Plain-text fallback names are D_KL(T || S) and D_KL(S || T).
Compute OPD-TOY-001
All inputs in this subsection are TOY. All values produced from them are DERIVED. Natural logarithms make the unit nats. The fixture scores exactly two positions, x and xB, with an unweighted mean. It models no EOS transition.
[DERIVED · OPD-TOY-001, CASE-LAB-001] The different means arise because the two directions weight the same log ratios differently. They do not show that either objective is better for a real model. xA is a useful contrast precisely because it is excluded.
CASE-FIG-004
OPD-TOY-001 — same path, two KL directions
TOY inputs DERIVED arithmetic. Bars are invented allocations, not truth or calibrated correctness.
x
fixed rollout start
IN MEAN
Student A0.75
Student B0.25
Teacher A0.50
Teacher B0.50
Forward D_KL(T || S)
0.143841 nats
Reverse D_KL(S || T)
0.130812 nats
xB
student-visited after detached B draw
IN MEAN
Student A0.60
Student B0.40
Teacher A0.90
Teacher B0.10
Forward D_KL(T || S)
0.226289 nats
Reverse D_KL(S || T)
0.311239 nats
xA
fixed teacher-demonstration comparison
NOT IN MEAN
Student A0.30
Student B0.70
Teacher A0.80
Teacher B0.20
Forward D_KL(T || S)
0.534111 nats
Reverse D_KL(S || T)
0.582685 nats
Teacher-weighted forward mean0.185065 natsx + xB only
Student-weighted reverse mean0.221025 natsx + xB only
Relationship: reversing the KL weighting changes the arithmetic, not the recorded path. Means use full-precision operands; xA remains excluded.
Lab bench — recompute, then inspect membership
CASE-LAB-001 is a standard-library Python companion. It is an arithmetic demonstration, not a language-model training run. The complete runnable source is lab/run.py; the focused excerpt below is CASE-LAB-LIST-002.
def kl_divergence(p, q):
p_checked = validate_distribution(p, label="p")
q_checked = validate_distribution(q, label="q")
if len(p_checked) != len(q_checked):
raise ValueError("p and q must have the same length")
terms = []
for p_i, q_i in zip(p_checked, q_checked):
if p_i == 0.0:
continue
if q_i == 0.0:
return math.inf
terms.append(p_i * math.log(p_i / q_i))
return math.fsum(terms)
Run from the variant folder:
python -B lab/run.py
Deterministic output — captured from the delivered constants and Python standard-library operations:
prefix source reverse KL forward KL canonical mean?
x fixed rollout start 0.130812 0.143841 yes
xB student-visited 0.311239 0.226289 yes
xA off-policy comparison 0.582685 0.534111 no
mean(x, xB) 0.221025 0.185065
draw: u=0.8 -> B -> xB; gradient_through_draw=false (local toy only)
xA is displayed for comparison and excluded from both means.
The lab keeps student_sampling → visited_prefix → teacher_evaluation → local_loss_computation → parameter_update as distinct named stages (CASE-LAB-LIST-004). The last stage is intentionally not executed: this fixture does not invent parameters, gradients, or an optimizer. Its local draw is detached, but that does not prevent differentiation through S_θ(·|x) and S_θ(·|xB) in a selected local loss.
The captured run passed its eight internal contract checks, and the focused suite passed 31 tests under Python 3.12.0. Those are implementation checks, not model-quality or learner-outcome evidence. The lab does not test a real tokenizer, EOS handling, behavior-policy lag, sequence-level policy gradients, reward learning, or whether one KL direction is generally preferable.
Dossier 05 — One batch, two prefix sources
CASE-DOS-05 · TOY · CASE-CL-016
Prompt: “Condense to five words: The prototype battery lasted nine hours during the bench test.” An invented 50/50 source rule selects either a stored fixed prefix, Battery lasts, or a freshly sampled current-student prefix, Nine-hour battery. The teacher supplies a dense next-token vector at whichever prefix is selected. Both branches use the same forward-KL local loss.
Autopsy question
Finding
1. Who generated this prefix?
One branch is fixed; the other is current-student-generated. The record is mixed, and the 50/50 rule must survive aggregation. The prompt is fixed in both branches.
2. What did the teacher supply?
A dense next-token distribution at the selected prefix.
3. Which loss is computed where?
Forward KL on states from both sources, combined by the disclosed source weights.
4. Does sampling receive a gradient?
No draw occurs on the fixed branch. The student draw is detached in this local teaching case; student probabilities in the selected local loss remain differentiable.
5. What changes next?
Student parameters receive losses from both source populations. The provenance field must not be erased by the mean.
Diagnosis: fixed/on-policy mixture—not purely on-policy and not purely fixed.
Tempting wrong label: “A fixed prompt set makes the whole batch offline.” The prompt is fixed; one continuation is freshly generated by the student.
For a disclosed toy weight \lambda_{\mathrm{data}}=0.5, the case is represented as
[SOURCE + TOY · CASE-CL-005] GKD’s λ controls how often student-generated rather than fixed outputs supply training states; 0.5 here is only an invented clarity aid, not a recommendation. (Agarwal et al., §3.1, Algorithm 1 and boxed objective)
Do not confuse this coefficient with generalized-JSD β, which changes a divergence, or ImitKD’s β_i, which controls an initial-data versus student-sequence mixture in that paper. [SOURCE · CASE-CL-006, CASE-CL-007] (Agarwal et al., §2 Eq. 1; Lin et al., EMNLP 2020, §§3.2–3.3)
Dossier 06 — A teacher score is not automatically distribution distillation
CASE-DOS-06 · TOY · CASE-CL-016
Reuse the summary prompt. The current student samples Nine-hour battery bench result. <EOS>. A teacher-like judge returns only the invented scalar 0.8 for the completed sequence. The record contains no hard teacher target, dense teacher distribution, or sampled-token teacher likelihood.
Autopsy question
Finding
1. Who generated this prefix?
The current student generated the completion, so its trajectory provenance is on-policy under the stated freshness assumption.
2. What did the teacher supply?
One uncalibrated scalar score for the completed sequence.
3. Which loss is computed where?
An algorithm-specific scalar-reward RL objective over sampled sequences. A prefix-distribution KL cannot be reconstructed from one score.
4. Does sampling receive a gradient?
Token identities are not pathwise differentiated. A score-function estimator may attach credit through sampled-token log probabilities; its returns, baseline, normalization, and regularization must be stated.
5. What changes next?
Student parameters may change to increase expected return. The score does not reveal a teacher token distribution or causal explanation.
Diagnosis: on-policy scalar-reward RL in this record. Calling it prefix-distribution OPD would be unsupported.
Tempting wrong label: “A teacher produced feedback, so this must be distillation.” Teacher identity does not specify payload or objective.
The bounded claim is source-specific: Agarwal et al.’s combined objective writes expected scalar reward and generalized on-policy distillation as separate summands. This invented record contains the scalar-reward term and no distribution-matching term. RL and distillation can still be combined; this dossier does not declare them mutually exclusive or impose a universal naming rule on all literature. [SOURCE + INFERRED · CASE-CL-008] (Agarwal et al., §3.2 Eq. 5)
One sharp score is not proof of correctness. Nor would a sharp teacher probability vector be proof: it is a teacher-matching signal, and the cited GKD paper explicitly notes a teacher can hallucinate. [SOURCE + INFERRED · CASE-CL-014] (Agarwal et al., §4.1)
Dossier 07 — Sequence-level reverse KL is a different estimator family
CASE-DOS-07 · TOY surface + SOURCE method · CASE-CL-009, CASE-CL-016
Prompt: “Correct OCR: rnodern rneter.” In the toy surface, the current student samples modern meter <EOS>. We now use that surface to inspect MiniLLM’s method family: a sequence-level student-to-teacher reverse-KL objective with policy-gradient semantics.
Autopsy question
Finding
1. Who generated this prefix or sequence?
In this toy record, the current student generated it. For MiniLLM’s practical estimator, the behavior sampler must be recorded separately because the paper also introduces a teacher/student mixture sampler with importance weighting.
2. What did the teacher supply?
The published estimator uses two teacher payloads: a dense next-token teacher distribution for its exact single-step component at sampled prefixes, and teacher log-likelihood on sampled tokens for its long-horizon sequence-return component.
3. Which loss is computed where?
Sequence-level D_KL(S_θ(y∣x) ∥ T(y∣x)), estimated with method-specific decomposition and corrections. It is not the two-position local mean from OPD-TOY-001.
4. Does sampling receive a gradient?
A score-function/policy-gradient term accounts for sampling-dependent sequence credit. This is not pathwise differentiation through discrete token identities.
5. What changes next?
Student parameters change under the verified sequence estimator and documented auxiliary terms. The sampled sequence remains an observed record.
Diagnosis: MiniLLM-style sequence-level reverse-KL policy-gradient distillation, kept separate from the local detached-rollout GKD toy.
Tempting wrong label: “It is just Dossier 04 summed over more tokens.” The objective level, estimator, feedback requirements, sampler, normalization, and gradient semantics differ.
The sequence-level objective family can be written
MiniLLM derives a Monte Carlo policy-gradient estimator, then introduces an exact single-step term that consumes the dense teacher next-token distribution at sampled prefixes, a long-horizon return that uses teacher likelihood on sampled tokens, a teacher/student mixture behavior distribution, importance weighting, and length normalization. Its objective is student-distribution reverse KL; its practical behavior sampler can be mixed when the paper’s mixture coefficient is nonzero. State the two payloads and the behavior source separately rather than calling every realized prefix strictly student-only. [SOURCE · OPD-CL-007, CASE-CL-009] (official ICLR 2024 record, published as “MiniLLM: Knowledge Distillation of Large Language Models”; current author manuscript v6, retitled “MiniLLM: On-Policy Distillation of Large Language Models,” §§2.1–2.3)
Controlled pair 03 — Local reverse KL versus sequence reverse KL
Field
Dossier 04
Dossier 07
Shared headline words
Student-generated; reverse KL
Student-generated; reverse KL
Objective level
Local token distributions at visited prefixes
Whole-sequence distribution objective
Teacher payload
Dense aligned-vocabulary vector at each toy state
Dense next-token vector for the exact single-step term; teacher likelihood on sampled tokens for the long-horizon return
Sampling semantics
Rollout detached in the GKD-style local estimator
Score-function/policy-gradient credit; practical mixed sampler and corrections
Reduction
Invented unweighted mean over x,xB
Published method-specific decomposition and length treatment
[SOURCE · OPD-CL-007] Two shared labels do not establish estimator equivalence.
CASE-FIG-005
Controlled near-miss bench
SOURCE + TOY Pairs A, B, and D isolate a primary changed field. Bridge C names both changes explicitly.
PAIR A
Held constant · Arithmetic prompt and fixed teacher path
Shared headline words do not establish estimator equivalence.
The two-axis field map
The seven records can now be summarized without pretending they form one linear spectrum.
Dossier
Continuation-prefix source
Teacher payload
Objective location
Sampling semantics
Working diagnosis
CASE-DOS-01
Fixed teacher-decoded
Hard token
Fixed token positions
No student draw
Basic SeqKD-style hard-target training
CASE-DOS-02
Same fixed prefixes
Dense full distribution
Fixed token positions
No student draw
Dense fixed-prefix KD
CASE-DOS-03
Fresh student
Dense full distribution
Student-visited token states, forward KL
Detached draw; local gradient
GKD-style on-policy + forward KL
CASE-DOS-04
Same fresh student path
Same dense distributions
Same states, reverse KL
Same detached draw
GKD-style on-policy + reverse KL
CASE-DOS-05
Disclosed fixed/student mixture
Dense distribution
Mixed-source token states
None on fixed branch; detached locally on student branch
Mixed-state distillation
CASE-DOS-06
Fresh student
Scalar sequence score
Expected-return objective
Score-function credit if specified
Scalar-reward RL; no prefix-distribution KD shown
CASE-DOS-07
Objective-level student sequence; practical sampler must be disclosed
Method-specific likelihood signal
Sequence-level reverse KL
Policy-gradient estimator, with method-specific corrections
MiniLLM-style sequence reverse KL
Misconception ledger
The wrong labels are tempting because real method names often bundle several choices. This ledger points back to the field that actually discriminates. It is also the complete static form of CASE-FIG-006.
ID
Tempting shortcut
Decisive discriminator
Replacement model
CASE-MC-001
On-policy means reverse KL.
Dossiers 03 and 04 have one student path and opposite KL directions.
SOURCE: provenance and divergence are separate controls. (GKD §3.1)
CASE-MC-002
Forward KL implies fixed states.
Dossier 03 evaluates forward KL at student-visited xB.
SOURCE: any declared divergence can be paired with a disclosed state source.
CASE-MC-003
Fixed prompts make completions off-policy.
Ask who generated the continuation, not where x came from.
Start with MC-001: compare Dossiers 03 and 04. The same fresh-student path supports opposite KL directions.
Blind diagnosis set
Apply the five autopsy questions before reading the key. The prompts appear without category labels, but the explanations remain openly available below. A future interactive treatment may record selections; it must not gate this key or convert a tally into a mastery claim.
OPD-XFER-A
OPD-XFER-B
CASE-XFER-001 — same OCR text, different records
Record A · TOY: For “Correct OCR: c1ear,” a teacher decoder stores clear <EOS>. The student later minimizes hard-target cross-entropy on that fixed sequence.
Record B · TOY: For the same prompt, the current student samples clear <EOS>. A judge returns only scalar 1.0, and the trainer applies a disclosed policy-gradient estimator.
CASE-XFER-002 — incomplete top-k record
Record · TOY: A student snapshot generated a summary prefix, but the record does not identify whether that behavior snapshot matches the student now being updated. The teacher returns its top two token probabilities, but the record does not say whether remaining mass is discarded, renormalized, aggregated, or corrected. The trainer report calls the loss “the same as full forward KL.”
CASE-EXP-001
Diagnose the prefix before naming the method
TOY PRACTICE · NO SCORE Commit provenance and objective as two separate facts. Feedback never collapses them into a tally.
CASE-EXP-001 · STATIC / PRINT PATH
Complete open diagnosis key
All five records stay visible without scripts or an attempt. Each answer preserves the full autopsy, the matched counterexample, and its boundary.
TOY + DERIVED
OPD-XFER-A · Reverse KL on a fixed comparison prefix
Provenance
Fixed or teacher-generated continuation
Objective
Local reverse KL, D_KL(S || T)
A trainer loads fixed teacher-demonstration prefix xA. At xA, student [0.3, 0.7] and teacher [0.8, 0.2] share the aligned toy support [A, B]. It computes local reverse KL. No fresh student draw produced xA for this update.
Five-field autopsy
Who generated this prefix?The fixed teacher-demonstration record supplied xA. It is not a fresh student-visited state.
What did the teacher supply?A dense distribution [0.8, 0.2] over the aligned toy vocabulary [A, B] at xA.
Which loss is computed where?Local reverse KL, D_KL(S || T), at fixed xA: 0.582685 nats (derived).
Does sampling receive a gradient?There is no current-student trajectory draw in this record. The loaded prefix is fixed.
What changes next?An optimizer would update student parameters from the declared local objective; this fixture executes no update.
Boundary: Reverse KL: yes. On-policy state sampling: no. Teacher probability is a preference signal, not ground truth.
TOY + DERIVED + SOURCE
OPD-XFER-B · Forward KL after the student takes the branch
Provenance
Fresh student-generated continuation
Objective
Local forward KL, D_KL(T || S)
Fixed prompt x starts a rollout. The disclosed current student has S(.|x)=[0.75, 0.25]; supplied u=0.8 selects B and visits xB. The teacher is queried at that same visited prefix, and the trainer computes local forward KL over x and xB.
Five-field autopsy
Who generated this prefix?Prompt x is fixed, but the disclosed fresh student draw B generates the continuation prefix xB.
What did the teacher supply?Dense aligned-vocabulary distributions at the recorded states x and xB.
Which loss is computed where?Local forward KL, D_KL(T || S), at x and xB; the full-precision unweighted mean is displayed as 0.185065 nats.
Does sampling receive a gradient?The categorical draw B is detached in this local GKD-style toy; student probability vectors in the local losses remain differentiable.
What changes next?An optimizer would update student parameters from the selected local objective. The lab executes no optimizer and keeps B, xB, and teacher values fixed.
Boundary: The student draw makes xB on-policy for the disclosed fresh snapshot; forward KL changes weighting, not provenance.
TOY + SOURCE
CASE-XFER-001-A · OCR record A — stored teacher target
Provenance
Fixed or teacher-generated continuation
Objective
Hard-target NLL / cross-entropy
Prompt: Correct OCR: c1ear. A teacher decoder stores clear <EOS>. Later, the student minimizes hard-target cross-entropy on that fixed sequence. No current-student rollout generated the target record.
Five-field autopsy
Who generated this prefix?The continuation is teacher-decoded and stored before the current student update.
What did the teacher supply?One hard decoded target token at each stored position, not a dense distribution.
Which loss is computed where?Hard-target NLL / cross-entropy on fixed teacher-sequence positions.
Does sampling receive a gradient?No current-student trajectory draw exists; the teacher's earlier decoding is fixed data construction.
What changes next?Student parameters would move toward the stored targets. The stored sequence remains fixed.
Boundary: This is a basic SeqKD-style hard-target record, not student-prefix on-policy distillation.
TOY + SOURCE
CASE-XFER-001-B · OCR record B — fresh sequence, scalar score
Provenance
Fresh student-generated continuation
Objective
Scalar-reward policy gradient
Prompt: Correct OCR: c1ear. The disclosed current student samples clear <EOS>. A judge returns only scalar 1.0, and the trainer applies a disclosed sequence-return policy-gradient estimator. No teacher token distribution is recorded.
Five-field autopsy
Who generated this prefix?The disclosed fresh current-student snapshot generated the completion.
What did the teacher supply?One scalar sequence score, 1.0; no hard target or token-distribution payload.
Which loss is computed where?An algorithm-specific scalar-reward policy-gradient objective over the sampled sequence.
Does sampling receive a gradient?Sampled actions receive score-function credit through log probabilities, not pathwise differentiation through token identities.
What changes next?Student parameters would be updated toward higher expected scalar return under the declared estimator.
Boundary: This is on-policy scalar-reward RL in the stated toy record; local teacher-distribution distillation is not established.
TOY + UNRESOLVED
CASE-XFER-002 · Top-k report with missing contract fields
Provenance
Unresolved without behavior freshness
Objective
Unresolved partial-feedback objective
A report contains a student-generated summary prefix, but does not identify whether its behavior-policy snapshot matches the student being updated. The teacher returns only its top two token probabilities. The report omits aligned-support, missing-mass, renormalization or correction, objective, reduction, EOS, and length rules, yet calls the result the same as full forward KL.
Five-field autopsy
Who generated this prefix?A student snapshot generated it, but behavior freshness relative to the update is absent. Current on-policy provenance is unresolved.
What did the teacher supply?Only two teacher probabilities on an unspecified restricted support; omitted probability mass is unaccounted for.
Which loss is computed where?Unresolved. Partial top-k feedback is not enough to infer dense full-vocabulary forward KL or its reduction.
Does sampling receive a gradient?Unresolved. The report does not specify detached local evaluation, a sampled-token estimator, or score-function semantics.
What changes next?Presumably student parameters, but the estimator and update contract are too incomplete to claim equivalence.
Boundary: Refuse a full-forward-KL equivalence. Full-vocabulary, sampled-token, and teacher-top-k feedback are not interchangeable.
Open answer key
OPD-XFER-A — two-axis explanation
Objective axis: Yes. The record explicitly says it computes reverse KL.
Provenance axis: No. xA is fixed and teacher-generated relative to the student being updated; no fresh student draw produced that state.
Why: Reverse KL changes which distribution weights the log ratio. It does not change the source of the prefix on which the ratio is evaluated. [SOURCE · OPD-CL-003]
OPD-XFER-B — two-axis explanation
Provenance axis: Yes, under the stated current/fresh student behavior snapshot. The student draw B creates visited prefix xB, even if prompt x came from a fixed set.
Feedback/objective axis: The teacher is queried at that same xB state and forward KL is computed there, so this is a local on-policy distillation record under the aligned-support assumptions.
Why: Forward rather than reverse KL changes the discrepancy’s weighting, not who generated xB. [SOURCE · OPD-CL-001, OPD-CL-002, OPD-CL-003, OPD-CL-006]
CASE-XFER-001 — identical text does not imply identical training
Record A: The prompt is fixed and the continuation is teacher-decoded/stored. The teacher supplies hard targets. Hard-target cross-entropy is computed on fixed positions. There is no current-student rollout draw. Student parameters update toward the stored sequence. Diagnosis: basic SeqKD-style fixed hard-target training.
Record B: The prompt is fixed but the completion comes from the current student. The judge supplies one uncalibrated scalar, not token targets or a distribution. A sequence-return policy-gradient estimator is used; sampled tokens receive score-function credit rather than pathwise differentiation. Student parameters update toward higher expected scalar return. Diagnosis: on-policy scalar-reward RL in the stated record.
The rendered completion clear <EOS> matches in both records, but the provenance, payload, objective, and estimator do not. Both strings and the score are TOY, not observed model results.
CASE-XFER-002 — refuse the false equality
Prefix provenance is UNRESOLVED because the record does not supply behavior-policy freshness. The loss identity is also UNRESOLVED. Two teacher probabilities are not a full-vocabulary vector unless the method specifies aligned support, how top-k was selected, what happens to missing mass, whether either distribution is renormalized or corrected, the objective formula, and the position reduction. EOS, truncation, and length/mask handling are also missing.
Therefore the record cannot be called “the same as full forward KL.” Current primary sources distinguish full-vocabulary, sampled-token, and teacher-top-k objectives; the latter two do not become equivalent because they produce one scalar. This boundary is supported by a 2026 preprint and an author engineering report, so empirical conclusions retain those source statuses. [QUALIFIED SOURCE · CASE-CL-010] (Fu et al., arXiv v2, §3.1; Thinking Machines Lab engineering report)
The field card
Before accepting any “on-policy distillation” label in a codebase or paper, record:
prompt source;
continuation-prefix source and behavior-policy version;
freshness, replay, mixture, or importance-correction rule;
teacher payload and its support;
tokenizer/vocabulary alignment;
objective level and direction;
discrete-sampling and gradient-estimator semantics;
sampling temperature and decoding rule;
EOS, truncation, masks, length normalization, and reduction; and
the parameters that actually update.
The opening arithmetic record is now straightforward: fixed prompt, fixed teacher-decoded continuation, hard targets, hard-target loss on stored prefixes, no current-student draw, student update. The model name was never the key; the record was.
Where this casebook stops
OPD-TOY-001 assumes a shared two-token vocabulary, natural logs, a supplied draw at temperature implicit in the fixed probabilities, exactly two scored positions, no modeled EOS transition, a fresh behavior snapshot, and a detached local draw. It executes no optimizer step. The summary and OCR records are also invented. None establishes model quality, training stability, teacher correctness, process supervision, causal blame, efficiency, or a preferred divergence.
Cross-tokenizer mapping, stale or asynchronous rollouts, partial-support corrections, tool-using trajectories, teacher ensembles, adaptive teachers, and production serving are outside this treatment. So are universal comparisons among OPD, SFT, fixed distillation, and RL. A stronger or more confident teacher is not guaranteed to help.
A good diagnosis is not a fashionable method name. It is a compact record of provenance, payload, objective, estimator, update, and the assumptions that make each field meaningful.