mlsanityData to 7 Oct 2026

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

arXiv 2609.04061 ↗First posted 3 Sep 2026cs.SE cs.AI cs.CLcited by 0

Not on the map. Why?

Abstract (arXiv)

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.

Key facts. No citing papers in the map yet (data through 7 Oct 2026). Builds on 22 of its 66 references that are in the map. First posted on arXiv 3 Sep 2026.

Builds on

22 of 66 references.

References · 22

  1. 2021Evaluating Large Language Models Trained on Codecited by 8,053
  2. 2023Direct Preference Optimization: Your Language Model is Secretly a Reward Modelcited by 7,916
  3. 2021Program Synthesis with Large Language Modelscited by 3,509
  4. 2023SWE-bench: Can Language Models Resolve Real-World GitHub Issues?cited by 3,193
  5. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  6. 2024LlamaFactory: Unified Efficient Fine-Tuning of 100+ Language Modelscited by 1,442
  7. 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,332
  8. 2025SFT Memorizes, RL Generalizes: A Comparative Study of Foundation Model Post-trainingcited by 655
  9. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  10. 2023TACO: Topics in Algorithmic COde generation datasetcited by 150
  11. 2024Benchmarking Complex Instruction-Following with Multiple Constraints Compositioncited by 147
  12. 2022Out of the BLEU: how should we assess quality of the Code Generation models?cited by 65
10 more
  1. 2025When Thinking Fails: The Pitfalls of Reasoning for Instruction-Following in LLMscited by 51
  2. 2023Can It Edit? Evaluating the Ability of Large Language Models to Follow Code Editing Instructionscited by 46
  3. 2025SWE-Perf: Can Language Models Optimize Code Performance on Real-World Repositories?cited by 33
  4. 2024HumanEvo: An Evolution-aware Benchmark for More Realistic Evaluation of Repository-level Code Generationcited by 26
  5. 2024CREF: An LLM-based Conversational Software Repair Framework for Programming Tutorscited by 14
  6. 2025EDIT-Bench: Evaluating LLM Abilities to Perform Real-World Instructed Code Editscited by 13
  7. 2025CoreCodeBench: Decoupling Code Intelligence via Fine-Grained Repository-Level Taskscited by 3
  8. 2026PAFT: Preservation Aware Fine-Tuning for Minimal-Edit Program Repaircited by 2
  9. 2026Edit, But Verify: An Empirical Audit of Instructed Code-Editing Benchmarkscited by 1
  10. 2026QiMeng-PRepair: Precise Code Repair via Edit-Aware Reward Optimizationcited by 1

Built on by

Not cited yet.