继续还是重启?编码智能体中早期失败预测的局限性
Continue or Restart? The Limits of Early Failure Prediction in Coding Agents
AI总结:
该研究分析编码智能体早期失败预测的局限性,发现早期停止的任务内判别接近随机,重启仅在跨任务分配有增益,未中断继续运行的解决率更高且成本更低,早期停止需验证尝试级判别与净计算节省。
摘要:
早期停止承诺通过提前终止无前景的运行来降低自主编码智能体的计算成本,而决定何时放弃运行需要将基线问题难度与单个尝试的轨迹区分开。我们研究了来自两个公开语料库、涵盖四个模型-框架设置的147002条执行轨迹中的这种区分,通过将执行前的问题上下文与早期执行前缀进行比较,评估了线性计数模型、初始回合文本嵌入、任务条件排序器以及微调后的Qwen3-0.6B监控器。尽管早期前缀适度改善了跨任务结果排序,但在早期里程碑(5k-20k token)下的任务内判别仍接近随机水平:初始回合嵌入和20k token的任务条件模型的AUC约为0.50,且在20k token下对32406次尝试进行的三种子集神经评估,在不同解决率的任务中实现了平均任务内AUC为0.50[0.48,0.51]。为评估这些预测如何转化为停止决策,我们在共享token预算下重放了得分引导重启、匹配随机重启以及未中断的继续运行。在75k token的上限下,学习型重启相比匹配随机重启的解决率提升最高达1.98个百分点。一个精确的代数分解解决了这一悖论:相比随机重启的增益几乎完全来自跨任务停止分配(避免在简单问题上停止),而任务内的尝试级选择贡献接近零(-0.11至+0.24个百分点)。在75k上限下的所有四个设置中(以及224个测试的预算-阈值配置中的216个),未中断的继续运行相比两种重启策略实现了更高的解决率和更低的平均token成本。因此,早期停止的实际评估必须建立尝试级判别,并证明相比继续运行的净计算节省。
英文摘要:
Early stopping promises to reduce compute costs for autonomous coding agents by terminating unpromising runs early. Deciding when to abandon a run requires separating baseline issue difficulty from the trajectory of an individual attempt. We study the distinction in 147,002 execution traces from two public corpora spanning four model-framework settings. Comparing pre-execution issue context against early execution prefixes, we evaluate linear count models, initial-turn text embeddings, task-conditional rankers, and a fine-tuned Qwen3-0.6B monitor. Although early prefixes modestly improve cross-task outcome ranking, within-task discrimination remains near chance across early landmarks (5k-20k tokens): initial-turn embeddings and 20k-token task-conditional models yield AUCs around 0.50, and three-seed neural evaluations across 32,406 attempts at 20k tokens achieve a mean within-task AUC of 0.50 [0.48, 0.51] across tasks of varying solve rates. To evaluate how these predictions translate into stopping decisions, we replay score-guided and matched random restarts under shared token budgets alongside uninterrupted continuation. Under a 75k-token cap, learned restarting improves resolution over matched random restarting by up to 1.98 percentage points. An exact algebraic decomposition resolves this paradox: the gain over random restarting stems almost entirely from between-task stopping allocation (avoiding stops on easy issues), whereas attempt-level selection within a task contributes near zero (-0.11 to +0.24 percentage points). Across all four settings at the 75k cap (and 216 of 224 tested budget-threshold configurations overall), uninterrupted continuation achieves higher solve rates at lower mean token cost than both restart policies. Practical evaluations of early stopping must therefore establish attempt-level discrimination and demonstrate net compute savings relative to continuation.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。