BoostAPR: 実行検証と二重報酬モデルによる自動プログラム修正の強化学習 BoostAPR: Boosting Automated Program Repair via Execution-Grounded Reinforcement Learning with Dual Reward Models
- BoostAPRは大規模言語モデルによる自動プログラム修正(APR)を強化学習で改善する手法。
- 実行結果に基づく検証と、パッチの妥当性とコード品質を評価する二重報酬モデルを組み合わせ、テスト通過だけでなく意味的に正しい修正の生成を目指す。
English summary
- BoostAPR enhances LLM-based automated program repair through execution-grounded reinforcement learning combined with dual reward models that evaluate both patch correctness and code quality, aiming beyond mere test-pass plausibility.
BoostAPRは、大規模言語モデル(LLM)を用いた自動プログラム修正(Automated Program Repair: APR)の精度を、強化学習と実行検証によって底上げしようとする研究である。論文では、テストを通過するだけの「もっともらしいパッチ」を超え、意味的に正しい修正を生成することを目標に掲げている。
提案手法の核は二つある。第一に、生成されたパッチを実際にテストスイート上で実行し、その結果を学習信号として直接フィードバックする「実行に基づく(execution-grounded)」報酬設計である。これにより、表面的にコードらしいが動作しない出力を抑制する狙いがある。第二に、二つの報酬モデルを併用する点だ。片方はパッチの正当性(テスト通過や故障箇所の修正)を評価し、もう片方はコード品質(可読性、不要な変更の少なさなど)を評価することで、過剰修正やテスト過剰適合(test overfitting)を緩和すると見られる。
APRの分野では、Defects4JやQuixBugsといったベンチマークで評価される手法が長年研究されてきた。古典的にはGenProgのような遺伝的プログラミング系、近年ではCodeBERTやCodexベースの学習型APR、さらにChatRepairのようにLLMと対話的にパッチを精製するアプローチが台頭している。共通の課題として知られるのが、テストには通るが本来の意図と異なる修正(plausible but incorrect patch)問題であり、本研究の二重報酬設計はこの課題に対する応答と位置づけられる。
実行結果に基づく検証と、パッチの妥当性とコード品質を評価する二重報酬モデルを組み合わせ、テスト通過だけでなく意味的に正しい修正の生成を目指す。
強化学習をコード生成に適用する流れ自体は、RLHFやDeepSeekのGRPO、CodeRLなど既存研究と方向性を共有しており、特に実行フィードバックを報酬に組み込むアプローチは、関数合成タスクで成果を上げてきた。BoostAPRはそれをバグ修正という、より制約の強いタスクに拡張した試みと言える。
なお、本要約はarXivに掲載された論文情報に基づくものであり、具体的な性能数値や採用したベースモデル、ベンチマーク結果の詳細は原論文を参照されたい。実運用に向けては、テストスイートの質に依存する点や、報酬ハッキングのリスクといった一般的な課題が残る可能性がある。
BoostAPR is a research effort aimed at improving large language model (LLM) based Automated Program Repair (APR) by combining reinforcement learning with execution-grounded feedback. The work targets a long-standing weakness in the field: producing patches that pass tests but fail to capture the true intent of the fix.
The approach rests on two main ideas. First, instead of training purely on textual similarity to reference patches, BoostAPR executes candidate patches against the project's test suite and feeds the outcome back as a learning signal. This execution-grounded reward is designed to discourage outputs that look syntactically plausible but do not actually compile or pass tests. Second, the system employs dual reward models. One reward estimates patch correctness, presumably leveraging test outcomes and fault-localization signals, while the other evaluates code quality dimensions such as minimality of edits and readability. Combining the two is intended to mitigate test overfitting, where a model learns to game a narrow test suite at the cost of semantic correctness.
The broader APR landscape provides useful context. Classical search-based tools like GenProg pioneered automated patching through genetic programming, while neural approaches such as CoCoNuT, SequenceR, and more recent LLM-driven systems like AlphaRepair and ChatRepair have steadily raised the bar on benchmarks such as Defects4J and QuixBugs. A persistent finding across these works is the gap between plausible patches (tests pass) and correct patches (intent preserved). BoostAPR's dual-reward structure can be read as a direct response to that gap, attempting to encode quality signals that pure pass/fail rewards cannot capture.
Reinforcement learning for code is itself an active area. Methods like CodeRL and execution-based RL for program synthesis have shown that grounding rewards in runtime behavior helps models generalize beyond surface patterns. More recent training recipes, including RLHF variants and group-relative policy optimization seen in systems like DeepSeek-Coder, point to a broader trend of treating code generation as a verifiable task where ground-truth execution can replace noisy human preferences. APR is arguably an even better fit for this paradigm than open-ended code synthesis, because bug-fix tasks come with concrete oracles in the form of failing tests.
Several caveats are worth noting. The quality of execution-grounded RL is bounded by the quality of the test suite; weak tests can still let incorrect patches through, and overly strict tests may suppress valid alternative fixes. Dual reward models also introduce the classic risk of reward hacking, where the policy exploits idiosyncrasies of the quality model rather than improving real code. As with most APR research, generalization across languages, project sizes, and bug categories remains an open question, and reported gains on curated benchmarks do not always translate to industrial codebases.
Because this summary is based on the arXiv listing, specific numbers, base models, and benchmark comparisons should be confirmed against the full paper. Still, the direction is consistent with where LLM-based program repair appears to be heading: less reliance on static supervised fine-tuning, and more on closed-loop training where the compiler and test runner act as the ultimate judge.
本ページの本文・要約は AI による自動生成です。正確性は元記事 (arxiv.org) をご確認ください。