OPRD: On-Policy Reminder Distillation for Long-Horizon Coding Agents

📄 arXiv: 2610.21496v1 📥 PDF

作者: Yuechen Luo, Zhiyi Lai, Miao Ziqi, Zihang Xu, Jingxuan Xu, Songwei Yu, Wenqiang Zhu, Weihao Li, Junhao Fan, Haoyang Huang, Yanan Wu, Ken Deng

分类: cs.CL

发布日期: 2026-10-15

备注: 19 pages, including appendix


💡 一句话要点

提出OPRD以解决长时间编码代理的反馈响应问题

🎯 匹配领域: 支柱二:RL算法与架构 (RL & Architecture) 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 长时间编码 反馈响应 蒸馏训练 多范围监督 自回归模仿

📋 核心要点

  1. 现有方法在长时间交互中未能有效利用上下文信息,导致编码代理的反馈响应不佳。
  2. 论文提出的OPRD方法通过结合多范围提醒监督与结果导向路由,提升了代理的决策能力。
  3. 实验结果显示,OPRD在多个基准测试中提高了任务解决率11.3个百分点,并将错误事件数量减少了50.2%。

📝 摘要(中文)

可靠的库级编码要求代理不仅生成正确的代码,还需在长时间交互中保持约束并响应工具反馈。然而,我们的诊断分析显示,代理常常未能利用上下文中已有的相关信息,而最终的通过/失败结果仅提供稀疏的过程监督。为此,我们提出了On-Policy Reminder Distillation(OPRD),结合了多范围提醒监督与基于结果的路由。成功的回放提供自回归自我模仿目标,而失败的回放则从教师那里获得基于提醒的反向KL监督。最终测试的诊断通过全局提醒转化为轨迹级指导,而局部提醒仅适用于相关环境观察后的下一个决策。在推理时,学生在没有提醒的情况下进行操作。OPRD在多个基准测试中显著提高了任务解决率,并减少了错误事件的总数。

🔬 方法详解

问题定义:本论文旨在解决长时间编码代理在生成代码时未能有效利用上下文信息的问题。现有方法在反馈响应上存在不足,导致代理的决策效果不理想。

核心思路:OPRD方法通过引入多范围提醒监督与结果导向路由,旨在提升代理在长时间交互中的表现。成功的回放提供自回归自我模仿目标,而失败的回放则通过教师的反向KL监督进行改进。

技术框架:整体架构包括两个主要阶段:首先是教师与学生的双阶段初始化,分别基于编码SFT和指令跟随SFT;其次,在推理阶段,学生在没有提醒的情况下进行操作。

关键创新:最重要的创新在于引入了全局提醒与局部提醒的结合,使得最终测试的诊断能够转化为轨迹级指导,从而有效提升了代理的决策能力。

关键设计:在设计中,采用了基于提醒的反向KL损失函数,确保了失败回放的有效监督,同时在成功回放中实现了自回归自我模仿的目标设定。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

在SWE-bench Verified、SWE-bench Pro和SWE-bench Multilingual等基准测试中,OPRD方法相比于开源的Qwen3.5-4B基础模型,任务解决率平均提高了11.3个百分点,同时错误事件总数从446减少至222,减少幅度达到50.2%。

🎯 应用场景

该研究的潜在应用领域包括软件开发、自动化测试和智能编程助手等。通过提升编码代理在长时间交互中的反馈响应能力,OPRD能够显著提高代码生成的可靠性和效率,未来可能对软件工程领域产生深远影响。

📄 摘要(原文)

Reliable repository-level coding requires agents not only to generate correct code but also to preserve constraints and respond to tool feedback across long interactions. However, our diagnostic analysis shows that agents often fail to act on relevant information already available in context, while final Pass/Fail outcomes provide only sparse process supervision. We introduce On-Policy Reminder Distillation (OPRD), which combines Multi-Scope Reminder supervision with outcome-based routing on reminder-free student rollouts. Successful rollouts provide autoregressive self-imitation targets, whereas failed rollouts receive Reminder-conditioned reverse-KL supervision from a teacher that re-evaluates the same student-generated prefixes. A Global Reminder converts final-test diagnostics into trajectory-level guidance, while Turn-local Reminders apply only to the next decision following the relevant environment observation. The teacher and student share a two-stage initialization from Coding SFT and Instruction-Following (IF) SFT. At inference, the student operates without Reminders. On SWE-bench Verified, SWE-bench Pro, and SWE-bench Multilingual, OPRD improves the benchmark-averaged task resolution rate by 11.3 points over the open-source Qwen3.5-4B base model. Under the same diagnostic protocol, it reduces the aggregate error-event count from 446 to 222, a 50.2% reduction.