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.


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

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
大型语言模型推理增强外部知识:综述
专知会员服务
36+阅读 · 2025年6月2日
PEFT A2Z:大型语言与视觉模型的参数高效微调综述
专知会员服务
21+阅读 · 2025年4月22日
KnowledGPT:基于知识库的检索和存储访问增强大型语言模型
如何使用自然语言工具包(NLTK)在Python3中执行情感分析
Python程序员
21+阅读 · 2019年10月28日
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
Arxiv
0+阅读 · 2025年12月29日
VIP会员
相关基金
国家自然科学基金
18+阅读 · 2017年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员