Reinforcement Learning for Reasoning in Large Language Models with One Training Example
该论文展示了使用单个训练示例(1-shot RLVR)在强化学习中对大语言模型(LLMs)的数学推理能力进行激励的有效性。
更新于 2025-04-30。作者:Yiping Wang、Qing Yang、Zhiyuan Zeng、Liliang Ren、Lucas Liu、Baolin Peng、Hao Cheng、Xuehai He、Kuan Wang、Jianfeng Gao、Weizhu Chen、Shuohang Wang、Simon Shaolei Du、Yelong Shen。
中文摘要
我们证明,使用一个训练示例(1-shot RLVR)的可验证奖励的强化学习能够有效地激励大型语言模型(LLMs)的数学推理能力。将RLVR应用于基础模型Qwen2.5-Math-1.5B,我们发现一个示例将MATH500上的模型性能从36.0%提升到73.6%,并将六个常见数学推理基准的平均性能从17.6%提高到35.7%。这一结果与使用1.2k DeepScaleR子集(MATH500:73.6%,平均:35.9%)获得的结果相匹配,该子集包括上述示例。在各个模型(Qwen2.5-Math-7B、Llama3.2-3B-Instruct、DeepSeek-R1-Distill-Qwen-1.5B)、RL算法(GRPO和PPO)以及不同的数学示例(其中许多作为单个训练示例使用时,在MATH500上可带来约30%或以上的提升)中,都观察到了类似的显著改进。此外,我们在1-shot RLVR过程中还发现了一些有趣的现象,包括跨领域泛化、自我反思频率的增加,以及即使在训练精度饱和后,测试性能也能持续改进,我们将这种现象称为饱和后泛化。此外,我们验证了1-shot RLVR的有效性主要来自于策略梯度损失,这将其与“理解”现象区分开来。我们还展示了在1-shot RLVR训练中促进探索(例如,通过添加具有适当系数的熵损失)的关键作用。作为额外收获,我们观察到,仅应用熵损失,而不添加任何结果奖励,就能将Qwen2.5-Math-1.5B在MATH500上的性能提高27.4%。这些发现可以启发未来关于RLVR数据效率的研究,并鼓励重新审视RLVR的近期进展和潜在机制。我们的代码、模型和数据在https://github.com/ypwang61/One-Shot-RLVR上开源。
英文摘要
We show that reinforcement learning with verifiable reward using one training example (1-shot RLVR) is effective in incentivizing the math reasoning capabilities of large language models (LLMs). Applying RLVR to the base model Qwen2.5-Math-1.5B, we identify a single example that elevates model performance on MATH500 from 36.0% to 73.6%, and improves the average performance across six common mathematical reasoning benchmarks from 17.6% to 35.7%. This result matches the performance obtained using the 1.2k DeepScaleR subset (MATH500: 73.6%, average: 35.9%), which includes the aforementioned example. Similar substantial improvements are observed across various models (Qwen2.5-Math-7B, Llama3.2-3B-Instruct, DeepSeek-R1-Distill-Qwen-1.5B), RL algorithms (GRPO and PPO), and different math examples (many of which yield approximately 30% or greater improvement on MATH500 when employed as a single training example). In addition, we identify some interesting phenomena during 1-shot RLVR, including cross-domain generalization, increased frequency of self-reflection, and sustained test performance improvement even after the training accuracy has saturated, a phenomenon we term post-saturation generalization. Moreover, we verify that the effectiveness of 1-shot RLVR primarily arises from the policy gradient loss, distinguishing it from the "grokking" phenomenon. We also show the critical role of promoting exploration (e.g., by adding entropy loss with an appropriate coefficient) in 1-shot RLVR training. As a bonus, we observe that applying entropy loss alone, without any outcome reward, significantly enhances Qwen2.5-Math-1.5B's performance on MATH500 by 27.4%. These findings can inspire future work on RLVR data efficiency and encourage a re-examination of both recent progress and the underlying mechanisms in RLVR. Our code, model, and data are open source at https://github.com/ypwang61/One-Shot-RLVR
解读
一句话总结
该论文展示了使用单个训练示例(1-shot RLVR)在强化学习中对大语言模型(LLMs)的数学推理能力进行激励的有效性。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:大语言模型在数学推理任务上取得了显著进展,但数据效率问题仍然存在。
- 现有方案不足:现有方法通常依赖于大量数据,导致数据效率低下。
- 研究目标:探索使用单个训练示例在保持性能的同时,如何减少RLVR的训练数据集。
问题2:论文的核心创新点是什么?
- 技术创新:提出了一种使用单个训练示例进行强化学习的方法(1-shot RLVR)。
- 方法改进:通过实验验证了1-shot RLVR在数学推理任务上的有效性。
- 优势:显著提高了数据效率,同时保持了模型性能。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在不同的模型、算法和数据集上进行了实验,验证了1-shot RLVR的有效性。
- 性能提升:使用单个示例将Qwen2.5-Math-1.5B模型在MATH500上的性能从36.0%提高到73.6%,平均性能从17.6%提高到35.7%。
- 对比结果:1-shot RLVR的性能与使用1.2k DeepScaleR子集(DSR-sub)的结果相当,甚至在某些情况下超过了这些结果。
问题4:这个研究的实际应用价值是什么?
- 应用场景:1-shot RLVR可以应用于需要数据效率的数学推理任务。
- 实施建议:建议在数据有限的情况下使用1-shot RLVR来提高模型性能。
- 局限与展望:1-shot RLVR可能需要进一步研究以适应不同的数据集和任务。未来可以探索更有效的数据选择方法和探索策略。
来源
机器可读索引:llms.txt