arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2603.11103cs.SE
收藏

通过重构理解:为LLM预训练反转软件开发过程

Understanding by Reconstruction: Reversing the Software Development Process for LLM Pretraining

ByteDance Seed(字节跳动种子);Fudan University(复旦大学);M-A-P;ByteDance TikTok(字节跳动TikTok);Shanghai Innovation Institute(上海创新研究所);The Hong Kong University of Science and Technology(香港科技大学)

Zhiyuan Zeng, Yichi Zhang, Yong Shan, Kai Hua, Siyuan Fang, Zhaiyu Liu, Jiaheng Liu, Haozhe Wang, Yining Zheng, Ming Ding, Ke Shen, Ge Zhang, Wenhao Huang, Xipeng Qiu

AI总结:

本文提出通过重构软件开发过程来提升LLM性能,通过模拟多智能体轨迹生成更丰富的监督信号,实验显示在多个基准测试中效果显著。

摘要:

尽管大型语言模型(LLMs)在代码生成方面取得了显著成功,但它们在复杂软件工程所需的深度、长周期推理方面往往表现不佳。我们归因于标准预训练数据的性质:静态软件仓库仅代表复杂智力过程的终端状态,抽象掉了中间的规划、调试和迭代优化。为此,我们提出了一种新的范式:通过重构理解。我们假设逆向工程静态仓库背后的潜在智能体轨迹——规划、推理和调试步骤——能提供比原始代码更丰富的监督信号。为此,我们引入了一个框架,通过多智能体模拟合成这些轨迹。该过程基于源仓库的结构现实(例如依赖图和文件层次结构)以确保准确性。此外,为了保证合成数据的逻辑严谨性,我们采用基于搜索的优化技术,通过迭代优化Chain-of-Thought(CoT)推理来最大化真实代码的似然性。实验证明,连续预训练这些重构轨迹显著提高了Llama-3-8B在多个基准测试中的性能,包括长上下文理解、编码能力和智能体能力。

英文摘要:

While Large Language Models (LLMs) have achieved remarkable success in code generation, they often struggle with the deep, long-horizon reasoning required for complex software engineering. We attribute this limitation to the nature of standard pre-training data: static software repositories represent only the terminal state of an intricate intellectual process, abstracting away the intermediate planning, debugging, and iterative refinement. To bridge this gap, we propose a novel paradigm: understanding via reconstruction. We hypothesize that reverse-engineering the latent agentic trajectories -- the planning, reasoning, and debugging steps -- behind static repositories provides a far richer supervision signal than raw code alone. To operationalize this, we introduce a framework that synthesizes these trajectories using a multi-agent simulation. This process is grounded in the structural realities of the source repositories (e.g., dependency graphs and file hierarchies) to ensure fidelity. Furthermore, to guarantee the logical rigor of the synthetic data, we employ a search-based optimization technique that iteratively refines the Chain-of-Thought (CoT) reasoning to maximize the likelihood of the ground-truth code. Empirical results demonstrate that continuous pre-training on these reconstructed trajectories significantly enhances Llama-3-8B's performance across diverse benchmarks, including long-context understanding, coding proficiency, and agentic capabilities.

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

↑