2025-03-03 · 进阶 · 数据科学 · 机器学习 · 计算机视觉

Multi-Turn Code Generation Through Single-Step Rewards

该论文提出了一种名为 µCODE 的简单且可扩展的方法,通过单步奖励实现多轮代码生成,显著提高了代码生成的准确性和效率。

更新于 2025-03-03。作者:Arnav Kumar Jain、Gonzalo Gonzalez-Pumariega、Wayne Chen、Alexander M Rush、Wenting Zhao、Sanjiban Choudhury。

中文摘要

我们针对从多轮执行反馈生成代码的问题进行研究。现有方法要么在无反馈的情况下生成代码,要么使用复杂、分层的强化学习来优化多轮奖励。我们提出了一种简单但可扩展的方法muCode,它使用单步奖励来解决多轮代码生成问题。我们的关键洞察是,代码生成是一个单步可恢复的马尔可夫决策过程(MDP),正确的代码可以从任何中间代码状态在一轮内恢复。muCode迭代训练一个生成器,以提供基于多轮执行反馈的代码解决方案,以及一个验证器来评估新生成的代码。实验评估表明,我们的方法在性能上显著优于最先进的方法。我们对奖励模型和策略的设计选择进行了分析,并展示了muCode利用执行反馈的有效性。我们的代码可在https://github.com/portal-cornell/muCode上获取。

英文摘要

We address the problem of code generation from multi-turn execution feedback. Existing methods either generate code without feedback or use complex, hierarchical reinforcement learning to optimize multi-turn rewards. We propose a simple yet scalable approach, muCode, that solves multi-turn code generation using only single-step rewards. Our key insight is that code generation is a one-step recoverable MDP, where the correct code can be recovered from any intermediate code state in a single turn. muCode iteratively trains both a generator to provide code solutions conditioned on multi-turn execution feedback and a verifier to score the newly generated code. Experimental evaluations show that our approach achieves significant improvements over the state-of-the-art baselines. We provide analysis of the design choices of the reward models and policy, and show the efficacy of muCode at utilizing the execution feedback. Our code is available at https://github.com/portal-cornell/muCode.

解读

一句话总结

该论文提出了一种名为 µCODE 的简单且可扩展的方法,通过单步奖励实现多轮代码生成,显著提高了代码生成的准确性和效率。

问题1:这篇论文想要解决什么具体问题?

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

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

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

来源

机器可读索引:llms.txt