SWE-at-Scale:从历史缺陷修复中可扩展地合成问题

·

研究论文 · 2026/10/16

随着编码智能体能力增强,稳健评估需要更广泛多样的可验证软件工程任务。但真实任务受限于问题报告频率和人工整理成本,现有合成方法依赖大模型预训练知识和启发式提示,难以捕捉真实软件故障机制。为此,我们提出 SWE-at-Scale,通过逆向工程真实修复自动合成逼真问题。核心洞察是历史修复蕴含缺陷形成的深层机制知识:反转修复将修复监督转化为基于实际开发场景的缺陷诱导监督。SWE-at-Scale 将这些缺陷模式迁移到新代码上下文,反复采样多样缺陷类型构建可执行 SWE 任务。实验表明,其生成的 SWE 任务比现有基线更多样、更真实,对先进编码智能体挑战更大。值得注意的是,它可从单一代码上下文生成不同缺陷类型,且缺陷多样性在每文件多达 200 次生成时仍稳健扩展。总体而言,SWE-at-Scale 将有限真实修复转化为可复用监督,实现可扩展、逼真、多样且具挑战性的 SWE 任务合成。

该工作提出了一种可扩展合成逼真软件工程任务的新范式,能有效缓解评估数据稀缺问题,并为编码智能体提供更具挑战性的测试基准,对推动软件工程自动化评估具有重要意义。

As coding agents become increasingly capable, robust evaluation requires a broader and more diverse supply of verifiable software engineering (SWE) tasks. However, real-world tasks are constrained by the natural frequency of issue reporting and the substantial cost of manual curation. Furthermore, existing synthetic approaches rely primarily on the pretrained knowledge of large models coupled with heuristic prompting, often failing to capture the authentic, complex mechanics of software failures. To exponentially scale SWE task production, we introduce SWE-at-Scale, a framework that automatically synthesizes realistic issues by reverse-engineering real-world software fixes. Our key insight is that historical fixes encapsulate deep mechanistic knowledge of bug formation: inverting a fix transforms repair supervision into bug-induction supervision grounded in actual development scenarios. SWE-at-Scale transfers these learned bug patterns to novel code contexts, repeatedly sampling diverse bug typologies to construct executable SWE tasks. Extensive experiments show that SWE-at-Scale generates more diverse and realistic SWE tasks than current synthesis baselines while posing greater challenges to state-of-the-art coding agents. Notably, SWE-at-Scale can generate distinct bug types from a single code context, with bug diversity scaling robustly even up to 200 generations per file. Overall, SWE-at-Scale turns finite real-world fixes into reusable supervision for scalable synthesis of realistic, diverse, and challenging SWE tasks.

阅读原文

参与讨论