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

探索代码解释器有效推理的外在属性与内在属性

Exploring Extrinsic and Intrinsic Properties for Effective Reasoning with Code Interpreter

Vidyasirimedhi Institute of Science and Technology(维达亚希米科技学院);Kasetsart University(科琼大学);SCB 10X;King Mongkut’s University of Technology Thonburi(朱拉隆功技术大学泰竹分校);Department of Computer Engineering Chulalongkorn Univesity(朱拉隆功大学计算机工程系);Cohere;AI Singapore(AI新加坡)
Patomporn Payoungkhamdee, Napat Laosaengpha, Jenta Wonglertsakul, Pittawat Taveekitworachai, Pume Tuchinda, Panjapong Poobanchuen, Ekapol Chuangsuwanich, Can Ud… 展开作者

Patomporn Payoungkhamdee, Napat Laosaengpha, Jenta Wonglertsakul, Pittawat Taveekitworachai, Pume Tuchinda, Panjapong Poobanchuen, Ekapol Chuangsuwanich, Can Udomcharoenchaikit, Samuel Cahyawijaya, Peerat Limkonchotiwat, Sarana Nutanong

AI总结:

本文从外在属性(关键token)和内在属性(代码特定认知行为)两个角度研究代码解释器推理,发现强模型更频繁出现关键token和验证、回溯等行为,并利用这些属性在推理和训练中提升性能。

摘要:

使用代码解释器(CI)进行推理已成为一种有效范式,通过可执行计算和迭代验证增强大型语言模型(LLM)的推理能力。尽管其应用日益广泛,但有效代码推理的行为属性仍未被充分探索。在本工作中,我们受自然语言推理研究的启发,从两个不同视角研究代码推理:外在属性(由关键token表示)和内在属性(由代码特定的认知行为表示)。在多个LLM上,我们发现更强的CI推理模型一致地表现出更高比例的关键token和认知行为,特别是验证、回溯和反向链。基于这些观察,我们研究了如何在推理和训练期间利用这些属性。在推理时,附加代码特定的关键token在数学、排序和优化等若干推理能力上提升了性能,但在其他方面收益有限。在训练时,用代码特定的认知行为增强最先进的框架,在三个评估模型中的两个上提升了监督微调和强化学习性能。进一步分析表明,这些行为减少了错误回答中的过度思考,提高了token效率,同时也揭示了限制某个模型收益的因素。我们的发现首次系统性地描述了有效CI推理的特征,并展示了利用关键属性改进CI推理的潜力和局限性。

英文摘要:

Reasoning with a Code Interpreter (CI) has emerged as an effective paradigm for enhancing the reasoning capabilities of large language models (LLMs) through executable computation and iterative verification. Despite its growing adoption, the behavioral properties underlying effective code reasoning remain largely underexplored. In this work, we investigate code reasoning from two distinct perspectives inspired by prior studies of natural language reasoning: extrinsic properties, represented by crucial tokens, and intrinsic properties, represented by code-specific cognitive behaviors. Across multiple LLMs, we find that stronger CI reasoning models consistently exhibit a higher prevalence of crucial tokens and cognitive behaviors, particularly verification, backtracking, and backward chaining. Building on these observations, we examine how these properties can be leveraged during both inference and training. At inference time, appending code-specific crucial tokens improves performance on several reasoning capabilities, including mathematical, ordering, and optimization, while yielding limited benefits elsewhere. At training time, augmenting a state-of-the-art framework with code-specific cognitive behaviors improves supervised fine-tuning and reinforcement learning performance in two of three evaluated models. Further analysis shows that these behaviors reduce overthinking in incorrect responses and improve token efficiency, while also revealing factors that limit gains in a certain model. Our findings provide the first systematic characterization of effective reasoning with CI and demonstrate both the potential and limitations of leveraging key properties to improve CI-based reasoning.

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

↑