Abstract
Pretrained language models are commonly aligned with human preferences and downstream tasks via reinforcement finetuning (RFT), which refers to maximizing a (possibly learned) reward function using policy gradient algorithms. This work identifies a fundamental optimization obstacle in RFT: we prove that the expected gradient for an input vanishes when its reward standard deviation under the model is small, even if the expected reward is far from optimal. Through experiments on an RFT benchmark and controlled environments, as well as a theoretical analysis, we then demonstrate that vanishing gradients due to small reward standard deviation are prevalent and detrimental, leading to extremely slow reward maximization. Lastly, we explore ways to overcome vanishing gradients in RFT. We find the common practice of an initial supervised finetuning (SFT) phase to be the most promising candidate, which sheds light on its importance in an RFT pipeline. Moreover, we show that a relatively small number of SFT optimization steps on as few as 1% of the input samples can suffice, indicating that the initial SFT phase need not be expensive in terms of compute and data labeling efforts. Overall, our results emphasize that being mindful for inputs whose expected gradient vanishes, as measured by the reward standard deviation, is crucial for successful execution of RFT.
Introduction
Reinforcement Learning from Human Feedback (RLHF) and Reinforcement Finetuning (RFT) are standard techniques for aligning modern language models. However, practitioners often find these models frustratingly slow to optimize. This research identifies a fundamental mathematical hurdle: when a model’s outputs for a specific prompt all receive similar rewards, the learning signal effectively disappears—even if those rewards are objectively poor. This phenomenon, termed "vanishing gradients," occurs when the reward standard deviation is low, creating optimization deadlocks where the model receives no signal on how to improve.
The Vanishing Gradient Trap
In a standard RFT pipeline, a pretrained model generates multiple responses for a prompt, and a policy gradient algorithm (like PPO) nudges the model toward higher-reward responses. The authors identify a "dead zone": if the model assigns roughly the same suboptimal reward to all generated responses, the gradient vanishes. Without "contrast" between attempts, the model cannot determine a direction for improvement. This is particularly common when the finetuning task differs significantly from pretraining data, causing the model to default to "safe" but low-reward behaviors.
Mathematically, the researchers proved (Theorem 1) that the expected gradient norm is bounded by the reward standard deviation. Essentially, no reward variance implies no learning signal.
Empirical Evidence and the Role of SFT
The study utilized the GRUE benchmark (NarrativeQA, ToTTo, IMDB, etc.) and controlled environments (MNIST, CIFAR-10). In datasets like NarrativeQA and ToTTo, a significant portion of inputs had near-zero reward variance under the pretrained model, leading to RFT failure.
As shown in Figure 1, the pretrained model often clusters samples in low-reward, low-variance regions (darker points). Supervised Finetuning (SFT) acts as a catalyst by reshaping the model's probability distribution. By forcing the model to assign high probability to a specific "correct" answer, SFT naturally increases reward variance, which "restarts" the RFT engine.
Figure 2 illustrates that the performance gap between RFT and SFT is most pronounced when the initial reward standard deviation is low. As the 10th percentile of pretrain reward STD increases, RFT performance approaches that of SFT, confirming that initial variance is a prerequisite for effective reinforcement learning.
Efficiency: The 1% Rule
A key finding is that the initial SFT phase does not require massive datasets. The authors discovered that SFT on just 1% of input samples for 40% of the usual steps allowed subsequent RFT to reach 96% of the reward of a full-scale SFT+RFT pipeline. This suggests the "warm-up" phase of RLHF can be significantly more compute-efficient than previously assumed, provided it successfully moves the model out of the vanishing gradient zone.
Conclusion
Vanishing gradients due to low reward standard deviation are a prevalent obstacle in RFT. While common heuristics like entropy regularization fail to solve this, a minimal SFT phase effectively kickstarts optimization. Future work should explore how these findings scale to 70B+ parameter models and how alternative objectives like Direct Preference Optimization (DPO) might inherently bypass the vanishing gradient trap.
Summary updated