Source-linked AI summary
G-Designer: Architecting Multi-agent Communication Topologies via Graph Neural Networks
Guibin Zhang, Yanwei Yue, Xiangguo Sun, Guancheng Wan, Miao Yu, Junfeng Fang, Kun Wang, Tianlong Chen, Dawei Cheng
TL;DR
Practitioners face a choice among communication topologies whose suitability can vary with task difficulty and token cost. G-Designer uses a variational graph auto-encoder to design task-aware topologies, and the paper reports gains across performance, token use, and adversarial robustness. The reported results include outperforming state-of-the-art topologies on MMLU and HumanEval while reducing token consumption by up to 92.24%.
Problem
Topology suitability varies across tasks, making it difficult to choose a communication structure that balances solution quality and token cost.
Source: §1 · p. 2Method
G-Designer uses a variational graph auto-encoder to encode agents and task-specific information and decode customized communication topologies.
Source: §1 · p. 2Results
Across six benchmarks, G-Designer surpasses state-of-the-art topologies by 0.20%–4.10% on MMLU and HumanEval, reduces token consumption by up to 92.24%, and has a 0.3% accuracy drop under adversarial attacks.
Source: §1 · p. 2Takeaways & Limitations
Abstract
from arXiv · showhide
Recent advancements in large language model (LLM)-based agents have demonstrated that collective intelligence can significantly surpass the capabilities of individual agents, primarily due to well-crafted inter-agent communication topologies. Despite the diverse and high-performing designs available, practitioners often face confusion when selecting the most effective pipeline for their specific task: \textit{Which topology is the best choice for my task, avoiding unnecessary communication token overhead while ensuring high-quality solution?} In response to this dilemma, we introduce G-Designer, an adaptive, efficient, and robust solution for multi-agent deployment, which dynamically designs task-aware, customized communication topologies. Specifically, G-Designer models the multi-agent system as a multi-agent network, leveraging a variational graph auto-encoder to encode both the nodes (agents) and a task-specific virtual node, and decodes a task-adaptive and high-performing communication topology. Extensive experiments on six benchmarks showcase that G-Designer is: \textbf{(1) high-performing}, achieving superior results on MMLU with accuracy at $84.50\%$ and on HumanEval with pass@1 at $89.90\%$; \textbf{(2) task-adaptive}, architecting communication protocols tailored to task difficulty, reducing token consumption by up to $95.33\%$ on HumanEval; and \textbf{(3) adversarially robust}, defending against agent adversarial attacks with merely $0.3\%$ accuracy drop.
1. Introduction
Multi-agent topologies can perform differently even within one dataset, leaving practitioners to choose between solution quality and communication cost. G-Designer addresses this by defining design criteria and generating task-aware communication topologies; experiments report performance, adaptability, and robustness gains.
1. Introduction
- Topology suitability varies with task difficulty: on High School Biology, chain matches GPTSwarm while using 0.5k versus 7.8k tokens, whereas on College Mathematics GPTSwarm leads chain by 8.75%.The comparison motivates selecting a topology that balances solution quality and communication cost for the task.Source: §1 · p. 2
- MACP says a suitable topology should produce a qualified solution, adapt complexity to task demands, and remain reliable under adversarial attacks.The protocol is presented as guidance for LLM multi-agent topology design.Source: §1 · p. 2
- G-Designer uses a variational graph auto-encoder to encode agents and task-specific information, then decode customized communication topologies with sparsity regularization.The paper contrasts this input-dependent design with prior approaches that use static structures across queries and tasks.Source: §1 · p. 2
- Across six benchmarks, G-Designer surpasses state-of-the-art topologies by 0.20%–4.10% on MMLU and HumanEval, reduces token use by up to 92.24%, and incurs a 0.3% accuracy drop under adversarial attacks.The reported MMLU cost is 1.5e + 5 versus 2.6e + 6 for state-of-the-art methods.Source: §1 · p. 2
2. Related Works
Prior LLM-agent collaboration systems use a range of communication structures, from independent agents to chains, stars, trees, and graphs. Although graph-based approaches explicitly represent agent organization, the cited designs remain input-independent and do not adapt topology to a task’s complexity.
LLM-agent Collaboration
- LLM-agent collaboration topologies include non-interactive, chain, star, tree, and graph structures, with examples spanning systems such as LLM-Debate, MetaGPT, AutoGen, SoA, and GPTSwarm.Graph structures include complete and random graphs.Source: §2 · pp. 2–3
Multi-agents as Graphs
- Graph-based views of LLM agents became explicit in systems including ChatLLM, DyLAN, GPTSwarm, and MacNet, but these approaches remain input-independent.Earlier systems also modeled interactions implicitly, including ChatEval, AutoGen, and DSPy.Source: §2 · p. 3
- The related-work section identifies a gap: existing graph designs do not adapt topologies to the complexity of the specific task.The paper frames this limitation as the reason they are not task-aware.Source: §2 · p. 3
3. Formalization
The formalization models LLM-based multi-agent systems as directed graphs whose edges carry information between agents. It specifies how agents exchange messages and produce solutions, then defines MACP as an objective balancing output utility, system overhead, and robustness to adversarial perturbations.
3.1. Topology Structure
- The system is modeled as a directed graph G = (V, E), with each node representing an agent and edges representing information flow.Connectivity is also represented by a nonsymmetric binary adjacency matrix A.Source: §3.1 · p. 3
- Each agent comprises a language model, an assigned role, accumulated knowledge and interaction history, and available external tools or plugins.Examples of plugins include web searchers, code compilers, and file readers.Source: §3.1 · p. 3
- An agent receives a system prompt containing its role and state, plus a user prompt that may include the task, other agents’ messages, and retrieved knowledge; it generates a response.The response can be a rationale, answer, or partial solution, depending on context.Source: §3.1 · p. 3, §3.2 · p. 3
3.2. Communication Pipeline
- For a query, agents engage in K rounds of utterances, and an execution order ensures an agent runs only after the agents from which it receives information.A mapping function determines the execution sequence at the start of each round.Source: §3.2 · pp. 3–4
- At each dialogue round’s end, an aggregation function combines agents’ responses to generate the system answer or solution.Options include majority voting, delegating final-answer generation to one agent, or using one agent’s output.Source: §3.2 · p. 3
- Figure 3 presents the workflow for designing G-Designer’s communication topologies.The caption identifies it as the designing workflow of the proposed system.Source: Figure 3 · p. 4
3.3. MACP Protocol
- MACP’s optimization principle combines maximizing system-output utility, minimizing graph computational and communication overhead, and constraining output deviation under adversarial perturbation.The objective’s terms correspond to performance, task-adaptiveness, and robustness, respectively.Source: §3.3 · p. 4
4. G-Designer
G-Designer constructs a task-specific multi-agent network, uses a graph auto-encoder to design its communication topology, and optimizes the resulting system. Its design refines a simple anchor topology into a sparse graph intended to support task-aware collaboration.
4. G-Designer
- The paper presents G-Designer as a pipeline that constructs a task-specific network, designs its topology, and uses that graph for multi-round collaboration.The pipeline is organized into Construct, Design, and Optimize stages.Source: §4 · p. 4
4.1. Multi-agent Network Construction
- G-Designer constructs a task-specific network from agent profiles, roles, states, and tools, adding a query-encoded virtual task node connected bidirectionally to every agent.A user-defined or automatically generated anchor topology supplies a simple starting structure for subsequent optimization.Source: §4.1 · pp. 4–5
4.2. Designing Communication Topology
- A variational graph auto-encoder encodes the network into latent agent representations and decodes them into a communication topology.The encoder uses a two-layer GCN in this implementation; the decoder constructs a sketched graph before refining it.Source: §4.2 · p. 5
- The decoder first sketches a communication graph from latent agent representations, then refines it into a sparse topology grounded in the sketch and anchor topology.The refinement uses anchor and sparsity regularization; the resulting graph guides inter-agent message passing.Source: §4.2 · pp. 5–6
4.3. Optimizing G-Designer
- The overall optimization combines utility, anchor, and sparsity losses, with policy gradients used because the utility objective is intractable and non-differentiable.The utility can depend on external API calls.Source: §4.3 · p. 6
- Training on a small query subset and fixing the learned parameters for the remaining queries develops task-aware, customized topology design.Agents use the designed graph for K interaction rounds before producing a final solution.Source: §4.3 · p. 6
5. Experiments
Across six benchmarks, the experiments evaluate G-Designer’s performance, task adaptation, efficiency, and robustness against existing methods. The analyses also examine how its design components contribute to those properties.
5.1. Experimental Setup
- The evaluation covers general, mathematical, and code tasks, using MMLU, GSM8K, MultiArith, SVAMP, AQuA, and HumanEval against single-agent and multi-agent baselines.Multi-agent baselines include communication topologies and frameworks such as AutoGen, MetaGPT, DyLAN, and GPTSwarm.Source: §5.1 · p. 6
5.2. Main Results
- G-Designer achieves the best performance on five of six benchmarks; on GSM8K it trails only PHP, while on HumanEval it beats MetaGPT by 4.0% at pass@1.It also outperforms GPTSwarm and DyLAN on HumanEval by 0.20%–1.41%.Source: Table 1 · p. 7, §5.2 · p. 7
- Across HumanEval and GSM8K, G-Designer uses a minimal Algorithm Designer → Programmer topology for a simple task and more intricate graphs for complex tasks.Its performance gain also grows more steeply than GPTSwarm’s as agent count rises from 5 to 20; at 20 agents, it uses 6.11% of GPTSwarm’s prompt tokens while surpassing it by 2.44%.Source: §5.2 · p. 7
- On MMLU, HumanEval, GSM8K, and SVAMP, G-Designer achieves the highest performance and lowest token cost among the compared topologies.On SVAMP, it surpasses DyLAN by 4% while using 23.7% of DyLAN’s token cost.Source: Figure 4 · p. 7, §5.2 · p. 8
- Training G-Designer with up to 1000 agents requires less than 4GB of memory, and Table 2 compares its training and inference efficiency on GSM8K.The reported dimensions include GPU cost, token cost, and wall-clock time.Source: §5.2 · p. 8, Table 2 · p. 8
5.3. Robustness Analysis
- Under simulated partial system-prompt attacks, G-Designer maintains nearly identical pre- and post-attack performance, while DyLAN and AutoGen lose 6.2% and 9.9% accuracy.The authors attribute this resilience to agent encoding that can detect malicious inputs and prune corresponding edges during optimization.Source: §5.3 · p. 8
5.4. Framework Analysis
- Removing the task virtual node causes the largest performance drop; removing the anchor topology also degrades performance, while removing sparsity regularization increases attack vulnerability.The authors report that G-Designer improves over its chain anchor by 9.50% on GSM8K and 8.44% on SVAMP.Source: §5.4 · p. 8
6. Conclusion
The conclusion presents MACP as guidance for multi-agent system design and G-Designer as an automated designer of task-aware communication topologies. It emphasizes compactness and robustness as task complexity varies.
- G-Designer dynamically crafts compact and robust communication topologies based on task complexity.Source: §6 · p. 8
- The paper presents the Multi-agent Communication Protocol (MACP) as guidance for designing complex multi-agent systems.Source: §6 · p. 8
- The authors hope G-Designer will inspire research on self-organizing and self-evolving collective intelligence.Source: §6 · p. 8
Impact Statement
The impact statement describes G-Designer as a practical solution for choosing task-specific communication topologies and as a possible foundation for future collective-intelligence research. It conditions its claim about harmful content on the base LLM being aligned with human values.
- The authors state that the paper is free of ethical concerns across its motivation, design, experiments, and data usage.Source: Impact Statement · p. 9
- G-Designer addresses the challenge of choosing a communication topology for a specific task and offers a practical solution for multi-agent deployment.Source: Impact Statement · p. 9
- The authors say the system will not generate harmful content as long as its base LLM is aligned with human values.Source: Impact Statement · p. 9
A. Algorithm Workflow
The workflow encodes agent and task information into a multi-agent network, then decodes a communication graph. It uses the resulting graph to guide collaboration and update the designer.
- The workflow encodes each agent’s base, role, and plugin information, and encodes the query as a task-specific node alongside an anchor topology.Source: A. Algorithm Workflow · p. 13
- The graph auto-encoder encodes the network into latent agent representations, sketches a graph, then decodes the communication graph from the sketch.Source: A. Algorithm Workflow · p. 13
- The workflow iterates multi-agent collaboration, aggregates the solution, and updates the G-Designer parameters using a learning rate.Source: A. Algorithm Workflow · p. 13
B. Dataset Statistics
The section points readers to Table 4 for dataset statistics.
- Dataset statistics are presented in Table 4.Source: B. Dataset Statistics · p. 13
C. Case Study
The case study visualizes G-Designer’s designed topologies across query difficulties on HumanEval and GSM8K.
- Figure 6 visualizes topologies designed for varying query difficulties on HumanEval and GSM8K.Source: C. Case Study · p. 13
D. Supplementary Results
The supplementary materials identify dataset statistics, topology examples, GPU costs as agent counts increase, and configuration comparisons on MMLU.
- Table 4 provides dataset descriptions and statistics.Source: Table 4 · p. 14
- Figure 6 shows designed communication topologies on HumanEval and GSM8K.Source: Figure 6 · p. 14
- Table 5 presents G-Designer’s GPU cost as the number of agents increases.Source: Table 5 · p. 14
- Table 6 compares accuracy, time, token consumption, and cost across agent configurations on MMLU using gpt-3.5-turbo.Source: Table 6 · p. 15