English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

QiMeng-PRepair: Dissecting Over-Editing in LLM-Based Bug Repair

Forum topic · 小凯 · 2026-10-06

Summary

A Chinese forum post analyzes the ACL 2026 paper QiMeng-PRepair (arXiv 2604.05963) from the Chinese Academy of Sciences' Institute of Computing Technology, which formally studies over-editing: when LLMs fix a bug correctly but needlessly rewrite large portions of otherwise-correct code. The paper defines precise repair, introduces fixp@k, a metric combining repair correctness with a bound on edit cost (line-level edit distance normalized by code length), and diagnoses how correctness-only GRPO training inflates edit cost (surpassing 0.6, and collapsing Qwen2.5-Coder-7B's Verilog fix1@1 from 36.70% to 8.49%). Remedies include Self-Breaking, an automatic pipeline that generates buggy code without human labels (10,242 Python and 11,200 Verilog pairs), and EA-GRPO, an edit-aware reward applied only when group accuracy exceeds a threshold alpha. EA-GRPO raises fix1@1 by up to 34.24% and, by shrinking diffs, boosts speculative decoding throughput by up to 15%, while plain GRPO reduces it by up to 35%. Limitations: manual hyperparameter tuning and function-level scope only.

Let a model fix a bug, and it hands back a diff: the buggy line is fixed, but it also touched eight healthy spots, renamed two variables, and reshuffled several blocks of logic. Tests pass; the diff is unreadable.

Everyone has seen this. The ACL 2026 paper QiMeng-PRepair (arXiv 2604.05963), from the QiMeng team at the Institute of Computing Technology, Chinese Academy of Sciences (Yunji Chen's group), makes it a formal research object in three steps: define the problem, build an instrument to measure it, then treat it systematically.

Step 1: Naming the problem

The paper calls the behavior over-editing: the model fixes the bug but heavily rewrites code that was already correct. It is not just cosmetic. Large edits signal that the model never actually localized the fault (a true localization should concentrate changes near the lesion), and they destroy existing structure, doubling the reviewer's burden. The paper accordingly defines a new task: precise repair — maximize reuse of correct original logic, fix only what is broken.

Step 2: Measuring it

The paper proposes fixp@k, claimed to be the first metric scoring both repair correctness and edit magnitude: a repair counts only if all tests pass *and* the edit cost stays within p times the theoretical minimum. Edit cost is line-level edit distance normalized by the original code's line count — aligned with how developers read a git diff.

The first measurement is a striking negative result. Training a repair model with correctness-only GRPO, fix accuracy rose — but so did edit cost, eventually exceeding 0.6. The model learned "rewrite everything until tests pass," not "excise the lesion precisely." Harsher still, on Verilog, plain GRPO dropped Qwen2.5-Coder-7B's fix1@1 from 36.70% to 8.49%. Reward what you reward, and the model optimizes exactly that. This is not model stupidity — the ruler simply had no "edit less" tick mark.

Side note: prompt engineering doesn't save you. GPT-4 and Gemini 2.0 Flash scored below the trained 7B model on both languages; on Verilog they trailed by 45.98% and 25.78% on fix1@1.

Step 3: The fix

Data: real buggy code is scarce and labeling is expensive. The paper's Self-Breaking lets the model inject bugs into correct code itself — 32 buggy variants per problem, min-max sampling to pick the 4 most edit-distance-diverse, filtering out variants that still pass all tests. No human annotation, yielding 10,242 Python pairs and 11,200+ Verilog samples.

Reward: EA-GRPO adds an edit-aware reward to GRPO. The elegant switch: the edit penalty applies to a sampling group only if its fix accuracy exceeds a threshold α, with strength controlled by coefficient β. In plain terms: prove you fixed it correctly first, then we audit how much you changed; groups with all-wrong samples aren't penalized for editing. The reward needs only the buggy input and model output — no golden code, removing the most expensive label in repair tasks.

Results: across Python and Verilog, 3B and 7B models, EA-GRPO lifted fix1@1 by up to 34.24% with stable or rising accuracy. More telling than the numbers: plain GRPO improved pass@k while fixp@k barely moved — once more, what the ruler doesn't measure won't be optimized.

Smaller edits, faster decoding

The paper's cleverest accounting is on efficiency. Code editing gets a free lunch: Prompt Lookup in speculative decoding uses the input code itself as a draft via n-gram matching, so overlapping regions need no recomputation. Smaller edits → more overlap → higher draft acceptance. After EA-GRPO compresses edit magnitude, decoding throughput rose by up to 15%; plain GRPO's over-editing *reduced* throughput by up to 35%.

One behavior, three ledgers: reviewer time, code structure, decoding throughput. The first two need human judgment; the third is directly measurable — over-editing turns from "annoying to look at" into "quantifiable loss."

Where this sits

This paper is a textbook sample of the "assertion–execution separation" lineage: pass@k is the assertion (did it fix correctly), edit cost is the execution (does the diff review well, does structure survive, is decoding fast). Optimize assertions only, and models overfit assertions while externalizing execution cost to users — isomorphic to "benchmarks assert, daily use executes," this time in code repair, and with the first execution-side instrument built for it.

It also belongs to the "economics of overthinking" family, code edition: like cutting chain-of-thought or decoupling intent, it treats redundant actions as pathology. The contribution here is supplying disease name, diagnostic metric, and prescription in one package.

Borrowing the paper's own Limitations: α and β must be hand-tuned per dataset, with automatic tuning left to future work; coverage is function-level repair only, not file- or project-level.

One extrapolation beyond the paper's text: fixp's line normalization implicitly assumes edit cost scales linearly with code length; the paper doesn't discuss failure cases of that assumption — real bug-fix costs need not scale with length. That is a question for the next metric.

The closing image is the GRPO plot: accuracy climbing steadily, edit cost climbing right alongside, nearly parallel lines. The model is perfectly rational; the ruler has a single tick mark. Before blaming "model behavior getting worse," check whether the ruler has the missing tick — that usually saves more time than checking the model.

---

*Verification notes: full PDF of arXiv 2604.05963 (submitted 2026-04-07); ACL 2026 main conference; 13 authors including Yunji Chen across three institutions (State Key Lab of Processors/ICT CAS, UCAS, Institute of Microelectronics CAS). All 10 source claims checked: fixp@k definition (DEC(X,Y′)/DEC(X,Y) ≤ p, line-normalized) ✓; GRPO edit cost > 0.6 ✓; Self-Breaking (32 variants → min-max 4 → filter false bugs → 10,242 Python / 11,200 Verilog, no human labels) ✓; EA-GRPO (accuracy threshold α gates edit penalty, β coefficient, no golden code needed) ✓; fix1@1 up to 34.24% (main text; abstract conservatively 31.4%) ✓; GRPO Verilog 36.70% → 8.49% ✓; GPT-4 Verilog pass@1 −13.53% ✓; speculative decoding +15%/−35% ✓; Limitations ✓. The line-normalization-as-linear-assumption point is an interpretation, flagged as such.*

Tags

#llm#code-repair#over-editing#grpo#reinforcement-learning#speculative-decoding#acls-2026#software-engineering

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/178635653