NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Mava: a research framework for distributed multi-agent reinforcement learning

Arnu Pretorius, Kale-ab Tessera, Andries P. Smit, Claude Formanek, St John Grimbly, Kevin Eloff, Siphelele Danisa, Lawrence Francis, Jonathan P. Shock, Herman Kamper, Willie Brink, Herman A. Engelbrecht, Alexandre Laterre, Karim Beguir · OpenReview

Abstract

Breakthrough advances in reinforcement learning (RL) research have led to a surge in the development and application of RL. To support the field and its rapid growth, several frameworks have emerged that aim to help the community more easily build effective and scalable agents. However, very few of these frameworks exclusively support multi-agent RL (MARL), an increasingly active field in itself, concerned with decentralised decision-making problems. In this work, we attempt to fill this gap by presenting Mava: a research framework specifically designed for building scalable MARL systems. Mava provides useful components, abstractions, utilities and tools for MARL and allows for simple scaling for multi-process system training and execution, while providing a high level of flexibility and composability. Mava is built on top of DeepMind's Acme, and therefore integrates with, and greatly benefits from, a wide range of already existing single-agent RL components made available in Acme. Several MARL baseline systems have already been implemented in Mava. These implementations serve as examples showcasing Mava's reusable features, such as interchangeable system architectures, communication and mixing modules. Furthermore, these implementations allow existing MARL algorithms to be easily reproduced and extended. We provide experimental results for these implementations on a wide range of multi-agent environments and highlight the benefits of distributed system training.

Introduction

Multi-Agent Reinforcement Learning (MARL) is a critical frontier in artificial intelligence, yet it remains notoriously difficult to implement and scale. Researchers often face a trade-off between simple, readable code that is too slow for large-scale experiments, and highly optimized frameworks that are overly complex and difficult to modify. Mava addresses these challenges by providing a JAX-native research library designed for both performance and hackability. By leveraging hardware accelerators and a "clean code" philosophy, Mava enables 10x to 100x speedups over traditional frameworks, transforming experiments that once took hours into tasks completed in minutes.

Methods: The Anakin Architecture

Mava is built entirely in JAX, enabling just-in-time (JIT) compilation of the entire training loop—including policy updates, environment transitions, and gradient calculations. This allows the entire pipeline to run as a single optimized executable on GPUs or TPUs.

At the core of Mava's scalability is the Anakin Architecture, a "podracer" distributed training design. Mava utilizes jax.pmap to replicate parameters across multiple devices and jax.vmap to vectorize environment rollouts. This approach facilitates massive parallelization without the significant communication overhead typically associated with CPU-based distributed systems.

The Anakin architecture leverages JAX's pmap and vmap for efficient multi-device parallelization.

Furthermore, Mava adheres to a "Clean Code" philosophy, keeping core algorithmic logic in single, readable files. This avoids the deep nesting and complex inheritance found in many modular frameworks, making it easier for researchers to inspect and modify implementations like Multi-Agent PPO (MAPPO).

Ecosystem and Environments

Mava is designed to be an integrated component of a broader JAX-native ecosystem. It works seamlessly with Flashbax for accelerated replay buffers, OG-MARL for offline learning, and MARL-eval for statistically robust reporting. To maintain high throughput, Mava focuses on JAX-native environments such as:

  • Jumanji: Including Multi-Robot Warehouse (RWARE) and Level-Based Foraging (LBF).
  • JaxMARL: Specifically the StarCraft Multi-Agent Challenge (SMAX).
  • Matrax: A suite for fundamental matrix game testing.

Key Results: Scaling to Warp Speed

The performance gains achieved by Mava are substantial. While it is significantly faster than PyTorch-based frameworks like EPyMARL in standard configurations, its advantage grows exponentially with vectorization. With 1024 vectorized environments, Mava reaches a throughput of nearly 2 million steps per second.

Training performance on the Tiny-4ag task, demonstrating Mava's significant speedup over traditional frameworks.

In practical terms, on the RWARE "tiny-2ag" task, Mava reaches convergence in approximately 2 minutes, compared to several hours for traditional frameworks. Similarly, in StarCraft (SMAX) scenarios like the 2s3z map, Mava achieves an 85% win rate in just 54 seconds, matching baseline performance with a fraction of the wall-clock time.

Conclusion and Future Work

Mava provides a powerful starting point for MARL research, bridging the gap between performance and accessibility. While currently focused on JAX-native environments and on-policy methods, future work includes the implementation of the Sebulba architecture to support non-JAX environments and the expansion of the library to include off-policy algorithms like QMIX and MASAC.

Summary updated

BibTeX
@misc{pretorius2021mava,
  author = {Arnu Pretorius and Kale-ab Tessera and Andries P. Smit and Claude Formanek and St John Grimbly and Kevin Eloff and Siphelele Danisa and Lawrence Francis and Jonathan P. Shock and Herman Kamper and Willie Brink and Herman A. Engelbrecht and Alexandre Laterre and Karim Beguir},
  title = {{Mava: a research framework for distributed multi-agent reinforcement learning}},
  year = {2021},
  eprint = {2107.01460},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2107.01460},
}
Figure