ZeroHour
Hugging Face daily paperspublished ()ingested Tongyao Zhu, Wei Hern Lim, Min-Yen Kan1

When Models Edit Too Much: On the Fidelity of Minimal Code Edits

infoAI researchimportance 30
AI summary · glm-5.3-flash

A 400-task BigCodeBench evaluation shows frontier LLMs widely over-edit code; a preservation instruction cuts excess edits and raises Pass@1 by 2.3 points.

Researchers built an evaluation framework from 400 BigCodeBench problems with injected AST-level corruptions, each with a known minimal patch, to measure over-editing in LLM code repair. Even strong models like GPT-5.5 produce unnecessarily large edits despite high Pass@1. Adding a preservation instruction reduced average excess Levenshtein distance from 0.195 to 0.131, cut added cognitive complexity by 26.6%, and raised Pass@1 by 2.3 points. Reinforcement learning post-training gave the best out-of-domain edit-fidelity trade-off, while supervised fine-tuning overfit to seen corruption patterns.

  • Evaluation injects AST corruptions into 400 BigCodeBench tasks with known minimal patches
  • Over-editing is widespread even in frontier models like GPT-5.5
  • Preservation instruction cuts excess edit distance from 0.195 to 0.131 and raises Pass@1 2.3 points
  • RL beats supervised fine-tuning for out-of-domain edit fidelity; SFT overfits seen corruptions
ProductsBigCodeBench
AI modelsGPT-5.5
Full article195 words · extracted from huggingface.co · click to collapse

Large language models (LLMs) are increasingly used to edit existing code, but correctness alone is not enough: useful repairs should also be minimal, reviewable, and faithful to the original implementation. We study over-editing, the tendency of a model to rewrite code beyond what is required to fix a bug. We construct an evaluation framework from 400 BigCodeBench problems by injecting controlled AST-level corruptions into reference solutions, giving each repair task a known minimal patch. Across frontier LLMs, over-editing is widespread even among strong models like GPT-5.5: high Pass@1 can coexist with unnecessarily large edits and added cognitive complexity. A preservation instruction substantially reduces this behavior, lowering average excess Levenshtein distance from 0.195 to 0.131, reducing added cognitive complexity by 26.6%, and increasing Pass@1 by 2.3 points. However, these gains do not simply follow from a larger reasoning budget or larger models. We next ask whether minimal editing can be learned directly during post-training. We observe that supervised fine-tuning overfits to seen corruption patterns, whereas reinforcement learning gives the best out-of-domain edit-fidelity and performance-retention trade-off. These results position edit fidelity as a distinct axis of code-repair quality and show that it can be measured and learned.

Text extracted automatically; images, tables and formatting may be missing. Original: https://huggingface.co/papers/2609.04061