2025-12-02 · 专家 · 自然语言处理 · 机器学习

Stabilizing Reinforcement Learning with LLMs: Formulation and Practices

本文提出了一种新的强化学习公式,通过使用代理的token级目标函数来优化LLM的序列级奖励,并通过实验验证了该方法在稳定RL训练中的有效性。

更新于 2025-12-12。作者:Chujie Zheng、Kai Dang、Bowen Yu、Mingze Li、Huiqiang Jiang、Junrong Lin、Yuqiong Liu、An Yang、Jingren Zhou、Junyang Lin。

中文摘要

本文提出了一种针对大型语言模型强化学习(RL)的新型公式,解释了为什么以及什么条件下,通过代理标记级目标可以在REINFORCE等策略梯度方法中优化真实序列级奖励。具体而言,通过一阶近似,我们表明只有当训练-推理差异和政策老化都最小化时,这种代理才变得更加有效。这一见解为在强化学习训练中稳定RL训练的几种广泛采用的技术(包括重要性采样校正、截断以及尤其是用于混合专家(MoE)模型的Routing Replay)的关键作用提供了原则性解释。通过使用总计数百万GPU小时的30B MoE模型进行的广泛实验,我们表明,对于策略训练,带重要性采样校正的基本策略梯度算法实现了最高的训练稳定性。当引入离策略更新以加速收敛时,结合截断和Routing Replay成为缓解由政策老化引起的不稳定性的关键。值得注意的是,一旦训练稳定,长期优化始终能够产生与冷启动初始化无关的可比最终性能。我们希望这些共享见解和为稳定RL训练开发的食谱能够促进未来的研究。

英文摘要

This paper proposes a novel formulation for reinforcement learning (RL) with large language models, explaining why and under what conditions the true sequence-level reward can be optimized via a surrogate token-level objective in policy gradient methods such as REINFORCE. Specifically, through a first-order approximation, we show that this surrogate becomes increasingly valid only when both the training-inference discrepancy and policy staleness are minimized. This insight provides a principled explanation for the crucial role of several widely adopted techniques in stabilizing RL training, including importance sampling correction, clipping, and particularly Routing Replay for Mixture-of-Experts (MoE) models. Through extensive experiments with a 30B MoE model totaling hundreds of thousands of GPU hours, we show that for on-policy training, the basic policy gradient algorithm with importance sampling correction achieves the highest training stability. When off-policy updates are introduced to accelerate convergence, combining clipping and Routing Replay becomes essential to mitigate the instability caused by policy staleness. Notably, once training is stabilized, prolonged optimization consistently yields comparable final performance regardless of cold-start initialization. We hope that the shared insights and the developed recipes for stable RL training will facilitate future research.

解读

一句话总结

本文提出了一种新的强化学习公式,通过使用代理的token级目标函数来优化LLM的序列级奖励,并通过实验验证了该方法在稳定RL训练中的有效性。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源