arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.03253cs.CLcs.LG
收藏

自主执行模拟提升编码模型

Self-Execution Simulation Improves Coding Models

FAIR team, Meta(Meta FAIR团队);Hebrew University of Jerusalem(耶路撒冷希伯来大学);Inria(法国国家信息与自动化研究所)

Gallil Maimon, Ori Yoran, Felix Kreuk, Michael Hassid, Gal Cohen, Pierre Chambon, Yossi Adi

AI总结:

本文通过自主执行模拟提升编码模型,结合监督微调与强化学习,改进编程竞赛表现,验证了执行模拟在代码生成中的有效性。

摘要:

在使LLMs生成一致正确代码的研究方向中,解决其无法正确估计程序执行能力是一个重要问题,特别是对于生成的代码。本文展示了Code LLMs可以训练以逐步模拟程序执行,并利用此能力提升编程竞赛表现。我们的方法结合了基于自然语言执行轨迹的监督微调、基于真实执行的文本解释,以及使用可验证奖励的强化学习。我们引入了两个互补的目标:给定代码和输入进行输出预测,以及使用真实或自预测执行反馈解决编程竞赛任务。这些目标使模型能够对多个候选解决方案进行自我验证,并通过模拟测试执行实现迭代自我修复。在多个编程竞赛基准上,我们的方法在标准推理方法上表现出一致的改进。我们进一步进行了消融分析,以阐明执行模拟的作用及其限制。

英文摘要:

A promising research direction in enabling LLMs to generate consistently correct code involves addressing their inability to properly estimate program execution, particularly for code they generate. In this work, we demonstrate that Code LLMs can be trained to simulate program execution in a step-by-step manner and that this capability can be leveraged to improve competitive programming performance. Our approach combines supervised fine-tuning on natural language execution traces, textual explanations grounded in true execution, with reinforcement learning using verifiable rewards. We introduce two complementary objectives: output prediction given code and inputs, and solving competitive programming tasks with either ground-truth or self-predicted execution feedback. These objectives enable models to perform self-verification over multiple candidate solutions, and iterative self-fixing by simulating test execution. Across multiple competitive programming benchmarks, our method yields consistent improvements over standard reasoning approaches. We further present ablations and analysis to elucidate the role of execution simulation and its limitations.

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

↑