ReTerm:面向自改进终端智能体的恢复训练
ReTerm: Recovery Training for Self-Improving Terminal Agents
AI总结:
ReTerm是一种自改进终端智能体,通过构建ReTerm-10K数据集和提出ReTerm-GRPO算法实现恢复训练,其ReTerm-9B在Terminal-Bench 2.0上的Pass@1较基础模型提升14.6个百分点。
摘要:
终端智能体在复杂编码任务中展现出较强能力,但在长时间运行时往往难以从错误(如命令错误、实现故障)中恢复,最终导致任务失败。为此,我们提出ReTerm,一种通过学习自身失败终端任务的恢复方法进行训练的自改进终端智能体。为支持其训练,我们构建了定制化数据管道,并生成ReTerm-10K,这一高质量数据集为SFT(监督微调)冷启动提供了有效的恢复示范。此外,我们提出ReTerm-GRPO,一种在线强化学习算法,该算法从智能体自身的失败状态分叉出多个独立的自我恢复尝试。通过学习这些尝试是否成功完成任务,智能体可从自身的恢复经验中实现自改进。基于Qwen3.5-9B构建的ReTerm-9B在Terminal-Bench 2.0上达到34.8%的Pass@1指标,较基础模型提升了14.6个百分点。进一步分析表明,与标准GRPO训练相比,我们的方法在各类错误类别中均实现了更高的恢复率。所有代码、数据和模型均已在该https地址发布。
英文摘要:
Terminal agents have shown strong abilities in complex coding tasks. However, they often struggle to recover from errors during long-running execution (e.g., command errors, faulty implementations), eventually leading to task failures. To this end, we present ReTerm, a self-improving terminal agent trained by learning how to recover from its own failed terminal tasks. To support its training, we construct a customized data pipeline and produce ReTerm-10K, a high-quality dataset that provides effective recovery demonstrations for SFT cold start. Furthermore, we propose ReTerm-GRPO, an online RL algorithm that forks from the agent's own failure states to generate multiple independent self-recovery attempts. By learning from whether these attempts successfully complete the task, the agent self-improves through its own recovery experience. Built on Qwen3.5-9B, our ReTerm-9B achieves 34.8% Pass@1 on Terminal-Bench 2.0, improving over the base model by 14.6 points. Further analysis shows that our method achieves consistently higher recovery rates across diverse error categories compared with standard GRPO training. All code, data and model are released at https://github.com/twothsnd/ReTerm.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。