通过动态调整学习率,解决大模型强化学习训练中的不稳定问题
Beyond Precision: Training-Inference Mismatch is an Optimization Problem and Simple LR Scheduling Fixes It
- 将训练-推理不匹配视为优化过程中的动态问题
- 发现梯度噪声与不匹配随训练同步加剧,缩减更新量可抑制
- 基于响应长度触发学习率衰减,稳定长期训练
大语言模型的强化学习训练以不稳定著称。尽管现有研究归因于混合引擎导致的训练-推理不一致,但标准方法如重要性采样在长周期训练中可能失效。本文从优化视角分析发现,梯度噪声与训练-推理不匹配随训练进程同步加剧。同时,我们发现缩小更新幅度可有效抑制该不匹配。据此推断,该问题不仅是静态数值差异,更是与模型优化动态耦合的失败现象。基于此,提出一种简单有效的解决方案:设计一种新型学习率调度器,不再采用预设衰减策略,而是根据响应长度动态触发学习率下降——我们识别出响应长度是不稳定前兆的可靠早期信号。实验证明,当梯度噪声上升时降低学习率,能持续稳定强化学习训练,并将训练-推理不匹配控制在安全水平。
原文摘要 · Abstract (English)
Reinforcement Learning (RL) for training Large Language Models is notoriously unstable. While recent studies attribute this to "training inference mismatch stemming" from inconsistent hybrid engines, standard remedies, such as Importance Sampling, might fail during extended training runs. In this work, we analyze this instability through the lens of optimization, demonstrating that gradient noise and training-inference mismatch escalate in tandem as training progresses. Meanwhile, we find that the mismatch can be effectively suppressed by shrinking the update size. Taken together, we deduce that the mismatch is not merely a static numerical discrepancy, but a dynamic failure coupled with the model's optimization. Based on this insight, we propose a simple yet effective solution: a specialized Learning Rate (LR) scheduler. Instead of pre-defined decay schedule in traditional LR scheduler, our method dynamically triggers LR decay based on response length, which we identify as a reliable early-warning signal for impending instability. Empirical evidence suggests that by reducing the learning rate as gradient noise rises, we can consistently stabilize RL training and keep the training-inference mismatch at a safe level.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。