NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Multi-Agent Constrained Policy Optimisation

Shangding Gu, Jakub Grudzien Kuba, Muning Wen, Ruiqing Chen, Ziyan Wang, Zheng Tian, Jun Wang, Alois Knoll, Yaodong Yang

TL;DR

This paper introduces a theoretical and practical framework for safe multi-agent reinforcement learning (MARL) by formulating cooperative multi-agent tasks as constrained Markov games. The authors propose two scalable algorithms—MACPO and MAPPO-Lagrangian—that guarantee monotonic reward improvement while strictly adhering to safety constraints at every iteration. To evaluate these methods, they also introduce Safe Multi-Agent MuJoCo, the first open benchmark suite designed for safe MARL.

What Problem Does This Paper Address?

While multi-agent reinforcement learning (MARL) has achieved impressive success in cooperative games and robotic control, applying these policies to the physical world requires strict safety guarantees (e.g., collision avoidance or hardware damage prevention).

Safe learning is notoriously difficult in multi-agent settings: an agent's individual actions not only affect its own safety but alter the environment state in ways that can cause other agents to violate safety constraints later. Prior safe RL techniques primarily focus on single-agent setups (e.g., CPO) or rely on rigid control-theoretic assumptions (such as control barrier functions) that require known dynamics models. Existing model-free safe MARL methods either force parameter sharing or lack formal convergence and safety guarantees. Furthermore, the field has lacked a standardized, open benchmark suite for safe multi-agent continuous control.

Methods

The authors formulate cooperative safe MARL as a Constrained Markov Game where agents seek to maximize a shared expected return while keeping each agent $i$'s expected discounted costs $\{J_{j}^i\}_{j=1}^{m^i}$ below specific thresholds $c_j^i$.

Building on multi-agent advantage decomposition and multi-agent trust region learning (HATRPO), the paper proves that if policy updates are kept within small bounds via maximum KL-divergence, cost variations can be bounded by single-agent surrogate costs. This leads to Algorithm 1, an idealized sequential policy iteration scheme with theoretical guarantees for both monotonic reward improvement and per-iteration constraint satisfaction.

To make this practical for deep neural networks, the authors introduce two algorithms:

  • MACPO (Multi-Agent Constrained Policy Optimisation): Extends single-agent CPO to sequential multi-agent updates. It approximates the surrogate reward and cost constraints using first-order Taylor expansions and the KL divergence using a second-order Taylor expansion (Fisher Information Matrix / Hessian). It then solves the resulting dual quadratic program analytically and incorporates a backtracking line search (plus a TRPO-style cost-recovery step if the policy becomes infeasible).
  • MAPPO-Lagrangian: A computationally lighter, first-order alternative. It incorporates constraint violations into the reward objective via learnable Lagrange multipliers and enforces trust regions using the PPO-clip objective, avoiding costly Hessian-vector products.
Agent 1 Updates Policy (Trust Region + Safety Constraints)
       │
       ▼
Agent 2 Updates Policy (Evaluates Advantage relative to Agent 1's new policy)
       │
       ▼
... -> Agent n Updates Policy

Datasets

The authors introduce Safe Multi-Agent MuJoCo (Safe MAMuJoCo), extending the standard MAMuJoCo continuous control benchmark with safety-critical hazards and cost functions:

  • Safe Ant & Safe ManyAgent Ant: Divided into multi-agent configurations (e.g., 2x4, 4x2, 2x4d, 2x3, 3x2, 6x1). Agents control subsets of robot joints within narrow, folding corridors. A cost of 1 is emitted if the robot approaches within 1.8m of corridor walls or topples over ($z_{\text{torso}} \notin [0.2, 1.0]$).
  • Safe HalfCheetah: Configured across agent splits (2x3, 3x2, 6x1) where segments of the cheetah are controlled independently while avoiding moving obstacle "bombs." A cost of 1 is incurred whenever the robot is within 9m of a bomb.

Key Insights and Ideas

  • Decoupled Cost Surrogates via Trust Regions: Even though agent actions coupled via state transitions affect everyone's long-term safety, bounding the policy shift under a maximum KL constraint enables decomposing global safety bounds into individual surrogate constraints.
  • Adaptive Safety Margins: In sequential policy updates, each agent adjusts its available KL-budget depending on how much safety "slack" earlier agents have consumed, ensuring no agent pushes the joint system into constraint violation.
  • Primal-Dual vs. Lagrangian Trade-off: MACPO provides strong theoretical adherence through explicit constrained quadratic programming and safe recovery steps, while MAPPO-Lagrangian offers a simpler, first-order approximation that performs remarkably well in practice without computing second-order Hessians.

Key Results

The authors evaluated MACPO and MAPPO-Lagrangian against standard unconstrained MARL baselines (IPPO, MAPPO, and HAPPO):

  • Safety Enforcement: Baselines completely failed safety requirements, racking up high average episode costs (often between 150 and 600 against thresholds of 0.2 to 10). In contrast, both MACPO and MAPPO-Lagrangian consistently maintained near-zero costs across all tasks, staying strictly within safe limits.
  • Reward Performance: Despite strict safety constraints, MAPPO-Lagrangian and MACPO achieved rewards competitive with unconstrained algorithms. MAPPO-Lagrangian consistently outperformed IPPO and often matched or exceeded unconstrained MAPPO (notably on challenging Safe Ant tasks).
  • Unconstrained Baseline Gap: Unconstrained HAPPO achieved higher pure reward scores than the safe algorithms; however, this came at the expense of massive safety violations, confirming that safe agents intentionally trade off extreme, risky movements for constraint satisfaction.

Limitations and Future Work

  • Approximation Discrepancies: The theoretical guarantees rely on maximum KL-divergence over all states, whereas practical implementations use sample-average KL divergence. This necessitates heuristics like line-search fallbacks and TRPO recovery steps.
  • Computational Scalability of MACPO: Because MACPO relies on conjugate gradient descent to compute the inverse Hessian of the KL-divergence for each agent sequentially, wall-clock training time scales with the number of agents and parameter dimensions.
  • Exploration vs. Safety: The framework assumes an initial feasible (safe) joint policy $\pi_0$. Finding this initial safe policy in complex, unknown environments remains an open challenge.

Summary updated

BibTeX
@inproceedings{gu2022multi,
  author = {Shangding Gu and Jakub Grudzien Kuba and Muning Wen and Ruiqing Chen and Ziyan Wang and Zheng Tian and Jun Wang and Alois Knoll and Yaodong Yang},
  title = {{Multi-Agent Constrained Policy Optimisation}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=BlyXYc4wF2-},
}
Figure