Scaling Multi-Agent Reinforcement Learning (MARL) to hundreds of agents is computationally brutal. Sharing parameters in multi-agent deep reinforcement learning has historically played an essential role in allowing algorithms to scale. However, this paper introduces Selective Parameter Sharing (SePS), a method that automatically identifies which agents have similar goals and dynamics, clustering them to share neural network parameters. This approach combines the sample efficiency and speed of parameter sharing with the representational capacity of independent networks, allowing MARL to scale to 200+ heterogeneous agents without suffering from gradient interference.
The Bottleneck in MARL Scaling
In MARL, training a separate neural network for every single agent—known as No Parameter Sharing (NoPS)—scales terribly. If you have 100 agents, you need 100 networks, which requires massive amounts of memory and compute.
To bypass this, researchers often use Full Parameter Sharing (FuPS), where all agents share a single policy network. While highly sample-efficient, it assumes agents are largely homogeneous. If agents have different abilities, observation spaces, or goals (e.g., a team of robots where some are cooks and some are waiters), forcing them to share a single network causes catastrophic interference. Agents essentially "forget" their own required behaviors when the network updates to accommodate a different type of agent. Even conditioning the shared network on the agent's ID (FuPS+id) fails to solve this bottleneck.
The authors tackle the challenge of finding the "Goldilocks" zone: sharing parameters to gain efficiency, but only among agents that actually need to learn similar behaviors.
Introducing Selective Parameter Sharing (SePS)
The authors propose SePS, which splits the training process into two distinct phases: Unsupervised Agent Clustering and Selective RL Training.
1. Unsupervised Agent Clustering (Pre-training)
Before the actual RL training begins, agents take random actions in the environment to collect a small dataset of trajectories. The authors train an encoder-decoder model (using a Variational Autoencoder framework) on this data.
As shown above, the encoder takes an agent's ID and maps it to a latent distribution. The decoder takes this latent representation, along with the agent's current observation and action, and tries to predict the agent's next observation and reward. Because the agent ID is bottlenecked through the latent space, the encoder is forced to capture the intrinsic dynamics and goals of that specific agent. The authors then apply $k$-means clustering to these latent representations to group similar agents.
2. Selective RL Training
Once the clusters are formed, one policy network is initialized per cluster. Agents within a cluster share that network's parameters.
This architecture allows multiple agents to map to a smaller, optimized set of policies. The teams are then trained using standard MARL algorithms (specifically, A2C), avoiding the computational bloat of NoPS and the gradient interference of FuPS.
Experimental Datasets
The authors evaluate SePS across four environments, including custom benchmarks designed to test heterogeneity:
- Blind-Particle Spread (BPS & BPS-h): Custom Multi-Agent Particle Environments where agents must navigate to specific colored landmarks but cannot see their own color. BPS-h adds heterogeneous observation spaces.
- Coloured Multi-Robot Warehouse (C-RWARE): A sparse-reward logistics environment where different robots can only deliver specific colored shelves.
- Level-based Foraging (LBF): A cooperative grid-world where agents of varying levels must team up to collect food.
- StarCraft Multi-Agent Challenge (SMAC): Specifically the "MMM2" map, featuring highly distinct unit types (Marines, Marauders, and Medivacs).
Key Insights and Results
- Network capacity isn't the problem; gradient interference is: The authors tested scaling up the size of a fully shared network (FuPS+id) to see if more parameters would help it learn distinct behaviors. It still failed. The issue is that gradients from different tasks actively interfere with one another during backpropagation.
- Dynamics dictate identity: By forcing a VAE to predict an agent's next state and reward, the latent space naturally organizes agents by their underlying "type." For example, in SMAC, the encoder perfectly separated Medivacs (healers) from Marines (attackers) in the latent space without any manual labeling.
- Massive Scalability and Speedup: In the BPS-h(3) environment with 200 agents, training with independent networks (NoPS) was computationally infeasible. SePS successfully clustered the agents and solved the environment. Furthermore, by reducing the number of trainable parameters, SePS drastically cuts training time. In 30-agent environments, SePS required roughly half the median time per timestep compared to NoPS, while achieving better final performance.
- Superior Returns: SePS achieved the highest maximum evaluation returns across almost all tested environments, outperforming NoPS, FuPS, and FuPS+id.
Limitations and Future Work
While powerful, SePS relies on static clustering before RL training begins based on initial random trajectories. If agents have identical dynamics early on but need to diverge into specialized roles later in the episode or training process, SePS will incorrectly lock them into the same shared network. Similarly, if agents are physically identical but the optimal strategy requires them to take on distinct roles, SePS will group them together, potentially limiting strategic diversity.
Future work suggests that dynamically retraining the encoder-decoder model during the RL phase could allow agents to shift clusters as their policies and required roles evolve over time.
Summary updated