Source-linked AI summary
Recursive Multi-Agent Systems
Jiaru Zou, Rui Pan, Ruizhong Qiu, Pan Lu, Shizhe Diao, Jindong Jiang, Hanghang Tong, Tong Zhang, Markus J. Buehler, Jingrui He, James Zou
TL;DR
Multi-agent systems have limited ability to co-evolve efficiently because text-based interactions introduce latency and training entire agents is difficult. RecursiveMAS instead recursively optimizes heterogeneous agents in latent space, achieving 8.3% average accuracy improvement, 1.2×–2.4× inference speedup, and 34.6%–75.6% token reduction.
Problem
Existing multi-agent adaptation methods either refine shared prompts without improving agents themselves or face difficult training and latency from text-based interactions.
Method
RecursiveMAS connects heterogeneous agents through inner and outer RecursiveLink modules and jointly optimizes the system with an inner-outer loop training paradigm.
Results
8.3% average accuracy improvement accompanies 1.2×–2.4× inference speedup and 34.6%–75.6% token usage reduction across 9 benchmarks.
Takeaways & Limitations
RecursiveMAS provides a scalable and efficient framework for multi-agent systems to collaborate, refine, and evolve recursively in latent space.
Abstract
from arXiv · showhide
Recursive or looped language models have recently emerged as a new scaling axis by iteratively refining the same model computation over latent states to deepen reasoning. We extend such scaling principle from a single model to multi-agent systems, and ask: Can agent collaboration itself be scaled through recursion? To this end, we introduce RecursiveMAS, a recursive multi-agent framework that casts the entire system as a unified latent-space recursive computation. RecursiveMAS connects heterogeneous agents as a collaboration loop through the lightweight RecursiveLink module, enabling in-distribution latent thoughts generation and cross-agent latent state transfer. To optimize our framework, we develop an inner-outer loop learning algorithm for iterative whole-system co-optimization through shared gradient-based credit assignment across recursion rounds. Theoretical analyses of runtime complexity and learning dynamics establish that RecursiveMAS is more efficient than standard text-based MAS and maintains stable gradients during recursive training. Empirically, we instantiate RecursiveMAS under 4 representative agent collaboration patterns and evaluate across 9 benchmarks spanning mathematics, science, medicine, search, and code generation. In comparison with advanced single/multi-agent and recursive computation baselines, RecursiveMAS consistently delivers an average accuracy improvement of 8.3%, together with 1.2$\times$-2.4$\times$ end-to-end inference speedup, and 34.6%-75.6% token usage reduction. Code and Data are provided in https://recursivemas.github.io.
1. Introduction
RecursiveMAS treats multi-agent collaboration as a recursively optimized computation in continuous latent space, addressing the limits of prompt-only adaptation and standalone agent improvement. It connects heterogeneous agents through lightweight RecursiveLinks and trains the integrated system with inner-outer-loop co-optimization, supported by theoretical and empirical evaluation.
- Motivation and framework: RecursiveMAS reframes multi-agent collaboration as system-level recursive computation in continuous latent space rather than separately improving each agent.The framework extends recursive language model ideas to co-evolve and scale the entire multi-agent system as an integrated whole.
- RecursiveMAS architecture: Lightweight RecursiveLinks connect agents without updating all model parameters, transmitting and refining latent states within agents and across heterogeneous models.Inner links consolidate ongoing latent thoughts during generation, while outer links bridge hidden representations across agents with different model types and sizes.
- Training: The Inner-Outer Loop trains agent links progressively, using inner-loop warm starts and outer-loop system training with gradients backpropagated through recursive computation traces.This exposes each agent to system-level feedback for progressive co-optimization.
- Theoretical analysis: RecursiveMAS theoretically targets lower runtime complexity than text-mediated interaction and stable gradient propagation across recursion rounds.Latent-space connections avoid repeated decoding of intermediate agents and mitigate gradient vanishing induced by text-based interactions.
- Empirical evaluation: The framework is evaluated on 9 benchmarks across mathematics, science, medicine, search, and code generation, using diverse model families and 4 collaboration scenarios.The scenarios are sequential reasoning, mixture-of-experts collaboration, expert-to-learner knowledge distillation, and tool-integrated deliberation.
2. Preliminary
The preliminary section defines latent-space autoregressive generation, recursive computation, and recursive multi-agent evolution as progressive refinement of continuous agent states. It also motivates flexible collaboration patterns, including sequential and mixture-style systems, within a recursive multi-agent framework.
- Auto-regressive Generation in Latent Space: Latent generation feeds each previously generated hidden state back into the model, keeping autoregressive recurrence in continuous representation space as an ongoing latent thought.Unlike standard decoding, the hidden state is not first projected into vocabulary space before the next step.
- Recursive Computation: Recursive computation reuses the same Transformer layer stack for n forward iterations, with the final recursively refined representation used for prediction.The shared layers progressively deepen the representation across recurrent rounds.
- LLM-based Multi-Agent Evolution: A multi-agent system contains N LLM agents with individual latent states whose interactions jointly produce a prediction for an input problem.The collective system state is represented as H = {H_1, ..., H_N}.
- LLM-based Multi-Agent Evolution: Recursive multi-agent evolution progressively refines the collective latent state as agents iteratively interact with one another and their own reasoning states.The refinement is intended to better align the system with the given problem.
- Collaboration Pattern: The framework considers four collaboration patterns rather than restricting multi-agent architectures to a single style, including sequential and mixture styles.Sequential collaboration assigns Planner, Critic, and Solver roles, whereas mixture collaboration runs Math, Code, and Science agents in parallel before aggregation by a Summarizer.
3. Building a Recursive Multi-Agent System
RecursiveMAS forms a recursive latent-space collaboration loop among heterogeneous LLM agents, using inner and outer RecursiveLinks to generate, transfer, and refine latent thoughts. Its design replaces text-mediated communication with efficient latent transformations and provides a two-stage recursive optimization pipeline.
- RecursiveLink Design: Inner RecursiveLinks transform each agent’s last-layer states back into input embeddings, enabling autoregressive latent-thought generation across multiple forward steps.The residual design preserves latent semantics while the transformed embedding becomes the next forward-pass input.
- RecursiveLink Design: Outer RecursiveLinks map latent thoughts between agents with different hidden dimensions, allowing each agent to condition generation on transferred information from preceding agents.After the final agent, latent outputs return to the first agent through the inner-outer link, closing the loop for recurrent refinement.
- Recursive Architecture: RecursiveMAS casts each heterogeneous agent as an RLM-like layer, with latent information recurring within and across agents to form a unified reasoning loop.Agents reason and interact in latent space, while later recursion rounds condition on previous system outputs for iterative refinement.
- Training Pipeline: Training uses inner-loop warm-up for each agent’s inner RecursiveLink, followed by outer-loop optimization of the outer RecursiveLink across the entire system.This two-stage pipeline separately prepares latent-thought generation before recursively optimizing cross-agent collaboration.
- Complexity Analysis: RecursiveMAS achieves lower end-to-end runtime complexity than text-based recursive MAS by replacing vocabulary-space decoding with latent-space transformations.The comparison is formalized in Proposition 3.1, while the stated practical rationale is that d_h ≪ |V|.
4. Learning to Recur as a Whole
RecursiveMAS learns the whole recursive system through a two-stage inner–outer procedure: agents first learn latent-thought generation, then outer links are jointly optimized across recursion rounds. Theoretical analysis shows that latent interaction preserves informative gradients where text-based recursion suffers vanishing gradients.
- Learning Procedure: RecursiveMAS trains the system in two stages: an inner loop strengthens each agent’s latent-thought generation, while an outer loop co-optimizes the unified system over recursion rounds.Only the RecursiveLink requires training, enabling whole-system co-optimization.
- Model-Level Inner-Loop Training: The inner RecursiveLink warm-starts off-the-shelf agents by aligning generated latent thoughts with ground-truth embedding semantics, avoiding explicit decoding and re-encoding.Training uses cosine-similarity regression between the agent’s last-layer latent thoughts and the target latent-thought distribution from the input embedding layer.
- System-Level Outer-Loop Training: The outer loop unrolls the system for n recursion rounds, then jointly trains all outer links with cross-entropy while backpropagation assigns shared credit from the final prediction.Preserving the full recursive computation graph enables information flow to be optimized according to each link’s global contribution.
- Learning Advantage of RecursiveMAS: With probability ≥ 1 − δ, text-based SFT during recursion has gradient norm close to 0, whereas RecursiveMAS maintains stable gradients with norm close to 1 when token entropy ≤ ε.The theorem attributes the learning advantage to informative gradients across recursion rounds and motivates latent-based rather than text-mediated interaction.
5. Empirical Evaluations
RecursiveMAS is evaluated across nine benchmarks and four collaboration patterns, consistently outperforming advanced single-agent, multi-agent, and recursive baselines. Its advantages grow with recursion depth, reaching 8.3% average performance improvement, 1.2×–2.4× inference speedup, and 34.6%–75.6% token reduction.
- Tasks and experimental setup: Evaluations span nine benchmarks covering mathematical reasoning, scientific and medical tasks, code generation, and search QA, using heterogeneous agents from Qwen, Llama, Gemma, and Mistral families.The study instantiates Sequential, Mixture, Distillation, and Deliberation collaboration styles.
- Collaboration-pattern generalization: RecursiveMAS generalizes across four collaboration patterns and improves Mixture-style systems by 6.2% over the strongest domain specialist and Deliberation-style systems by 4.8% over the original tool-calling agent.The Deliberation-style evaluation covers mathematical and search-intensive tasks, while the Mixture-style result indicates gains from cross-domain specialist interaction.
- Recursion-depth evaluation: Against text-based recursion, RecursiveMAS improves performance by 8.1% at r=1, 19.6% at r=2, and 20.2% at r=3, while accelerating inference from 1.2× to 2.4× and reducing output tokens from 34.6% to 75.6%.Both light and scaled variants show increasingly favorable performance and efficiency as recursion depth increases.
- Whole-system comparison: RecursiveMAS consistently outperforms advanced single-agent methods, alternative MAS frameworks, and recursive computation baselines, achieving an average performance improvement of 8.3% over the strongest baseline on each benchmark.Comparisons use identical backbone models and comparable training budgets, including matched trainable parameter counts, recursion depth, and training data.
- Efficiency analysis: RecursiveMAS reduces token usage by 34.6% at the first recursion round and 75.6% at r=3 because recursive interaction occurs mainly in latent space rather than repeatedly decoding intermediate text.The token reduction increases as recursion deepens, supporting more efficient system-level scaling.
6. In-depth Analyses on RecursiveMAS
The analyses show that deeper recursion progressively aligns generated answers with ground-truth semantics and can correct early errors, while moderate latent-thought length stabilizes performance. They also examine RecursiveLink alternatives and compare RecursiveMAS training costs against direct fine-tuning methods.
- RecursiveLink Design: RecursiveLink experiments compare the 2-layer residual design with 1-layer, 1-layer residual, and 2-layer non-residual alternatives.The comparison uses scaled sequential-style RecursiveMAS adapted for both Rin and Rout.
- Semantic Representations in Recursion: By recursion round r=3, generated and ground-truth answer distributions become largely aligned, whereas r=1 remains visibly shifted.The progressive alignment indicates iterative refinement of latent embeddings and corresponding answers.
- Semantic Representations in Recursion: Case studies show that deeper recursion can correct incorrect answers produced at earlier stages, supporting semantically meaningful latent thoughts.The analyses report iterative refinement toward correct final outputs.
- Optimal Length of Latent Thoughts Generation: Performance improves as latent-thought length m increases early, then stabilizes across benchmarks around m=80.This ablation evaluates a broad range of latent-thought lengths under the scaled sequential-style RecursiveMAS setting.
- Training Cost Analysis: Training-cost analysis compares RecursiveMAS with LoRA and full supervised fine-tuning using matched training data and backbone settings.Cost is estimated from GPU usage, including per-agent GPU memory and trainable parameter count.
7. Related Works
Prior work studies collaborative multi-agent systems and recursive reasoning as separate ways to address LLM limitations. RecursiveMAS extends recursive scaling to the system level, while additional related work appears in Appendix C.
- LLM-based Multi-Agent Systems: Multi-agent systems extend single-LLM reasoning through collaboration to address diverse reasoning patterns and domain-specific challenges (Su et al., 2025; Tran et al., 2025; Wu et al., 2024; Yang et al., 20…).
- LLM-based Multi-Agent Systems: Mixture-style systems run domain-expert agents in parallel and aggregate their outputs into a final decision (Wang et al., 2025b; Ye et al., 2025b; Yun et al., 2026).
- LLM-based Multi-Agent Systems: Textual-feedback methods improve multi-agent systems by using LLM-generated natural-language feedback to refine agents’ contextual inputs and instructions (Shen et al., 2025).
- Scaling Reasoning via Recursion: Recursive language models reuse shared computation blocks across recurrent rounds to increase reasoning depth and iteratively refine hidden representations (Bae et al., 2025; Geiping et al., 2025; Tang et al., 2026).
- Scaling Reasoning via Recursion: RecursiveMAS presents the first attempt to extend recursive scaling from language models to the system level; additional related works are provided in Appendix C.
8. Conclusion · Appendix · A. Theoretical Analysis
RecursiveMAS scales multi-agent collaboration through system-level recursion, combining latent-thought generation, heterogeneous-agent connections, and inner-outer optimization. The framework is reported to improve training stability and efficiency relative to text-based baselines across reasoning, code-generation, and search benchmarks.
- 8. Conclusion: RecursiveMAS scales agent collaboration through system-level recursion.
- 8. Conclusion: Inner RecursiveLink supports latent-thought generation within each agent.
- 8. Conclusion: Outer RecursiveLink connects heterogeneous agents into a collaborative system.
- 8. Conclusion: An inner-outer loop training paradigm optimizes the whole multi-agent system.
- A. Theoretical Analysis: Theoretically, RecursiveMAS produces more stable training dynamics than text-based baselines.
- 8. Conclusion: The framework improves efficiency compared to text-based baselines across mathematical and scientific reasoning, code generation, and search benchmarks.
A.1. Running Complexity Analysis … B. Experiment Setups
RecursiveMAS reduces recursive multi-agent runtime by replacing token-level decoding with latent RecursiveLink processing, while under low-entropy confident-token conditions it avoids the gradient vanishing predicted for text-based recursion. The supplied passages state these complexity and learning advantages under the listed assumptions, but provide no experiment-setup details.
- A.1. Running Complexity Analysis: Θ(N(m d^2_h + (t + m)^2 d_h)) runtime for RecursiveMAS contrasts with Θ(N(m|V|d_h + (t + m)d^2_h + (t + m)^2d_h)) for text-based Recursive MAS.The comparison is stated for systems with the same collaboration structure.
- A.1. Running Complexity Analysis: RecursiveLink adds Θ(m d^2_h), whereas text-based interaction adds Θ(m|V|d_h) for projecting each latent embedding into vocabulary logits.Both approaches share the standard Transformer computation over context and generated sequences.
- A.1. Running Complexity Analysis: The runtime advantage scales across N agents because RecursiveMAS requires Θ(N(m d^2_h + (t + m)^2d_h)) per full system, while text-based Recursive MAS retains the vocabulary-projection term.The full-system expressions follow by summing per-agent computation across N agents.
- A.2. Realistic Assumptions: The analysis treats text-based SFT as R_text(h) = W_in softmax(W_out h), assumes bounded operator norms for W_in and W_out, and analyzes RecursiveLink with Kaiming-normal W_1,W_2 and W_3 = I.These are the stated Realistic Assumptions for the learning analysis.
- A.3. Learning Advantage Analysis: Under confident tokens with entropy ≤ ε, text-based SFT suffers gradient vanishing, whereas RecursiveMAS maintains stable, near-constant gradients during looped backpropagation.The theorem characterizes the respective gradient norms as close to 0 and close to 1, with probability ≥ 1 − δ.
- A.3. Learning Advantage Analysis: The text-based gradient bound follows from the chain rule, spectral-norm sub-multiplicativity, and properties of the categorical covariance matrix and entropy.The supplied proof passages identify these steps but do not expose the omitted intermediate equations.
- A.3. Learning Advantage Analysis: For RecursiveMAS, Kaiming initialization and bounded GELU derivatives support a high-probability gradient bound consistent with stable recursive training.The proof invokes the triangle inequality and states the resulting bound with probability ≥ 1 − δ.
B.1. Evaluation Datasets … D.1. Results on Different Collaboration Patterns
RecursiveMAS is evaluated across diverse mathematical, scientific, medical, coding, and search-based benchmarks against single-agent, multi-agent, recursive, and text-communication baselines. Across collaboration patterns, it consistently improves accuracy while reducing inference cost, supporting the framework’s generality.
- B.1. Evaluation Datasets: The evaluation covers mathematical reasoning, graduate-level science, medical decision-making, functional code generation, and search-intensive multi-hop question answering.The datasets include MATH500, AIME2025/2026, GPQA-Diamond, MedQA, LiveCodeBench-v6, MBPP Plus, HotpotQA, and Bamboogle.
- B.2. Compared Baselines: RecursiveMAS is compared with LoRA and Full-SFT single-agent baselines, layered and text-gradient multi-agent methods, LoopLM, and a text-communicating recursive MAS.The baselines isolate single-agent fine-tuning, representative multi-agent collaboration, recursive latent computation, and explicit-text agent communication.
- B.3. Additional Implementation Details: Training uses role-specific supervision targets created from question-answer data across four domains, with each agent receiving input-output pairs tailored to its collaboration role.For Sequential-Style systems, separate planner and critic targets are constructed alongside the original solver answer.
- B.3. Additional Implementation Details: The implementation freezes base LLM parameters and trains only the inner and outer RecursiveLink modules, while inference uses task-specific generation limits and external Python and Tavily tools for Deliberation-Style MAS.Evaluation normalizes non-code answers and applies numerical, multiple-choice, and execution-based correctness checks.
- C. Additional Related Work: Prior latent-space collaboration work studies hidden-embedding transfer, internal-state reuse, and latent interfaces for communication across models and agents.These studies provide the related-work context for RecursiveMAS’s latent-space collaboration design.
- D.1. Results on Different Collaboration Patterns: Across Mixture, Deliberation, and Distillation collaboration patterns, RecursiveMAS consistently improves accuracy over the strongest individual agent while also providing efficiency benefits.In Distillation-Style systems, it improves the Learner and requires substantially less inference time than the Expert.
D.2. Ablations on Latent Thoughts Lengths … Prompt Template for Deliberation-Style RecursiveMAS
RecursiveMAS performance improves as transferred latent-thought length increases, saturating around m = 80. Its prompt templates implement sequential planning and critique, mixture-based specialization and aggregation, expert-to-learner distillation, and tool-assisted deliberation.
- D.2. Ablations on Latent Thoughts Lengths: m = 80 marks the approximate saturation point as RecursiveMAS performance consistently improves across all benchmarks with longer transferred latent thoughts.The results suggest that a moderate latent-thought budget is sufficient for effective latent collaboration.
- Prompt Template for RecursiveMAS: All prompt templates use the system instruction “You are a helpful assistant.”This shared system prompt appears for sequential, mixture, and distillation configurations.
- Prompt Template for Sequential-Style RecursiveMAS: Sequential-Style RecursiveMAS prompts planner, critic, and solver agents to pass latent information through planning, critique, improvement, and final answering.The solver is instructed to place the final answer inside \boxed{}.
- Prompt Template for Mixture-Style RecursiveMAS: Mixture-Style RecursiveMAS assigns math, science, and code specialists to produce domain-specific reasoning, then has a summarizer aggregate their latent information.The summarizer provides the final answer and places it inside \boxed{}.
- Prompt Template for Distillation-Style RecursiveMAS: Distillation-Style RecursiveMAS passes latent information from an expert agent to a learner agent, who uses the expert guidance to solve the question.The learner is instructed to provide the final answer inside \boxed{}.
- Prompt Template for Deliberation-Style RecursiveMAS: Deliberation-Style RecursiveMAS equips agents with web-search and Python tools, then uses reflector and tool-caller agents to improve and solve the current solution.Tool outputs use <python>, </python>, <result>, and </result> tags, while the final answer is placed inside \boxed{}.
F. Case Study on Different Recursion Rounds … Case Study of RecursiveMAS on Search Based Tasks (Bamboogle)
The case studies show RecursiveMAS improving reasoning across recursion rounds and extending the Planner–Critic–Solver loop to mathematical, medical, code-generation, and search tasks. On the illustrated MATH500 problem, it changes from an incorrect answer in Round 1 to the correct answer in Rounds 2 and 3.
- G. Examples of RecursiveMAS Across Different Downstream Tasks: Across downstream examples, RecursiveMAS applies three latent-space Planner–Critic–Solver rounds, with the third round producing the final output for each task.The math, medical, code, and search examples all show the same recursive collaboration pattern, although the supplied search excerpt stops during retrieval.
- Case Study of RecursiveMAS on Scientific and Medical Questions (AIME2026): On the AIME2026 medical question, RecursiveMAS diagnoses organophosphate poisoning and identifies atropine plus pralidoxime as the correct treatment.The diagnosis is supported by miosis, wheezing, diaphoresis, and cholinergic-crisis signs.
- Case Study of RecursiveMAS on Code Generation Tasks (MBPP Plus): On the MBPP Plus task, RecursiveMAS proposes a tuple-comparison function that checks equal lengths and verifies each second-tuple element is smaller.The supplied excerpt presents the planned logic and partial Python implementation but does not state an explicit correctness outcome.
- Case Study of RecursiveMAS on Search Based Tasks (Bamboogle): On the Bamboogle search question, RecursiveMAS decomposes the task into finding Citibank’s founding year and then identifying the U.S. president in that year.The provided passage ends at the first search query and does not include the retrieved result or final answer.