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

用于增强LLM代码调试的双过程支架推理

Dual-Process Scaffold Reasoning for Enhancing LLM Code Debugging

National Taiwan University(国立台湾大学);AI Research Center, Inventec Corporation(Inventec公司人工智能研究中心);University at Albany, SUNY(纽约州立大学阿尔巴尼分校)

Po-Chung Hsieh, Chin-Po Chen, Jeng-Lin Li, Ming-Ching Chang

AI总结:

针对LLM推理步骤平衡复杂度与效率的问题,提出基于心理学的支架推理框架(含支架、分析、整合流),在DebugBench上实现88.91%通过率和5.36秒/问题的推理效率,优于其他方法且与人类认知一致。

摘要:

近期大语言模型(LLMs)通过先进推理算法在各类基准测试中展现出复杂的问题解决能力。然而,识别平衡复杂度与计算效率的推理步骤这一关键研究问题仍未解决。近期研究越来越多地借鉴心理学理论来探索优化认知路径的策略。LLM的最终输出和中间步骤分别被视为系统1和系统2,但对系统2推理的深入探索仍显不足。因此,我们提出一种新颖的基于心理学的支架推理(Scaffold Reasoning)框架用于代码调试,该框架包含支架流、分析流和整合流。支架流中参考代码的构建通过整合流与分析流生成的错误代码分析结果相结合。我们的框架在DebugBench上实现了88.91%的通过率,平均每个问题的推理时间为5.36秒,在推理准确性和效率上优于其他推理方法,且适用于不同LLM。进一步分析阐明了不同认知路径在不同问题难度和错误类型下的优势与局限性。我们的研究结果还证实了所提出的支架推理框架与人类认知过程的一致性。

英文摘要:

Recent LLMs have demonstrated sophisticated problem-solving capabilities on various benchmarks through advanced reasoning algorithms. However, the key research question of identifying reasoning steps that balance complexity and computational efficiency remains unsolved. Recent research has increasingly drawn upon psychological theories to explore strategies for optimizing cognitive pathways. The LLM's final outputs and intermediate steps are regarded as System 1 and System 2, respectively. However, an in-depth exploration of the System 2 reasoning is still lacking. Therefore, we propose a novel psychologically backed Scaffold Reasoning framework for code debugging, which encompasses the Scaffold Stream, Analytic Stream, and Integration Stream. The construction of reference code within the Scaffold Stream is integrated with the buggy code analysis results produced by the Analytic Stream through the Integration Stream. Our framework achieves an 88.91% pass rate and an average inference time of 5.36 seconds per-problem on DebugBench, outperforming other reasoning approaches across various LLMs in both reasoning accuracy and efficiency. Further analyses elucidate the advantages and limitations of various cognitive pathways across varying problem difficulties and bug types. Our findings also corroborate the alignment of the proposed Scaffold Reasoning framework with human cognitive processes.

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

↑