Source-linked AI summary
MetaGen: Self-Evolving Roles and Topologies for Multi-Agent LLM Reasoning
Yimeng Wang, Jiaxing Zhao, Hongbin Xie, Hexing Ma, Yuzhen Lei, Shuangxue Liu, Xuan Song, Zichen Zhang, Haoran Zhang
TL;DR
Many multi-agent systems retain fixed role libraries and execution-frozen topologies, leaving role and structure adaptation during inference as an open challenge. MetaGen generates and revises query-conditioned roles and evolves a constrained collaboration graph at inference time. It reports stronger overall benchmark performance with lower inference-token cost than prior multi-agent systems.
Problem
Many multi-agent systems use predefined roles and execution-frozen graphs, while task needs and evidence can vary during execution and topology adaptation must keep cost bounded.
Source: §1 · pp. 1–2Method
MetaGen is a training-free framework that generates and revises query-conditioned roles and iteratively updates prompts and constrained graph decisions using lightweight feedback without modifying backbone weights.
Source: §1 · p. 2, §3 · p. 2, §3.3 · p. 5Results
MetaGen achieves the strongest overall performance across five benchmarks and reports a 1.8% ↑average accuracy improvement over strongest baseline G-Designer.
Source: §4.2 · p. 6, §5 · p. 7Takeaways & Limitations
The results highlight inference-time optimization of text-level roles and discrete collaboration structure as a practical path for multi-agent reasoning.
Source: §5 · p. 7
Abstract
from arXiv · showhide
Large language models are increasingly deployed as multi-agent systems, where specialized roles communicate and collaborate through structured interactions to solve complex tasks that often exceed the capacity of a single agent. However, most existing systems still rely on a fixed role library and an execution-frozen interaction topology, a rigid design choice that frequently leads to task mismatch, prevents timely adaptation when new evidence emerges during reasoning, and further inflates inference cost. We introduce MetaGen, a training-free framework that adapts both the role space and the collaboration topology at inference time, without updating base model weights. MetaGen generates and rewrites query-conditioned role specifications to maintain a controllable dynamic role pool, then instantiates a constrained execution graph around a minimal backbone. During execution, it iteratively updates role prompts and adjusts structural decisions using lightweight feedback signals. Experiments on code generation and multi-step reasoning benchmarks show that MetaGen improves the accuracy and cost tradeoff over strong multi-agent baselines.
1 Introduction
Multi-agent systems can outperform single-agent prompting, but many use fixed role pools and execution-frozen communication protocols. MetaGen addresses this rigidity by adapting roles and topology at inference time under explicit controls.
1 Introduction
- Fixed roles and execution-frozen protocols can mismatch task needs, block mid-run structural revision, and require manual engineering.The cited issues reflect variation in task granularity, tool preferences, and error modes, as well as new evidence or contradictions during execution.Source: §1 · pp. 1–2
- Prior topology designers automate graph construction, but commonly retain predefined roles and freeze instance-specific graphs once execution begins.The introduction frames the open question as whether an MAS can generate needed roles and update its collaboration structure during inference while keeping cost bounded.Source: §1 · p. 2
- MetaGen generates and revises query-conditioned role specifications, builds a constrained graph around a minimal backbone, and updates prompts and structural decisions using lightweight feedback.It does so at test time without modifying backbone weights and uses validity checks, selective activation, edge gating, and cost-aware stopping.Source: §1 · p. 2
- MetaGen logs generated roles, selected participants, structural edits, and update-triggering feedback to support reproducibility and diagnosis.Its stated design combines dynamic roles and inference-time evolution with structured control.Source: §1 · p. 2
- The introduction claims that experiments improve the accuracy–cost trade-off over competitive multi-agent baselines, with ablations supporting complementary benefits from dynamic roles and refinement.It also identifies cross-instance accumulation as a beneficial component.Source: §1 · p. 2
2 Related Work
Prior LLM multi-agent work explores discussion, debate, specialized roles, and structured interaction patterns, while often retaining predefined roles and fixed or template-based topologies. Graph-based systems optimize interaction structures, and MetaGen treats role specifications as editable alongside topology.
2.1 Multi-agent collaboration with LLMs.
- LLM collaboration includes discussion and debate protocols, specialized roles in hierarchical pipelines, and chain, star, tree, or graph interaction patterns.These approaches exchange intermediate results, refine candidate solutions, surface contradictions, or organize decomposition and verification.Source: §2.1 · p. 2
- Despite varied collaboration patterns, many systems use predefined role pools and fixed or template-based topologies, limiting instance-specific tailoring and potentially wasting computation.The passage also connects mismatched roles and redundant interactions with hindered robustness under distribution shift.Source: §2.1 · p. 2
2.2 Multi-Agents as Graphs
- Graph-oriented systems model agent interactions as optimizable graphs; examples include MacNet and GPTSwarm [Qian et al., 2024b; Zhuge et al., 2024].DyLAN selects and routes agents, G-Designer generates communication graphs, and ARG-Designer constructs task-conditioned agent groups and links [Liu et al., 2024b; Zhang et al., 2024b; Li et al., 2025].Source: §2.2 · p. 2
- Unlike topology-focused designers that use fixed or retrieved roles, MetaGen makes both role specifications and topology editable during inference.The passage identifies coupled within-instance refinement and cross-instance accumulation as distinguishing capabilities.Source: §2.2 · p. 2
3 Method
MetaGen adapts role specifications and collaboration structure at inference time through constrained role generation and feedback-driven graph evolution. It also updates lightweight priors and retains verified roles across instances.
3 Method
- MetaGen treats role specifications and communication topology as editable entities, refining collaboration structures under constraints while bounding cost and preserving auditable traces.Its evolution operates during inference without modifying backbone weights.Source: §3 · p. 2
3.1 Problem Formulation
- Each task becomes a DAG whose nodes are roles and whose edges encode message flows; each role specifies its name, description, prompts, and capabilities or tools.Source: §3.1 · p. 3
- MetaGen jointly optimizes role specifications and collaboration structure against prediction error and inference cost, while a sparsity regularizer promotes interpretable, controllable graphs.At inference, it uses observable execution signals rather than ground-truth targets to trigger edits.Source: §3.1 · p. 3
3.2 Generative Role Space
- The Architect generates query-conditioned roles, then filters candidates for schema, structural, and safety validity before applying embedding-based diversity gating.Source: §3.2 · pp. 3–4
- Role selection balances novelty against the historical library and candidate redundancy, then admits top-K candidates that exceed a novelty threshold.The resulting roles are intended to be valid and semantically non-redundant.Source: §3.2 · p. 4
3.3 Task-Adaptive Graph Construction
- Graph construction starts from a minimal task-type backbone, combines accumulated and query-generated roles, and adds high-scoring edges subject to DAG constraints.Source: §3.3 · p. 4
- Within an instance, execution feedback such as logs, tests, validators, and consistency checks triggers role-prompt rewrites and conservative, constraint-filtered edge edits.The edits target unhelpful roles and preserve an exit path while avoiding cycles.Source: §3.3 · p. 5
- Across instances, reward-weighted updates adjust shallow role and edge priors, while passing executions can yield deduplicated, validated roles for persistent reuse.Cached roles are merged into the library as high-priority candidates for later instances.Source: §3.3 · p. 5
4 Experiments and Analyses
Across five benchmarks, MetaGen achieves the strongest overall performance, while reducing runtime-token and manual-prompt costs. Stream and corruption analyses show adaptation after distribution shifts and graceful degradation under noise; ablations find that each core component contributes to performance.
4.1 Experimental Setup
- Evaluation covers five benchmarks with accuracy-based metrics, compares single-agent and multi-agent baselines, and uses DeepSeek-V3 as the common backbone.The benchmarks span mathematical reasoning, code generation, broad knowledge and reasoning, algebraic word problems, and natural language inference.Source: §4.1 · pp. 5–6
4.2 Main Results
- MetaGen improves average accuracy by 1.8% over the strongest baseline, G-Designer, and reports gains on AQuA, MNLI, HumanEval, and GSM8K while matching the best MMLU result.The reported gains are 5.1% over ARG-Designer on AQuA, 9.4% over few-shot CoT on MNLI, 0.9% over G-Designer on HumanEval, and 0.1% on GSM8K.Source: §4.2 · p. 6
4.3 Cost Efficiency
- MetaGen uses 1.2 × 10^6 inference tokens, 85.4% fewer than G-Designer, and achieves 7.1× to 18.3× fewer end-to-end tokens than prior multi-agent systems.It also improves the accuracy-versus-manual-prompt-size frontier on HumanEval and MMLU, with the strongest advantage in the low-budget regime.Source: §4.3 · p. 6, Figure 3 · p. 6
4.4 Adaptation and Robustness
- On a 150-instance MMLU-to-MNLI-to-HumanEval stream, MetaGen improves overall accuracy by 3 points over Frozen and 2 over Random while using 7.1% and 10.9% fewer tokens, respectively.After shifts, its first-20-example cold-start accuracy is strongest with lower token cost; on the final HumanEval segment it reaches perfect accuracy without increasing tokens.Source: Figure 4 · p. 6, §4.4 · p. 7, Table 3 · p. 7
- Under node and edge corruption, MetaGen’s accuracy decreases gradually as corruption proportion rises and exhibits only mild additional drops as noise strength increases at p=0.4.The authors attribute the resilience to redundant reasoning routes and the evolving structure’s ability to reweight or bypass unreliable components.Source: Figure 5 · p. 6, §4.4 · p. 7
4.5 Ablation Study
- Removing each of role generation, learned policy, intra-task evolution, or cross-instance memory reduces performance, with role-generation removal producing the largest reported degradation.Examples include HumanEval falling from 95.1 to 92.1 without role generation and MMLU reaching 92.8 without the learned policy.Source: §4.5 · p. 7, Table 4 · p. 7
5 Conclusion
MetaGen adapts roles and collaboration structure at inference time without modifying backbone weights. Across five benchmarks, it achieves the strongest overall performance while reducing inference-token cost and manual prompt engineering; analyses also report graceful degradation under noise and strong cold-start recovery after shifts.
5 Conclusion
- MetaGen adapts role specifications and collaboration topology at inference time, improving accuracy while reducing inference-token cost and manual prompt engineering.The framework is training-free and does not modify backbone weights.Source: §5 · p. 7