GBC:基于梯度的连接用于优化多智能体系统
阅读原文· arxiv.org针对大语言模型多智能体系统协作不佳与缺乏细粒度信用分配的问题,提出GBC方法。GBC将多智能体系统建模为计算图,引入基于梯度的连接权重,在token级别量化每个智能体输出对下游的影响。通过构建归因图并反向传播任务损失,实现错误源精确定位与定向提示词优化。配套开发基于前缀梯度计算的AgentChord实现。在MultiWOZ和τ-bench上实验表明,GBC提升多智能体性能,超越强单智能体与多智能体基线,且归因质量越高优化效果越好。代码已开源。
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.