← Latest papers
🤖 AI

BoostAPR: Boosting Automated Program Repair via Execution-Grounded Reinforcement Learning with Dual Reward Models

BoostAPR is a three-stage framework that enhances automated program repair by combining supervised fine-tuning with execution-verified reasoning and dual reward models to enable fine-grained, line-level credit assignment during reinforcement learning, achieving state-of-the-art performance and strong cross-language generalization across multiple benchmarks.

Original authors: Yuanhao Li, Hongbo Wang, Xiaotang Shang, Xunzhu Tang, Yiming Cao, Xuhong Chen

Published 2026-05-12
📖 5 min read🧠 Deep dive

Original authors: Yuanhao Li, Hongbo Wang, Xiaotang Shang, Xunzhu Tang, Yiming Cao, Xuhong Chen

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you are trying to teach a very smart, but slightly clumsy, apprentice how to fix a broken machine. The machine is a piece of computer code, and the "break" is a bug that causes it to fail a test.

For a long time, we've tried to teach these apprentices (AI models) by showing them examples of broken machines and their fixes. But there's a problem: when the apprentice tries a fix, the machine either works perfectly or it explodes. It doesn't tell the apprentice which specific screw they tightened or which wire they cut that made the difference. They just get a binary "Good job" or "Bad job." This makes learning slow and frustrating.

The paper introduces a new system called BOOSTAPR to solve this. Think of it as a three-step training camp designed to turn that clumsy apprentice into a master mechanic.

Step 1: The "Think-Then-Act" Homework (Supervised Fine-Tuning)

First, the system doesn't just show the apprentice the final fix. It shows them a master mechanic's notebook.

  • The Analogy: Imagine a master mechanic doesn't just hand you the fixed engine; they write down their thought process first: "I noticed the noise came from the left, so I checked the belt, found it was loose, and tightened it."
  • The Paper's Claim: The AI is trained on "execution-verified demonstrations." This means it only learns from examples where the master mechanic actually fixed the problem and wrote down their reasoning. The AI learns not just what to change, but how to think about the problem.

Step 2: Hiring Two Different Coaches (Dual Reward Models)

Once the apprentice starts practicing, they need feedback. In the old days, the coach would just say, "That patch worked!" or "That patch failed!" The paper says this is too vague. So, they hire two specialized coaches:

  1. The "Big Picture" Coach (RseqR_{seq}): This coach looks at the whole repair job. Did the machine run? Yes or No? They give a score for the entire patch.
  2. The "Microscope" Coach (RlineR_{line}): This is the new, secret sauce. This coach looks at the repair line-by-line.
    • The Analogy: Imagine the apprentice fixed the engine but also painted the car a weird color and changed the radio station. The "Big Picture" coach says, "It runs, so it's a good job." But the "Microscope" coach says, "Wait, the painting and radio didn't help fix the engine. Only the belt tightening did. Let's give the credit for the success to the belt, not the paint."
    • The Paper's Claim: This coach learns to identify exactly which lines of code (the "edit spans") actually fixed the bug and which ones were just noise. It takes the "Big Picture" score and redistributes the credit to the specific lines that mattered.

Step 3: The Practice Run with Smart Feedback (PPO Optimization)

Finally, the apprentice goes into a simulation to practice fixing bugs in real-time.

  • The Analogy: Every time the apprentice makes a move, the two coaches talk to each other. The "Microscope" coach tells the "Big Picture" coach, "Don't just give points for the whole job; give extra points to the apprentice for tightening that specific bolt, and zero points for the random typing they did in between."
  • The Paper's Claim: The AI uses a method called PPO (a type of reinforcement learning) to update its brain. Because the "Microscope" coach is giving such detailed feedback, the AI learns much faster and more accurately than if it only got a generic "Good/Bad" signal.

The Results: How Well Did It Work?

The authors tested this new training camp on four different "garages" (benchmarks) containing thousands of broken code examples:

  • SWE-bench (Real-world GitHub bugs): The AI fixed 40.7% of the bugs. This is a huge jump of 22.9% over the same AI model without this special training.
  • Defects4J (Java bugs): Even though the AI was trained mostly on Python, it successfully fixed 24.8% of Java bugs. This shows the "Microscope" coach helped the apprentice learn general repair skills, not just Python-specific tricks.
  • HumanEval-Java & QuixBugs: It achieved very high scores (84.5% and 95.0%) on these specific coding challenges.

Why This Matters (According to the Paper)

The paper argues that the biggest breakthrough isn't just that the AI got smarter, but how it got smarter. By moving away from "Did it work?" (Sequence-level) to "Which specific lines made it work?" (Line-level), they solved a major learning bottleneck.

The "Microscope" coach (RlineR_{line}) didn't do all the heavy lifting alone; the "Big Picture" coach (RseqR_{seq}) did most of the work. However, the Microscope coach provided the extra boost needed to generalize to new, difficult problems and made the training process more stable and efficient.

In short: BOOSTAPR teaches AI to fix code by showing it expert thought processes, hiring a coach to grade the whole job, and hiring a second coach to grade every single screw turned, ensuring the AI learns exactly what to do next time.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →