TL;DR
Reinforcement Learning with Verifiable Rewards (RLVR) is highly effective for boosting LLM reasoning, but it suffers from a harsh trade-off between exploration diversity and sample quality. This paper introduces Exploratory Annealed Decoding (EAD), a simple plug-and-play strategy that dynamically lowers the sampling temperature within the generation of a single response. By exploring early and exploiting late, EAD significantly improves training stability, sample efficiency, and final model accuracy across various RL algorithms and model sizes.
What Problem Does This Paper Address?
When fine-tuning Large Language Models (LLMs) using reinforcement learning for tasks with verifiable outcomes (like mathematics or coding), success heavily depends on how well the model explores the solution space. Standard fixed-temperature sampling forces a difficult compromise:
- High temperatures promote diversity but often degrade text quality, leading to incoherent hallucinations.
- Low temperatures preserve text quality but restrict exploration, causing "entropy collapse" where the model gets stuck repeating generic, suboptimal paths.
Furthermore, aggressive exploration introduces a severe off-policy discrepancy between the sampling policy and the target policy being optimized. This discrepancy can cause gradient variance to explode, destabilizing the entire training process.
Methods
The authors propose Exploratory Annealed Decoding (EAD), which operates on an intuitive design principle: explore at the beginning, exploit at the end.
Instead of maintaining a static temperature throughout a generation, EAD dynamically adjusts the token-level temperature $\tau_t$ as the sequence progresses:
- Intra-sequence Annealing: The generation starts at a high temperature ($\tau_{\max} > 1$) to inject randomness into the initial tokens, allowing the model to choose diverse semantic directions. The temperature then decays exponentially toward a low temperature ($\tau_{\min}$) to ensure the final steps are precise and coherent.
- Global-Step-Aware Decay: Because LLMs naturally learn to generate longer reasoning chains as RL training progresses, a fixed decay rate would cause the model to spend too many tokens at freezing temperatures. EAD dynamically scales the decay rate based on the global training step.
- Truncated Importance Sampling (TIS): To correct the off-policy bias introduced by this dynamic sampling schedule and prevent gradient explosion, the authors integrate a token-level truncation mechanism to keep training stable.
Datasets
- Numina-Math: A large-scale dataset containing 860k math prompts, used as the primary training set.
- MMLU (Massive Multitask Language Understanding): Used with Chain-of-Thought prompting as a held-out evaluation dataset to analyze natural entropy trends and validate inference-time scaling.
Key Insights and Ideas
- Natural Entropy Decay: Both information theory (the data processing inequality) and empirical testing reveal that an LLM's uncertainty naturally shrinks as it generates a sequence. Initial tokens shape the high-level structure, while later tokens merely fill in details. EAD aligns its exploration strategy with this natural dynamic.
- Early Branching Wins: Through a controlled "forking" experiment, the authors confirmed that forcing a model to branch out early in its generation path yields significantly higher accuracy (
Maj@k) than forcing it to branch out later in low-entropy zones.
- Mitigating Entropy Collapse: Under standard fixed-temperature sampling, RL training quickly crushes the model's entropy. EAD allows the model's entropy to dynamically adjust and transition out of local optima continuously without requiring heavy external interventions like tree-search.
Key Results
- Sustained Performance Gains: EAD consistently outperformed fixed-temperature baselines on both
Pass@16andWorst@16metrics. It proved highly effective across multiple model families (Llama and Qwen) and successfully scaled up to a Qwen-2.5-Math-7B model.
- High Sample Efficiency: Generating multiple rollouts to find a correct answer is computationally expensive. EAD achieves strong results using just 4 or 8 rollouts, matching or beating fixed-temperature baselines that use double the sample size.
- Broad Compatibility: EAD acts as a plug-and-play enhancement. The authors demonstrated robust performance gains when integrating it into three distinct RL frameworks: DAPO, GRPO, and EntropyMech.
- Inference-Time Benefits: Even without any RL training, applying EAD directly at test-time inference consistently improved performance under majority voting setups.
Limitations and Future Work
- Scaling Verification: Due to limited computational resources, the authors could not fully explore EAD's scaling behavior on extremely large models (e.g., 70B+ parameters).
- Uniform Schedules: The current implementation applies a uniform temperature annealing schedule across all prompts. Developing an adaptive mechanism that tailors the temperature schedule to individual prompt difficulty remains a challenging but promising direction.
- Advanced Algorithmic Blending: Future work will focus on systematically combining EAD with other advanced exploration-promoting RLVR algorithms to see if their benefits compound.
Summary updated