arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2505.17218cs.AI
收藏

有效强化学习用于语言模型推理

Effective Reinforcement Learning for Reasoning in Language Models

University of Pennsylvania(宾夕法尼亚大学)

Lianghuan Huang, Shuo Li, Sagnik Anupam, Insup Lee, Osbert Bastani

AI总结:

针对语言模型推理,提出DASH算法,通过抢占式采样和梯度过滤,在保持准确性的同时将训练时间减少83%,并揭示在线策略RL优于SFT等关键设计决策。

摘要:

强化学习(RL)已成为在数学和编程等领域提升语言模型(LMs)推理能力的一种有前景的策略。然而,大多数现代RL算法是为机器人应用设计的,这与LM推理存在显著差异。我们分析了针对LM推理的RL算法设计决策,兼顾准确性和计算效率,并因计算约束而聚焦于相对较小的模型。我们的发现如下:(i)在线策略RL显著优于监督微调(SFT);(ii)基于PPO的离线策略更新提高了准确性而非降低方差;(iii)移除KL散度可带来更简洁的生成和更高的准确性。此外,我们发现计算效率的一个关键瓶颈在于推理和反向传播的最优批大小不同。我们提出了一种新算法DASH,它执行抢占式采样(即采样大批量并以小增量累积梯度更新)和梯度过滤(即丢弃优势估计较小的样本)。我们表明,与标准GRPO实现相比,DASH在不牺牲准确性的情况下将训练时间减少了83%。我们的发现为设计有效的LM推理RL算法提供了宝贵见解。

英文摘要:

Reinforcement learning (RL) has emerged as a promising strategy for improving the reasoning capabilities of language models (LMs) in domains such as mathematics and coding. However, most modern RL algorithms were designed to target robotics applications, which differ significantly from LM reasoning. We analyze RL algorithm design decisions for LM reasoning, for both accuracy and computational efficiency, focusing on relatively small models due to computational constraints. Our findings are: (i) on-policy RL significantly outperforms supervised fine-tuning (SFT), (ii) PPO-based off-policy updates increase accuracy instead of reduce variance, and (iii) removing KL divergence can lead to more concise generations and higher accuracy. Furthermore, we find that a key bottleneck to computational efficiency is that the optimal batch sizes for inference and backpropagation are different. We propose a novel algorithm, DASH, that performs preemptive sampling (i.e., sample a large batch and accumulate gradient updates in small increments), and gradient filtering (i.e., drop samples with small advantage estimates). We show that DASH reduces training time by 83% compared to a standard implementation of GRPO without sacrificing accuracy. Our findings provide valuable insights on designing effective RL algorithms for LM reasoning.

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

↑