AI干活会原地打转,这篇教它别绕圈
大模型当「智能体」替你跑长任务时,会犯一个特别像人的毛病:重复做已经做完的事——再调一次同一个工具、拿回一模一样的结果,白白浪费步骤。这毛病在 Qwen、Llama、Gemini 上都有,而且一旦把历史记录压缩省内存,打转的频率暴涨。研究者没靠人工标注或奖励函数,而是让 AI 自己当自己的老师:把「重复动作」当反面教材,把同一次任务里「第一次没重复的动作」当正面教材,用偏好优化直接训练。效果是,在压缩条件下,会打转的任务占比从 57.3% 降到 6.1%,步骤数省了三分之二,任务成功率还从 37.7% 提到 44.8%。这不是你明天能用的功能,但它指向一个趋势:AI 的自我纠错,正在从「靠人教」转向「靠自己跑出来的错误」。
📄 原文摘要(英文)
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%.