Abstract
Multi-agent coordination often suffers from scalability and structural loss when environment observations are treated as flat vectors. TransfQMix addresses these challenges by reimagining observations as a graph of entities. By employing Transformer architectures for both individual agents and the centralized mixing network, TransfQMix achieves state-of-the-art performance in complex tasks like StarCraft II and enables zero-shot transfer learning across varying team sizes.
Introduction
In Multi-Agent Reinforcement Learning (MARL), agents must learn to coordinate to achieve common objectives. Traditional methods, such as QMix, typically represent an agent's observation as a fixed-length "flat" vector. This approach introduces two significant limitations:
- Loss of Relational Structure: Observations often pertain to discrete entities (teammates, enemies, landmarks). Concatenating these into a single vector obscures the inherent spatial and functional relationships between them.
- Scalability Constraints: Fixed input sizes prevent models trained on a specific number of agents from scaling to larger groups without architectural redesign and retraining.
TransfQMix shifts the paradigm from "vector-thinking" to "graph-thinking," utilizing Transformers to process sets of entities flexibly and preserve relational information through self-attention.
Methodology
The TransfQMix architecture introduces several key innovations to the standard MARL pipeline to facilitate graph-based reasoning.
Graph-Based Observations and Transformer Agents
Instead of a flat vector, observations are structured as a matrix where each row represents an entity (vertex) with specific features. Each agent employs a Transformer block to perform self-attention over these entities, allowing it to dynamically weigh the importance of teammates or landmarks relative to itself. To maintain temporal consistency, a recurrent mechanism is integrated into the agent's hidden state.
Transformer-Based Mixing Network
In the Centralized Training, Decentralized Execution (CTDE) framework, a "mixer" network aggregates individual agent values into a global team Q-value. TransfQMix replaces standard multi-layer perceptron (MLP) mixers with a Transformer-based architecture. This allows the mixer to handle a variable number of agents and incorporate global state information more effectively. Notably, this is one of the first methods to include temporal conditioning (recurrence) directly in the centralized mixer.
Identity Features
To help the permutation-invariant Transformer understand its own role, simple binary flags are added to entity features: IS_SELF (identifying the agent itself) and IS_AGENT (identifying teammates).
Experimental Setup
The authors evaluated TransfQMix on two primary benchmarks:
- Multi-Agent Particle Environment (Spread): A coordination task where $N$ agents must occupy $N$ landmarks. Scalability was tested by increasing $N$ from 3 to 6.
- StarCraft Multi-Agent Challenge (SMAC): A high-complexity micromanagement benchmark. Evaluation focused on "Hard" and "Super Hard" maps (e.g.,
5m_vs_6m,27m_vs_30m, andcorridor) involving large unit counts and precise coordination requirements.
Key Results and Insights
TransfQMix demonstrates significant improvements in both coordination efficiency and scalability.
Performance and Scalability
In the "Spread" task, TransfQMix maintained a ~90% success rate across all team sizes. In contrast, baseline models like QMix and QPlex experienced significant performance degradation as the number of agents increased.
In StarCraft II, TransfQMix outperformed all baselines on the most challenging maps. Notably, in the 27m_vs_30m scenario—involving 57 total entities—it achieved a high win rate while standard RNN-based models failed to converge.
Zero-Shot Transfer and Efficiency
A defining feature of TransfQMix is its ability to perform zero-shot transfer. Because the architecture is independent of the number of inputs, a model trained with 4 agents can be deployed in a 6-agent scenario without additional training. Furthermore, the model is highly parameter-efficient; by sharing Transformer weights across entities, the model size remains constant (~50k parameters) regardless of environment complexity.
Discussion and Future Work
While TransfQMix offers robust scalability in terms of entity count, it remains constrained by the feature space; the type of features for entities must remain consistent across tasks. Future research directions include developing "generalist" agents capable of solving diverse StarCraft II maps simultaneously and improving the interpretability of self-attention mechanisms to better understand agent coordination strategies.
Summary updated