RLPF: 코드 생성을 위한 성능 피드백 기반 강화 학습
RLPF: Reinforcement Learning from Performance Feedback for Code Generation
코드 모델은 점점 더 많은 실행 피드백을 통해 학습되고 있지만, 대부분의 학습 신호는 여전히 정확성(correctness)에만 머무릅니다. 이는 시스템 코드의 경우 중요한 격차를 만듭니다. 왜냐하면 동일한 테스트를 통과하는 두 프로그램이라도 런타임 성능이 크게 다를 수 있기 때문입니다. 본 연구에서는 코드 에이전트가 효율성을 단순히 평가 지표로 취급하는 것이 아니라, 더 빠른 실행 속도를 가진 정확한 구현을 선호하도록 학습하는 방법을 탐구합니다. 주요 어려움은 런타임이 불안정한 보상(reward)이라는 점입니다. 런타임은 프로그램이 정확할 때만 의미가 있으며, 작업에 따라 달라지고, 대부분의 샘플링된 프로그램이 컴파일되거나 실행되지 않을 때는 거의 도움이 되지 않습니다. 우리는 성능 피드백 기반 강화 학습인 extbf{RLPF}를 제안합니다. RLPF는 실행 결과를 단계별 보상으로 변환합니다. 실패한 프로그램은 실행 진행 상황에 따라 순서가 매겨지고, 올바르게 실행된 프로그램은 기준(baseline) 대비 개선 정도와 전문가 참조(expert reference)와의 상대적인 성능 향상을 기준으로 순위가 매겨집니다. 이를 통해 정확성 이전에 유용한 피드백을 제공하고, 정확성이 확보된 후에는 성능에 민감한 피드백을 제공합니다. RLPF를 사용하여 Qwen3-32B 모델을 PerfCodeBench 데이터셋으로 미세 조정(fine-tuning)한 결과, 실행 가능한 정확한 솔루션 비율이 11.1%에서 54.6%로 향상되었으며, 상대적인 효율성 또한 8.1%에서 38.6%로 개선되었습니다. 학습된 모델은 더 강력한 오픈 소스 시스템과 경쟁력을 갖게 되었고, 최적화 동작은 EffiBench-X 데이터셋에도 일부 적용될 수 있었습니다. 추가 연구 결과, 모델이 생성한 참조(reference)가 유용한 감독 신호(supervision)를 제공하지만, 정확성만 고려하거나 런타임만 고려하는 기존 방식보다 복합적인 보상이 더 안정적임을 확인했습니다. 이러한 결과는 코드 에이전트가 단순히 테스트를 통과하는 것뿐만 아니라 작성한 프로그램 자체를 최적화하도록 학습될 수 있음을 시사합니다.
Code models are increasingly trained with execution feedback, but most training signals still stop at correctness. This leaves an important gap for systems code: two programs can pass the same tests while differing greatly in runtime. We study how to train code agents to prefer faster correct implementations, rather than treating efficiency only as an evaluation metric. The key difficulty is that runtime is a fragile reward. It is meaningful only after a program is correct, varies across tasks, and gives little guidance when most sampled programs fail to compile or run. We propose \textbf{RLPF}, reinforcement learning from performance feedback, which turns execution outcomes into a staged reward. Failed programs are ordered by execution progress, while correct programs are ranked by their relative improvement from the baseline toward the expert reference. This gives useful feedback before correctness and performance-sensitive feedback after correctness. Fine-tuning Qwen3-32B with RLPF on PerfCodeBench raises correct-and-runnable solutions from $11.1\%$ to $54.6\%$ and improves relative efficiency from $8.1\%$ to $38.6\%$. The trained model becomes competitive with stronger open-weight systems, and its optimization behavior transfers modestly to EffiBench-X. Additional studies show that model-generated references provide useful but weaker supervision, and that the full composite reward is more reliable than correctness-only or runtime-only baselines. These results suggest that code agents can be trained not only to pass tests, but also to optimize the programs they write.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.