StopLoss:教智能体预测失败并提前停止
StopLoss: Teaching Agents to Predict Failure and Stop Early
AI总结:
本文提出StopLoss小型外部监控器,从轨迹与验证结果学习失败识别,成本远低于通用评判器,可提前终止可能失败的编码任务,显著降低成本且保留大部分成功运行。
摘要:
编码智能体持续运行那些会在验证阶段失败的任务,而让前沿模型监控这种情况本身成本高昂。我们提出StopLoss,这是一种小型外部监控器,它从已完成的轨迹及其验证器结果中学习失败识别。其名称灵感来自金融中的止损订单:当运行很可能失败时,StopLoss会提前终止运行,从而节省资源。最终结果标记了更早的局部窗口,因此微调后的语言模型可以在单次前向传播中对最近的工具步骤进行评分,而根据成功运行校准的阈值会将该评分转化为中止决策,且无需修改执行器。StopLoss在GPT系列SWE-rebench轨迹上进行训练,并在SWE-bench Verified以及带有GPT和Claude执行器的SWE-bench Pro子集上进行评估,我们将其与读取相同窗口的六个通用评判器进行比较。结果监督将失败预测从接近随机提升到首次检查时的有用信号,且每次检查的成本比所有测试的评判器低1至2个数量级。这转化为成本节约:相对于完成所有任务,StopLoss在Verified上将每次保留解决的任务成本降低4.5%,同时保留99%的成功运行;在成本更高的Pro子集上,成本降低高达31%,使用Qwen3-8B主干时达到48%,且在所有四种设置中,其每次保留解决的任务成本均低于所有评判器策略。经结果训练的小型监控器可使失败识别成本足够低,从而让提前停止机制实现自我收益。
英文摘要:
Coding agents keep working on runs that will fail verification, and asking a frontier model to watch for this is expensive in its own right. We introduce StopLoss, a small external monitor that learns failure recognition from completed trajectories and their verifier outcomes. The name is inspired by the stop-loss order in finance: StopLoss ends a run early when the run is likely to fail, which saves resources. Final outcomes label earlier local windows, so a fine-tuned language model can score the most recent tool steps in a single forward pass, and a threshold calibrated on successful runs turns that score into an abort decision without changing the executor. Trained on GPT-family SWE-rebench trajectories and evaluated on SWE-bench Verified and a SWE-bench Pro subset with GPT and Claude executors, StopLoss is compared against six general-purpose judges reading identical windows. Outcome supervision lifts failure prediction from near chance to a useful signal at the first check, at one to two orders of magnitude lower cost per check than any tested judge. This translates into savings: relative to completing every task, StopLoss lowers cost per retained solve by 4.5\% on Verified while preserving 99\% of successful runs, and by up to 31\% on the costlier Pro subset, reaching 48\% with a Qwen3-8B backbone, and in all four settings its cost per retained solve is below that of every judge policy. Outcome-trained small monitors can make failure recognition cheap enough for early stopping to pay for itself.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。