Abstract
Multi-agent reinforcement learning (MARL) often struggles with generalization across varying agent populations. We present Meta Representations for Agents (MRA), a framework that decouples game-common skills from game-specific tactics. By employing hierarchical latent variables and relational self-attention, MRA enables agents to adapt to new population sizes and strategic contexts. Our results across diverse environments demonstrate superior zero-shot and few-shot generalization compared to state-of-the-art baselines.
Introduction
Most Multi-Agent Reinforcement Learning (MARL) algorithms are "brittle." A team of agents trained to coordinate in a small group often fails when the population size changes. This occurs because optimal strategies shift as the population grows; a strategy effective for three agents may be disastrous for twelve. The core challenge is that agents typically learn a single, unimodal policy. To generalize, agents must distinguish between universal "game-common" knowledge and "game-specific" tactics that depend on the current player count.
The MRA Framework
The proposed Meta Representations for Agents (MRA) framework relies on three key pillars to achieve robust generalization:
- Relational Representation: MRA utilizes a Transformer-like self-attention mechanism to handle varying numbers of agents. This allows an agent to process an arbitrary number of neighbors into a fixed-length relational graph ($g$), prioritizing information based on situational relevance.
- Hierarchical Latent Policies: Instead of a single fixed policy, MRA learns a set of potential strategies. A low-level latent variable ($z$) acts as a "mode selector" between different attention heads, allowing the agent to switch strategic focus (e.g., from "nearest enemy" to "furthest goal") as needed.
- Diversity-Driven Optimization: To ensure latent modes are distinct and useful, the framework maximizes Mutual Information (MI) between the latent variable $z$ and observed behaviors. This unsupervised approach effectively "discovers" different strategic modes.
Additionally, MRA incorporates a first-order meta-learning approach (similar to the Reptile algorithm) for fast adaptation, providing a parameter starting point that can be fine-tuned to new populations in few gradient steps.
Experimental Evaluation
We evaluated MRA across three distinct environments within the particle-world framework:
- Treasure Collection: A cooperative task requiring agents to collect dots, tested on populations ranging from 3 to 24 agents.
- Resource Occupation: A mixed-motive task where agents compete for landmarks of varying sizes.
- Pacman-like World: A competitive predator-prey environment involving Pac-Man agents, ghosts, and food resources.
Key Insights
- Suboptimal Training as Data Augmentation: MRA intentionally trains agents under multiple strategic variations, including suboptimal ones. Learning to perform optimally under different attention patterns helps distill a robust core of game-common knowledge.
- Policy Sets vs. Unimodal Policies: A "Swiss Army knife" approach—having a library of strategies—is superior for generalization. If the environment changes, the agent is more likely to possess a strategy that remains effective.
- Nash Equilibrium Guarantee: Theoretical analysis shows that with a sufficiently large latent space, agents can reach a Nash Equilibrium in any evaluation game by selecting the appropriate latent mode.
Results and Discussion
MRA significantly outperformed standard baselines like MADDPG and EPC. In the Treasure Collection task, agents trained on small populations generalized to a 48-agent environment with high rewards. In the Pacman world, MRA's game-common knowledge provided a superior initialization, allowing agents to learn survival behaviors much faster than baselines, which often failed due to early termination by ghosts.
Limitations and Future Work
While promising, MRA faces challenges regarding the definition of a "sufficiently large" latent space for complex tasks. Currently, the framework focuses on role-symmetric, homogeneous agents; extending this to highly heterogeneous teams remains an open research question. Furthermore, while this work targets Nash Equilibrium, future research could explore other solution concepts like social optima or correlated equilibria in general-sum games.
Summary updated