arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.22791cs.CLcs.AI
收藏

利用Harness策略优化实现自进化编码智能体

Self-Evolving Coding Agents via Harness-Policy Optimization

Microsoft Research(微软研究院);University of Virginia(弗吉尼亚大学);Carnegie Mellon University(卡内基梅隆大学)

Zhepei Wei, Wenlin Yao, Baolin Peng, Danqing Wang, Qianhui Wu, Hao Cheng, Yu Meng, Jianfeng Gao

AI总结:

本研究提出Self-HPO框架,通过交替优化Harness与策略实现编码智能体自进化,在编码基准测试中提升了Qwen3.5-35B-A3B的解决率,且性能可泛化至分布外场景。

摘要:

大型语言模型(LLM)智能体在编码任务中展现出良好潜力,其性能由策略模型与协调智能体和环境交互的Harness共同决定。实际上,Harness与策略相互促进,仅优化其中一个组件会导致性能不佳——针对某一检查点调整的Harness可能无法适配更新后策略的失败模式,而策略学习也仅局限于固定Harness生成的轨迹。据此,我们提出Self-HPO,一种用于编码智能体的递归自改进框架,该框架交替进行Harness优化与策略优化,利用进化后的策略作为自身的Harness提议者。具体而言,每一轮中,当前策略先分析自身失败情况并提出新的Harness候选(H步);随后在选定的Harness下通过强化学习(RL)更新策略(P步),训练中识别的困难任务构成下一轮Harness搜索集,使Harness优化始终针对策略不断演变的失败模式。在三个编码基准测试中,Self-HPO始终优于仅优化Harness和仅优化策略的基线方法,将Qwen3.5-35B-A3B的平均解决率从57.8%提升至64.8%,且该提升可泛化到分布外场景。进一步分析表明,两个优化后的组件与各自基础版本配对时仍能保持性能提升,而它们的联合增益超过各自单独增益之和。Self-HPO还提升了基础智能体的可靠性(Pass@1)并拓展了能力边界(Pass@k)。此外,我们发现使用更强的外部模型(如Opus 4.8)作为Harness提议者时,同一框架可实现进一步的性能提升。

英文摘要:

Large language model (LLM) agents have shown promising potential in coding tasks, and their performance is jointly determined by the policy model and the harness that mediates their interaction with the environment. Indeed, harness and policy are mutually reinforcing and evolving only one component is suboptimal---a harness tuned for one checkpoint may not target the failure modes of an updated policy, while policy learning remains limited to the trajectories elicited by a fixed harness. In light of this, we propose Self-HPO, a recursive self-improving framework for coding agents that alternates harness and policy optimization, using the evolving policy as its own harness proposer. Specifically, in each round, the current policy first analyzes its own failures and proposes new harness candidates (H-step). The policy is then updated through reinforcement learning (RL) under the selected harness (P-step), and hard tasks identified during training form the next harness search set, keeping harness optimization targeted to the policy's evolving failure modes. Across three coding benchmarks, Self-HPO consistently outperforms harness-only and policy-only baselines, improving Qwen3.5-35B-A3B's average resolve rate from 57.8% to 64.8%, with gains generalizing to out-of-distribution settings. Further analysis shows that both optimized components retain gains even when paired with their base counterparts, while their joint gain exceeds the sum of their individual gains. Self-HPO also improves reliability (Pass@1) and expands the capability frontier (Pass@k) over the base agent. Additionally, we show that with a stronger external model (e.g., Opus 4.8) as the harness proposer, the same framework yields a further performance boost.

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

↑