发表机构
Beijing University of Posts and Telecommunications; Beijing University of Technology; Meta(北京邮电大学; 北京工业大学; Meta)
机构由 AI 辅助整理,请以论文原文为准。AI 中文总结
本文提出HiSentinel,一种基于后见之明蒸馏的轻量级哨兵框架,在执行前判断是否及如何干预编码智能体,通过SWE-Intervene数据集训练,在SWE-bench上提升任务完成率高达14%,有效防止错误传播。
AI 中文摘要
编码智能体通过一系列动作解决仓库级任务,其中单个错误动作可能会误导后续决策并增加恢复成本。现有方法使用执行反馈进行恢复或使用专门检查来阻止错误,但在执行前判断干预是否最终有利于任务完成仍然具有挑战性。为解决这一挑战,我们提出HiSentinel,一种后见之明蒸馏框架,训练轻量级0.6B和1.7B哨兵模型来选择旨在提高任务完成率的执行前干预,而非纠正每个不完美的动作。一个特权教师使用记录的执行结果作为干预判断的证据,并将其蒸馏到一个仅接收动作前上下文和提议动作的因果学生模型中。除了识别是否以及何时干预外,哨兵还必须提供可操作的反馈,帮助编码智能体恢复或获取必要的人类输入。为支持这些能力,我们引入SWE-Intervene,一个从软件工程轨迹构建的动作级数据集,标注动作是否应被允许、自主重定向或暂停以等待人工协助,并附有相应的干预反馈。在SWE-bench Verified Mini和Ask or Assume上,HiSentinel在哨兵规模和编码智能体家族中持续提高任务完成率,分别提升高达14%和10%,同时保持有竞争力的令牌消耗。这些结果表明,轻量级执行前干预能有效防止错误传播并提高自主编码智能体的可靠性。
英文摘要
Coding agents solve repository-level tasks through sequences of actions, where a single erroneous action can misdirect subsequent decisions and increase recovery costs. Existing approaches use execution feedback for recovery or specialized checks to block errors, but deciding before execution whether intervention will benefit eventual task completion remains challenging. To address this challenge, we propose HiSentinel, a hindsight-distillation framework that trains lightweight 0.6B and 1.7B sentinels to select pre-execution interventions aimed at improving task completion rather than correcting every imperfect action. A privileged teacher uses recorded execution outcomes as evidence for intervention judgments, which are distilled into a causal student that receives only the pre-action context and proposed action. Beyond identifying whether and when to intervene, the sentinel must also provide actionable feedback that helps the coding agent recover or obtain necessary human input. To support these capabilities, we introduce SWE-Intervene, an action-level dataset constructed from software-engineering trajectories that annotates whether an action should be allowed, autonomously redirected, or paused for human assistance, together with corresponding intervention feedback. Across SWE-bench Verified Mini and Ask or Assume, HiSentinel consistently improves task completion across Sentinel scales and coding-agent families, with gains of up to 14% and 10%, respectively, while maintaining competitive token consumption. These results demonstrate that lightweight pre-execution intervention can effectively prevent error propagation and improve the reliability of autonomous coding agents.