Afterburner: 強化学習による自己改善型コード効率最適化の実現
Afterburner: Reinforcement Learning Facilitates Self-Improving Code Efficiency Optimization
May 29, 2025
著者: Mingzhe Du, Luu Tuan Tuan, Yue Liu, Yuhao Qing, Dong Huang, Xinyi He, Qian Liu, Zejun Ma, See-kiong Ng
cs.AI
要旨
大規模言語モデル(LLM)は機能的に正しいソリューションを生成しますが、コード効率性においてしばしば不足が見られ、実世界での展開における重要なボトルネックとなっています。本論文では、この問題に対処するために、実行サンドボックスからの実績フィードバックに基づいてLLMがコードを反復的に改良する閉ループシステムを採用した、新しいテスト時反復最適化フレームワークを提案します。我々は、教師ありファインチューニング(SFT)、直接選好最適化(DPO)、およびグループ相対ポリシー最適化(GRPO)という3つの学習戦略を検討します。VenusデータセットとAPPSベンチマークでの実験により、SFTとDPOは効率性の向上において急速に飽和することが示されました。一方で、実行フィードバックを用いた強化学習(RL)を採用するGRPOは、コード性能を継続的に最適化し、pass@1(47%から62%へ)および効率性において人間の提出物を上回る確率(31%から45%へ)を大幅に向上させました。本研究は、テスト時のコード効率性改善の有効性を示すとともに、LLMが真に自己改善してコード効率性を高めるためのRLの力を明らかにしました。
English
Large Language Models (LLMs) generate functionally correct solutions but
often fall short in code efficiency, a critical bottleneck for real-world
deployment. In this paper, we introduce a novel test-time iterative
optimization framework to address this, employing a closed-loop system where
LLMs iteratively refine code based on empirical performance feedback from an
execution sandbox. We explore three training strategies: Supervised Fine-Tuning
(SFT), Direct Preference Optimization (DPO), and Group Relative Policy
Optimization~(GRPO). Experiments on our Venus dataset and the APPS benchmark
show that SFT and DPO rapidly saturate in efficiency gains. In contrast, GRPO,
using reinforcement learning (RL) with execution feedback, continuously
optimizes code performance, significantly boosting both pass@1 (from 47% to
62%) and the likelihood of outperforming human submissions in efficiency (from
31% to 45%). Our work demonstrates effective test-time code efficiency
improvement and critically reveals the power of RL in teaching LLMs to truly
self-improve code efficiency.Summary
AI-Generated Summary