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

**Authors:** Tongyao Zhu, Wei Hern Lim, Min-Yen Kan  
**arXiv:** [2609.04061](https://arxiv.org/abs/2609.04061)  
**Date:** 2026-09-03  
**Summary page:** https://www.summarizepaper.com/en/arxiv-id/2609.04061v1/

## 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

## Summary

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.
