Shield Decentralization for Safe Multi-Agent Reinforcement Learning

Daniel Melcer, Christopher Amato, Stavros TripakisNeurIPS 2022

Introduction

Learning safe solutions is an important but challenging problem in multi-agent reinforcement learning (MARL). Reinforcement learning is powerful but notoriously opaque—it is difficult to guarantee a neural network will not take a catastrophic action in a safety-critical environment. To mitigate this, researchers often use shields: reactive systems that sit between the agent and the environment, intercepting unsafe proposals and replacing them with known-safe actions.

While shielding works well for single agents, multi-agent systems present a massive hurdle. Existing MARL shields are typically centralized, assuming all agents can communicate instantaneously to coordinate a safe joint action. In the real world—such as swarms of drones or autonomous cars—communication is often delayed, restricted, or non-existent. This paper introduces a novel framework for decentralizing safety shields in MARL. By decomposing a centralized safety monitor into independent, local shields, the authors enable agents to maintain 100% safety guarantees without requiring any communication or centralized coordination during execution.

Methodology: Decentralizing the Shield

The authors propose an algorithm to transform a centralized shield (represented as a Deterministic Finite Automaton) into a set of individual shields for each agent. The key technical innovation lies in ensuring two properties during this decomposition:

  1. Cartesian Property: The set of allowed joint actions must be the Cartesian product of individual safe action sets. This ensures that no matter which "safe" action Agent A picks and which "safe" action Agent B picks, the resulting combination is guaranteed to be safe.
  2. Unambiguity: Each agent must be able to track the global state of the shield using only their own observations and the environment's public labels, without needing to know exactly what actions the other agents took.
Step-by-step matrix decomposition of joint actions into individual safe actions.

The algorithm works by starting with a single safe joint action and greedily adding more individual actions for each agent, provided they do not violate the Cartesian or Unambiguity constraints. If a conflict arises, the algorithm effectively assigns a "right of way" to higher-priority agents.

Experimental Setup

The researchers evaluated their approach on two primary domains:

  • Gridworld Collision Domain: Using four classic maps (MIT, ISR, SUNY, and Pentagon), agents must navigate to goal positions without colliding or crossing paths.
  • Relative Particle + Momentum Domain: A more complex environment where agents have inertia. This tests the shield's ability to look ahead—for example, forcing an agent to slow down long before a potential collision because its momentum would otherwise make a crash inevitable.
The MIT Gridworld map used to evaluate collision avoidance.

Key Results and Insights

The evaluation yielded several critical insights into the viability of decentralized shielding:

  • 100% Safety Guarantees: As mathematically guaranteed by their framework, agents equipped with decentralized shields experienced zero safety violations during training and testing. In contrast, unshielded agents in the momentum task averaged over 115 violations per 100 episodes.
  • Communication-Free Safety: The results demonstrate that agents do not need to communicate to remain safe, provided the shield is pre-decomposed to account for all possible safe interactions.
  • Minimal Loss of Freedom: One might expect decentralization to be extremely restrictive. However, the decentralized shields were nearly as permissive as centralized ones. In the Gridworld tasks, the centralized shield allowed an average of 23.3 safe joint actions, while the decentralized version still allowed 22.07.
  • Competitive Performance: Agents using decentralized shields achieved reward values comparable to those using centralized shields, proving that removing communication does not cripple the agents' ability to solve the task.
  • Handling Momentum: The shield successfully checks if the agent is entering a "winning region" from which safety can be maintained indefinitely, which is crucial for physical systems with dynamics like velocity. Furthermore, the decentralization algorithm itself is computationally efficient, running in linear time relative to the number of states in the input shield.

Limitations and Future Work

While the decentralization step is fast, the initial synthesis of the centralized shield still suffers from the "state explosion" problem, where the number of states grows exponentially with the number of agents. Additionally, the method relies on a human-defined abstraction function to translate the complex environment into a simpler label set; if this abstraction is flawed, the safety guarantees may fail.

The current framework also assumes agents share a common label from the environment. Future work aims to extend this to settings where agents have highly asymmetric or strictly local observations, and to investigate scaling these decomposition methods to more complex, continuous-state environments.

Summary updated

BibTeX
@inproceedings{melcer2022shield,
  author = {Daniel Melcer and Christopher Amato and Stavros Tripakis},
  title = {{Shield Decentralization for Safe Multi-Agent Reinforcement Learning}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=pcrZKE7ZAY},
}
Figure