Stabilizing Reinforcement Learning with LLMs: Formulation and Practices

Chujie Zheng, Kai Dang, Bowen Yu, Mingze Li, Huiqiang Jiang, Junrong Lin, Yuqiong Liu, Hao Lin, Chencan Wu, Feng Hu, An Yang, Jingren Zhou, Junyang LinarXiv 2025 · DOI

Introduction

Reinforcement Learning (RL) has emerged as a critical component in enhancing the reasoning capabilities of Large Language Models (LLMs), as seen in frontier models like OpenAI’s o1 and DeepSeek-R1. However, a fundamental challenge persists: LLMs are optimized at the token level, while rewards are typically provided at the sequence level (e.g., the correctness of a mathematical proof). This discrepancy, coupled with the architectural complexities of Mixture-of-Experts (MoE) models, often leads to training instability or catastrophic collapse.

Theoretical Framework: First-Order Approximation

The Qwen team at Alibaba proposes a mathematical bridge to justify token-level optimization for sequence-level rewards. They frame token-level objectives as a first-order approximation of the true reward function. This validity holds only if two primary sources of error are minimized:

  1. Training-Inference Discrepancy: The difference between the model's behavior during inference (e.g., on vLLM) and training (e.g., on Megatron).
  2. Policy Staleness: The gap between the policy that generated the response and the current policy being updated.

Stabilization Techniques in MiniRL

To address these challenges, the authors introduced MiniRL, a minimalist baseline incorporating several key stabilization techniques:

  • Importance Sampling (IS) Correction: Adjusts for policy staleness and training-inference discrepancies. This ensures the model learns from the correct distribution even when using slightly older data.
  • Routing Replay (R2 & R3): Specifically for MoE models, this technique "replays" expert selections from the initial rollout. This prevents the model from getting confused by changing routing decisions during a single training step.
  • Clipping: A standard technique used to prevent overly aggressive policy updates, maintaining the validity of the first-order approximation.

Experimental Results and Analysis

The effectiveness of these techniques was evaluated using a 30B MoE model on high-level mathematical reasoning benchmarks, including HMMT25 and AIME24/25.

Training dynamics across different stabilization techniques, showing the impact of Importance Sampling and Routing Replay on stability and performance.

As illustrated in the figure above, the absence of Importance Sampling for training-inference discrepancy (the green line, "MiniRL – train-infer-IS") leads to immediate training collapse. This is characterized by a sharp spike in KL divergence and a rapid decline in benchmark scores. Conversely, the full MiniRL suite (blue line) demonstrates steady, stable improvement in both training rewards and benchmark performance over 1,200 gradient steps.

Key Insights

  • MoE Stability: Routing Replay is identified as the "missing link" for stable MoE RL. Without it, the shifting expert routing acts as a moving target that destabilizes the optimization process.
  • Convergence: A surprising finding was that as long as the RL process is stable and prolonged, models starting from different initializations (different "cold-start" data) eventually converge to similar high-performance levels.
  • Scaling Reasoning: Stabilization enables significantly longer training runs. This allows the model to continue improving its reasoning capabilities without hitting the premature performance ceilings or crashes typical of unstable RL setups.

Conclusion

By providing a principled mathematical foundation for RL stabilization, this work highlights that techniques like Importance Sampling and Routing Replay are necessary components for maintaining the validity of the reward approximation. These practices enable the reliable scaling of RL for complex reasoning tasks, particularly in MoE-based architectures.

Summary updated

BibTeX
@misc{zheng2025stabilizing,
  author = {Chujie Zheng and Kai Dang and Bowen Yu and Mingze Li and Huiqiang Jiang and Junrong Lin and Yuqiong Liu and Hao Lin and Chencan Wu and Feng Hu and An Yang and Jingren Zhou and Junyang Lin},
  title = {{Stabilizing Reinforcement Learning with LLMs: Formulation and Practices}},
  year = {2025},
  eprint = {2512.01374},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.01374},
}
Figure