arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2604.23989cs.LGcs.AI
收藏

修正初始代码并迭代细化文本方向以实现安全的多轮代码修正

Understanding Scattered Forest Search: A Version-Space Perspective on Multi-Turn Program Correction

Department of Computer Science(计算机科学系);The University of Tokyo(东京大学)

Yuto Tanaka, Issei Sato

AI总结:

本文提出简化方法IRTD,通过修正初始代码并迭代细化文本方向,理论证明其安全性,并在代码生成基准测试中表现与最先进方法相当。

摘要:

近期关于大语言模型(LLMs)的研究强调了扩展推理计算的重要性。从这一视角出发,提出了状态-of-the-art方法Scattered Forest Search(SFS),采用蒙特卡洛树搜索结合精心设计的初始种子和文本优化进行多轮代码修正。然而,其复杂性使不清楚哪些因素对推理性能的提升起作用。为了解决这个问题,我们分析SFS并提出更简单的Iterative Refinement of Textual Directions(IRTD)方法,该方法修正初始代码并迭代细化文本方向。由于IRTD的简单性,我们利用Oracle-Guided Inductive Synthesis(OGIS)理论建立了其安全性。在多个代码生成基准测试中,实验表明IRTD的推理性能与最先进方法相当。这些结果表明,即使没有复杂的搜索结构,仅通过高质量文本方向细化初始代码也能有效提升推理性能。

英文摘要:

In multi-turn program correction, the state-of-the-art method Scattered Forest Search (SFS) has been proposed, employing Monte Carlo Tree Search (MCTS) with carefully crafted initial seeds and text-based optimization. However, since SFS integrates multiple components, the effects of each component on performance and the overall behavior of SFS have not been sufficiently analyzed. In this work, we theoretically analyze the refinement process of SFS from the perspective of version spaces in learning theory and clarify its behavior. First, as a basis for the theoretical analysis, we introduce a sequential self-refinement method (Line), which starts from an initial program and repeatedly refines the resulting program. Furthermore, while Line progresses the refinement process in the depth direction, we introduce Iterative Refinement of Repair Instructions (IRRI) to capture the refinement process in the width direction, which fixes initial programs and iteratively refines repair instructions. We then analyze Line and IRRI and conduct a theoretical analysis of SFS by positioning it as an intermediate method between the two. Our theoretical analysis reveals that SFS exhibits behavior closer to IRRI than to Line, and this theoretical characteristic is also confirmed experimentally. Considering computational resources and methodological simplicity, these results suggest that a simpler method, IRRI, may achieve a similar refinement process without relying on the complex correction mechanism of SFS.

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

↑