LLM Collaboration with Multi-Agent Reinforcement Learning

Shuo Liu, Zeyu Liang, Xueguang Lyu, Christopher Amato · DOI

TL;DR

This paper introduces MAGRPO, a novel Multi-Agent Reinforcement Learning (MARL) algorithm designed to enable multiple Large Language Models (LLMs) to collaborate effectively on complex tasks. By framing LLM collaboration as a cooperative MARL problem, MAGRPO allows LLMs to learn coordinated strategies, leading to more efficient and higher-quality outputs in tasks like writing and coding.

What Problem Does This Paper Address?

While LLMs have shown remarkable capabilities, they are typically trained independently and lack inherent mechanisms for effective collaboration. Existing approaches to coordinating LLMs often rely on complex prompt engineering or individual rewards, which can be difficult to design and may not guarantee optimal cooperation. This paper addresses the challenge of enabling multiple LLMs to work together seamlessly and efficiently, moving beyond simple prompt-based interactions to a more principled, learned approach to coordination.

Methods

The core contribution is the Multi-Agent Group Relative Policy Optimization (MAGRPO) algorithm. MAGRPO models LLM collaboration as a cooperative MARL problem, specifically within a Decentralized Partially Observable Markov Decision Process (Dec-POMDP) framework. This allows for centralized training of agents while maintaining decentralized execution, a common and effective paradigm in MARL. MAGRPO builds upon existing RL techniques for LLMs and MARL, incorporating ideas from Group Relative Policy Optimization (GRPO). The algorithm trains multiple LLMs in a multi-turn setting, leveraging centralized group-relative advantages for joint optimization. This approach aims to overcome the limitations of independent learning and prompt-based coordination by learning cooperative policies directly.

Datasets

The authors evaluated MAGRPO on several datasets:

  • TLDR Summarization: A dataset of Reddit posts and their corresponding summaries.
  • arXiv Abstract Expansion: A dataset for expanding research paper abstracts.
  • HumanEval (HE): A dataset of 164 handwritten programming problems for code generation.
  • CoopHumanEval (CHE): A custom dataset derived from HumanEval, specifically designed to include problems with cooperative potential for LLM agents.

Key Insights and Ideas

  • MARL as a Natural Fit for LLM Collaboration: The paper convincingly argues that MARL provides a robust theoretical framework for achieving true cooperation among LLMs, moving beyond superficial prompt engineering.
  • Learned Cooperation Outperforms Prompting: Experiments demonstrate that MAGRPO, by learning cooperative policies, significantly outperforms baseline methods that rely solely on prompt-based interactions, especially in complex tasks.
  • Emergent Cooperation Schemes: MAGRPO enables LLMs to develop diverse cooperation strategies (e.g., fallback, decorator, coordinator, strategy filter) without explicit pre-definition, showcasing the flexibility of the learned approach.
  • Decentralized Execution is Key for Scalability: The MAGRPO framework's ability to maintain decentralized execution while benefiting from centralized training is crucial for scaling to real-world applications where LLMs need to act independently.

Key Results

  • Writing Collaboration: MAGRPO significantly improved response efficiency and quality in both TLDR summarization and arXiv expansion tasks. For instance, MAGRPO was observed to be up to 3 times faster than a comparable single model while achieving better results.
  • Coding Collaboration: On the HumanEval and CoopHumanEval datasets, MAGRPO demonstrated superior performance across metrics like pass@k, acc@k, and coop@k. For example, on the CHE dataset, Multi-Turn MAGRPO achieved the best performance across most metrics, including a return of 88.5%.
  • Efficiency Gains: MAGRPO achieved comparable or better speeds than baseline methods while delivering higher quality outputs, indicating efficient use of computational resources.

Limitations and Future Work

  • Homogeneous Agents: The current study focuses on homogeneous agents (e.g., all LLMs are of the same type). Future work could explore collaboration among heterogeneous agents with diverse capabilities.
  • Short Horizon and Small Models: Experiments were conducted with short horizons and relatively small LLMs due to computational constraints. Larger models and longer horizons in more complex scenarios could reveal more intricate cooperation schemes.
  • Reward Model Simplicity: The reward models used are relatively simple and could be susceptible to reward hacking. Developing more expressive and fine-grained reward models is suggested for better alignment.
  • Future Directions: The authors suggest exploring LLM collaboration through interactions with static analyzers, sandbox-based evaluations, and expert models. They also propose integrating MARL techniques into existing test-time multi-agent interaction methods.

Summary updated

BibTeX
@misc{liu2025llm,
  author = {Shuo Liu and Zeyu Liang and Xueguang Lyu and Christopher Amato},
  title = {{LLM Collaboration with Multi-Agent Reinforcement Learning}},
  year = {2025},
  eprint = {2508.04652},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.04652},
}
Figure