GBC:基于梯度的连接优化多智能体系统
GBC: Gradient-Based Connections for Optimizing Multi-Agent Systems
June 26, 2026
作者: Xiaocheng Yang, Abdulrahman Alrabah, Dilek Hakkani-Tür, Gokhan Tur
cs.AI
摘要
基于大型语言模型(LLMs)构建的多智能体系统(MAS)通过角色分工与结构化交互,为求解复杂任务提供了有前景的框架。然而,其性能常常受限于协作失调,更根本的问题在于跨智能体的细粒度信用分配缺失。现有方法通常依赖粗粒度反馈,难以定位错误究竟源于哪个智能体或交互步骤。本文提出基于梯度的连接(Gradient-Based Connections, GBC)方法,以实现多智能体系统的细粒度归因与优化。GBC将MAS建模为计算图,并引入基于梯度的连接权重,在词元级别量化每个智能体输出对下游智能体的影响程度。通过构建归因图并反向传播任务特定的损失信号,该方法能够精准识别错误来源并实现目标性提示优化。我们进一步开发了AgentChord——一种利用基于前缀的梯度计算的高效实现。在MultiWOZ和τ-bench上的实验表明,GBC提升了多智能体性能,且优于强单智能体和多智能体基线;归因质量越高,优化效果越显著。代码已开源:https://github.com/yxc-cyber/AgentChord。
English
Multi-agent systems (MAS) built on large language models (LLMs) provide a promising framework for solving complex tasks through role specialization and structured interaction. However, their performance is often limited by miscoordination and, more fundamentally, the lack of fine-grained credit assignment across agents. Existing approaches typically rely on coarse-grained feedback, making it difficult to identify which agents or interaction steps are responsible for errors. We propose Gradient-Based Connections (GBC), an approach for fine-grained attribution and optimization of multi-agent systems. GBC models a MAS as a computational graph and introduces gradient-based connection weights to quantify the influence of each agent's output on downstream agents at the token level. By constructing an attribution graph and propagating task-specific loss signals backward, our method enables precise identification of error sources and targeted prompt optimization. We further develop AgentChord, an efficient implementation that leverages prefix-based gradient computation. Experiments on MultiWOZ and τ-bench show that GBC improves multi-agent performance and outperforms strong single-agent and multi-agent baselines, and higher attribution quality is associated with greater optimization effectiveness. Code is available at: https://github.com/yxc-cyber/AgentChord.