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

代码赋能的语言模型可在多样任务上超越推理模型

Code-enabled language models can outperform reasoning models on diverse tasks

MIT(麻省理工学院);Inria(法国国家科研机构);Harvard University(哈佛大学)

Cedegao E. Zhang, Cédric Colas, Gabriel Poesia, Joshua B. Tenenbaum, Jacob Andreas

AI总结:

本文提出CodeAdapt方法,结合CodeAct框架与少样本上下文学习,使标准指令微调语言模型无需微调即可在多样任务上超越对应推理模型,提升性能并显著提高token效率。

摘要:

推理模型(RMs)是通过强化学习训练的语言模型(LMs),能够生成长篇自然语言推理,已取得显著成功,但它们仍需要大量计算和数据来训练,且运行起来可能缓慢且昂贵。在本文中,我们表明,标准指令微调的语言模型无需微调,即可被激发为强大的推理者,其水平可与对应的推理模型(如DeepSeek V3与R1)相当甚至超越,涵盖从指令遵循、创造性生成到数学推理的多样领域。这通过我们提出的简单方法CodeAdapt实现,该方法结合了CodeAct框架(语言模型以多步骤方式将自然语言推理与代码执行交替进行)和少样本引导的上下文学习(仅需五个训练问题)。通过分析四对匹配的语言模型和推理模型,我们发现CodeAdapt使三个语言模型在八个任务上的平均表现优于对应的推理模型(最高提升22.9%),同时token效率提高10-81%,并且在四个模型平均下,在六个任务上表现更优(最高提升35.7%)。此外,代码增强的推理轨迹展现出丰富多样的问题解决策略。我们的研究结果支持:(1)CodeAdapt式的学习和推理可能具有鲁棒性和领域通用性;(2)代码赋能的语言模型在认知上具有基础性且功能强大,可能为权重内强化学习提供坚实基础。

英文摘要:

Reasoning models (RMs), language models (LMs) trained with reinforcement learning to produce long-form natural language reasoning, have been remarkably successful, but they still require large amounts of computation and data to train, and can be slow and expensive to run. In this paper, we show that standard instruct LMs can already be elicited to be strong reasoners at a level comparable to or even surpassing their corresponding RMs (e.g., DeepSeek V3 vs R1) without finetuning, across diverse domains from instruction following and creative generation to mathematical reasoning. This is achieved by CodeAdapt, our simple recipe that combines the CodeAct framework, where LMs interleave natural language reasoning with code execution in a multi-step fashion, with few-shot bootstrap in-context learning from as few as five training problems. Analyzing four matched pairs of LMs and RMs, we find that CodeAdapt enables three LMs to outperform the corresponding RMs on average over eight tasks (up to 22.9%) while being 10-81% more token efficient, and delivers superior performance on six tasks when averaged over the four models (up to 35.7%). Furthermore, the code-augmented reasoning traces display rich and varied problem-solving strategies. Our findings support that (1) CodeAdapt-style learning and reasoning may be robust and domain general and (2) code-enabled LMs are cognitively grounded and powerful systems, potentially providing a strong foundation for in-weight reinforcement learning.

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

↑