ChatPaper.aiChatPaper

MindForge:透過無源碼程式合成,教導小型語言模型全生命週期軟體工程

MindForge: Teaching Small Language Models Whole-Life-Cycle Software Engineering via Source-Free Program Synthesis

July 29, 2026
作者: Yihao Chen, Shi Chang, Khaled Chawa, Feng Lin, Boyuan Chen, Shaowei Wang, Ahmed E. Hassan
cs.AI

摘要

编程代理在修改现有代码库的软件工程任务上取得了显著进展,包括修复错误和实现功能。然而,从零开始构建完整程序仍是一项重大挑战:即便是在ProgramBench上评估的前沿模型,也仅有不到1%的任务能完全解决。其中一个障碍是缺乏适用于这种从零开始场景的可扩展训练环境,这类环境需覆盖整个软件工程生命周期,而现有的环境构建框架仅聚焦于软件开发中的单一阶段。为解决这一缺口,我们提出了MindForge,一个自动化流程,可将开源命令行程序转换为无源码的环境,仅暴露编译后的参考可执行文件及其文档。利用MindForge,我们从与ProgramBench不相关的代码仓库中构建训练环境,并使用GLM-5.2作为教师代理,精心设计了一套由程序合成轨迹组成的高质量数据配方。在Qwen3.6-27B上对这些轨迹进行微调,使其在ProgramBench上的平均测试通过率从37.98%提升至49.51%,性能与规模大得多的前沿模型相当。此外,微调后的模型在所有七个未见过的软件工程基准测试上持续优于基础模型,涵盖长期仓库生成与翻译、错误修复、功能实现以及跨语言问题解决,具体绝对提升为:RepoZero-C2Rust上31.00分,DeepSWE上14.16分,NL2Repo-Bench(含/不含测试)上10.70/4.56分,SWE-bench Verified上5.04分,SWE-bench Pro上5.93分,SWE-bench Multilingual上5.22分,以及FeatBench上4.94分。
English
Coding agents have made substantial progress on software engineering tasks that modify existing codebases, including bug fixing and feature implementation. However, constructing a complete program from scratch remains a major challenge: even the frontier models evaluated on ProgramBench fully resolve fewer than 1% of tasks. One obstacle is the lack of scalable training environments for this from-scratch setting, spanning the whole software engineering life cycle, as existing environment-construction frameworks focus only on a single phase in software development. To address this gap, we introduce MindForge, an automated pipeline that converts open-source command-line programs into source-free environments that expose only a compiled reference executable and its documentation. Using MindForge, we construct training environments from repositories disjoint from those in ProgramBench, and curate a high-quality data recipe consisting of program synthesis trajectories using GLM-5.2 as the teacher agent. Fine-tuning Qwen3.6-27B on these trajectories increases its ProgramBench average test pass rate from 37.98% to 49.51%, achieving performance comparable to substantially larger frontier models. Moreover, the fine-tuned model consistently improves over the base model across all seven unseen software engineering benchmarks, spanning long-horizon repository generation and translation, bug fixing, feature implementation, and cross-language issue resolution, with absolute gains of 31.00 points on RepoZero-C2Rust, 14.16 on DeepSWE, 10.70/4.56 on NL2Repo-Bench (with/without tests), 5.04 on SWE-bench Verified, 5.93 on SWE-bench Pro, 5.22 on SWE-bench Multilingual, and 4.94 on FeatBench.