Developer Tools

PatchFusion fuses AI repair candidates to fix 426/500 bugs deterministically

Researchers propose a deterministic fusion method to close the pass@k-to-pass@1 gap in LLM bug fixing.

Deep Dive

Modern LLM coding agents often use pass@k evaluation, but developers apply only one final patch in practice—creating a post-generation selection problem. Existing approaches rank candidates, filter by tests, or query an LLM, but none deterministically reuse shared edit evidence. Researchers propose PatchFusion, a deterministic fusion method that first aligns whole-diff agreement into a repair neighborhood, selects an auditable representative, then applies evidence-constrained fusion (ECF) to retain repeated edit atoms and prune unsupported parts. Evaluated on PatchFuseBench (covering SWE-bench Verified, SWE-bench Multilingual, and Defects4J), PatchFusion solves 426/500, 236/300, and 87/371 bugs respectively, beating every matched selector.

Ablation studies show ECF adds +5/+6/+9 solved bugs without regression, and gains persist under resampling. Cross-candidate evidence recovers 41 bugs that no single source fixes—30 more than the best single source. PatchFusion reaches within 96.2% and 89.7% of the candidate-reachable ceiling on the two SWE-bench benchmarks, while costing orders of magnitude less than test- or LLM-based selectors. This work provides a practical, auditable path to deploy LLM-generated patches in real-world software engineering workflows.

Key Points
  • PatchFusion solves 426/500 bugs on SWE-bench Verified and 236/300 on SWE-bench Multilingual, outperforming all tested selectors.
  • Evidence-constrained fusion (ECF) recovers 41 bugs that no single source patch fixes, with zero regression in ablation tests.
  • The method operates at orders-of-magnitude lower cost than test-based or LLM-based selectors, reaching 96.2% of the candidate ceiling.

Why It Matters

Brings LLM code repair from research to production by eliminating the guesswork in selecting the right patch.

📬 Get the top 10 AI stories daily