arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2611.02074cs.AIcs.SE
收藏

SWE-Trail:用于编码智能体训练的历史引导轨迹收集方法

SWE-Trail: History-Guided Trajectory Collection for Coding Agent Training

University of Connecticut(康涅狄格大学);Ant Group(蚂蚁集团)

Ziming Li, Lu Yu, Jiatan Huang, Qing Cui, Jun Zhou, Chuxu Zhang

AI总结:

SWE-Trail是一种轨迹收集器,它利用早期轨迹指导编码智能体训练的轨迹收集,在不暴露历史信息的情况下,使124B规模的学生模型在SWE-bench Multilingual和Pro上的平均解决率较独立采样分别提升2.33和1.60个百分点。

摘要:

编码智能体通过探索、编辑和验证的长序列来解决仓库问题,这些轨迹越来越多地被用作后训练数据,因此它们的收集方式决定了训练后的模型能学到什么。一种常见方法是为每个问题独立采样多条轨迹,然后对其进行选择或整理。然而,随着独立采样的轨迹增多,后续轨迹会变得越来越冗余,尽管早期轨迹本可以指导后续收集工作应投入的方向。利用这种历史信息的自然方式是将其作为建议提供给编码智能体,但基于此类轨迹进行训练会使模型依赖在测试时不可用的建议,从而造成训练-测试不匹配。相反,我们认为历史信息应指导收集工作的投入方向,而编码智能体则决定生成什么内容。我们提出SWE-Trail,这是一种轨迹收集器,它利用早期轨迹指导后续收集,同时将该历史信息排除在编码智能体的上下文之外。在新的部署过程中,SWE-Trail利用历史信息识别出可能需要额外收集工作的状态,在该状态下,编码智能体从其常规上下文提出候选下一个动作,SWE-Trail则从相同的检查点短暂执行这些动作以决定保留哪条路径。我们通过在其生成的轨迹上训练学生模型来评估收集方法。对于从Ling-3.0-flash-base初始化的124B规模的学生模型,SWE-Trail在SWE-bench Multilingual和SWE-bench Pro上的平均解决率相比独立采样分别提高了2.33和1.60个百分点。没有历史信息时,相同流程生成的已解决轨迹比独立采样更多,但在Multilingual上仅提高了0.11个百分点。这些结果表明,利用历史信息指导收集且不将其暴露给编码智能体的价值。

英文摘要:

Coding agents solve repository issues through long sequences of exploration, editing, and validation. These trajectories are increasingly used as post-training data, so how they are collected shapes what the trained model learns. A common approach is to sample multiple trajectories independently for each issue and then select or curate them. However, as more trajectories are sampled independently, later trajectories become increasingly redundant, even though earlier trajectories could guide where subsequent collection effort should be spent. A natural way to use this history is to expose it to the coding agent as advice. But training on such trajectories can make the model rely on advice that is unavailable at test time, creating a train-test mismatch. Instead, we argue that history should guide where collection effort is spent, while the coding agent decides what to generate. We introduce SWE-Trail, a trajectory collector that uses earlier trajectories to guide subsequent collection while keeping that history outside the coding agent's context. During a new rollout, SWE-Trail uses history to identify a state where additional collection effort may be useful. There, the coding agent proposes candidate next actions from its ordinary context, and SWE-Trail briefly executes them from the same checkpoint to decide which route continues. We evaluate collection approaches by training student models on the trajectories they produce. For a 124B student initialized from Ling-3.0-flash-base, SWE-Trail improves mean resolution over independent sampling by 2.33 and 1.60 percentage points on SWE-bench Multilingual and SWE-bench Pro, respectively. Without history, the same pipeline produces more resolved trajectories than independent sampling, but improves by only 0.11 points on Multilingual. These results show the value of using history to guide collection without exposing it to the coding agent.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑