从代码仓库到训练环境:通过环境演化循环扩展长周期编程智能体

·

研究论文 · 2026/11/18

RepoFactory 是一个自动化流水线,将真实代码仓库转换为可验证的训练环境,使智能体能够根据语言规范从零构建完整项目。其环境进化循环通过代理反馈优化有效性、结构耦合和实现范围的乘积目标,从而大规模合成环境。该流水线在17个软件领域生成了10,159个环境。在此环境上训练 Qwen3.5-35B-A3B 得到的 RepoHorizen-35B-A3B,在 NL2Repo-Bench 上提升22.6个百分点,在五个基准上平均提升8.5个百分点(无环境进化时分别为17.5和6.4个百分点)。

该工作提出了一种可扩展的方法,将真实代码仓库转化为可验证的训练环境,并通过环境进化循环提升训练价值,在多个基准上取得了显著性能提升,为长时程编码智能体的训练提供了新思路和实用工具。

Training coding agents for long-horizon tasks requires environments with verifiable feedback. Existing pipelines often follow a linear process that ends with validation, establishing usability but providing little guidance on improving training value. Recursive self-improvement (RSI) often requires model rollouts or model training followed by downstream evaluation, with costs and feedback delays amplified on long-horizon tasks. How can we use timely, reliable proxy signals to improve training value and synthesize environments at scale? We present RepoFactory, an automated pipeline that converts real repositories into verifiable environments where agents build complete projects from scratch given a language specification. Its Environment Evolution Loop optimizes a multiplicative objective combining validity, structural coupling, and implementation scope through proxy feedback. RepoFactory produces 10,159 environments across 17 software domains. Training Qwen3.5-35B-A3B on these environments yields RepoHorizen-35B-A3B, which achieves gains of 22.6 percentage points on NL2Repo-Bench and 8.5 points on average across five benchmarks covering long-horizon coding and agentic tasks in real-world production settings, compared with 17.5 and 6.4 points without environment evolution. These results highlight the training value of RepoFactory environments and the additional gains from the Environment Evolution Loop.

阅读原文

参与讨论