Skip to content

GBC: Gradient-Based Connections for Optimizing Multi-Agent Systems

🕒 Published (v1): 2026-06-26 00:00 UTC · Source: HuggingFace · link

Ask a follow-up

Open an assistant pre-loaded with this paper's context.

💬 Ask ChatGPT✦ Ask Claude

TL;DR

GBC models an LLM-based multi-agent system as a computational graph and propagates gradient-based signals backward through an attribution graph to achieve token-level credit assignment across agents. The companion framework AgentChord uses these attribution trajectories to guide LLM-based prompt optimization, significantly improving performance on MultiWOZ and \(\tau\)-bench, and showing that higher attribution quality correlates with better optimization outcomes.

Problem

Multi-agent LLM systems lack fine-grained credit assignment: errors in the final output often originate from specific agents or interaction steps, but existing optimization methods rely on coarse-grained signals (overall task success or reward). This makes it difficult to identify which agents or steps are responsible for failures, limiting both manual debugging and automatic optimization. Recent studies also show that MAS often fail to consistently outperform strong single-agent baselines due to miscoordination and inefficient communication.

Method

GBC has four components:

  1. Agent Graph — Models the MAS as a directed acyclic graph \(G=(V,E)\) where each agent \(v\) is a prompt–model pair \((P_v, M_v)\). Agents execute in topological order; each agent's output \(O_v = M_v(P_v + I_v)\) where \(I_v\) aggregates predecessor outputs.

  2. Gradient-Based Connection — Quantifies the contribution of each predecessor output \(O_u\) to agent \(v\) via four attribution variants: (a) mean of L1 norm of token-level gradients, (b) max of L1 norm, (c) mean of gradient–input product, (d) max of gradient–input product. The top-\(m\) predecessors (\(m=1\) by default) form an attribution graph \(G_{\text{attr}}\).

  3. Verbal Loss — A task-specific verbal loss (e.g., JGA loss comparing predicted vs. ground-truth dialogue states, or reward-based loss for tool-call correctness) is attached to the final output.

  4. Backward Propagation & Optimizer — The loss signal is backpropagated through \(G_{\text{attr}}\) to extract attribution trajectories \(\tau = [(s_0, c_0), \ldots, (\ell, L_\ell)]\) that trace errors back to source agents. An LLM-based optimizer then updates agent prompts conditioned on these trajectories and optimization history.

AgentChord implements this pipeline with a prefix-based gradient computation trick: prompt tokens are processed without gradients (KV cache only), and gradients are computed only for input tokens, reducing memory from \(O(n \cdot d \cdot L)\) to \(O((n-k) \cdot d \cdot L)\).

Key Contributions

  • GBC: A method for token-level attribution across LLM agents via gradient-based signals, enabling fine-grained credit assignment in multi-agent systems.
  • AgentChord: A scalable framework combining GBC with an LLM optimizer for attribution-guided prompt updates, plus a prefix-based memory optimization.
  • Empirical validation on MultiWOZ and \(\tau\)-bench showing that GBC-optimized multi-agent systems can surpass strong single-agent baselines, and that attribution quality correlates with optimization effectiveness.

Results

MultiWOZ (manager–worker architecture, 6 metrics): - Qwen-3-32B with mean of L1 norm: JGA 28.9 → 54.4, Slot F1 79.3 → 91.4, Inform 99.0, Success 94.0 — best overall; substantially outperforms the single-agent Qwen-3-32B baseline. - Qwen-3-32B with max of L1 norm: Inform 99.0, Success 95.0, JGA 53.0, Slot F1 91.3. - L1-norm-based variants consistently outperform gradient–input product variants. - Error analysis: cross-domain errors, information omission, and over-prediction dominate; domain-specific workers updated most frequently. - Attribution accuracy is highest for L1-norm variants (Figure 6), directly correlating with optimization success.

\(\tau\)-bench (retail domain, multi-step tool-use): - Qwen-3-32B with max of L1 norm: overall reward 13.0 → 24.3, surpassing the single-agent baseline (22.6). - Qwen-3-32B with mean of product with input: also reaches 24.3 overall reward, driven by action reward 13.9 → 27.0. - Llama-3.3-70B-It with max of product with input: overall reward 6.1 → 9.6. - Error analysis: retrieval/identification failures dominate; tool misuse and premature escalation also significant.

Limitations

  • Cross-domain errors remain the most persistent failure mode, indicating that manager-worker routing is still imperfect after optimization.
  • Success metric on MultiWOZ is more variable and harder to optimize than JGA/inform, suggesting long-horizon coordination remains a challenge.
  • Requires training data (30 samples for MultiWOZ, 10 for \(\tau\)-bench) and access to model gradients (white-box), limiting applicability to API-only models.
  • Attribution quality varies significantly across connection-weight formulations; the best variant may be task-dependent.
  • Memory is reduced but still scales with hidden dimension and layers; may not scale to very long contexts or many agents.

Relevance to Agentic AI / LLM Agents

This paper directly tackles the core obstacle holding back multi-agent LLM systems: the inability to pinpoint which agent caused a failure. By introducing token-level gradient signals as a principled credit-assignment mechanism, GBC provides a viable path to systematically debug and optimize agent chains, workflows, and role-based collaborations. For practitioners building agentic systems, AgentChord offers a concrete optimization loop that can lift MAS performance above single-agent baselines — a milestone the field has struggled to reach.