Teacher Forcing › Combining Cross-Entropy and Reinforcement Learning
Language AI HandbookAll chapters Teacher Forcing › Combining Cross-Entropy and Reinforcement LearningOne section · Sections in this chapter10 / 16 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
In modern practice, cross-entropy loss (teacher forcing) and REINFORCE-style rewards are rarely used in isolation. Instead, they are combined in a mixed training objective that exploits the strengths of both approaches. The standard formulation is:
where:
- : the mixing coefficient, typically set between 0.9 and 0.99 to keep training stable
- : the cross-entropy (teacher forcing) loss
- : the policy gradient (REINFORCE) loss
The high value of reflects the practical wisdom that cross-entropy loss provides essential regularization. Without it, the RL component alone tends to overfit to the specific evaluation metric, sometimes in degenerate ways. Models trained only with BLEU score have been known to learn to repeat high-frequency phrases that boost BLEU without improving actual translation quality. The cross-entropy component keeps the model's predicted distribution over tokens close to the true distribution, which prevents degenerate reward-hacking behavior.
A common training recipe in industrial NMT systems is to first train to convergence with pure teacher forcing, then switch to the mixed objective for a limited number of additional epochs. The rationale is that teacher forcing is far more efficient during the initial phase, since it provides a clean and informative gradient signal at every step. Once the model has developed strong basic competence, the RL fine-tuning phase can safely optimize the task metric with reasonable stability.
This two-stage approach also addresses the cold-start problem for RL training. If you apply REINFORCE from the beginning, the model's initial random outputs receive very low rewards, and the gradient variance is enormous because the baseline (the greedy output) is also terrible. There is very little useful signal for the model to learn from. Starting from a strong teacher-forced checkpoint means the model already produces reasonable outputs, the rewards are in a useful range, and the advantage signal (difference between sampled and greedy rewards) is informative.