Efficient Model-Based Multi-Agent Mean-Field Reinforcement Learning

Barna Pásztor, Andreas Krause, Ilija Bogunovic

Abstract

Learning in multi-agent systems is highly challenging due to several factors including the non-stationarity introduced by agents' interactions and the combinatorial nature of their state and action spaces. In particular, we consider the Mean-Field Control (MFC) problem which assumes an asymptotically infinite population of identical agents that aim to collaboratively maximize the collective reward. In many cases, solutions of an MFC problem are good approximations for large systems, hence, efficient learning for MFC is valuable for the analogous discrete agent setting with many agents. Specifically, we focus on the case of unknown system dynamics where the goal is to simultaneously optimize for the rewards and learn from experience. We propose an efficient model-based reinforcement learning algorithm, $M^3$-UCRL, that runs in episodes, balances between exploration and exploitation during policy learning, and provably solves this problem. Our main theoretical contributions are the first general regret bounds for model-based reinforcement learning for MFC, obtained via a novel mean-field type analysis. To learn the system’s dynamics, $M^3$-UCRL can be instantiated with various statistical models, e.g., neural networks or Gaussian Processes. Moreover, we provide a practical parametrization of the core optimization problem that facilitates gradient-based optimization techniques when combined with differentiable dynamics approximation methods such as neural networks.

Introduction

Multi-Agent Reinforcement Learning (MARL) is notoriously difficult due to two main hurdles: non-stationarity and scalability. As agents learn and change their behavior, the environment's dynamics appear to shift from the perspective of any single agent. Furthermore, the state and action spaces grow exponentially with the number of agents ($N$), making traditional RL intractable for large swarms or traffic systems.

Mean-Field Control (MFC) bypasses these issues by considering an asymptotically infinite population of identical agents. Instead of tracking every individual, MFC tracks the distribution (the "mean-field") of agents. While this simplifies the mathematical complexity, most existing MFC solvers either assume the physics of the world are already known or use "model-free" RL, which requires millions of trials to learn even simple tasks. This paper introduces $M^3$-UCRL, the first model-based RL algorithm designed to solve MFC problems when system dynamics are unknown and samples are expensive.

Methodology: $M^3$-UCRL

The proposed algorithm, $M^3$-UCRL (Model-Based Multi-Agent Mean-Field Upper-Confidence RL), operates in episodes and follows a three-step cycle:

  1. Model Estimation: Transition data is collected to build a statistical model of the environment (e.g., using Gaussian Processes or Deep Ensembles of Neural Networks). Crucially, this model includes a measure of uncertainty (confidence bounds).
  2. Optimistic Planning: Instead of planning against the "most likely" model, the agent searches for a policy and a plausible dynamics model within the confidence bounds that together maximize the predicted reward. This "optimism-in-the-face-of-uncertainty" naturally encourages exploration of poorly understood states.
  3. Execution: The agent executes the policy in the real world, collects new data, and repeats.

To make the "optimistic planning" step computationally feasible with deep learning, the authors use a "hallucinated control" trick. They transform the uncertainty of the model into an additional virtual action that the optimizer can manipulate, allowing the use of standard gradient-based optimization techniques.

Theoretical Contributions

A major theoretical contribution is a novel analysis using the Wasserstein-1 metric to bound how errors in the learned dynamics propagate into errors in the predicted mean-field flow. This allows the authors to provide the first general regret bounds for model-based RL in MFC, proving that the algorithm achieves sublinear regret and will eventually converge to the optimal policy.

Experimental Evaluation

The algorithm was evaluated on challenging simulated benchmarks, most notably a 4-room entropy maximization task. In this 2D environment, agents start in one corner and must learn to navigate narrow corridors to spread out uniformly. This is a classic "hard exploration" task because random movement rarely finds the bottlenecks required to reach other rooms.

Evolution of agent distribution in the 4-room environment. (a) Initial state concentrated in one corner. (b) Final distribution after learning to navigate narrow corridors to maximize entropy.

Key Results

  • Staggering Sample Efficiency: In the 4-room task, $M^3$-UCRL converged to a near-optimal policy in just 30 episodes. For comparison, state-of-the-art model-free Q-learning algorithms failed to reach the same performance even after 10 million episodes, representing a $10^5 \times$ improvement.
  • High Performance: The learned policies achieved rewards within 1% of the theoretical optimum calculated with known dynamics.
  • Robustness: The algorithm successfully handled "congestion" dynamics (McKean-Vlasov dynamics) where the movement of an agent depends explicitly on the density of other agents, a scenario that often breaks simpler MARL assumptions.

Conclusion

$M^3$-UCRL demonstrates that model-based approaches can dramatically reduce the sample complexity of multi-agent learning. By focusing on a "representative agent" interacting with a global distribution, the complexity becomes independent of the number of agents. While the planning step is computationally intensive, the massive gains in sample efficiency make it a powerful tool for real-world systems where interactions are costly. Future work includes extending this framework to competitive Mean-Field Games (MFG).

Summary updated

BibTeX
@article{pasztor2023efficient,
  author = {Barna Pásztor and Andreas Krause and Ilija Bogunovic},
  title = {{Efficient Model-Based Multi-Agent Mean-Field Reinforcement Learning}},
  journal = {Accepted by TMLR},
  year = {2023},
  url = {https://openreview.net/forum?id=gvcDSDYUZx},
}
Figure