Hugging Face Daily Papers · · 3 min read

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

Mirrored from Hugging Face Daily Papers for archival readability. Support the source by reading on the original site.

Code: <a href=\"https://github.com/nreHieW/over-editing\" rel=\"nofollow\">https://github.com/nreHieW/over-editing</a></p>\n","updatedAt":"2026-09-07T02:09:35.611Z","author":{"_id":"647db42711084fb58318b053","avatarUrl":"/avatars/901a4db8e99f6e0c7e7e596c251b315c.svg","fullname":"Tongyao","name":"tyzhu","type":"user","isPro":true,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":1,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.7536159157752991},"editors":["tyzhu"],"editorAvatarUrls":["/avatars/901a4db8e99f6e0c7e7e596c251b315c.svg"],"reactions":[],"isReport":false}}],"primaryEmailConfirmed":false,"paper":{"id":"2609.04061","authors":[{"_id":"6a9a685d8f7c3b75572396aa","name":"Tongyao Zhu","hidden":false},{"_id":"6a9a685d8f7c3b75572396ab","name":"Wei Hern Lim","hidden":false},{"_id":"6a9a685d8f7c3b75572396ac","name":"Min-Yen Kan","hidden":false}],"publishedAt":"2026-09-03T00:00:00.000Z","submittedOnDailyAt":"2026-09-07T00:00:00.000Z","title":"When Models Edit Too Much: On the Fidelity of Minimal Code Edits","submittedOnDailyBy":{"_id":"647db42711084fb58318b053","avatarUrl":"/avatars/901a4db8e99f6e0c7e7e596c251b315c.svg","isPro":true,"fullname":"Tongyao","user":"tyzhu","type":"user","name":"tyzhu"},"summary":"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.","upvotes":2,"discussionId":"6a9a685e8f7c3b75572396ad","githubRepo":"https://github.com/nreHieW/over-editing","githubRepoAddedBy":"user","ai_summary":"Large language models frequently over-edit code during repair, but preservation instructions and reinforcement learning can improve edit fidelity without sacrificing correctness.","ai_keywords":["AST-level corruptions","over-editing","Levenshtein distance","cognitive complexity","preservation instruction","supervised fine-tuning","reinforcement learning","edit fidelity"],"ai_summary_model":"thinkingmachines/Inkling-Small","githubStars":19,"organization":{"_id":"6508ab2b349930913196378b","name":"NationalUniversityofSingapore","fullname":"National University of Singapore","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/630ca0817dacb93b33506ce7/ZYUmpSMsa5Whihw3me2Bw.png"}},"canReadDatabase":false,"canManagePapers":false,"canSubmit":false,"hasHfLevelAccess":false,"upvoted":false,"upvoters":[{"_id":"647db42711084fb58318b053","avatarUrl":"/avatars/901a4db8e99f6e0c7e7e596c251b315c.svg","isPro":true,"fullname":"Tongyao","user":"tyzhu","type":"user"},{"_id":"63ac5701c21e60a3e9b58aa7","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/63ac5701c21e60a3e9b58aa7/g6EX7diOpuA94R2ab-rZC.png","isPro":true,"fullname":"Dipankar Sarkar","user":"dipankarsarkar","type":"user"}],"acceptLanguages":["en"],"dailyPaperRank":0,"organization":{"_id":"6508ab2b349930913196378b","name":"NationalUniversityofSingapore","fullname":"National University of Singapore","avatar":"https://cdn-avatars.huggingface.co/v1/production/uploads/630ca0817dacb93b33506ce7/ZYUmpSMsa5Whihw3me2Bw.png"},"markdownContentUrl":"https://huggingface.co/buckets/huggingchat/papers-content/resolve/2609/2609.04061.md","query":{}}">
Papers
arxiv:2609.04061

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

Published on Sep 3
· Submitted by
Tongyao
on Sep 7
Authors:
,

Abstract

Large language models frequently over-edit code during repair, but preservation instructions and reinforcement learning can improve edit fidelity without sacrificing correctness.

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.

Community

Upload images, audio, and videos by dragging in the text input, pasting, or clicking here.
Tap or paste here to upload images

· Sign up or log in to comment

Get this paper in your agent:

hf papers read 2609.04061
Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash

Models citing this paper

No model linking this paper

Cite arxiv.org/abs/2609.04061 in a model README.md to link it from this page.

Datasets citing this paper

No dataset linking this paper

Cite arxiv.org/abs/2609.04061 in a dataset README.md to link it from this page.

Spaces citing this paper

No Space linking this paper

Cite arxiv.org/abs/2609.04061 in a Space README.md to link it from this page.

Collections including this paper

No Collection including this paper

Add this paper to a collection to link it from this page.

Discussion (0)

Sign in to join the discussion. Free account, 30 seconds — email code or GitHub.

Sign in →

No comments yet. Sign in and be the first to say something.