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

Multi-Agent Reinforcement Learning is a Sequence Modeling Problem

Muning Wen, Jakub Grudzien Kuba, Runji Lin, Weinan Zhang, Ying Wen, Jun Wang, Yaodong Yang

TL;DR

The Multi-Agent Transformer (MAT) reframes cooperative multi-agent reinforcement learning (MARL) as a sequence modeling problem. By leveraging an encoder-decoder architecture and the multi-agent advantage decomposition theorem, MAT achieves state-of-the-art performance across major benchmarks while demonstrating remarkable few-shot generalization to tasks with varying numbers of agents.

In cooperative MARL, a team of agents must learn to work together to maximize a shared reward. This is notoriously difficult due to the joint policy search problem: as the number of agents increases, the space of possible combined actions grows exponentially.

Existing solutions like MAPPO (Multi-Agent PPO) often rely on parameter sharing, which can be sub-optimal for heterogeneous agents. Others, like HAPPO, use a sequential update scheme to guarantee improvement but are computationally inefficient. Furthermore, most MARL algorithms are "brittle"—they are designed for a fixed number of agents and fail if the team size changes. The authors ask a compelling question: Can we model these complex interactions using the same sequence-modeling power that drives Large Language Models (LLMs) like GPT?

Methods: The Multi-Agent Transformer (MAT)

The core contribution is the Multi-Agent Transformer (MAT), which uses an encoder-decoder architecture to bridge the gap between MARL and sequence models:

The Multi-Agent Transformer (MAT) architecture featuring an observation encoder and an auto-regressive action decoder.
  1. Multi-Agent Advantage Decomposition: The authors utilize a theorem showing that a joint team decision can be mathematically broken down into a sequence of individual decisions. If agent $i$ knows what agents $1$ through $i-1$ chose, it can make an optimal contribution to the team.
  2. The Encoder: Takes in the observations of all agents and encodes them into latent representations. It is trained to approximate the value function (predicting future rewards).
  3. The Decoder: Generates actions for each agent one by one (auto-regressively). Crucially, it uses masked self-attention to ensure that when agent $i$ is choosing an action, it can "see" the actions already chosen by its predecessors in the sequence, but not those of its successors.
  4. Online Training: Unlike the "Decision Transformer," which is trained on static offline datasets, MAT is trained on-policy through active trial and error in the environment.

Key Insights and Ideas

  • Linear Complexity: By treating agents as a sequence, MAT reduces the complexity of the joint action space from multiplicative (exponential) to additive (linear).
  • Monotonic Improvement: The architecture's design, rooted in the advantage decomposition theorem, provides a mathematical guarantee that the joint policy will improve (or stay the same) during training, leading to high stability.
  • Agents as Tokens: By treating agents like tokens in a sentence, the model becomes naturally flexible. It doesn't matter if the "sentence" (the team) has 3 agents or 10; the Transformer can process the sequence regardless.
  • Bridging CTDE and Sequence Modeling: MAT provides a unified way to perform Centralized Training (the encoder sees everything) and Decentralized Execution (the decoder can generate actions sequentially).

Key Results

The authors evaluated MAT on four diverse and challenging benchmarks: StarCraft Multi-Agent Challenge (SMAC), Multi-Agent MuJoCo, Bi-DexHands, and Google Research Football.

Learning curves comparing MAT against baselines like MAPPO and HAPPO across various continuous control tasks.
  • State-of-the-Art (SOTA): MAT outperformed strong baselines like MAPPO, HAPPO, and QMIX across nearly all tasks. In SMAC, MAT achieved a 100% win rate on several "Hard" and "Hard+" maps where other algorithms struggled.
  • Superior Data Efficiency: MAT often reached high performance levels with significantly fewer environment steps than its competitors.
  • Few-Shot Generalization: This is perhaps the most striking result. A MAT model pre-trained on simple StarCraft tasks could be adapted to much harder, unseen tasks with different agent counts using only a tiny amount of additional data (1-10% of standard training). It even showed "zero-shot" capabilities on some robotic tasks.

Limitations and Future Work

  • Inference Latency: Because the decoder generates actions auto-regressively (one after another), there is a slight computational delay during execution. While the authors note this is manageable for the tested benchmarks, it could be a bottleneck for ultra-high-speed real-time systems.
  • Permutation Sensitivity: While the theorem holds for any agent order, the specific sequence used might affect learning speed. The authors currently use random permutations.
  • Future Directions: The authors suggest moving toward "large multi-modal sequence models" for MARL, potentially incorporating vision and language to create more generally intelligent agents.

Summary updated

BibTeX
@inproceedings{wen2022multi,
  author = {Muning Wen and Jakub Grudzien Kuba and Runji Lin and Weinan Zhang and Ying Wen and Jun Wang and Yaodong Yang},
  title = {{Multi-Agent Reinforcement Learning is a Sequence Modeling Problem}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=1W8UwXAQubL},
}
Figure