Technical GUIDE

Scheduled Sampling and Exposure Bias

Exposure bias is the gap that appears when a model trained only on perfect prefixes must, at inference, condition on its own imperfect outputs.

2 min readLast updated

Overview

Scheduled sampling is a curriculum that gradually closes that gap.

Deep Dive

Models trained with teacher forcing only ever see ground-truth tokens as context, but at generation time they feed back their own predictions. When an early mistake lands the model in a state it never encountered during training, errors can snowball, a failure mode called exposure bias. Scheduled sampling, introduced by Bengio and colleagues in 2015, addresses this by flipping a coin at each decoding step during training: with some probability it feeds the true token (teacher forcing) and otherwise it feeds the model's own sampled prediction. The probability of using ground truth starts near one and decays over training via a schedule (linear, exponential, or inverse-sigmoid), so the model is progressively exposed to its own outputs and learns to recover from its mistakes.

Technical Insight

At step t the model samples a Bernoulli variable with probability epsilon_i of choosing the gold token; epsilon_i decays as training proceeds. A subtlety is that feeding sampled tokens makes the objective biased and the discrete sampling non-differentiable, so gradients do not flow cleanly through the fed-back token. Variants use a straight-through Gumbel-softmax or differentiable relaxations to mitigate this, and sequence-level methods optimize a metric like BLEU directly.

Strategic Impact

Cost and budget

Architecture decisions drive performance and operating cost for years.

Clearer decisions

Technical education helps teams choose the right stack, not just the newest one.

Quality control

Better engineering choices reduce reliability incidents in production.

The Future of Scheduled Sampling and Exposure Bias

For large Transformer language models the practical impact of exposure bias is debated, since huge data and scale dampen it, and methods like RLHF reshape generation behavior directly. Still, scheduled sampling and its descendants remain relevant for smaller models, structured generation, and tasks with strict accuracy needs. Future work blends curriculum exposure, reinforcement-style sequence objectives, and minimum-risk training to align how models are trained with how they actually decode.

Real-World Implementation

Training an image-captioning model with scheduled sampling so it learns to continue gracefully after an imperfect predicted word

Decaying the teacher-forcing probability with an inverse-sigmoid schedule in a neural machine translation system

Diagnosing a chatbot that drifts into incoherent loops as an exposure-bias symptom from pure teacher forcing

Comparing BLEU scores of a summarizer trained with full teacher forcing versus one trained with scheduled sampling

Risks & Guardrails

Optimizing one benchmark can hide broader system weaknesses.

Infrastructure and maintenance costs are often underestimated.

Security and observability gaps can grow as systems become more complex.

Implementation Roadmap

1

Define latency, quality, and cost targets before implementation.

2

Benchmark under realistic load and data conditions.

3

Instrument monitoring for errors, drift, and user impact.

4

Prepare rollback and incident response paths before scaling.

Keep Exploring

Free newsletter

Get the daily AI briefing

Three verified AI stories every weekday morning, written in plain English. Free forever, no ads.

One email each weekday. Unsubscribe in one click. We never sell or share your address.

Test yourself

Take the Scheduled Sampling and Exposure Bias quiz

Instant feedback on every answer, and a shareable certificate with a verifiable ID once you pass a course.

Start quiz

Support free AI education. AI Understanding is a 501(c)(3) nonprofit — no ads, no paywall, ever. Make a donation

Next guide

Negative Sampling and Noise Contrastive Estimation

Frequently asked questions

What is Scheduled Sampling and Exposure Bias?

Exposure bias is the gap that appears when a model trained only on perfect prefixes must, at inference, condition on its own imperfect outputs. Scheduled sampling is a curriculum that gradually closes that gap.

What does scheduled sampling do during training?

Scheduled sampling stochastically mixes ground-truth and model-generated tokens as decoder inputs, controlled by a decaying probability.

How does the probability of using the ground-truth token change over training in scheduled sampling?

The schedule begins near full teacher forcing and decays so the model is increasingly exposed to its own predictions as it improves.

Who introduced scheduled sampling, and roughly when?

Scheduled sampling was proposed by Samy Bengio and colleagues in 2015 for sequence prediction with recurrent networks.

Which schedule shape is commonly cited for decaying the teacher-forcing probability?

The original work proposed linear, exponential, and inverse-sigmoid decay schedules for reducing the ground-truth sampling probability.