arXiv:2509.12434cs.AI2025-09被引 7

提升代码生成模型的多轮协作能力,让小模型也能逼近大模型表现。

Building Coding Agents via Entropy-Enhanced Multi-Turn Preference Optimization

  • 通过增强策略熵优化多轮对话中的输出多样性
  • 30B模型在SWE-bench上达到开源模型第一,仅逊于参数超10倍的大模型
  • 适合开发高效、可交互的自动化编程助手

软件工程对大语言模型(LLM)构成复杂、多步骤的挑战,需在大型代码库中进行推理并协调使用工具。这类任务的难度在SWE-bench等基准测试中体现明显,当前模型仍难以解决真实问题。测试时扩展(TTS)是一种提升性能的潜力方法,但其效果高度依赖模型输出的多样性。标准对齐方法如直接偏好优化(DPO)和卡尼曼-特韦尔斯基优化(KTO)虽能有效对齐人类偏好,却可能降低输出多样性,限制TTS收益。此外,现有偏好优化算法多针对单轮任务,未充分应对多轮推理与工具集成的复杂性。为此,我们提出熵增强型多轮偏好优化(EntroPO),将现有方法扩展至多轮、工具辅助场景,显式保留策略熵,并优化多轮交互而非单轮响应。我们在多个模型家族与规模(最大达106B参数)上验证了该框架。为最大化TTS收益,进一步提出结合学习型验证器与无模型方法的混合最优轨迹选择策略。在SWE-bench排行榜上,我们的方法在开源权重模型中建立新纪录:30B参数模型在SWE-bench-LITE上排名第一,在SWE-bench-VERIFIED上排名第四,仅低于参数量超10倍的模型(>350B)。

原文摘要 · Abstract (English)

Software engineering presents complex, multi-step challenges for Large Language Models (LLMs), requiring reasoning over large codebases and coordinated tool use. The difficulty of these tasks is exemplified by benchmarks like SWE-bench, where current LLMs still struggle to resolve real-world issues. A promising approach to enhance performance is test-time scaling (TTS), but its gains are heavily dependent on the diversity of model outputs. While standard alignment methods such as Direct Preference Optimization (DPO) and Kahneman-Tversky Optimization (KTO) are effective at aligning model outputs with human preferences, this process can come at the cost of reduced diversity, limiting the effectiveness of TTS. Additionally, existing preference optimization algorithms are typically designed for single-turn tasks and do not fully address the complexities of multi-turn reasoning and tool integration required for interactive coding agents. To bridge this gap, we introduce EntroPO, an entropy-enhanced framework that adapts existing preference optimization algorithms to the multi-turn, tool-assisted setting. EntroPO augments the preference objective to explicitly preserve policy entropy and generalizes learning to optimize over multi-turn interactions rather than single-turn responses. We validate EntroPO by fine-tuning a diverse suite of models from different families and sizes (up to 106B parameters).To maximize performance gains from TTS, we further propose a hybrid best-trajectory selection scheme combining a learned verifier model with model free approaches. On the SWEBENCH leaderboard, our approach establishes new state-of-the-art results among open-weight models. A 30B parameter model trained with EntroPO ranks 1st on SWEBENCH-LITE and 4th on SWEBENCH-VERIFIED on the open-weight leaderboard, surpassed only by models with over 10x more parameters(e.g., >$350B).

代码生成多轮推理偏好优化模型效率

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。