Solving Multi-Agent Safe Optimal Control with Distributed Epigraph Form MARL

Songyuan Zhang, Oswin So, Mitchell Black, Zachary Serlin, Chuchu Fan · DOI

Abstract

Multi-agent reinforcement learning (MARL) in safety-critical environments requires strict adherence to constraints, often referred to as "hard" safety. Traditional approaches utilizing Lagrangian multipliers frequently suffer from training instability and gradient explosions when safety thresholds are set to zero. This paper introduces Def-MARL (Distributed Epigraph Form Multi-Agent Reinforcement Learning), a framework that reformulates the Constrained Markov Decision Process (CMDP) into its epigraph form. By introducing an auxiliary additive variable $z$ to represent a cost budget, Def-MARL ensures stable training and zero-violation performance. We demonstrate that Def-MARL scales to swarms of over 500 agents and maintains high success rates in real-world quadcopter experiments where traditional methods fail.

Introduction

In autonomous multi-robot systems—such as drone swarms or warehouse robotics—safety is not a soft preference but a hard requirement. Robots must achieve collective goals while strictly avoiding collisions or hazardous states. While reinforcement learning has shown promise in complex multi-agent tasks, integrating hard constraints remains a significant challenge.

Standard safe RL methods typically rely on the Lagrangian method, which penalizes constraint violations using a multiplier $\lambda$. However, in scenarios requiring zero violations, $\lambda$ can grow indefinitely, leading to unstable training dynamics and gradient instability. Def-MARL addresses these shortcomings by shifting the optimization objective to an epigraph form, providing a more robust mathematical foundation for safe multi-agent coordination.

Problem Statement: The Limits of Lagrangian Methods

Multi-agent safety is typically modeled as a Constrained Markov Decision Process (CMDP). The goal is to maximize a cumulative reward while keeping a cumulative cost below a specific threshold.

In real-world robotics, this threshold is often zero. When using Lagrangian methods to enforce this, the penalty term (the product of $\lambda$ and the violation) creates a scaling issue. If the agent fails to meet the constraint, $\lambda$ increases to force compliance. This multiplicative relationship often leads to "exploding gradients," causing the policy to crash or become overly conservative to the point of uselessness.

Methodology

1. The Epigraph Transformation

The core innovation of Def-MARL is the transition to the Epigraph Form. Instead of using a penalty multiplier, the authors introduce an auxiliary variable $z$, which serves as an upper bound or "budget" for the total cost. The optimization is then bifurcated:

  • The Inner Problem: The policy is optimized to satisfy safety constraints while keeping the total cost within the budget $z$.
  • The Outer Problem: The system seeks to find the minimum feasible value for $z$.

Because $z$ is an additive component rather than a multiplier, the gradients remain stable throughout the training process, even when the safety requirement is absolute.

2. Distributed Execution and Consensus

Def-MARL follows the Centralized Training, Distributed Execution (CTDE) paradigm. While agents learn together, they must act independently during deployment. The authors prove (Theorem 1) that the global cost budget $z$ can be mathematically decomposed. During execution, each agent maintains a local budget $z_i$ and communicates with its neighbors to reach a consensus on the global state, ensuring that the collective behavior remains within safe bounds.

3. Scalable Architecture

To handle varying numbers of agents and dynamic communication topologies, Def-MARL utilizes a Graph Neural Network (GNN) backbone. This allows the policy to process information from a flexible number of neighbors, making the system inherently scalable.

Experimental Evaluation

Simulation Benchmarks

Def-MARL was evaluated across eight distinct tasks in two primary environments:

  • Modified Multi-Particle Environments (MPE): Tasks such as Target, Spread, Formation, and Line were modified with static obstacles to increase the safety challenge.
  • Safe Multi-agent MuJoCo: Continuous control tasks, including Safe HalfCheetah, where multiple agents control different segments of a single entity to move forward while avoiding obstacles.

Hardware Demonstration

The framework was validated using a swarm of Crazyflie 2.1 quadcopters. In tasks like "Corridor" (navigating narrow passages) and "Inspect" (collaborative tracking), Def-MARL was compared against traditional Model Predictive Control (MPC). While MPC often struggled with non-convex cost functions—leading to drones getting stuck or colliding—Def-MARL achieved a 100% success rate.

Key Results

  • Superior Safety and Stability: Def-MARL consistently achieved near 100% safety rates. Unlike Lagrangian baselines, which exhibited sharp performance drops during training, Def-MARL’s training curves remained smooth and predictable.
  • Hyperparameter Robustness: A significant finding was that Def-MARL utilized the same set of hyperparameters across all eight experimental environments. In contrast, baseline methods required extensive, task-specific tuning to remain functional.
  • Massive Scalability: Due to the GNN architecture and distributed epigraph form, a policy trained on only 8 agents was successfully deployed on a simulation of 512 agents. This zero-shot scaling resulted in only a 0.5% drop in safety, demonstrating the robustness of the learned coordination logic.

Discussion and Limitations

While Def-MARL represents a significant step forward for safe MARL, some limitations remain. The training phase is still centralized, which creates a bottleneck for the number of agents that can be included during the learning process due to GPU memory limits. Additionally, the current theoretical safety guarantees assume ideal communication; real-world factors like latency or packet loss could impact the consensus mechanism for the budget variable $z$. Future work may involve integrating formal methods or reachability analysis to provide even more rigorous safety guarantees in the presence of approximation errors.

Summary updated

BibTeX
@misc{zhang2025solving,
  author = {Songyuan Zhang and Oswin So and Mitchell Black and Zachary Serlin and Chuchu Fan},
  title = {{Solving Multi-Agent Safe Optimal Control with Distributed Epigraph Form MARL}},
  year = {2025},
  eprint = {2504.15425},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2504.15425},
}
Figure