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

代码语义有帮助吗?关于代码大语言模型基于执行轨迹信息的综合研究

Do Code Semantics Help? A Comprehensive Study on Execution Trace-Based Information for Code Large Language Models

Singapore Management University(新加坡国立管理学院);Nanyang Technological University(南洋理工大学);Tianjin University(天津大学);State Key Laboratory for Novel Software Technology(新型软件技术国家重点实验室)

Jian Wang, Xiaofei Xie, Qiang Hu, Shangqing Liu, Yi Li

AI总结:

本研究提出通用框架将执行轨迹等语义信息集成到代码大语言模型提示中,综合探究其对监督微调和推理后阶段的作用,发现语义信息用处有限,与先前工作结论相悖。

摘要:

代码大语言模型(Code LLMs)凭借其令人印象深刻的能力开启了编程的新时代。然而,近期研究揭示了它们在推理运行时行为和理解程序实际功能方面的关键局限性,这对其后训练和实际部署构成了重大挑战。具体而言,代码大语言模型面临两个主要问题:(1)缺乏对程序执行行为进行推理的能力,因为它们难以解释程序在运行时实际做了什么;(2)现有方法中语义信息(如执行轨迹)的表示不一致且零散,这阻碍了它们有效泛化和推理的能力。这些挑战凸显了采用更系统的方法来增强代码大语言模型推理能力的必要性。为解决这些问题,我们引入了一个通用框架,以支持将语义信息(例如执行轨迹)集成到代码任务相关的提示中,并开展了一项综合研究,以相应探索语义信息在增强代码大语言模型推理能力中的作用。具体而言,我们重点研究基于轨迹的语义信息在提升代码大语言模型的监督微调(SFT)和推理后阶段中的有用性。实验结果出乎意料地与先前工作相悖,表明语义信息对代码大语言模型的SFT和测试时扩展的用处有限。

英文摘要:

Code Large Language Models (Code LLMs) have opened a new era in programming with their impressive capabilities. However, recent research has revealed critical limitations in their ability to reason about runtime behavior and understand the actual functionality of programs, which poses significant challenges for their post-training and practical deployment. Specifically, Code LLMs encounter two principal issues: (1) a lack of proficiency in reasoning about program execution behavior, as they struggle to interpret what programs actually do during runtime, and (2) the inconsistent and fragmented representation of semantic information, such as execution traces, across existing methods, which hinders their ability to generalize and reason effectively. These challenges underscore the necessity for more systematic approaches to enhance the reasoning capabilities of Code LLMs. To address these issues, we introduce a generic framework to support integrating semantic information~(e.g., execution trace) to code task-relevant prompts, and conduct a comprehensive study to explore the role of semantic information in enhancing the reasoning ability of Code LLMs accordingly. Specifically, we focus on investigating the usefulness of trace-based semantic information in boosting supervised fine-tuning~(SFT) and post-phase inference of Code LLMs. The experimental results surprisingly disagree with previous works and demonstrate that semantic information has limited usefulness for SFT and test time scaling of Code LLM.

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

↑