DeLoop:将重复动作作为长时程智能体的自监督

·

研究论文 · 2026/10/22

语言模型智能体在执行长任务时经常重复已完成的工作,即重新发起相同的工具调用并得到相同观察,这种无新信息的步骤被称为循环。循环在Qwen、Llama和Gemini智能体中自然出现,且当历史被压缩以适应上下文窗口时更为常见。为减少循环,作者提出DeLoop,一种自监督训练方法。DeLoop基于一个简单观察:智能体自身的轨迹可提供学习循环所需的监督。它将循环动作作为负例,将同一轨迹中第一个后续非循环动作作为正例,通过直接偏好优化从这些对中学习,无需任务奖励、标准答案或LLM评判。在压缩下的CodeGym上,DeLoop将Qwen3-8B任务中包含循环的比例从57.3%降至6.1%,每任务步数约为原来的三分之一,任务成功率相近。在Qwen3-32B上,DeLoop减少了循环和步数,同时将任务成功率从37.7%提升至44.8%。

该文章针对长任务智能体中普遍存在的循环问题,提出了一种无需额外监督信号的自监督训练方法,并在多个模型上显著减少了循环和步数,同时保持或提升了任务成功率,具有较高的实用价值和创新性。

Language-model agents that run long tasks often redo work they have already done: they re-issue a tool call they made earlier and get back exactly the same observation, a step that adds no new information. We identify this failure as a loop. Loops appear natively in Qwen, Llama, and Gemini agents and become far more common once the agent's history is compressed to fit its context window. To reduce these loops, we propose DeLoop, a self-supervised training method. DeLoop builds on a simple observation: the agent's own rollout can provide the supervision needed to learn from its loops. We use a looping action as a negative example and the first later non-looping action in the same rollout as a positive example. DeLoop learns from these pairs through direct preference optimization and does not require task rewards, gold answers, or LLM judges. On CodeGym under compression, DeLoop reduces the share of Qwen3-8B tasks containing loops from 57.3% to 6.1%. It also uses about one third as many steps per task, with similar task success. On Qwen3-32B, DeLoop reduces loops and steps while raising task success from 37.7% to 44.8%.

阅读原文

参与讨论