TL;DR
This paper mathematically demonstrates why "natural" sequence-level loss functions designed to fix exposure bias in language models are fundamentally broken—they are unbounded below, meaning training would simply diverge to negative infinity. While the authors identify a theoretical "moment matching" update direction that avoids this pitfall, its high variance leads to the surprising conclusion that standard teacher forcing remains the most robust choice for supervised learning.
What Problem Does This Paper Address?
Autoregressive (AR) language models are typically trained using teacher forcing: at each step, the model predicts the next token given the ground-truth prefix. However, at inference time, the model must generate text based on its own previous (and potentially erroneous) predictions. This mismatch is known as exposure bias, and it can lead to compounding errors where one wrong word sends the model spiraling into gibberish.
Researchers have long sought "sequence-level" loss functions that incorporate actual decoding procedures (like greedy search or sampling) during training to bridge this gap. This paper asks a critical question: Can we design a mathematically sound supervised loss that mimics how the model actually behaves at inference time?
Methods
The authors analyze two intuitive candidates for sequence-level loss:
- Greedy Decoding Loss ($L^{greedy}$): A loss based on the difference between the score of the ground truth and the score of the sequence the model would greedily pick.
- Sampling-Based Loss ($L^{sampling}$): A loss based on the expected score of sequences sampled from the model.
To study these, they leverage an AR-to-EBM mapping, a theoretical framework that treats autoregressive models as a special case of Energy-Based Models (EBMs). They also introduce an Autoregressive Gumbel Trick to provide a unified view of greedy decoding and ancestral sampling. Finally, they propose a Moment Matching Direction—a surrogate gradient obtained by applying a "stop-gradient" to the sampling process—to see if it can serve as a valid training signal without the pathologies of the other losses.
Datasets
Not discussed in the paper. This is a purely theoretical work focused on mathematical proofs and the fundamental properties of loss functions. No empirical experiments on specific text datasets were conducted.
Key Insights and Ideas
- The "Unbounded Below" Pathology: The most striking finding is that both the greedy and sampling-based losses are "fundamentally flawed." Because the decoded sequence depends on the model parameters, the model can "cheat" by pushing the scores of certain sequences to infinity, causing the loss to diverge to $-\infty$. This makes them unusable for standard gradient descent.
- Two Faces of the Same Coin: Using the Autoregressive Gumbel trick, the authors prove that the sampling-based loss is actually just the expected greedy loss under Gumbel noise. This elegantly unifies deterministic decoding and stochastic sampling under one mathematical roof.
- The Moment Matching Surrogate: By using a "stop-gradient" (treating the sampled sequence as a constant during backpropagation), the authors derive an update direction that is a valid descent direction for the model's likelihood. It encourages the model's generated "moments" (the tokens it produces) to match the ground-truth "moments."
- Teacher Forcing is "All You Need": Despite its known flaws, teacher forcing provides an exact gradient that is computationally cheap and low-variance. The authors argue that the theoretical alternatives are either mathematically broken (unbounded) or practically unusable (high variance).
Key Results
The paper is structured as a series of formal propositions:
- Propositions 2 & 3: Formally prove that $L^{greedy}$ and $L^{sampling}$ are non-convex and unbounded below.
- Proposition 4: Establishes the Gumbel trick connection between greedy decoding and sampling.
- Proposition 7: Proves that the "moment matching" direction is a mathematically valid descent direction in function space, even though it isn't the gradient of any specific loss function.
- Qualitative Conclusion: The authors conclude that exposure bias cannot be solved through "intrinsic" sequence-level supervised loss functions without introducing severe mathematical pathologies.
Limitations and Future Work
The primary limitation identified is the high variance of the moment matching direction. Because it requires sampling entire sequences to estimate a single update, the noise in the gradient grows with the sequence length $T$, making it much less efficient than the token-level gradients of teacher forcing.
The authors suggest that if researchers want to tackle exposure bias directly, they should look outside of static supervised loss functions:
- Online Policy Distillation: Changing the training data distribution by querying a teacher model on the student's own generated prefixes.
- Reinforcement Learning (RL): Using methods like REINFORCE with external rewards, which bypasses these pathologies by using a score function estimator rather than direct differentiation through the decoding process.
Summary updated