ACECODER: 自動テストケース合成によるコーダーRLの成功
ACECODER: Acing Coder RL via Automated Test-Case Synthesis
February 3, 2025
著者: Huaye Zeng, Dongfu Jiang, Haozhe Wang, Ping Nie, Xiaotong Chen, Wenhu Chen
cs.AI
要旨
最近のコーダーモデルの進歩のほとんどは、教師あり微調整(SFT)によって推進されてきましたが、強化学習(RL)の潜在能力は、コード領域における信頼性のある報酬データ/モデルの不足により、ほとんど未開拓のままです。本論文では、自動大規模テストケース合成を活用してコードモデルのトレーニングを強化することで、この課題に取り組みます。具体的には、既存のコードデータから豊富な(質問、テストケース)ペアを生成するパイプラインを設計します。これらのテストケースを使用して、サンプリングされたプログラムの合格率に基づいて好みのペアを構築し、Bradley-Terry損失を用いて報酬モデルをトレーニングします。これにより、Llama-3.1-8B-Insでは平均で10ポイントの改善、Qwen2.5-Coder-7B-Insでは5ポイントの改善が見られ、ベストオブ32サンプリングにより、7Bモデルが236B DeepSeek-V2.5と同等の性能を発揮します。さらに、報酬モデルとテストケース合格報酬の両方で強化学習を行い、HumanEval、MBPP、BigCodeBench、LiveCodeBench(V4)で一貫した改善が見られます。特に、Qwen2.5-Coder-baseから直接開始するR1スタイルのトレーニングを行い、強化学習によって、HumanEval-plusで25%以上、MBPP-plusでわずか80回の最適化ステップで6%改善することを示しました。我々は、強化学習がコーダーモデルにおいて大きな潜在能力を示すと考えています。
English
Most progress in recent coder models has been driven by supervised
fine-tuning (SFT), while the potential of reinforcement learning (RL) remains
largely unexplored, primarily due to the lack of reliable reward data/model in
the code domain. In this paper, we address this challenge by leveraging
automated large-scale test-case synthesis to enhance code model training.
Specifically, we design a pipeline that generates extensive (question,
test-cases) pairs from existing code data. Using these test cases, we construct
preference pairs based on pass rates over sampled programs to train reward
models with Bradley-Terry loss. It shows an average of 10-point improvement for
Llama-3.1-8B-Ins and 5-point improvement for Qwen2.5-Coder-7B-Ins through
best-of-32 sampling, making the 7B model on par with 236B DeepSeek-V2.5.
Furthermore, we conduct reinforcement learning with both reward models and
test-case pass rewards, leading to consistent improvements across HumanEval,
MBPP, BigCodeBench, and LiveCodeBench (V4). Notably, we follow the R1-style
training to start from Qwen2.5-Coder-base directly and show that our RL
training can improve model on HumanEval-plus by over 25\% and MBPP-plus by 6\%
for merely 80 optimization steps. We believe our results highlight the huge
potential of reinforcement learning in coder models.Summary
AI-Generated Summary