arXiv:2604.14564cs.AIcs.CL2026-04ACL被引 1

多智能体协作搜索提升代码生成的强化学习性能

MARS$^2$: Scaling Multi-Agent Tree Search via Reinforcement Learning for Code Generation

论文配图:MARS$^2$: Scaling Multi-Agent Tree Search via Reinforcement Learning for Code Generation
图 1 · 摘自论文原文
  • 多个独立训练智能体在共享搜索树中协同探索
  • 在多个基准上性能超越单智能体方法,提升显著
  • 适合需要强推理能力的代码生成研究者

强化学习在代码生成等需要复杂推理的任务中表现优异,但轨迹多样性有限导致性能提升受限。搜索增强型强化学习通过结构化探索缓解此问题,但仍受单智能体策略先验制约。利用多个交互式策略可获得更丰富的探索信号,但现有方法通常与结构化搜索脱节。本文提出MARS²(Multi-Agent Reinforced Tree-Search Scaling),一个统一的强化学习框架,多个独立优化的智能体在共享树状搜索环境中协作。该框架将搜索树建模为可学习的多智能体交互环境,使异构智能体能在共享拓扑中共同生成并优化候选解。为支持有效学习,引入基于树一致奖励设计的路径级组优势函数,实现复杂搜索路径上的有效信用分配。在代码生成基准上的实验表明,MARS²在多种模型组合和训练设置下均持续提升性能,验证了多智能体协作与树搜索结合对强化学习的增强效果。代码已公开于https://github.com/TsinghuaC3I/MARTI。

原文摘要 · Abstract (English)

Reinforcement learning (RL) paradigms have demonstrated strong performance on reasoning-intensive tasks such as code generation. However, limited trajectory diversity often leads to diminishing returns, which constrains the achievable performance ceiling. Search-enhanced RL alleviates this issue by introducing structured exploration, which remains constrained by the single-agent policy priors. Meanwhile, leveraging multiple interacting policies can acquire more diverse exploratory signals, but existing approaches are typically decoupled from structured search. We propose \textbf{MARS$^2$} (Multi-Agent Reinforced Tree-Search Scaling), a unified RL framework in which multiple independently-optimized agents collaborate within a shared tree-structured search environment. MARS$^2$ models the search tree as a learnable multi-agent interaction environment, enabling heterogeneous agents to collaboratively generate and refine candidate solutions within a shared search topology. To support effective learning, we introduce a path-level group advantage formulation based on tree-consistent reward shaping, which facilitates effective credit assignment across complex search trajectories. Experiments on code generation benchmarks show that MARS$^2$ consistently improves performance across diverse model combinations and training settings, demonstrating the effectiveness of coupling multi-agent collaboration with tree search for enhancing reinforcement learning. Our code is publicly available at https://github.com/TsinghuaC3I/MARTI.

代码生成强化学习多智能体树搜索

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