TL;DR
ACORM (Attention-guided COntrastive Role representation learning) is a novel framework for multi-agent reinforcement learning (MARL) that automatically discovers distinct agent roles using contrastive learning. By employing an attention mechanism to help the team's "critic" focus on these learned roles, ACORM achieves state-of-the-art performance and more sophisticated coordination in complex environments like StarCraft II and Google Research Football.
The Challenge of Agent Homogenization
In cooperative MARL, researchers frequently use "parameter sharing" to accelerate learning. However, this often leads to agent homogenization, where every agent attempts to execute the exact same strategy. In reality, complex tasks require specialized, dynamic roles—much like a soccer team relying on distinct behaviors for forwards, midfielders, and defenders.
While previous "role-based" methods exist, they often depend on pre-defined responsibilities or fail to capture how roles shift dynamically during a mission. The core challenge is twofold: learning distinct, meaningful role representations from scratch, and effectively utilizing that information to improve team coordination.
The ACORM Framework
The authors propose ACORM, which introduces two major innovations to the standard centralized training with decentralized execution (CTDE) pipeline:
1. Contrastive Role Representation Learning
To distinguish between different behaviors, ACORM encodes an agent's recent history into an embedding. It then uses contrastive learning (specifically an InfoNCE loss) to ensure that agents performing similar roles have similar embeddings, while agents with different behaviors are pushed apart in the representation space. To generate "negative pairs" for this loss without manual labeling, the system periodically clusters agents using K-means; agents falling into different clusters are treated as having different roles.
2. Attention-Guided Role Coordination
In value-based MARL (like QMIX), a "mixing network" combines individual agent contributions into a total team score. ACORM enhances this by integrating a Multi-Head Attention (MHA) module. The global state acts as a "query" that "attends" to the learned role representations. This allows the mixing network to perform more expressive credit assignment—essentially, the model learns which roles are most critical to the team's success at any given moment.
Key Insights
- Roles as Emergent Behaviors: Instead of treating a "role" as a static ID, ACORM treats it as a pattern of behavior extracted from an agent's trajectory. This allows roles to emerge naturally from the task requirements.
- Dynamic Team Composition: Roles in ACORM are fluid. An agent might start in an "attacker" role but seamlessly shift to a "retreating" role if its health depletes.
- The Power of Attention in Credit Assignment: By letting the central "critic" observe the team's role distribution via attention, the model better understands why a certain state is valuable. It can recognize, for instance, that a victory was secured because one agent played a "distraction" role while others attacked.
Experimental Results
The authors evaluated ACORM on two primary benchmarks: the StarCraft II Micromanagement Challenge (SMAC) and Google Research Football (GRF).
ACORM demonstrated significant improvements over strong baselines like QMIX, RODE, and CDS:
- Superior Performance on Super-Hard Tasks: On the
corridormap in SMAC, ACORM achieved a near 100% win rate, whereas most baselines struggled to reach 50% or failed entirely. - Faster Convergence: In the
MMM2scenario, ACORM reached a high win rate in roughly half the training steps required by other state-of-the-art methods. - Stability: The learning curves for ACORM exhibited much lower variance compared to baselines, suggesting that contrastive role learning makes the training process significantly more robust.
- Ablation Success: Removing either the contrastive learning or the attention mechanism led to a noticeable drop in performance, proving that both "knowing the roles" and "attending to them" are vital for success.
Limitations and Future Work
The authors identify a few areas for future improvement. Currently, the model does not fully exploit "exploratory" trajectories (failed attempts) to learn roles, relying mostly on current successful behaviors. Additionally, the method requires choosing a fixed number of clusters ($K$) for the contrastive loss, though experiments showed the model is relatively insensitive to this hyperparameter. Finally, extending this framework to offline reinforcement learning—learning from fixed datasets without environment interaction—is highlighted as a promising future direction.
Summary updated