DiDPO: 차등분석 정책 최적화 - 코딩 에이전트 학습을 위한 방법
DiDPO: Diff-in-Diff Policy Optimization for Coding Agent Training
검증 가능한 보상을 활용한 강화학습(RLVR)은 컴파일 및 테스트로부터 얻는 실행 피드백을 통해 객관적인 검증을 제공하여, 코딩 에이전트 학습에 강력한 패러다임으로 부상했습니다. 그러나 일반적인 에이전트 작업과는 달리, 코딩 에이전트는 독특하고 세분화된 신용 할당 문제를 안고 있습니다. 각 단계에서 코딩 액션은 코드 버전의 다양한 영역에 동시에 다양한 변경 사항을 적용하므로, 독립적인 변경 사항의 기여도를 구별하기 어렵습니다. 기존 RLVR 방법들은 주로 결과 보상 또는 단계별 보상을 활용하는데, 이는 코드 차이(diff)를 깊이 있게 분석하지 못하고 코딩 액션의 고유한 특성을 학습에 반영하지 못합니다. 본 논문에서는 Diff-in-Diff Policy Optimization (DiDPO)라는 새로운 방법을 제안합니다. DiDPO는 크리틱 없이 강화학습을 수행하며, 코드 차이 구조로부터 세분화된 신용 단위(credit unit)를 직접 구성합니다. DiDPO는 다단계 코딩 상호작용을 여러 개의 사고-행동 단계로 구성하고, 샘플링된 경로에서 발생하는 코드 차이를 분석합니다. 그런 다음, 저희가 제안하는 '그룹가능성 점수(groupability score)'를 사용하여 각 전체 차이에서 분리된 유사한 하위 차이들을 그룹화하여 앵커(anchor)를 선택합니다. 이 앵커들은 장점 그룹을 형성하고, 차이 수준의 장점을 개별 응답 토큰으로 투영합니다. 장기적인 코딩 및 추론 벤치마크 실험 결과, DiDPO는 강력한 기존 강화학습 기반 모델들을 크게 능가하는 성능을 보였습니다. Qwen2.5-7B-Coder 모델에서, DiDPO는 유사한 방법들보다 10% 이상 높은 성능을 보이며, 훨씬 더 큰 모델들과의 격차를 줄여줍니다. 이는 코딩 에이전트 학습에 있어 세분화된 신용 할당을 위한 체계적인 프레임워크를 제공합니다. 또한, 다양한 강화학습 방법과 코딩 벤치마크를 지원하는 에이전트 기반 강화학습 코드베이스인 verl-code를 공개합니다.
Reinforcement learning with Verifiable Reward (RLVR) has emerged as a powerful paradigm for training coding agents, where the execution feedback from compilation and tests provides objective verification. However, unlike agent tasks, coding agents face a unique and finer-grained credit assignment challenge: at each step, coding actions simultaneously pack varying changes into different regions of a code version, which makes the contribution of independent change indistinguishable. Existing RLVR methods mostly leverage the outcome reward or step-level reward, which fails to dive into a code diff and makes unique properties of coding actions invisible to training. In this paper, we propose Diff-in-Diff Policy Optimization (DiDPO), a critic-free RL method that constructs fine-grained credit units directly from the structure of code diffs. DiDPO organizes multi-turn coding interactions into multiple thought--action steps and discovers code diffs across sampled trajectories. It then selects anchors by aggregating highly similar sub-diffs split from each whole diff by our ``groupability score'', which provides the splitting schema that optimally balances the semantic scope of anchors and the group mass they may form. Finally these anchors form advantage groups and project the diff-level advantage back to individual response tokens. Experiments on long-horizon coding and reasoning benchmarks show that DiDPO significantly outperforms strong agentic RL baselines. On Qwen2.5-7B-Coder, DiDPO exceeds comparable methods by over 10\% and narrows the gap with far larger models, offering a principled framework for fine-grained credit assignment in coding agent training. We also open-source verl-code, an agentic rl codebase that supports various RL methods and coding benchmarks.
No Analysis Report Yet
This paper hasn't been analyzed by Gemini yet.
Log in to request an AI analysis.