Ground Truth.
AI, checked against the source.

Learn · Intermediate

Teacher forcing and exposure bias

Teacher forcing is the standard way to train a model that generates one token at a time: at every step, you feed it the correct previous tokens from the training data rather than what it actually predicted. It makes training fast, parallel, and stable. It also creates a mismatch, because at generation time no correct history exists -- the model must build on its own output, including its own mistakes. That mismatch is called exposure bias, and it is one of the oldest unresolved tensions in sequence modeling.

Start with why teacher forcing exists at all. Suppose you are training a model to write "the cat sat on the mat." At position four, the model should predict "on." What should it condition on? The obvious answer -- whatever it predicted at positions one through three -- has a fatal problem early in training, when those predictions are noise. The model would be learning to continue gibberish, the gradient signal would be useless, and worse, every position would have to be computed in order, since position four's input depends on position three's output. Training would be sequential and slow.

Teacher forcing cuts that knot by using the ground-truth prefix as the input everywhere. Now every position is independent, the whole sequence trains in one parallel pass, and the learning signal is clean from the first step. This is the property that makes transformers trainable at scale. The causal attention mask exists precisely to let a transformer do teacher forcing on an entire document at once while keeping each position blind to its future.

The bill comes due at inference. Now the model generates "the cat sat in" -- a small error. In training it never once encountered that prefix, because the training data never contained it. It is now being asked to extrapolate from a state it has no experience of, and its next prediction is a little worse, which produces a state further still from anything it has seen. Errors compound. Yoshua Bengio and colleagues described this as a discrepancy between the training and inference distributions in their 2015 paper introducing scheduled sampling, and the analogy they were implicitly working against is a good one: it is like a pilot who has only ever trained in a simulator that resets after every mistake. The first real mistake puts them somewhere the training never went.

Three families of fixes have been tried, and it is worth knowing all three because they keep reappearing in new domains.

Scheduled sampling gradually replaces ground-truth tokens with the model's own samples during training, on a schedule -- mostly teacher forcing at the start, mostly self-generated by the end. It is simple and it helps, but it has a known theoretical wart: the objective it optimizes is not quite the likelihood of the data, which can push the model toward degenerate solutions.

Sequence-level training abandons token-by-token supervision and scores the whole generated sequence against a metric, then optimizes that score with reinforcement learning. Marc'Aurelio Ranzato and colleagues did this in Sequence Level Training with Recurrent Neural Networks, warming up with teacher forcing and then handing off to a policy-gradient objective. This is the direct ancestor of how large models are post-trained today. Reinforcement learning with verifiable rewards is the same idea with a checkable grader instead of a text-similarity metric: the model generates its own rollout, and gets scored on the thing it actually produced.

Professor forcing, from Alex Lamb and coauthors, trains a discriminator to tell whether a hidden-state trajectory came from teacher-forced or free-running generation, and pushes the model to make them indistinguishable -- an adversarial way of saying "behave the same whether or not the crutch is there."

The reason this matters again in 2026 is video and world models, where the compounding is far more visible than in text. A model generating a long interactive video is conditioning on its own frames for minutes at a time, and drift that would be a slightly odd word in a paragraph becomes a room that dissolves. The technique now called self-forcing is teacher forcing's correction applied here: train the student on its own rollouts rather than on ground-truth frames, so it learns to recover from its own drift. Alaya Lab's Evoke does this over 20 generated chunks -- about 31 seconds of continuous video -- during distillation, which is expensive but is exactly the point.

The practical takeaway: teacher forcing is not a mistake to be eliminated, it is a trade you make deliberately. You buy parallel, stable training, and you pay with a model that has never seen its own errors. Every serious training pipeline eventually pays some of that back, whether through RL post-training, self-generated rollouts, or a discriminator. Knowing which stage in a pipeline is doing that repayment tells you a lot about how well the system will hold up over long generations.

Key papers
Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks (Bengio et al., 2015)
Sequence Level Training with Recurrent Neural Networks (Ranzato et al., 2015)
Professor Forcing: A New Algorithm for Training Recurrent Networks (Lamb et al., 2016)

Key questions

What problem does teacher forcing solve?

It makes training a sequence model parallel and stable. If every prediction is conditioned on the true previous tokens rather than the model's own guesses, all positions in a sequence can be trained at once and no early mistake corrupts the rest of the training signal.

What is exposure bias, in one sentence?

Exposure bias is the gap between training, where a model only ever sees correct history, and generation, where it must condition on its own imperfect output -- so it is being tested on a distribution of inputs it was never trained on.

Do modern large language models still have this problem?

They still train with teacher forcing, but the practical damage is much smaller than it was for recurrent models, and post-training on the model's own generations is the main reason. Reinforcement learning from human feedback and reinforcement learning with verifiable rewards both score whole sequences the model produced itself, which directly exposes it to its own error distribution.
Cite this

APA

Ground Truth. (2026, August 23). Teacher forcing and exposure bias. Ground Truth. https://groundtruth.day/learn/teacher-forcing-and-exposure-bias.html

BibTeX

@misc{groundtruth:teacher-forcing-and-exposure-bias,
  title  = {Teacher forcing and exposure bias},
  author = {{Ground Truth}},
  year   = {2026},
  month  = {aug},
  url    = {https://groundtruth.day/learn/teacher-forcing-and-exposure-bias.html}
}

Topics: training-methods · sequence-models · fundamentals · language-models · video-generation