Parameter Sharing For Heterogeneous Agents in Multi-Agent Reinforcement Learning

Justin K. Terry, Nathaniel Grammel, Sanghyun Son, Benjamin BlackarXiv 2020

Abstract

In Multi-Agent Reinforcement Learning (MARL), training individual networks for each agent is computationally prohibitive. Parameter sharing offers a scalable alternative but traditionally requires agents to be homogeneous. This work formalizes the use of "agent indication"—tagging observations with agent IDs—to enable parameter sharing among heterogeneous agents. We provide theoretical guarantees for optimal policy convergence and introduce practical padding methods for agents with diverse observation and action spaces. Our empirical evaluation identifies "color inversion" as a robust and high-performing indication strategy for image-based MARL environments.

Introduction

Multi-Agent Reinforcement Learning (MARL) often employs parameter sharing to mitigate the computational cost of training separate neural networks for every agent. However, standard parameter sharing assumes agents are identical (homogeneous). In scenarios where agents have distinct roles or physical capabilities (heterogeneity), a single shared network struggles to learn specialized behaviors from identical inputs. While practitioners often append agent IDs to observations to differentiate agents, this approach lacked formal theoretical justification and clear implementation standards for complex visual inputs.

Theoretical Framework and Heterogeneity

The authors establish a formal proof showing that if observation spaces are disjoint, a single shared policy can represent the collection of optimal individual policies. Agent indication effectively creates these disjoint spaces, theoretically guaranteeing that parameter sharing can reach optimal solutions.

To address physical heterogeneity—where agents have different field-of-view sizes or available moves—the paper introduces two padding strategies:

  1. Observation Padding: Smaller observation tensors are zero-padded to match the dimensions of the largest observation space.
  2. Action Padding/Clipping: The network outputs a vector corresponding to the largest action space; agents with fewer actions ignore or clip the extraneous outputs.

Image-Based Agent Indication

For environments with visual inputs, the paper proposes and evaluates five distinct methods to "tag" agents within the observation stream:

Visual representation of the five proposed image-based agent indication methods: Identity, Geometric, Binary, Inversion, and Inversion with Replacement.
  • Identity: The baseline method with no modifications.
  • Geometric: Appends a checkerboard pattern channel.
  • Binary: Appends channels that are entirely black or white based on the agent ID.
  • Inversion: Appends a channel containing a color-inverted version of the original observation.
  • Inversion with Replacement: Replaces the original observation with its inverted version for specific agents.

Experimental Evaluation

The methods were tested across five diverse environments from the PettingZoo library:

  • Cooperative Pong: Requires coordination between differently shaped paddles.
  • Knights Archers Zombies (KAZ): Features agents with distinct combat roles.
  • Prospector: A high-complexity environment requiring both agent indication and padding for bankers and prospectors.
  • Entombed Cooperative: An Atari game where agents receive identical observations, making indication essential.

Key Insights and Results

The experiments revealed several critical findings:

  • The "Inversion" Advantage: Color inversion was the most consistent performer, appearing in the top 10 hyperparameter configurations for all environments and ranking as the absolute best method in 3 out of 5 cases. This suggests that inversion provides a clear differentiation signal while preserving the spatial features necessary for convolutional neural networks to generalize.
  • Failure of Binary Encoding: While binary encoding is standard for vector-based inputs, it performed poorly in image-based tasks, indicating that agent tagging must be architecturally compatible with convolutional layers.
  • Validation of Padding: The Prospector environment served as a successful proof of concept; agents were unable to learn without the combined use of agent indication and the proposed padding methods.

Conclusion

This research bridges the gap between MARL practice and theory by formalizing agent indication. The discovery of color inversion as a robust visual tag provides a practical tool for researchers working with heterogeneous agents in image-rich environments. Future work will explore these techniques in 3D environments and investigate their compatibility with transformer-based architectures.

Summary updated

BibTeX
@misc{terry2020parameter,
  author = {Justin K. Terry and Nathaniel Grammel and Sanghyun Son and Benjamin Black},
  title = {{Parameter Sharing For Heterogeneous Agents in Multi-Agent Reinforcement Learning}},
  year = {2020},
  eprint = {2005.13625},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.13625},
}
Figure