에이스코더: 자동 테스트케이스 합성을 통한 코더 강화학습
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 손실을 사용하여 보상 모델을 훈련시킵니다. 32개 중 최고를 선택하는 샘플링을 통해 Llama-3.1-8B-Ins에서 평균 10포인트 개선 및 Qwen2.5-Coder-7B-Ins에서 5포인트 개선을 보여줌으로써 7B 모델을 236B DeepSeek-V2.5와 동등하게 만듭니다. 또한, 우리는 두 보상 모델 및 테스트 케이스 통과 보상과 함께 강화 학습을 수행하여 HumanEval, MBPP, BigCodeBench 및 LiveCodeBench (V4)에서 일관된 개선을 이끌어냅니다. 특히, 우리는 Qwen2.5-Coder-base에서 직접 시작하는 R1-스타일 훈련을 따르고, 우리의 강화 학습이 단 80번의 최적화 단계만으로 HumanEval-plus에서 25% 이상, MBPP-plus에서 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