Direct Feedback Policy Optimization for AI Coding Agents
Organizations: Alibaba Group.
Abstract
AI coding agents generate, modify, and validate code through multi-turn interactions. Existing reinforcement learning methods often rely on sparse terminal rewards, making it difficult to assess how intermediate decisions affect task outcomes, and group-relative methods also require repeated sampling for each task. We propose Direct Feedback Policy Optimization (DFPO), a single-trajectory reinforcement learning algorithm that trains directly from a single trajectory. DFPO achieves higher task resolution rates than GSPO under matched base models and execution harnesses.
Figures & tables
| Method | SWE-rebench | Verified |
|---|---|---|
| 110 problems | 500 problems | |
| Base | 17.3 | 44.2 |
| GSPO | 19.4 | 48.5 |
| GSPO + BASIS | 21.1 | 51.7 |
| DFPO | 28.5 | 62.4 |
| Base (Step 0) | GSPO | DFPO |
| 64.0 | 69.2 | 78.2 |
| Group | Training setting | History rewrite and replay at evaluation | Resolution rate (%) |
| A | Initial base model | Off | 17.3 |
| B | Same base as A | On | 17.6 |
| C | GSPO with rewrite | On | 21.8 |
| D | DFPO with rewrite | On | 28.5 |
| E | DFPO w/o retry loss | On | 25.5 |
| F | DFPO w/o mask | On | 24.8 |
RL for Code Generation
Reinforcement learning for code generation trains models to write, repair, and optimize programs using execution-based and other task-specific feedback.
See all 166 papers