Offline Pre-trained Multi-Agent Decision Transformer: One Big Sequence Model Tackles All SMAC Tasks

Linghui Meng, Muning Wen, Yaodong Yang, Chenyang Le, Xiyun Li, Weinan Zhang, Ying Wen, Haifeng Zhang, Jun Wang, Bo Xu

Abstract

This paper introduces the Multi-Agent Decision Transformer (MADT), a novel framework that applies large-scale sequence modeling to offline Multi-Agent Reinforcement Learning (MARL). By framing multi-agent coordination as a sequence prediction task, MADT enables a single universal model to master diverse StarCraft II scenarios and generalize to unseen tasks with zero-shot or few-shot efficiency. We provide the first large-scale offline MARL dataset and demonstrate that MADT significantly outperforms traditional offline RL baselines while offering massive speedups in online fine-tuning.

Introduction

Multi-Agent Reinforcement Learning (MARL) is notoriously difficult due to the non-stationarity of environments where multiple agents must learn to coordinate. Traditionally, this requires massive amounts of online interaction, which is often expensive, slow, or dangerous. While fields like Natural Language Processing (NLP) have transitioned to a "pre-train and fine-tune" paradigm using large-scale sequence models, MARL has lagged behind due to a lack of offline datasets and the instability of standard RL algorithms when learning from static data.

The authors address this by proposing the Multi-Agent Decision Transformer (MADT). By treating multi-agent coordination as a sequence modeling problem, they aim to build a universal policy capable of generalizing across different tasks within the StarCraft Multi-Agent Challenge (SMAC) ecosystem.

Methodology

Architecture and Training Pipeline

Instead of relying on traditional Temporal Difference (TD) learning, MADT utilizes a Causal Transformer architecture. The model treats trajectories—sequences of states, observations, and actions—as "tokens," learning to predict the next action based on the interaction history.

The MADT architecture utilizes a Causal Transformer to process agent trajectories as sequences, supporting both actor and critic networks.

To handle the diversity of SMAC maps, which feature varying numbers of agents and observation sizes, the authors implemented a universal architecture using parameter sharing, zero-padding for features, and action masking. The training follows an offline-to-online pipeline: the model is first pre-trained on static datasets via supervised learning and then integrated with Proximal Policy Optimization (PPO) for online fine-tuning. In this phase, the Transformer serves as the backbone for both the actor (policy) and the critic (value estimator).

The First Large-Scale Offline MARL Dataset

A key contribution of this work is the release of the first large-scale offline MARL dataset based on StarCraft II. It includes millions of samples across maps ranging from "Easy" to "Super Hard," capturing trajectories of varying quality (poor, medium, and good) to provide a robust benchmark for offline research.

Results and Discussion

Performance and Generalization

MADT demonstrated clear superiority over state-of-the-art offline RL baselines, such as BCQ-MA and ICQ-MA, across nearly all tested StarCraft maps.

Performance comparison of MADT against offline MARL baselines across various SMAC scenarios, demonstrating superior average returns.

Beyond raw performance, the model exhibited remarkable sample efficiency and transferability:

  • Efficiency: On the "3s vs 5z" (Hard) map, a pre-trained MADT reached a 100% win rate in just 150,000 samples, whereas a standard MAPPO algorithm required 2,000,000 samples.
  • Zero-Shot Coordination: Models trained on a subset of maps performed surprisingly well on entirely unseen maps without additional training, suggesting the model learns general principles of unit micro-management rather than map-specific heuristics.

Technical Insights

The researchers identified that the "reward-to-go" input—a staple in single-agent Decision Transformers—actually hindered performance during online fine-tuning in MARL. This was attributed to a distribution shift: early online exploration often yields low rewards, which conflicts with the high-reward targets learned from offline data. Removing this input made the model more robust for adaptation. Furthermore, by treating RL as a prediction task, MADT avoids the "deadly triad" of RL (off-policy learning, function approximation, and bootstrapping), leading to greater stability in offline settings.

Conclusion

MADT represents a significant step toward a "Foundation Model" for multi-agent systems. By leveraging the scalability of Transformers and the stability of sequence modeling, the framework overcomes traditional MARL bottlenecks. Future work will focus on scaling these models to even more diverse environments and bridging the gap between static data and dynamic real-world robotics applications.

Summary updated

BibTeX
@misc{meng2021offline,
  author = {Linghui Meng and Muning Wen and Yaodong Yang and Chenyang Le and Xiyun Li and Weinan Zhang and Ying Wen and Haifeng Zhang and Jun Wang and Bo Xu},
  title = {{Offline Pre-trained Multi-Agent Decision Transformer: One Big Sequence Model Tackles All SMAC Tasks}},
  year = {2021},
  eprint = {2112.02845},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2112.02845},
}
Figure