A General Learning Framework for Open Ad Hoc Teamwork Using Graph-based Policy Learning

Arrasy Rahman, Ignacio Carlucho, Niklas Höpner, Stefano V. Albrecht

TL;DR

This paper introduces Graph-based Policy Learning (GPL), a reinforcement learning framework designed for "open" ad hoc teamwork, where an agent must collaborate on-the-fly with unknown teammates who can join or leave at any time. By leveraging Graph Neural Networks (GNNs) and advanced belief inference, the framework successfully coordinates with changing team compositions under both full and partial observability, significantly outperforming traditional multi-agent and single-agent baselines.

What Problem Does This Paper Address?

In real-world AI deployment, autonomous agents rarely interact in a vacuum or with perfectly static teams. Most multi-agent reinforcement learning (MARL) algorithms assume a fixed number of agents trained together in advance. However, true collaboration often requires ad hoc teamwork: cooperating with unfamiliar partners without prior joint training.

This paper tackles an even harder variant: open ad hoc teamwork under partial observability. Here, the agent (the "learner") faces two major hurdles:

  1. Environmental Openness: Teammates can enter or leave the environment dynamically, changing the size of the observation vector and disrupting team dynamics.
  2. Partial Observability: The learner cannot see the entire state of the environment or all its teammates, meaning it must infer latent environment states, teammate existence, and teammate intentions purely from a stream of partial observations.

Methods

The authors propose Graph-based Policy Learning (GPL) to handle these challenges. GPL breaks down the learner's decision-making process into three interconnected, GNN-based modules:

  • Type Inference Model: Uses an LSTM to map a teammate's historical behavior into a continuous "type" vector, allowing the agent to characterize teammate policies without ground-truth knowledge.
  • Agent Modelling: Implements a Relational Forward Model (a type of GNN) to predict the likelihood of teammates' next actions based on their inferred types and the current state.
  • Joint Action Value Modelling: Uses a fully connected Coordination Graph (CG) implemented via GNNs to factorize the joint action-value function into individual and pairwise utilities. This allows the network to scale quadratically rather than exponentially with team size.

To extend GPL to partially observable environments (PO-GPL), the authors integrate three distinct belief inference methodologies to maintain estimates of latent states, teammate existence, and joint actions:

  1. Autoencoder-based (AE-GPL): Uses recurrent neural networks to encode observations into a fixed-length embedding.
  2. Variational Autoencoder-based (VAE-GPL): Maintains a parametric distribution over representation vectors.
  3. Sequential Monte Carlo / Particle Filter (PF-GPL): Tracks a collection of graph-based particles representing explicit hypotheses of the world state.

Datasets

The framework was evaluated across four simulated environments modified to feature open team dynamics (agents entering/leaving) and partial observability constraints:

  • Level-Based Foraging (LBF): A grid world where agents must coordinate to choose and retrieve items based on their assigned "levels."
  • Wolfpack: A cooperative hunting game where multiple "wolves" must surround a moving prey to capture it.
  • FortAttack: A continuous arena task where a defending team must guard a fort against incoming attackers. Openness is driven directly by agents getting "shot" and temporarily eliminated.
  • Penalized Cooperative Navigation (PCN): A novel benchmark introduced in this paper specifically to test partial observability. Agents must cover distant destination grids simultaneously; arriving alone incurs a penalty, forcing the agent to reason about unobserved teammates.

Key Insights and Ideas

  • The Power of Parameter Sharing: By sharing parameters across the pairwise utility estimators in the Coordination Graph, the learner can seamlessly transfer knowledge. For example, it can learn what an effective "defending" behavior looks like by watching a teammate, and then immediately apply that behavior to itself.
  • Action Prediction Trumps Existence Tracking: Surprisingly, while Particle Filters (PF-GPL) were exceptionally good at tracking whether unobserved teammates existed, they performed poorly in decision-making. Autoencoder-based methods (AE and VAE) won out because they more accurately reconstructed the latent environment states and teammate joint actions, which are more critical for computing optimal policies.
  • Robustness to the Unknown: GPL-based models demonstrated a strong capacity for zero-shot generalization, successfully collaborating with entirely unseen teammate types and adapting to team sizes never encountered during training.

Key Results

  • Fully Observable Performance: In training and testing across LBF, Wolfpack, and FortAttack, GPL-Q and GPL-SPI consistently achieved significantly higher returns than standard MARL baselines (MADDPG, DGN) and single-agent RL baselines (QL).
  • Partially Observable Generalization: When evaluated against unseen teammates under partial observability, VAE-GPL and AE-GPL drastically outperformed baselines like PPO and Deep Variational RL (DVRL). For instance, in the challenging PCN environment, AE-GPL achieved a score of 0.24 ± 0.10 and VAE-GPL scored 0.17 ± 0.15, while PPO failed completely with a negative return of -0.24 ± 0.12.

Limitations and Future Work

  • Discrete Action Spaces: The current framework is tailored for discrete actions. The authors note that extending GPL to continuous action spaces is an important next step for robotics applications.
  • Teammate Non-Stationarity: GPL assumes that while teammates may change, their underlying policies remain fixed during an episode. If teammates are also actively learning or changing their strategies on-the-fly, the type inference model would face non-stationarity issues.
  • Scalability: While GNNs handle variable input sizes, scaling to massive swarms of agents remains an open multi-agent challenge.

Summary updated

BibTeX
@article{rahman2023general,
  author = {Arrasy Rahman and Ignacio Carlucho and Niklas Höpner and Stefano V. Albrecht},
  title = {{A General Learning Framework for Open Ad Hoc Teamwork Using Graph-based Policy Learning}},
  journal = {J. Mach. Learn. Res.},
  year = {2023},
}
Figure