Qatten: A General Framework for Cooperative Multiagent Reinforcement Learning

Yaodong Yang, Jianye Hao, Ben Liao, Kun Shao, Guangyong Chen, Wulong Liu, Hongyao TangarXiv 2020

Abstract

In cooperative multi-agent reinforcement learning (MARL), the challenge of credit assignment—determining how individual agent actions contribute to a shared global reward—remains a central hurdle. This paper introduces Qatten (Q-value Attention network), a framework that leverages multi-head attention to decompose global Q-values. Unlike previous heuristic-based or "black-box" mixing methods, Qatten is grounded in a theoretical derivation using Taylor expansion, providing a more interpretable and effective value decomposition. Experimental results on the StarCraft Multi-Agent Challenge (SMAC) demonstrate that Qatten consistently outperforms state-of-the-art baselines, particularly in complex "Super Hard" scenarios.

Introduction

The goal of cooperative MARL is for a team of agents to learn a joint policy that maximizes a common reward. A primary difficulty is the "credit assignment" problem: in a system where only a global reward is observed, how should the contribution of each individual agent be measured?

Early approaches like Value Decomposition Networks (VDN) assumed that the global Q-value ($Q_{tot}$) is simply the sum of individual Q-values ($Q^i$). While intuitive, this additive assumption is often too restrictive for complex environments. QMIX improved upon this by allowing for non-linear mixing, provided the relationship between individual and global values remains monotonic. However, QMIX treats the mixing process as a "black box," offering little insight into the specific impact of each agent and lacking a formal theoretical justification for its architecture.

The Qatten Framework

Qatten addresses these limitations by reformulating value decomposition through the lens of mathematical approximation.

Theoretical Foundation

The authors utilize the Implicit Function Theorem and Taylor expansion to prove that the global Q-value can be approximated as a weighted sum of individual Q-values: $$Q_{tot} \approx \sum_{i=1}^N \lambda_i Q^i + c$$ where the weights $\lambda_i$ and the constant $c$ are functions of the global state. This derivation provides a rigorous basis for using attention mechanisms, as the attention weights naturally correspond to the coefficients $\lambda_i$ in the expansion.

Multi-Head Attention Mixing

To implement this decomposition, Qatten employs a multi-head attention mechanism within its mixing network. As shown in Figure 1, the architecture consists of a query derived from the global state, keys encoding individual agent features (like position or health), and values representing the individual agent's local Q-values.

The Qatten architecture featuring the multi-head attention mixing network and agent-level GRU modules.

By calculating attention scores between the global state and agent features, the model explicitly learns the "importance weight" of each agent at every timestep. To further enhance representational capacity, Qatten uses multiple attention heads, which are then combined using a secondary state-dependent weighting layer. This structure maintains the monotonicity required for stable training while allowing for highly flexible coordination strategies.

Experimental Evaluation

The framework was rigorously tested on the StarCraft Multi-Agent Challenge (SMAC), a high-fidelity benchmark for MARL. SMAC requires agents to perform precise micromanagement across various unit types and combat scenarios. The evaluation spanned three difficulty tiers: Easy, Hard (e.g., 5m_vs_6m), and Super Hard (e.g., MMM2 and 3s5z_vs_3s6z).

Results and Analysis

Qatten demonstrated superior performance across the board, particularly as the complexity of the task increased.

Median test win rates for Qatten and baselines across six representative SMAC maps, highlighting Qatten's dominance in hard and super-hard scenarios.

Performance in Complex Scenarios

In the "Super Hard" scenario 3s5z_vs_3s6z, most baseline algorithms (including QMIX and VDN) failed to achieve any wins. In contrast, Qatten reached a 16% win rate within 2 million training steps. Similarly, in the bane_vs_bane scenario involving 24 agents, Qatten significantly outperformed QMIX by effectively identifying and prioritizing the critical units that dictate the battle's outcome.

Interpretability and Strategy

A key advantage of Qatten is its interpretability. By visualizing the learned attention weights, the researchers observed that the model learns game-specific tactical priorities. For instance, the model assigns higher weights to units with high health or those that have completed their weapon cooldowns, indicating that it has learned to value agents based on their immediate potential impact on the battlefield.

Conclusion

Qatten represents a significant step forward in cooperative MARL by bridging the gap between theoretical decomposition and practical deep learning architectures. By replacing "black-box" mixing with a theoretically grounded attention mechanism, Qatten achieves state-of-the-art performance and provides valuable insights into agent coordination. Future work will explore extending this framework to continuous action spaces and scaling to environments with hundreds of agents.

Summary updated

BibTeX
@misc{yang2020qatten,
  author = {Yaodong Yang and Jianye Hao and Ben Liao and Kun Shao and Guangyong Chen and Wulong Liu and Hongyao Tang},
  title = {{Qatten: A General Framework for Cooperative Multiagent Reinforcement Learning}},
  year = {2020},
  eprint = {2002.03939},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.03939},
}
Figure