跳到正文
DAIR.AI· @dair_ai · X·· 5 天前AI 评分59
AI 导读

Microsoft 研究 7660 条来自 18 个前沿模型的 GitHub Copilot CLI 轨迹,提出 Delta Residue Attribution 方法逐块回退补丁并重跑测试来判断代码是否必要。

正文

Great paper from Microsoft on how much coding agents over-edit.

It is widely assumed that coding agents over-edit, because their patches are larger than developer patches.

This study tested that claim on 7,660 resolved GitHub Copilot CLI trajectories from 18 frontier models. Their method, Delta Residue Attribution, reverts each block of the final patch, reruns the task tests, and records whether the block was needed.

On SWE-bench Verified, most of the extra lines are tests (61%) and documentation (13%). Agent code was on average at least as necessary as developer code (0.887 vs 0.864), and 11 of 18 models left less unneeded code than developers.

About 11% of an agent's code units were still unneeded, and 89% of those changed behavior. Code necessity had no relation to resolve rate on SWE-bench Verified and a negative one on DeepSWE (Spearman -0.59).

Pruning with only the tests the agent can see removed most of the unneeded code, and 89% of pruned patches still resolved the task.

https://arxiv.org/abs/2611.34875

Chat with Paper: https://academy.dair.ai/papers/how-much-do-coding-agents-over-edit-and-why-an-empirical-study-of-unneeded-edits-2611.34875

来源:DAIR.AI · x.com