aifollow.news
返回 Rohan Paul
Rohan Paul· @rohanpaul_ai · X· · 原发布时间 AI 评分54

研究追踪编程智能体的多余修改:额外改动多数是测试

AI 导读

研究回放了来自18个模型的7,660次 GitHub Copilot CLI 运行,逐块删除补丁内容并重新测试,以判断修改是否必要。在 SWE-bench Verified 上,智能体比开发者多出的修改中有61%是测试;其代码块平均有88.7%被判定为必要,开发者补丁为86.4%。

原帖引用 · AI 翻译

@rohanpaul_ai
译文 · 以原文为准

– https://arxiv.org/abs/2611.34875

标题:“编程智能体过度编辑了多少,为什么?一项关于仓库级智能体补丁中非必要编辑的实证研究”

回复Rohan Paul@rohanpaul_ai
译文
微软的一篇新论文发现,AI 编程工具编写的漏洞修复补丁比人类程序员的更大(是人类开发者的 2.33 倍),主要因为它们添加了测试和文档,而其实际代码与人类编写的代码在必要性上大致相当。 智能体补丁修改的代码行数是开发者修复补丁的 2.33 倍,这被广泛解读为过度编辑。但仅凭大小无法判断额外的编辑是否必要、具体是什么,或从何而来。 研究人员重放了来自 18 个模型的 7,660 次 GitHub Copilot CLI 运行,并将每个补丁代码块追溯到编写它的步骤。随后,他们逐一移除各代码块,重新运行测试,并以同样方式评估开发者补丁。 在 SWE-bench Verified 上,额外编辑中有 61% 是测试;智能体补丁中必要代码块的平均占比为 88.7%,开发者补丁则为 86.4%。非必要代码产生于编写修复代码的过程,并非调试后遗留的内容;3 个 Gemini Flash 模型留下的非必要代码比开发者更多。 比较编程智能体时,应在问题解决率旁同时报告必要代码占比,并通过训练和运行后修剪减少过度编辑。
原文

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.

在 X 查看这条帖子 ↗

来源:Rohan Paul · x.com

论文
发现内容有误?提交纠错