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

AI-generated keywords: Code Editing Functional Success Metrics Edit Fidelity Over-editing Code-repair Quality

AI-generated Key Points

  • Correctness alone is not sufficient in code editing
  • Focus traditionally on functional success metrics like Pass@1 or Pass@k
  • Repairs should be minimal, reviewable, and faithful to original implementation (edit fidelity)
  • Over-editing phenomenon identified in large language models (LLMs) like GPT-5.5
  • Preservation instruction introduced to mitigate over-editing behavior
  • Importance of edit fidelity as a distinct dimension of code-repair quality emphasized
  • Shift towards encompassing edit fidelity for evaluating code repairs opens new avenues for enhancing software systems
Also access our AI generated: Comprehensive summary, Lay summary, Blog-like article; or ask questions about this paper to our AI assistant.

Authors: Tongyao Zhu, Wei Hern Lim, Min-Yen Kan

EMNLP 2026 (Main)
License: CC BY 4.0

Abstract: 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.

Submitted to arXiv on 03 Sep. 2026

Ask questions about this paper to our AI assistant

You can also chat with multiple papers at once here.

AI assistant instructions?

Results of the summarizing process for the arXiv paper: 2609.04061v1

In the realm of code editing, there is a growing recognition that correctness alone is not sufficient. The focus has traditionally been on functional success metrics such as Pass@1 or Pass@k, which assess whether a model can successfully fix bugs in code. However, repairs should also be minimal, reviewable, and faithful to the original implementation. This concept of edit fidelity is crucial in ensuring that code edits are not only correct but also maintain the integrity and coherence of the existing codebase. A recent study delves into the phenomenon of over-editing where models tend to make unnecessary changes to code beyond what is required to address a bug. By analyzing over 400 BigCodeBench problems and injecting controlled AST-level corruptions into reference solutions, researchers were able to quantify the extent of over-editing in large language models (LLMs), even among advanced models like GPT-5.5. Despite achieving high Pass@1 scores, these models exhibited a tendency towards unnecessarily large edits and increased cognitive complexity. To mitigate over-editing behavior, a preservation instruction was introduced resulting in significant reduction in excess Levenshtein distance and added cognitive complexity while improving Pass@1 performance. Interestingly, these improvements were not solely attributed to larger reasoning budgets or model sizes but rather stemmed from deliberate focus on edit fidelity during post-training. Further exploration into learning minimal editing directly post-training revealed that supervised fine-tuning tended to overfit to known corruption patterns. In contrast,reinforcement learning offered a more balanced trade-off between out-of-domain edit fidelity and performance retention. These findings underscore the importance of edit fidelity as a distinct dimension of code-repair quality that can be both measured and learned systematically.By shifting the emphasis from mere functional success to encompassing edit fidelity as an essential criterion for evaluating code repairs,this research opens up new avenues for enhancing the overall quality and maintainability of software systems through more precise and faithful editing practices.
Created on 08 Sep. 2026

Assess the quality of the AI-generated content by voting

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Similar papers summarized with our AI tools

Navigate through even more similar papers through a

tree representation

Look for similar papers (in beta version)

By clicking on the button above, our algorithm will scan all papers in our database to find the closest based on the contents of the full papers and not just on metadata. Please note that it only works for papers that we have generated summaries for and you can rerun it from time to time to get a more accurate result while our database grows.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.