论文71°

Microsoft 论文:AI 编程修复的改动量是人类程序员的 2.33 倍

精选理由

程序员都吐槽 AI 编程工具爱乱改一通,Microsoft 这篇论文把 7,660 次运行逐块拆开验证:多出来的编辑大半是测试和文档,代码本身甚至比人写得还精准。做编程智能体评测的话,这篇的指标方法直接能拿来用。

Microsoft 新论文分析 AI 编程工具与人类开发者修复 bug 的差异,发现智能体补丁改动行数是人类开发者的 2.33 倍。团队回放了 7,660 次 GitHub Copilot CLI 运行,覆盖 18 个模型,并将每个补丁块追溯到生成它的步骤。通过逐块删除再重跑测试,论文量化了哪些改动是必需的。

正文

结果显示,在 SWE-bench Verified 上 61% 的额外编辑是测试代码,智能体补丁的必需代码块占比达 88.7%,略高于人类的 86.4%。也就是说,AI 的“多编辑”并非过度修改代码本身,而是主要来自补充测试和文档。多余代码产生于修复编写环节,而非调试残留;3 个 Gemini Flash 模型的多余代码比例高于人类。

论文建议在对比编程智能体时,除了 resolve rate,还应报告必需代码占比这一指标,并通过训练和运行后剪枝来减少冗余编辑。

原文 · rohanpaul_ai

New Microsoft paper finds that AI coding tools write bigger bug fixes than human programmers (2.33X bigger than human developers) mainly because they add tests and documentation, while their actual code is about as necessary as a human's.

Agent patches change 2.33 times as many lines as developer fixes, which is widely read as over-editing. Size alone cannot say whether the extra edits are needed, what they are, or where they come from.

They replayed 7,660 GitHub Copilot CLI runs from 18 models and traced each patch block to the step that wrote it. They then removed each block, reran the tests, and graded developer patches the same way.

On SWE-bench Verified, 61% of the extra edits were tests, and agent patches averaged 88.7% needed code blocks versus 86.4% for developers. The unneeded code came from writing the fix, not debug leftovers, and 3 Gemini Flash models left more than developers.

Report needed-code share next to resolve rate when comparing coding agents, and cut over-editing through training and post-run pruning.

产业坐标与信源核验

本条情报归属 AITOP「论文」核心栏目,重点聚焦北美前沿实验室与硅谷科技巨头。在跨区域产业观察坐标中,该动态直接关联「AI 开发者工具链、Coding Agent 与工程化实践」研究主线,反映出当前技术演进与商业落地的最新风向。涉及核心实体与技术议题包括:GitHub Copilot、SWE-bench、编程助手、Gemini Flash,读者可通过下方标签进入对应专题页查阅历史脉络与关联对比。

信源核验说明:本文原始线索采编自「rohanpaul_ai」(@rohanpaul_ai),经 AITOP 多维评分管线结构化提炼。