From f(x) and g(x) to f(g(x)): LLMs Learn New Skills in RL by Composing Old Ones
该论文通过构建一个合成框架,证明了通过组合现有技能,强化学习可以使大型语言模型(LLMs)获得真正的新的技能,并展示了这些技能的可迁移性和跨任务泛化能力。
更新于 2025-09-30。作者:Lifan Yuan、Weize Chen、Yuchen Zhang、Ganqu Cui、Hanbin Wang、Ziming You、Ning Ding、Zhiyuan Liu、Maosong Sun、Hao Peng。
中文摘要
强化学习真的教会了大型语言模型新的技能,还是仅仅激活了已有的技能?这个问题是关于强化学习在大型语言模型后训练中作用持续争论的核心。一方面,即使没有先前的监督微调,使用强化学习也能取得强大的实证结果;另一方面,批评者认为强化学习对现有推理策略的重加权贡献甚微。这项工作提供了具体的证据,表明LLMs可以通过组合现有的技能来在学习强化学习过程中获得真正的新技能,这与人类获取新认知技能的一种核心机制相呼应。为了减轻数据污染和其他混杂因素,并允许精确控制任务复杂度,我们开发了一个用于调查的合成框架。具体来说,我们将技能定义为在给定x的情况下推断字符串变换函数f(x)的输出的能力。当LLM在强化学习之前已经学习了f和g,我们的实验显示强化学习使它能够学习这些函数未见过的组合h(x)=g(f(x))。此外,这种组合能力推广到更困难的问题,如RL训练期间未见过的超过2个函数的组合。令人惊讶的是,我们的实验表明,在源任务上获得的组合技能可以转移到不同的目标任务上。这种转移即使在目标上没有进行组合训练的情况下也会发生,只需要对目标的基本技能有先前的知识。我们的定性分析表明,强化学习从根本上改变了模型的推理行为。相比之下,使用相同数据进行下一token的训练却没有得出这些发现。我们的系统性实验为LLM的学习提供了新的见解,表明首先构建具有基本技能的基础模型,然后使用强化学习来激励复杂问题的先进、可推广的技能的价值。
英文摘要
Does RL teach LLMs genuinely new skills, or does it merely activate existing ones? This question lies at the core of ongoing debates about the role of RL in LLM post-training. On one side, strong empirical results can be achieved with RL even without preceding supervised finetuning; on the other, critics argue that RL contributes little beyond reweighting existing reasoning strategies. This work provides concrete evidence that LLMs can acquire genuinely new skills during RL by composing existing ones, mirroring one of the central mechanisms by which humans acquire new cognitive skills. To mitigate data contamination and other confounding factors, and to allow precise control over task complexity, we develop a synthetic framework for our investigation. Specifically, we define a skill as the ability to infer the output of a string transformation function f(x) given x. When an LLM has already learned f and g prior to RL, our experiments reveal that RL enables it to learn unseen compositions of them h(x)=g(f(x)). Further, this compositional ability generalizes to more difficult problems such as compositions of >2 functions unseen during RL training. Surprisingly, our experiments show that compositional skill acquired on a source task transfers to a different target task. This transfer happens even without compositional training on the target, requiring only prior knowledge of the target's atomic skills. Our qualitative analysis shows that RL fundamentally changes the reasoning behaviors of the models. In contrast, next-token training with the same data yields none of these findings. Our systematic experiments provide fresh insights into LLM learning, suggesting the value of first building base models with basic skills, then using RL to incentivize advanced, generalizable skills for complex problems.
解读
一句话总结
该论文通过构建一个合成框架,证明了通过组合现有技能,强化学习可以使大型语言模型(LLMs)获得真正的新的技能,并展示了这些技能的可迁移性和跨任务泛化能力。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:强化学习(RL)在大型语言模型(LLMs)上取得了成功,但关于RL在LLMs后训练中的作用存在争议,一方面是RL可以提高LLMs的推理能力,另一方面有人认为RL的贡献仅限于重新加权现有的推理策略。
- 现有方案不足:目前的研究方法难以区分LLMs在RL训练过程中是否学习到了新的技能,以及这些技能的泛化能力如何。
- 研究目标:通过实验证明LLMs在RL过程中能够学习到新的技能,并探究这些技能的泛化能力。
问题2:论文的核心创新点是什么?
- 技术创新:构建了一个合成框架,通过控制任务复杂度和技能定义来分析RL的能力。
- 方法改进:定义了原子技能和组合技能,并设计了基于RFT和RL的两种组合方法。
- 优势:能够更精确地评估RL的效果,并揭示了LLMs在RL过程中的学习行为。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:通过在合成框架上进行的实验,验证了RL可以使LLMs学习到新的组合技能,并展示了这些技能的可迁移性和跨任务泛化能力。
- 性能提升:实验结果表明,通过RL训练的模型在更复杂的任务上取得了显著的性能提升。
- 对比结果:与基线方法相比,RL训练的模型在组合技能学习方面表现出更好的性能。
问题4:这个研究的实际应用价值是什么?
- 应用场景:该研究的结果对于LLMs的开发和应用具有重要意义,可以为LLMs的后训练策略提供指导。
- 实施建议:建议在LLMs的后训练过程中,结合RFT和RL,以获得更好的性能和泛化能力。
- 局限与展望:该研究主要关注LLMs的推理能力,未来可以进一步研究RL在LLMs其他方面的应用。