2025-04-30 · 专家 · 机器学习 · 自然语言处理

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:这篇论文想要解决什么具体问题?

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

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

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

来源

机器可读索引:llms.txt