Foundations / Training
verifiedTeacher Forcing
During training, feed the model the correct previous tokens rather than the ones it just produced. It learns much faster this way — every position gets a clean prefix instead of compounding its own mistakes — and it never once practises the situation it will actually be in.
It is also what makes training parallelisable. Because the whole correct sequence is known in advance, every position can be predicted at once rather than one after another, which is the property that lets a transformer train on a thousand positions in a single forward pass. Sequential generation at inference is not an oversight; it is the price of a training procedure that was never sequential.
The model is fit to p(x sub t | x sub <t ) with x sub <t drawn from the data, and used to sample from p(x sub t | x̂ sub <t ) with x̂ sub <t drawn from itself. Those are different conditioning distributions, so the model is evaluated off the distribution it was fit on from the second token onward — and the gap widens with every step, because each sampled token moves the prefix further from anything the training set contained.
self-generated-prefix holds 13% of the budget; rest holds the remaining 87%.
Prefix tokens the model produced itself, against the ground-truth tokens it was trained on, in tokens. Drag the self-generated share up to watch the conditioning leave the training distribution — it does so from the second token, and never comes back.
Reviewed by opendroid · 2026-08-18
- arXiv:1506.03099 — Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks
- arXiv:1409.3215 — Sequence to Sequence Learning with Neural Networks