arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2602.16819cs.SEcs.CLcs.LG
收藏

Hybrid-Gym: 训练能够跨任务泛化的编码代理

Hybrid-Gym: Training Coding Agents to Generalize Across Tasks

Carnegie Mellon University(卡内基梅隆大学)

Yiqing Xie, Emmy Liu, Gaokai Zhang, Nachiket Kotalwar, Shubham Gandhi, Sathwik Acharya, Xingyao Wang, Carolyn Rose, Graham Neubig, Daniel Fried

AI总结:

Hybrid-Gym通过设计合成任务训练编码代理,提升其跨任务泛化能力,在多个基准测试中取得显著效果。

摘要:

在评估编码代理的质量时,主流基准主要聚焦于解决GitHub上的单一问题,如SWE-Bench。相比之下,在实际使用中,这些代理需要解决更多样化和复杂度更高的任务,涉及其他技能,如探索代码库、软件测试和架构设计。在本文中,我们首先通过将轨迹分解为细粒度组件,刻画出在不同任务中共享的可迁移技能,并推导出一套设计辅助训练任务的原则,以教给语言模型这些技能。基于这些原则,我们提出了一种训练环境Hybrid-Gym,包含一系列可扩展的合成任务,如函数定位和依赖搜索。实验表明,训练于我们合成任务的代理能够有效泛化到不在训练中的多样化现实任务,提升基础模型在SWE-Bench Verified上的绝对增益为25.4%,在SWT-Bench Verified上的增益为7.9%,在Commit-0 Lite上的增益为5.1%。Hybrid-Gym还补充了为下游任务构建的数据集(例如,提升SWE-Play在SWT-Bench Verified上的表现4.9%)。代码可在:https://github.com/yiqingxyq/Hybrid-Gym获取。

英文摘要:

When assessing the quality of coding agents, predominant benchmarks focus on solving single issues on GitHub, such as SWE-Bench. In contrast, in real use, these agents solve more various and complex tasks that involve other skills such as exploring codebases, testing software, and designing architecture. In this paper, we first characterize some transferable skills that are shared across diverse tasks by decomposing trajectories into fine-grained components, and derive a set of principles for designing auxiliary training tasks to teach language models these skills. Guided by these principles, we propose a training environment, Hybrid-Gym, consisting of a set of scalable synthetic tasks, such as function localization and dependency search. Experiments show that agents trained on our synthetic tasks effectively generalize to diverse real-world tasks that are not present in training, improving a base model by 25.4% absolute gain on SWE-Bench Verified, 7.9% on SWT-Bench Verified, and 5.1% on Commit-0 Lite. Hybrid-Gym also complements datasets built for the downstream tasks (e.g., improving SWE-Play by 4.9% on SWT-Bench Verified). Code available at: https://github.com/yiqingxyq/Hybrid-Gym.

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

↑