迭代修复会将失败程序的错误反馈给大语言模型(LLM)以进行修复。经迭代修复后,剩余失败大多为断言失败:使用四款Qwen2.5模型时,其在BigCodeBench的剩余失败中占79%,在HumanEval中占全部失败,在LiveCodeBench中占93%。我们通过反馈的信息视角指出,断言失败几乎无法说明故障位置。我们提出断点调试(BPD),返回标注了变量运行时值的失败程序。针对迭代修复经五次尝试仍未修复的任务,我们比较两种额外五次生成的处理方式:BPD与重采样。在BigCodeBench上,BPD修复26.7%的此类任务,而重采样为22.4%,且其优势随模型规模增大而提升;在HumanEval上,BPD略优于重采样;在LiveCodeBench上,新采样修复更多(6.5% vs 4.9%)。此外,BPD将BigCodeBench上未修改代码的重新提交率从28%降至8%。仅使用首个失败测试的轨迹,其性能优于使用所有失败测试的轨迹,且比全轨迹BPD和普通迭代修复使用更少token。在LiveCodeBench上,即使针对公开测试,BPD也无增益,故可见的失败输入不足以让轨迹发挥作用。这些结果与信息视角一致:仅当测试暴露失败输入且故障为实现疏漏时,轨迹才有用;否则,修复循环应重采样而非使用轨迹。
英文摘要:
Iterative repair returns a failed program's error to a large language model (LLM) and asks it to fix it. After iterative repair, the remaining failures are mostly assertion failures: with four Qwen2.5 models, they make up 79% of residual failures on BigCodeBench, all on HumanEval and 93% on LiveCodeBench. We argue, through an information view of the feedback, that an assertion failure says little about where the fault lies. We propose Breakpoint Debugging (BPD), which returns the failed program annotated inline with its variables' runtime values. We take the tasks that iterative repair failed to fix with five repair attempts and compare two ways of spending five further generations on them: BPD, and resampling. On BigCodeBench, BPD repairs 26.7% of these tasks against 22.4%, and its advantage grows with model size. On HumanEval, BPD outperforms resampling but only slightly, and on LiveCodeBench, fresh sampling repairs more (6.5% against 4.9%). Furthermore, BPD reduces unchanged-code resubmissions from 28% to 8% on BigCodeBench. Using only the first failing test's trace, it outperforms tracing all failing tests while using fewer tokens than both all-trace BPD and plain iterative repair. On LiveCodeBench, BPD gives no gain even on the public tests, so a visible failing input is not enough for a trace to help. These results match the information view: a trace helps only when the test exposes a failing input, and the fault is an implementation slip; otherwise, a repair loop should resample rather than trace.
Repairing LLM-Generated Specifications with Deterministic Diagnosis
University of Oxford(牛津大学);University of Illinois Chicago(伊利诺伊大学芝加哥分校);Politecnico di Milano(米兰理工大学);The Pennsylvania State University(宾夕法尼亚州立大学);Institute for Decentralized AI (IDAI)(去中心化人工智能研究所(IDAI))
From Failed Trajectories to Reliable LLM Agents: Diagnosing and Repairing Harness Flaws
State Key Laboratory of Complex System Modeling and Simulation Technology(复杂系统建模与仿真技术国家重点实验室);Institute of Software, Chinese Academy of Sciences(中国科学院软件研究所);University of Chinese Academy of Sciences(中国科学院大学);School of Computer Science and Technology, Tianjin University(天津大学计算机科学与技术学院)
Teaching Code LLMs to Reason with Intermediate Formal Specifications
FPT Software AI Center(FPT软件人工智能中心);University of Texas at Dallas(德克萨斯大学达拉斯分校);Hanoi Univ. of Science and Tech.(河内科学技术大学);Texas, USA(得克萨斯州,美国);Hanoi, Vietnam(河内,越南)
Improving Dynamic Specification Inference with LLM-Generated Counterexamples
University of Rio Cuarto(里奥夸尔托大学);Complutense University of Madrid(马德里康普顿斯大学);University of Buenos Aires(布宜诺斯艾利斯大学);Luxembourg Institute of Science and Technology(卢森堡科学与技术研究所);National Council for Scientific and Technical Research (CONICET)(国家科学研究和技术委员会);Guangdong Technion-Israel Institute of Technology(广东以色列理工学院)
Escaping the Self-Repair Trap: Improving Test Oracle Generation via Dual-Context Awareness
Beihang University(北京航空航天大学);National College for Excellent Engineers(卓越工程师学院);Qingdao Research Institute(青岛研究院);Hangzhou Innovation Institute(杭州创新研究院)
Multi-LLM Orchestration for High-Quality Code Generation: Exploiting Complementary Model Strengths
Chinese Academy of Science(中国科学院);University of Arizona(亚利桑那大学);Wuhan University(武汉大学);East Carolina University(东卡罗来纳大学);University of Georgia(佐治亚大学);University of Waterloo(滑铁卢大学)