---
title: "Scheduled Sampling for Sequence Prediction with Recurrent"
description: "Scheduled Sampling teaches recurrent networks to continue from their own predictions, improving sequence generation across several tasks."
canonical: "https://research.elamur.ai/free/en/papers/bengio-2015-scheduled-sampling-sequence-prediction-recurrent/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bengio-2015-scheduled-sampling-sequence-prediction-recurrent/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2015](https://md.research.elamur.ai/free/en/papers/2015/) / Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks

# Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks

Paper · 2015 · Samy Bengio, Oriol Vinyals, Navdeep Jaitly et al.

**Authors:** [Samy Bengio](https://md.research.elamur.ai/free/en/authors/samy-bengio/), [Oriol Vinyals](https://md.research.elamur.ai/free/en/authors/oriol-vinyals/), [Navdeep Jaitly](https://md.research.elamur.ai/free/en/authors/navdeep-jaitly/) and [Noam Shazeer](https://md.research.elamur.ai/free/en/authors/noam-shazeer/) · **Year:** 2015 · **Venue:** arXiv:1506.03099 · **Licence:** [arXiv — non-exclusive licence to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**1,493** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W648786980) · [Cited by **403** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/bengio-2015-scheduled-sampling-sequence-prediction-recurrent/cited-by/) · [arXiv:1506.03099](https://openalex.org/S4306400194) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [PDF](https://arxiv.org/pdf/1506.03099)
- [arXiv 1506.03099](https://arxiv.org/abs/1506.03099)
- [OpenAlex](https://openalex.org/W648786980)

Citations: OpenAlex, 2026-10-14.

## Summary

A recurrent network that describes a picture or translates a sentence produces its answer one token at a time. During conventional training, it receives the correct previous token before predicting the next one. When it generates an answer on its own, the previous token comes from its own prediction. An early mistake therefore changes the information the network receives for its next decision. If it has learned to continue chiefly from correct histories, it can have trouble recovering, and later mistakes can build on the first. Scheduled Sampling changes which histories the network encounters while it learns.

The method starts with frequent guidance from the reference sequence. At each position where a previous token is needed, a random choice determines whether the network receives the reference token or a prediction from its current output distribution. The probability of using the reference decreases as training proceeds. The authors describe linear, exponential, and inverse sigmoid schedules for making that transition. The reference token at the current position remains the target of the prediction. What changes is the history from which the network has to predict it.

Speech recognition, image captioning, and constituency parsing are the three tasks the authors use to test the procedure. On the MSCOCO development set, Scheduled Sampling improves the reported caption scores over conventional training, and the authors use it in the entry that finishes first in the 2015 MSCOCO image captioning challenge. On the WSJ 22 parsing development set, the method improves F1 and gives a further gain when combined with dropout. On TIMIT, the conventional baseline has the lowest next-frame error when given correct previous labels on the validation set. The ranking changes under beam decoding on the test set, where training with sampled feedback gives lower frame error. The speech experiment thus shows how the apparent advantage of a training method depends on the conditions under which predictions are evaluated.

The comparisons also clarify what matters about the transition. In captioning, uniformly chosen replacement tokens help, but predictions drawn from the network itself help more. Giving the network its own predictions throughout training works poorly for captioning and parsing, while it is a stronger comparison in the frame-aligned speech task. Making the choice once for an entire sequence also gives poorer results than choosing separately at each token. Scheduled Sampling uses a single evolving recurrent network, and the authors report no meaningful increase in training time in their experiments. They leave open how to account for the effect of a sampled decision on later losses when computing the gradient.

## Deep dive: Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks

Scheduled Sampling teaches recurrent networks to continue from their own predictions, improving sequence generation across several tasks. · about 39 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### A prediction becomes part of the next input

Sequence prediction turns a long answer into a series of smaller choices. In [machine translation](https://md.research.elamur.ai/free/en/topics/machine-translation/), the input is a sentence in one language and the answer is a sentence in another. In image captioning, which connects [vision and language](https://md.research.elamur.ai/free/en/topics/multimodal/), the input is an image and the answer is a sequence of words. The output alphabet depends on the task. Its tokens can be words, labels, or symbols that describe a tree. The common feature is that the identity of an earlier output can matter when the network decides what comes next.

A recurrent network carries a state forward between decisions. The state is a vector of values that can encode information about the input and the output history. The previous token participates in the update that produces the current state, so the history can influence later decisions even after its individual tokens have been read. The paper points to the difficulty of learning dependencies over long spans and uses Long Short-Term Memory, or LSTM, as a form of recurrence better suited to that problem. LSTMs give the network a way to retain information over a sequence, but the history the network actually receives still determines what it has an opportunity to retain.

The usual training procedure breaks the problem into next-token decisions along a known reference sequence. For a caption, for example, training can use the beginning of a human description to predict its next word, then advance with the human word in place. The recurrent state and the previous reference word provide context for the prediction. This teaches the output component something like a [language model](https://md.research.elamur.ai/free/en/concepts/language-model/) over the target tokens, conditioned on the input. The supervision is economical in a particular sense. A single labeled sequence supplies a correct answer at every position along its reference history.

Generation removes that guide. Once the network starts a caption, the words it has already produced influence what it will say next. An unexpected early word can change the next state, which changes the probabilities assigned to possible continuations. Even a later word that would have been easy to predict from the reference may be difficult to predict from this new state. The problem compounds if the new continuation takes the state farther from the states visited in training. In the sequential sampling analogy the authors draw, later decisions have no influence on the tokens already selected along a path.

This difficulty concerns the distribution of prediction contexts. The same image or source sentence may be available in both phases, and the output dictionary stays the same. What changes is the source of the prefix. Training expectations are set by what annotators wrote or what target labels specify. Generation contexts are determined in part by the network's successes and mistakes. The distinction matters even when an individual prediction is plausible. A plausible word that differs from the reference can require a different continuation, so the histories encountered during generation can diverge without a clear point at which every reader would agree an error occurred.

#### What search can do

Beam search gives generation some protection against committing too soon. It holds several partial answers at once, extends them, and keeps the best candidates under a limit on the number it can carry. A promising answer can survive even if it did not begin with the single most probable token. That helps when local probability rankings give an incomplete picture of how a sequence will develop.

Search still relies on the probabilities assigned by the recurrent network. Each retained prefix has a state produced by the tokens along that prefix. If the network handles a particular history poorly, search can compare its continuation with other candidates, but it does not teach the network what to do in that state. Moreover, the number of possible prefixes expands as candidates acquire additional tokens. Keeping many paths quickly becomes expensive.

The paper relates that cost to the form of recurrent state. In a discrete-state system, paths that arrive at the same state can sometimes share computation through dynamic programming. With a continuously valued recurrent state, the authors explain that alternative token histories do not offer a comparable way to factor the search. Each path can involve a distinct vector, so a modest beam sees only a small portion of the possibilities. The training proposal addresses the network's behavior on its own histories, leaving beam search available as a way to use the trained network at inference.

#### Earlier ways to learn from imperfect histories

The authors place their work alongside structured prediction and control methods that had already recognized the cost of compounding mistakes. In the paper's account of SEARN, the decisions made under a current policy help determine what the next stage learns. A policy specifies which decisions to make in the situations encountered along a sequence. SEARN trains a new predictor at a meta-iteration, applies it, and revises the policy to take account of behavior under that predictor. The revised policy combines earlier behavior with the newly learned behavior. The setup makes previous decisions part of the process that generates subsequent training situations.

Scheduled Sampling keeps the idea that a learner should encounter situations caused by its own decisions. Its implementation changes the feedback rule inside ongoing supervised training. The same recurrent network generates the candidate previous token, receives whichever token the feedback rule selects, and is updated by stochastic gradient descent. The authors call the procedure online because the network and the behavior it supplies evolve within a single training run.

Earlier work on [incremental parsing with the perceptron algorithm](https://md.research.elamur.ai/free/en/papers/collins-2004-incremental-parsing-perceptron-algorithm/) brought search into the training procedure. A training beam found the current predictor's best candidate, and a ranking loss compared that candidate with the guided solution. Aligning the use of search during training and inference was part of the approach. For the recurrent systems in Scheduled Sampling, the authors emphasize the expense of doing this with many continuously valued states. Their method obtains feedback from predicted tokens along a training sequence without maintaining a training beam.

The paper also describes an online parsing algorithm that uses a dynamic oracle. After a parsing decision, the oracle adjusts the target to account for what has already happened. That point is important because some earlier choices can change which later decisions remain valid. The method cited by the authors uses a perceptron and holds the probability of choosing the reference decision fixed. Scheduled Sampling, by comparison, changes the probability of taking reference feedback over training and retains the original target token at each position. The two designs address different parts of the supervision problem. One concerns the target that should follow a decision, and the other concerns how frequently predicted decisions enter the history.

#### Why make the transition gradually?

At the start of training, the recurrent network's output distributions supply little useful guidance. If its predictions are immediately recycled at every position, the training context can bear little relation to the target sequence. The network must learn which tokens belong in the answer while coping with feedback from a predictor that has yet to learn the task. Reference histories make the early prediction problem more informative.

The authors frame the transition as curriculum learning. A curriculum orders training conditions so that the learner first encounters a more accessible version of the task. Here the progression changes the mixture of reference and self-generated tokens. As the network learns to make more plausible predictions, those predictions increasingly determine the histories it has to continue. The change is specified by a schedule over training progress. The experiments therefore test both the value of generated histories and the value of introducing them after the network has begun to learn.

### The method, step by step

#### What is in a training example?

Each supervised example pairs an input with a reference sequence. An image provides visual evidence for a caption. A sentence provides the words whose constituent structure is to be described. The target sequence is made of tokens from a fixed dictionary, with the dictionary chosen for the task. A parsing symbol, for instance, can stand for part of the structure the output is building. The method needs to be able to supply a token from that dictionary to the recurrence and to predict a probability distribution over the possible next tokens.

For tasks with variable-length output, the paper adds a dedicated end-of-sequence token, EOS. Training places that token at the end of the reference. Predicting how to stop becomes another supervised decision. At inference, generation can end when the network selects EOS, so it can produce answers of different lengths without being given the length of an unseen reference. The frame-aligned speech setup uses a different arrangement, since every acoustic frame has a corresponding target.

The training collection can be written as follows.

```
{(Xⁱ, Yⁱ)}ᵢ₌₁…N
```

The braces enclose the collection. The superscript ⁱ identifies an example and ranges from 1 to N, the number of training pairs. The parentheses group Xⁱ, the input for that example, with Yⁱ, its reference output. The length of Yⁱ can vary across examples. The superscript denotes an index, so it does not raise an input or sequence to a power.

#### From the input to the next-token distribution

Consider a single example. Its input initializes the prediction process. The network produces its first distribution over output tokens from the information available at that point. For subsequent predictions, the state update consumes the previous token and the previous state. The paper writes the probability of the entire answer as a chain of conditional probabilities and uses logarithms to express the chain as a sum.

```
log P(Y | X) = log P(y[1:T] | X) = ∑ₜ₌₁ᵀ log P(yₜ | y[1:t−1], X)
```

X is the input and Y is the output sequence. T is the length of Y, and yₜ is its token at position t. Inside brackets, the endpoints separated by a colon specify an inclusive span of positions. Thus y[1:T] is the full sequence and y[1:t−1] is the preceding prefix, which is empty at the first prediction. P denotes probability, the vertical bar introduces the information being conditioned on, and log is the logarithm. The summation sign adds the next-token log probabilities as t runs from 1 through T. The equality expresses the chain rule for a sequence in log form.

This decomposition describes what has to be predicted at each position. The network implements it with a state vector that represents the relevant context. Many details of the preceding sequence may influence the state, but the output layer only needs to read that vector to give scores for the next possibility.

```
log P(yₜ | y[1:t−1], X; θ) = log P(yₜ | hₜ; θ)
```

Here hₜ is the recurrent state used to predict yₜ. The notation after the semicolon indicates θ, the learned network parameters, while the vertical bar separates the predicted token from its conditioning information. X, y[1:t−1], P, and log have the same meanings as in the sequence equation. The equality says that the network represents the conditioning context for its output probabilities through hₜ.

The state calculation supplies the connection between the history and the current prediction.

```
hₜ = ⎧ f(X; θ)                  if t = 1
     ⎩ f(hₜ₋₁, yₜ₋₁; θ)       otherwise
```

The brace gives the two cases for hₜ. At the first position, f maps the input X to a state using parameters θ. At later positions, the recurrence f combines hₜ₋₁, the state from the previous position, with yₜ₋₁, the previous output token. The symbol t denotes the current position. The notation f covers the appropriate network computation in each case.

The paper describes a common output layer that takes this state, projects it to a score for every item in the dictionary, and applies a softmax. Softmax yields positive probabilities that sum to 1. The distribution serves two roles in Scheduled Sampling. It gives the probability assigned to the reference token, which is used in the loss. It can also propose a token to be consumed by the next state update. Making those roles explicit helps avoid mistaking a token used for feedback for a token treated as the correct answer.

#### Where Scheduled Sampling changes training

With conventional training, the previous reference token always enters the state update. Suppose a caption has reached a point where the network must predict the word after an object name. Under full guidance, the recurrence receives the reference object name, even if the network would have chosen a different word. The loss then uses the probability of the reference's next word. By doing this at each position in a mini-batch, conventional training can optimize the following objective.

```
θ⋆ = argmaxθ ∑₍Xⁱ,Yⁱ₎ log P(Yⁱ | Xⁱ; θ)
```

θ is the parameter setting under consideration and θ⋆ is a setting that maximizes the displayed objective. The operator argmaxθ denotes choosing parameters that maximize the quantity to its right. The sum ranges over the training pairs (Xⁱ, Yⁱ), where ⁱ indexes the example, Xⁱ is its input, and Yⁱ is its reference sequence. P is the conditional probability of that sequence under θ. The vertical bar shows that the output is conditioned on its input, and log converts the probability to a log probability. The paper describes looking for the parameters with mini-batch stochastic gradient descent, which uses a group of examples at a time to estimate an update.

Scheduled Sampling alters the state update before the next prediction. For a given mini-batch, a probability controls how often the reference supplies the previous token. The network first has to produce a distribution at the preceding position. A random choice then determines whether the next position receives the previous reference token or an estimate obtained from that distribution. The choice is made afresh wherever a preceding token is needed, so a single training example can contain both kinds of feedback.

How Scheduled Sampling trains on mixed output histories The steps in order.

Here is the feedback choice in compact notation.

```
previous token fed at t = ⎧ yₜ₋₁   with probability εᵢ
                          ⎩ ŷₜ₋₁   with probability 1 − εᵢ
```

The symbol t identifies the prediction position and t−1 the position that supplies its feedback. The token yₜ₋₁ is the reference at that earlier position. The hat on ŷₜ₋₁ marks a network estimate. The probability εᵢ belongs to mini-batch i. Its complement, 1 − εᵢ, is the probability of taking the estimate. The brace indicates that exactly one of the alternatives is used on a given draw. The mini-batch index here tracks training progress and is separate from the example superscript in the objective.

The paper gives two ways to obtain the estimated token. Drawing from the distribution gives any token a chance in accordance with its probability. Choosing the most probable token gives a deterministic rule for obtaining an estimate from the current state, while the separate feedback choice still determines whether the estimate is used.

```
ŷₜ₋₁ = argmaxₛ P(yₜ₋₁ = s | hₜ₋₁)
```

The quantity ŷₜ₋₁ is the estimated previous token. The operator argmaxₛ chooses the dictionary token s that maximizes the probability. The event yₜ₋₁ = s inside P asks about the identity of the token predicted at the preceding position. The vertical bar conditions that prediction on hₜ₋₁, the state used at that position. P is supplied by the current network. With the sampling alternative, the same probabilities determine the chances of drawing each candidate s.

The distinction between the two random operations matters. The draw with probability εᵢ determines which source to use. If the network is the selected source and the procedure uses a distributional draw, a separate draw determines the actual token. It is also possible for the estimated token to match the reference. In that case the source changed, but the value passed to the recurrence is the same. A schedule for choosing the network therefore gives the frequency of relying on its predictions. The actual frequency of disruptive substitutions also depends on how well it predicts and which tokens it proposes.

#### Why a fresh choice at each position matters

An illustrative caption can begin with words that fit the image and then take an unexpected turn when a predicted noun replaces the reference noun. At the next position, the network must score the reference continuation while carrying a state influenced by the unexpected word. A later draw may supply a reference word again. That restores direct guidance at that position, and the state can still contain effects of the earlier prediction. The result is a training history with mistakes of different lengths and at different positions.

A single choice for the whole sequence changes the structure of that exposure. An example then follows a fully guided path or a path whose feedback is generated throughout. Near the start of training, generated feedback can create long runs of poor context before the recurrent network has learned useful continuations. With token-level choices, reference feedback can separate stretches of sampled history. The schedule and the granularity of the draws both influence what the network encounters.

At the fully guided endpoint, εᵢ is 1 and the procedure reduces to the conventional recurrence on reference tokens. At the other endpoint, εᵢ is 0 and the previous token always comes from the network. The latter reproduces self-generated feedback along the training path. The current reference token still supplies supervision, and the training path is distinct from the collection of candidates maintained by a beam at test time.

#### How the probability changes

The authors give decay functions that can start with frequent reference feedback and decrease it as training advances. They compare the use of a schedule with changing the learning rate over time. In this case the quantity being scheduled determines the source of a recurrent input. The examples describe different shapes for the transition, with parameters chosen in light of how quickly the task is expected to be learned.

```
εᵢ = max(ε, k − c i)
```

In the linear schedule, εᵢ is the reference feedback probability at mini-batch i. The function max takes the larger of its two arguments. The constant ε is the minimum reference probability, with 0 ≤ ε \< 1. The quantity k is the offset, and c controls how quickly the declining term falls as i grows. Once the floor is reached, the reference probability stays there. A positive floor can preserve some guided updates late in training.

```
εᵢ = kⁱ
```

In the exponential schedule, εᵢ is again the reference feedback probability at mini-batch i. The constant k is the decay base, specified as less than 1 and chosen to yield a valid probability. The superscript ⁱ means that k is raised to the power given by the mini-batch index. This form changes by a constant multiplier between successive indices, so the absolute change can be larger early in the schedule than late in it.

```
εᵢ = k / (k + exp(i / k))
```

In the inverse sigmoid schedule, εᵢ is the reference feedback probability at mini-batch i, and k is a constant at least 1. The function exp is the exponential function. The slash denotes division, the plus sign adds k to the exponential term in the denominator, and parentheses group the denominator and the argument of exp. The growing term in the denominator reduces the probability as training advances. The value of k sets the time scale of the decay, which the paper ties to the expected speed of convergence.

The captioning and parsing experiments use inverse sigmoid decay. The speech experiments use linear ramps followed by constant final probabilities. The schedules therefore describe a family of training procedures. A reference probability that is suitable at a given stage of one task need not represent a comparable level of difficulty on another, since the quality of generated feedback and the informativeness of correct feedback depend on the task.

#### What the loss can see

Even when a generated token enters the history, the current-position loss evaluates the original reference token. In this sense, the objective at a single step retains the same form as ordinary supervised next-token training. Its conditioning state can change. Over a full sequence, the sum of these losses along a mixed history has a different interpretation from the reference sequence log likelihood. The chain rule for the latter conditions each term on the corresponding reference prefix. A sampled training prefix can contain different tokens, even though its next-token loss still uses the reference at the matching position.

There is also a distinction between differentiating through recurrent state updates and differentiating through the discrete choice of a prediction for feedback. The experiments treat the selected token as an input once it has been obtained. They leave out the gradient contribution from how the parameters affect that selection and thereby influence later losses. For instance, a later reference prediction may become difficult because the network assigned a high probability to a troublesome earlier token. The experiment trains the continuation in the state that resulted, while the loss omits the path back through the choice of that earlier token. The authors identify that path as a subject for future work.

#### Aligned acoustic frames and generation at test time

The general state equation describes an input used to initiate an output sequence. The speech experiment instead provides acoustic evidence at each frame. Its output has the same length as the input frame sequence and contains a label for each frame. Every prediction can thus use a fresh acoustic vector alongside the recurrent state and the previous label.

```
log P(Y | X; θ) = log P(y[1:T] | x[1:T]; θ) = ∑ₜ₌₁ᵀ log P(yₜ | y[1:t−1], x[1:t]; θ) = ∑ₜ₌₁ᵀ log P(yₜ | hₜ; θ)
```

X denotes the acoustic input sequence and Y its aligned labels. The bracketed spans x[1:T] and y[1:T] run over all T positions in their respective sequences. At position t, x[1:t] is the acoustic evidence up to and including the current frame, and y[1:t−1] is the label history before it. The label being predicted is yₜ, while hₜ is the state that summarizes the information used for that prediction. The two sums add terms for all positions from 1 to T. P denotes conditional probability, log denotes its logarithm, the vertical bar introduces conditioning information, and θ denotes the parameters.

```
hₜ = ⎧ f(oₕ, S, x₁; θ)           if t = 1
     ⎩ f(hₜ₋₁, yₜ₋₁, xₜ; θ)     otherwise
```

At the first frame, f receives oₕ, a vector of zeros with the same size as the recurrent state, S, a dictionary token for the start of a sequence, and x₁, the first acoustic feature vector. At later frames, the brace selects the case in which f receives hₜ₋₁, the previous state, yₜ₋₁, the preceding output label, and xₜ, the acoustic features for the current frame. The symbol hₜ denotes the state that results at frame t, and θ denotes the parameters of the computation. During Scheduled Sampling the previous-label input can be replaced by the estimated label, following the same feedback choice as before.

At inference, the paper describes generating from the current probabilities one token at a time or using beam search to find high-scoring sequences. The beam maintains m partial candidates, where m is the number of paths it can keep across steps. It extends candidates by a token and prunes the resulting collection back to that limit. Once there are no new sequences to add, it returns k of the best sequences, where k is the requested number of outputs. This k is a search quantity, independent of the constants denoted by k in the decay schedules. In the speech experiment the input alignment fixes the number of frame decisions. In the variable-length formulation, EOS supplies the generation stopping decision.

### Experiments and results

#### Image captioning on MSCOCO

The image-captioning experiment starts from the observation that the same picture can reasonably be described in several ways. A caption may mention different objects or give different emphasis to the same scene. Evaluation therefore compares a generated sentence with a set of references. As the authors describe it, the metrics assess forms of word-sequence overlap, and evaluation uses the best result among the available captions for each picture. The scores are useful for comparing variants within the experiment, while the authors recognize the broader problem of measuring caption quality. The paper points to work on [CIDEr](https://md.research.elamur.ai/free/en/papers/vedantam-2014-cider-consensus-based-image-description/) in discussing metrics intended to relate to human judgments.

The dataset is [Microsoft COCO](https://md.research.elamur.ai/free/en/papers/lin-2014-microsoft-coco-common-objects-context/). The authors train using 75k images and report caption metrics on a separate development split of 5k images. Each image has 5 reference captions. When creating a training example, the procedure selects one caption at random and pairs it with the image. This reference selection has a different purpose from Scheduled Sampling. It determines the sequence that supplies the targets and possible reference feedback. Scheduled Sampling then decides which feedback source to use along that sequence.

A pretrained convolutional network converts the image into an embedding, a vector representation of the picture. The captioning system takes that representation from the convolutional network with its final classification layer removed. It passes the embedding to the recurrent component as the starting input, in the position an initial word would otherwise occupy. This gives the generated sentence visual context from the start. Image-conditioned word generation was already part of the line of work represented by [Show and Tell](https://md.research.elamur.ai/free/en/papers/vinyals-2014-show-tell-neural-image-caption/).

The caption decoder uses a single LSTM layer with 512 hidden units. Input words are represented by embeddings of size 512, and the output dictionary contains 8857 words. The Scheduled Sampling runs in this setup use inverse sigmoid decay. The design keeps the prediction task and reference captions in place while experimenting with different ways to choose the word fed into the recurrent state.

The conventional baseline always receives the preceding reference word in training. The authors describe its development results as comparable to the strongest work they knew on the task, with slightly better results in their comparison. The paper also discusses a version with dropout, a training technique that randomly suppresses some activations. Dropout helps the reported likelihood comparison, which the authors describe without displaying likelihood values, and lowers the caption evaluation scores. The result shows why it matters to measure the captions the network generates as well as the probabilities it assigns under supervised conditions.

Scheduled Sampling improves the reported MSCOCO development caption metrics over conventional training. Combining several trained predictors in an ensemble improves both the conventional and Scheduled Sampling variants. The comparison gives separate roles to ensembling and the feedback rule. Ensembling combines prediction evidence, while Scheduled Sampling changes the histories encountered during the training of a component. The authors observe gains from combining predictors under either training procedure.

The captioning experiment also tests two alternatives for the source and frequency of generated feedback. Always Sampling uses predicted words throughout training and produces poor captions by the reported metrics. Uniform Scheduled Sampling changes the source over time but draws replacements uniformly from the output dictionary. Its scores exceed those of the baseline and fall below those of the method that uses the network's own predictions. These orderings give evidence about why the transition and the source of replacements matter, even without precise sizes for those metric differences.

The authors used Scheduled Sampling in their entry for the 2015 MSCOCO image captioning challenge and ranked first on the final leaderboard. The development comparison and the challenge placement answer different questions. The former compares training choices under the described experimental setup. The latter shows the method in use as part of a complete competition system.

#### Constituency parsing as sequence generation

A constituency parse groups the words of a sentence into nested phrases. Normally the result is drawn as a tree. Following [Grammar as a Foreign Language](https://md.research.elamur.ai/free/en/papers/vinyals-2014-grammar-foreign-language/), the experiment represents the tree as an ordered sequence of symbols that describe how to build it. That representation makes constituency [parsing](https://md.research.elamur.ai/free/en/concepts/parsing/) a sequence prediction problem. The input is the sentence, and the target sequence describes its annotated structure. Partial outputs can constrain which later symbols will yield a valid tree.

The recurrent network has a single layer of 512 LSTM cells, with word embeddings of size 512. The input dictionary contains around 90k words, and the target dictionary has 128 symbols for expressing trees. During prediction the decoder uses attention resembling the mechanism in [Neural Machine Translation by Jointly Learning to Align and Translate](https://md.research.elamur.ai/free/en/papers/bahdanau-2014-neural-machine-translation-jointly-learning/). It assigns weights over recurrent states for positions in the input, using a softmax. This lets a decoder step focus on parts of the sentence that are relevant to the next structural symbol. Scheduled Sampling uses inverse sigmoid decay in this experiment as well.

The paper describes the expected output for a sentence as more determinate than the expected caption for a picture. The reported perplexity comparison conveys the difference in predictability. The authors give 1.1 for parsing versus 7 for captioning when discussing training and test perplexity. Perplexity summarizes how much probability a predictor assigns to the reference tokens. Lower perplexity means the reference is more predictable under the evaluated conditions. The paper gives the figures as a task-level comparison and does not assign separate figures to individual splits in that comparison.

The parser is evaluated by F1 on the WSJ 22 development set. F1 combines the precision and recall of predicted constituents against annotated constituents. The authors draw on the resources described in [OntoNotes](https://md.research.elamur.ai/free/en/papers/hovy-2006-ontonotes-90-solution/). They report 40k training instances and point to overfitting as an important factor at that scale. Scheduled Sampling improves development F1, and its improvement adds to the effect of dropout. The comparison puts the benefit in a setting where the ordinary next-symbol predictor already faces relatively little uncertainty about the reference sequence.

Always Sampling again has difficulty learning the task. Its outputs are often invalid trees, and the paper leaves the corresponding F1 entry without a score. That outcome matters independently of the size of the F1 gain for the scheduled variant. A decoder of structural symbols must produce a usable structure before agreement with the annotated one can be assessed in the usual way. A training condition that weakens that ability can change the form of the failure as well as the frequency of incorrect constituents.

#### TIMIT speech recognition with frame-aligned targets

The speech task has a different input and output relationship. Every frame of acoustic input has an aligned target from a hidden Markov model, or HMM. Training uses the TIMIT corpus and the Kaldi toolkit to prepare the features and labels. The target labels come from a system that combines a Gaussian mixture model with an HMM. Forced alignment uses the transcript to associate the acoustic frames with state labels. The recurrent network then learns to predict those labels. The task is part of [speech and spoken language](https://md.research.elamur.ai/free/en/topics/speech/) research, with frame classification as the measured output.

The features are 40 dimensional log Mel filter banks, accompanied by their first and second order temporal derivatives. These derivatives give the predictor information about how the acoustic features change across frames. The forced-alignment procedure produces 180 dimensional targets at each frame. There are 3696 sequences in the training split, 400 in validation, and 192 in the test split. The average sequence length reported for the data is 304 frames. The validation data determine the selected training epoch, whose parameters are then used for the test evaluation.

The speech network has two layers of 250 LSTM cells followed by a softmax layer. Its baseline always receives the correct preceding label during training. Always Sampling receives only its previous predictions as feedback. Scheduled Sampling 1, Scheduled Sampling 2, and Scheduled Sampling 3 use linear transitions from an initial reference probability to a lower final probability, reached over ten epochs and then held fixed. The authors train 3 networks per configuration and report average performance. All configurations use the aligned frame targets for supervision.

The paper reports frame error rate, the frequency of incorrect frame labels, under two evaluation procedures. In next-step evaluation on the validation set, the predictor receives the correct previous label and tries to predict the current frame's label. This measures the ability to predict with a verified history. In sequence decoding on the test set, the beam uses the predictor's own labels as feedback along its paths. The beam has a width of 10, and the best sequence is used to calculate the frame error rate. This evaluation asks how the trained system behaves when correct earlier labels are unavailable.

The conventional baseline gives the best next-step prediction on validation. The methods trained with sampled feedback have lower error under test decoding. Always Sampling is competitive in this experiment, unlike its behavior on captions and parse trees. Scheduled Sampling also improves decoding frame error in this setting. The validation and test outcomes come from different splits as well as different feedback conditions. The meaningful comparison is the ordering of training configurations within each evaluation, rather than a numerical comparison that treats the two evaluations as interchangeable.

The authors also report when validation accuracy typically peaks. Conventional training reaches its best validation accuracy after roughly 14 epochs. Training with sampled feedback reaches that point after approximately 9 epochs, after which validation accuracy declines. The comparison describes the timing of the observed peaks. It cannot be used to read off the size of the decoding improvement.

TIMIT validation set, approximate epoch of peak accuracy by training condition The reported validation accuracy peaks earlier with sampled feedback.

**The numbers**

| System or setting | epochs |
| --- | --- |
| Conventional training | 14 |
| Training with sampled feedback (this paper) | 9 |

The authors propose an explanation specific to the speech labels. Adjacent frames often share the same HMM state, and allowable transitions restrict which states can follow others. A network given the correct preceding label can make strong next-step predictions by learning these regularities. At test time, a mistaken preceding label can make those regularities misleading. A network accustomed to feeding back uncertain labels has an incentive to use more of the acoustic signal in its frame decisions. The paper develops this explanation as a hypothesis about the contrast between the two evaluations.

The speech decoder uses recurrent predictions and beam search without an HMM at that stage. An HMM is involved earlier, in producing the training targets through alignment. The authors distinguish this setup from conventional hybrid speech systems that use an HMM in decoding and can benefit from smoothing and language constraints there. The paper's central comparison is among recurrent training configurations under the same decoder.

### What the ablations show

#### Gradual exposure matters when early predictions are weak

Always Sampling tests whether the benefit comes simply from letting the network see the type of feedback it will receive at inference. In that configuration, all feedback after initialization comes from predictions. The network has to learn in that regime from the beginning. Captioning quality is poor under this condition, and the parser often fails to produce a valid tree. On both tasks, the scheduled variant succeeds under conditions where exclusive use of predicted feedback is a poor way to begin learning.

The authors' curriculum explanation fits those observations. Early reference tokens give the state update a meaningful partial answer. The next-token loss then teaches a prediction from a prefix that bears a direct relationship to the target. An untrained captioner can produce feedback with little connection to either the picture or the reference sentence. An untrained parser can enter a sequence of structural symbols from which the target continuation makes little sense. Reducing guidance gradually lets the network first learn regularities that make its own feedback more informative.

The speech comparison puts a boundary around that interpretation. The network sees current acoustic features at every step, and adjacent labels carry substantial redundancy. Always Sampling can learn in this setup and compares favorably with fully guided training under decoding. This establishes that a curriculum from entirely correct feedback is task-dependent in its value. The presence of reliable evidence at each position changes how much the recurrence needs the preceding label while learning.

#### Predicted replacements carry information that uniform replacements lack

Uniform Scheduled Sampling is the experiment's closest comparison for a noise-based explanation of the caption gains. It preserves the idea that some reference words are replaced according to a schedule. The replacement word, however, comes from a uniform distribution over the dictionary. It does not reflect what the network considers likely for the current image and history. The conventional baseline, the uniform variant, and the network-driven variant therefore give an ordering of methods with different sources of training context.

The uniform variant improves caption scores over the baseline. This shows that training on perturbed histories can have benefits even when the perturbations do not imitate ordinary predictions. A network may learn to rely less on the exact preceding reference word, for instance. That is a possible reading of the result, and the stronger performance with network-generated replacements gives additional evidence about the choice of perturbation.

A prediction is drawn from a distribution shaped by the image, the state, and the network's present competence. It can resemble an error the network would actually make in a caption. Uniform replacements can scatter through the dictionary without such a relationship to the context. The gain for the prediction-based variant is consistent with the authors' aim of training on relevant departures from the reference. The comparison varies both the contextual relevance of replacements and the tendency of replacements to agree with the reference, so it does not identify a unique cause of the extra gain.

#### Token-level mixing changes the histories within an example

The coin flip can be made once per token or once per sequence. In captioning, the authors report that the sequence-level version performs about as poorly as Always Sampling. The basic probability of choosing a source at a decision point can be set similarly under either scheme. The resulting sequences of choices are quite different. With a single draw, an example receiving generated feedback can receive it for its entire remaining history. Under token-level draws, a sampled token can be followed by guidance from the reference.

This comparison makes it possible to connect the unit of sampling to a concrete failure mechanism. During early training, a poor prediction can affect the next prediction, which in turn becomes feedback for another step. A sequence-level draw can sustain that pattern for a whole example. Token-level choices reduce the tendency for the decision to accept one prediction to entail accepting all the following ones. Even when the state retains traces of an earlier mistake, a correctly supplied token can contribute evidence for the next decision.

The authors attribute the weaker sequence-level result to the amplification of errors early in learning. That is an explanation of the observed result, with the comparison establishing the performance ordering in the tested setup. It does not directly measure the length of mistake runs or examine how quickly states recover after any given replacement. The evidence supports using token-level mixing in these experiments and motivates looking more closely at the histories that different feedback rules generate.

#### Dropout, likelihood, and the final task metric

The dropout comparison is informative in two ways. For captioning, it shows that a favorable movement in reference likelihood can coexist with worse generated-caption scores. Likelihood rewards assigning probability to a reference continuation under its known prefix. The caption metrics assess a completed sequence generated from the picture. Changes in local probabilities can affect the entire path taken by the decoder, and the metrics also reflect agreement with references differently from likelihood. The two evaluations can consequently favor different training choices.

For parsing, Scheduled Sampling adds to dropout's benefit on development F1. The authors explicitly leave the interpretation open. Generalization is already a concern with the available training set, so the added gain may reflect some effect on overfitting, some benefit from learning under imperfect histories, or both. Observing an additive gain establishes that the methods can be combined in this experiment. It does not provide a clean partition of the reasons either method helps.

The ensemble comparisons in captioning likewise put the Scheduled Sampling gain alongside a different way of improving predictions. Both conventional training and the scheduled variant benefit from combining predictors. The reported results support retaining a distinction between what happens during training and what happens when predictions are aggregated. An improvement that persists when using an ensemble is compatible with a change in the behavior of its individual components, but ensemble scores alone cannot reveal which histories caused the improvement.

#### Why the speech evaluations favor different training choices

The strongest demonstration of sensitivity to feedback comes from the TIMIT evaluation. When the input includes the correct previous label, the conventionally trained baseline gives the lowest frame error. For this task, an earlier correct state is valuable evidence about the current state. When decoding has to feed back its own labels, reliance on that evidence can become a liability. Testing decisions along a generated path favors the methods with experience of predicted feedback.

The authors hypothesize that Always Sampling makes greater use of the acoustics and gives comparatively little influence to its own earlier output labels. With uncertain feedback during training, the acoustic features form a more consistently useful source of evidence. The paper contrasts the redundancy of frame-aligned HMM labels with prediction of phone sequences, where it expects the acoustic signal and the output history both to matter. The experiment measures errors and compares training conditions. It does not directly measure which acoustic features or label dependencies account for any particular prediction.

The timing of the validation peaks provides another observation about optimization. Training with sampled feedback reaches its best observed validation performance earlier, and the authors report deterioration afterward. They suggest that omitting gradient information through the sampling probabilities may contribute. The paper compares training trajectories under the implemented procedures. A run that accounted for the omitted gradient contribution would be needed to test that explanation directly.

### Limitations

#### Limits identified by the authors

The authors emphasize that the training gradient leaves out the effect of the discrete feedback choice. The procedure can learn to predict a reference token from a history produced by the current network, but the gradient used in the experiments does not assign later losses back through the probability of selecting each earlier token. The authors propose investigating that connection. They also suggest exploring sampling rules conditioned on the network's confidence. The experiments described use schedules tied to training progress, so they give no comparative result for a confidence-based rule.

For image captioning, the authors identify evaluation itself as an open problem because an image admits many acceptable descriptions. Reference-overlap metrics can distinguish systems on a shared benchmark, and multiple references give some room for variation. A caption that focuses on a different valid aspect of the picture can still overlap little with those references. The reported improvements justify claims about the experiment's caption metrics. Human judgments of which version is more accurate, useful, or natural would address questions additional to those metrics.

For constituency parsing, the authors explicitly acknowledge uncertainty about the mechanism of improvement. The training set is limited, and overfitting is an important concern in their account. Scheduled Sampling changes the training contexts and also perturbs a supervised prediction problem that can otherwise be highly predictable. The observed F1 gain and compatibility with dropout cannot distinguish these possible sources of benefit.

For speech, the authors limit the comparison to their frame-labeling setting. Their network predicts aligned HMM states, and their decoder for the experiment omits the HMM smoothing used in conventional hybrid decoding. Frame error in this setup is consequently a measure of a particular type of sequential labeling. The authors also frame their account of label redundancy, acoustic dependence, and the earlier validation peak as explanations that would require further investigation.

#### Further limits of the experimental design

The targets come from reference sequences even when the history diverges substantially. That choice provides an unambiguous training signal at every position. It can nonetheless make a target awkward after a sampled token. In captioning, a generated word could start a reasonable alternative description to which the next word of the original caption is a poor fit. In parsing, a mistaken earlier structural symbol can change the set of valid continuations. The method specifies which reference label to score in these situations. The experiments do not establish that it is always the best correction for the history actually produced.

The training procedure also follows a single mixed history per example as it computes its losses. Beam decoding can maintain several alternative histories for the same input and prune them according to their scores. Experience with generated tokens can make a predictor better at continuing its own prefixes without teaching it how candidates should rank against one another across a beam. This distinction limits how far the experiments support claims about alignment between the whole training procedure and the whole inference procedure. They align a particular source of feedback.

The paper illustrates several schedule shapes and uses different choices for different tasks. The experiments support the settings used in captioning, parsing, and speech, but do not jointly compare all the schedules on all the tasks. A reference probability also has different effects when the predictor is already accurate than when it still makes frequent mistakes. The work gives no general criterion for choosing the floor, the transition rate, or the point at which the network is ready for more of its own feedback.

The speech analysis depends on the targets and their alignment. A correct previous HMM-state label can be especially predictive because the same state often persists across nearby frames. The reported reversal between next-step prediction and decoding is compelling evidence about the evaluation conditions in that experiment. The paper's discussion of phone-level recognition motivates a related question for less redundant targets, but the scores on aligned frames do not answer it. The experiment also does not evaluate how reductions in state-label error would translate into accuracy on completed word sequences.

The first-place captioning entry establishes that Scheduled Sampling was used successfully in a complete challenge system. A leaderboard cannot isolate the contribution of a single training change among the choices that shape an entry. The development comparisons give the better evidence for the effect of scheduled feedback under the configurations the authors compare. Their runtime observation similarly concerns these experiments. Using one evolving network avoids the repeated training of separate predictors in the authors' account of SEARN, while the cost of applying the method in other architectures or training regimes remains outside the measurements.

Finally, the experimental tasks vary in important ways beyond the feedback policy. An image caption can have multiple valid continuations, a parser has to produce a well-formed structure, and a frame label comes with new acoustic evidence at its position. The evidence that the method can help spans these settings. The different behavior of Always Sampling is itself a reason to interpret each result with its target structure and decoding protocol in view. Translation is part of the paper's motivation, with the empirical comparisons centered on captioning, parsing, and speech.

### What came after

#### Where to put the training signal

Scheduled Sampling makes a specific intervention in a general sequence-learning problem. It changes the history on which a prediction is conditioned and keeps the original next-token target. Later citing work addresses other parts of the same problem, including the unit at which a sequence is scored, the role of search, and the source of supervision after a predictor has made a mistake. Those distinctions help explain how work can build on the training–inference question while exploring a different method.

[Sequence Level Training with Recurrent Neural Networks](https://md.research.elamur.ai/free/en/papers/ranzato-2015-sequence-level-training-recurrent-neural/) makes the sequence itself the level of training under investigation. That emphasis distinguishes a question about feedback from a question about the criterion used to evaluate a generated answer. In Scheduled Sampling, a poor answer may result from the network being unfamiliar with its own prefixes, and the training change aims to give it that familiarity. Sequence-level training takes up the related problem of how the quality of a longer prediction should influence learning. The contrast is especially natural in captioning, where the experiments judge finished descriptions and training supervision arrives at individual positions.

[Self-critical Sequence Training for Image Captioning](https://md.research.elamur.ai/free/en/papers/rennie-2016-self-critical-sequence-training-image/) puts sequence training in the same application as the MSCOCO experiment. The connection is the gap between what a captioner learns from a reference prefix and how its own description is ultimately judged. Scheduled Sampling's caption tests focus on whether training with generated word histories produces better descriptions. The later captioning work places the completed sequence at the center of the training question. Its task makes visible that a caption can be acceptable even when the choice of words and their order diverge from a particular reference.

[An Actor-Critic Algorithm for Sequence Prediction](https://md.research.elamur.ai/free/en/papers/bahdanau-2016-actor-critic-algorithm-sequence-prediction/) takes up sequence prediction with an actor–critic formulation. Its connection to Scheduled Sampling is the question of what learning signal can be supplied for a decision that affects subsequent states. Scheduled Sampling exposes the predictor to the consequences of chosen tokens and applies supervised losses to the continuation. An actor–critic formulation raises the question of assessing decisions along the sequence. That question is close to the distinction the original authors draw between training a continuation after a sampled token and assigning later loss back through the decision to sample it.

#### Where to bring search into training

[Sequence-to-Sequence Learning as Beam-Search Optimization](https://md.research.elamur.ai/free/en/papers/wiseman-2016-sequence-sequence-learning-as-beam/) makes beam search central to the learning problem. Search is already part of Scheduled Sampling's account of inference. The beam compares candidate prefixes, but training obtains its own histories from individual feedback decisions. Framing learning in terms of beam-search optimization brings the comparison among candidates into view. A predictor can learn to continue an imperfect prefix and still assign scores that cause search to discard a more promising prefix. The two problems arise from using an evolving sequence of predictions, with different consequences for what the training criterion should attend to.

[Bridging the Gap between Training and Inference for Neural Machine Translation](https://md.research.elamur.ai/free/en/papers/zhang-2019-bridging-gap-between-training-inference/) brings the mismatch directly to a task that motivates Scheduled Sampling. Translation has a source sentence that continues to provide evidence even when the generated target prefix differs from an example translation. That difference makes the choice of feedback and the interpretation of the next target concrete. An error in the developing translation may call for recovery, while a different but valid phrase may call for a different continuation. The later work's focus puts the mismatch in the translation setting that the original paper uses to explain its motivation.

#### Feedback across kinds of output

[Tacotron](https://md.research.elamur.ai/free/en/papers/wang-2017-tacotron-fully-end-end-text/) is a citing work on end-to-end text-to-speech synthesis. It takes the broader sequence-learning question into an application whose input is text and whose output is speech. This makes a useful counterpart to the paper's TIMIT experiment. The original speech setup provides a current acoustic frame to help predict its label. Text-to-speech concerns generation in the other direction, so the alignment of available evidence and generated output must be considered afresh. Results from HMM-state classification leave that synthesis question open.

[On-Policy Distillation of Language Models](https://md.research.elamur.ai/free/en/papers/agarwal-2023-policy-distillation-language-models-learning/) places self-generated mistakes in the context of distillation. The point of contact is the use of the learner's own behavior to determine the situations from which it learns. Scheduled Sampling chooses whether a reference or a prediction contributes the previous token and then uses the existing reference sequence for supervision. The distillation framing shifts attention toward what guidance is available on self-generated histories. This addresses a question that becomes apparent in the captioning and parsing experiments whenever a departure from the reference changes which continuation would be useful.

[Data Noising as Smoothing in Neural Network Language Models](https://md.research.elamur.ai/free/en/papers/xie-2017-data-noising-as-smoothing-neural/) connects to the uniform-replacement comparison through a different way of understanding altered training inputs. The captioning results suggest that a perturbation can help even when it comes from a uniform distribution, with an additional gain when the predictor supplies the replacement. Work framed around noising and smoothing makes the general effect of perturbing the input a topic in its own right. It also sharpens the empirical question raised by the original comparison. Improvements from training on altered histories can reflect generalization from corruption, preparation for the network's actual errors, or a contribution from both.

## Cite

Cite as Samy Bengio, Oriol Vinyals, Navdeep Jaitly and Noam Shazeer. 2015. Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks. arXiv:1506.03099.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.1506.03099](https://doi.org/10.48550/arxiv.1506.03099) · [arXiv 1506.03099](https://arxiv.org/abs/1506.03099)

```bibtex
@misc{bengio2015scheduled,
  title = {{Scheduled Sampling for Sequence Prediction with Recurrent Neural Networks}},
  author = {Samy Bengio, Oriol Vinyals, Navdeep Jaitly and Noam Shazeer},
  year = {2015},
  doi = {10.48550/arxiv.1506.03099},
  eprint = {1506.03099},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.1506.03099}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
