通过引导机制提升代码生成智能体在复杂任务中的训练效果。
Agent-RLVR: Training Software Engineering Agents via Guidance and Environment Rewards
- 引入代理引导机制,利用策略规划与错误反馈引导智能体
- 使Qwen-2.5-72B-Instruct在SWE-Bench Verified上通过率从9.4%提升至22.4%
- 适用于需要多步推理的复杂真实场景,适合智能编程助手研究者
强化学习从可验证奖励(RLVR)已被广泛采用以增强大语言模型的推理能力,在数学和竞赛编程等可验证领域表现突出。然而,当应用于代理环境时,其有效性显著下降。这类环境具有多步、复杂的求解过程,导致前沿大模型也出现高失败率,传统RLVR因奖励稀疏难以有效训练。本文提出Agent-RLVR框架,使RLVR在挑战性代理场景中有效,初始聚焦于软件工程任务。受人类教学启发,Agent-RLVR引入代理引导机制,通过战略规划、错误反馈及环境交互动态信息,主动引导智能体走向成功路径,促进其通过额外探索实现自我改进。训练循环中,智能体先尝试解题生成初始轨迹,经单元测试验证后补充引导信息,再带引导重试,基于引导轨迹的奖励更新策略。该方法将Qwen-2.5-72B-Instruct在SWE-Bench Verified上的pass@1从9.4%提升至22.4%。进一步发现,引导增强的RLVR数据对测试时奖励模型训练亦有帮助,使通过率再升至27.8%。Agent-RLVR为在复杂真实环境中使用RLVR训练智能体奠定了基础。
原文摘要 · Abstract (English)
Reinforcement Learning from Verifiable Rewards (RLVR) has been widely adopted as the de facto method for enhancing the reasoning capabilities of large language models and has demonstrated notable success in verifiable domains like math and competitive programming tasks. However, the efficacy of RLVR diminishes significantly when applied to agentic environments. These settings, characterized by multi-step, complex problem solving, lead to high failure rates even for frontier LLMs, as the reward landscape is too sparse for effective model training via conventional RLVR. In this work, we introduce Agent-RLVR, a framework that makes RLVR effective in challenging agentic settings, with an initial focus on software engineering tasks. Inspired by human pedagogy, Agent-RLVR introduces agent guidance, a mechanism that actively steers the agent towards successful trajectories by leveraging diverse informational cues. These cues, ranging from high-level strategic plans to dynamic feedback on the agent's errors and environmental interactions, emulate a teacher's guidance, enabling the agent to navigate difficult solution spaces and promotes active self-improvement via additional environment exploration. In the Agent-RLVR training loop, agents first attempt to solve tasks to produce initial trajectories, which are then validated by unit tests and supplemented with agent guidance. Agents then reattempt with guidance, and the agent policy is updated with RLVR based on the rewards of these guided trajectories. Agent-RLVR elevates the pass@1 performance of Qwen-2.5-72B-Instruct from 9.4% to 22.4% on SWE-Bench Verified. We find that our guidance-augmented RLVR data is additionally useful for test-time reward model training, shown by further boosting pass@1 to 27.8%. Agent-RLVR lays the groundwork for training agents with RLVR in complex, real-world environments where conventional RL methods struggle.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。