Abstract
Multi-Agent Reinforcement Learning (MARL) faces significant hurdles in partial observability and cross-task generalization. This paper presents MA2RL, a framework that adapts Masked Autoencoders (MAE) to the MARL domain. By treating an agent's local observations as dynamically "masked" versions of the global state, MA2RL enables agents to infer hidden entities. This generative self-supervised approach improves sample efficiency, asymptotic performance, and zero-shot transferability in complex environments like SMAC and MPE.
Introduction
Training policies that generalize across diverse tasks—such as varying numbers of agents or action spaces—remains a core challenge in MARL. While recent research has explored task-independent "skills," these methods often falter in Decentralized Partially Observable Markov Decision Processes (Dec-POMDPs). In these settings, agents lack a global view, leading to two primary issues: a lack of global coordination and inconsistent skill semantics due to restricted inputs.
Existing self-supervised methods in MARL primarily utilize contrastive learning. However, they often overlook the potential of generative models, like Masked Autoencoders, to reconstruct missing environmental information. MA2RL bridges this gap by framing partial observability as a natural masking mechanism, allowing agents to actively "fill in the blanks" of the game state.
Methodology: Adapting MAE to MARL
MA2RL re-imagines the environment as a collection of "entities." Unlike standard MAEs that mask random image patches or text tokens, MA2RL uses the agent's field of view to define masking.
Dynamic Entity Masking
Entities visible to an agent are considered "unmasked" tokens, while those outside its view are "masked." Because visibility changes as agents move, the masking ratio is dynamic rather than fixed. This approach allows the model to learn from the inherent structure of the environment's observability constraints.
Latent Reconstruction and Temporal Inference
Instead of reconstructing high-dimensional raw state data, MA2RL employs Variational Autoencoders (VAEs) to map observations into Gaussian latent distributions. The model then reconstructs the latent representations of unobserved entities. To handle temporal dependencies, a Gated Recurrent Unit (GRU) processes historical trajectory data, allowing the agent to infer the current state of previously seen but now hidden entities (e.g., remembering an enemy's last known position).
Attentive Action Decoder
The policy network integrates both observed and inferred latent states. By reusing the VAE's decoder, the model grounds these representations into actionable semantics. A skill attention module then selects the optimal action based on the combined latent information.
Comparison with Existing Masking Strategies
MA2RL differs from other masked MARL approaches like MA2CL (which uses contrastive loss) and MaskMA (which uses supervised learning loss). By focusing on reconstruction loss in the latent space, MA2RL more effectively captures the underlying environmental structure needed for decision-making.
Experimental Evaluation
The authors evaluated MA2RL on two prominent benchmarks: the StarCraft Multi-Agent Challenge (SMAC) and the Multi-Agent Particle Environment (MPE).
Performance on SMAC
On hard and superhard SMAC maps (e.g., 6h_vs_8z, 3s5z_vs_3s6z), MA2RL significantly outperformed state-of-the-art baselines including MAPPO and UPDeT. It achieved higher win rates with faster convergence and lower variance, demonstrating that inferring hidden entities stabilizes the learning process. In multi-task settings, MA2RL showed superior mastery across maps of varying difficulty.
Zero-Shot Generalization in MPE
In the MPE "Spread" task, MA2RL demonstrated remarkable zero-shot transfer capabilities. A model trained on a 4-agent/4-landmark configuration successfully generalized to a 2-agent/2-landmark setup without any fine-tuning, significantly outperforming previous SOTA methods like DT2GS.
Discussion and Key Insights
A central insight of this work is that partial observability is essentially a masking problem. This conceptual bridge allows MARL to leverage the power of self-supervised generative learning. Furthermore, the results suggest that reconstructing latent space is more effective than raw space. Predicting Gaussian distributions allows the model to learn high-level semantics without the computational burden of exact state reconstruction. Finally, ablation studies confirmed that reusing the VAE decoder within the action decoder is critical for grounding inferred states into the policy.
Limitations and Future Work
While MA2RL shows great promise, it currently relies on online reinforcement learning, which is sample-intensive. Future research could explore its application in offline MARL settings, which are more relevant to real-world, data-constrained scenarios. Additionally, while the model generalizes well within a specific game engine (like SMAC), it is currently restricted to one domain at a time. The ultimate goal is to develop a universal generalist agent capable of zero-shot transfer across entirely different game types.
Summary updated