arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.01374cs.LGcs.AIcs.CL
收藏

通过大语言模型稳定强化学习:公式与实践

Stabilizing Reinforcement Learning with LLMs: Formulation and Practices

Alibaba Inc(阿里巴巴公司)

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 Lin

AI总结:

本文提出通过大语言模型稳定强化学习的新方法,揭示了代理目标优化的条件,并通过实验验证了重要性采样校正和Routing Replay在提升训练稳定性中的作用。

摘要:

本文提出了一种新的强化学习(RL)与大语言模型结合的公式,解释了为什么以及在什么条件下可以通过代理的token级目标在策略梯度方法如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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑