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

Multi-Agent First Order Constrained Optimization in Policy Space

Youpeng Zhao, Yaodong Yang, Zhenbo Lu, Wengang Zhou, Houqiang Li

In the complex world of Multi-Agent Reinforcement Learning (MARL), getting a group of agents to cooperate is hard enough. Adding safety constraints—like ensuring autonomous drones don't collide or robot hands don't exceed their range of motion—adds a massive layer of difficulty. While previous methods have tried to tackle "Safe MARL," they often rely on computationally expensive second-order mathematics that struggle to scale.

A new paper from NeurIPS 2023 introduces MAFOCOPS (Multi-Agent First Order Constrained Optimization in Policy Space), a method that promises to keep agents safe without the computational headache.

TL;DR

MAFOCOPS is a novel first-order algorithm for safe multi-agent reinforcement learning that achieves superior performance and safety by splitting the policy update into two steps: solving for an optimal "raw" policy and then projecting it back onto a neural network. It bypasses the need for expensive second-order calculations (like inverting Fisher information matrices), making it significantly faster and more stable than previous state-of-the-art methods.

What Problem Does This Paper Address?

Most MARL algorithms are "reward-hungry"—they prioritize maximizing a score at all costs. In the real world, this is dangerous. An autonomous car shouldn't run a red light just to reach its destination faster.

Developing "Safe MARL" is challenging because of non-stationarity: as one agent learns to be safe, the environment changes for everyone else, potentially making their previous safe strategies unsafe.

Joint Safe Area Concept

The current gold standard, MACPO, uses second-order Taylor approximations to handle this coordination. However, MACPO is a computational beast; it requires calculating and inverting high-dimensional matrices, which often leads to "infeasible" updates where the math simply breaks down, forcing the algorithm to waste data or backtrack.

Methods

The authors propose a two-step optimization process that stays strictly "first-order" (using only gradients, not curvatures):

  1. Non-parametric Optimization: Instead of trying to update the neural network weights directly, MAFOCOPS first finds the optimal update in the "non-parameterized" policy space. They derive a near-closed-form solution for what the ideal next policy should look like to maximize reward while staying within safety bounds.
  2. Parametric Projection: Once they have this "ideal" policy, they treat it as a target. They update the actual neural network (the parametric policy) by minimizing the distance (KL divergence) between the current network and that ideal target.

To make this work in practice, they use a sequential update scheme (inspired by HATRPO), where agents update their policies one by one. They also introduce a per-state acceptance indicator function, which helps the algorithm ignore noisy data points where the approximation might be inaccurate, further stabilizing the training.

Datasets

The researchers evaluated MAFOCOPS on two primary safe MARL benchmarks:

Safe MAMuJoCo Environment
  • Safe MAMuJoCo: A multi-agent version of the classic MuJoCo physics engine, modified with obstacles, walls, and pitfalls. Tasks include "Ant" and "HalfCheetah" where agents control different body parts and must move forward without tripping or hitting walls.
  • Safe MAIG (Multi-Agent Isaac Gym): A high-performance robotics simulator. They focused on the ShadowHand tasks, where two robotic hands must pass an object to each other while keeping finger joints within safe mechanical limits.

Key Insights and Ideas

  • First-Order is Enough: The biggest "aha" moment is that you don't need the complexity of second-order methods (like MACPO) to provide safety guarantees. By solving in the non-parametric space first, you get the benefits of trust-region optimization without the matrix-inversion nightmare.
  • The Safety-Reward Trade-off: The paper demonstrates that while stricter safety bounds inevitably lower the total reward, MAFOCOPS maintains a much more stable "Pareto front" than its predecessors.
  • Resistance to Complexity: Interestingly, as the number of agents increases (e.g., from a 2-agent Ant to a 6-agent Ant), MACPO’s performance degrades significantly due to computational overhead, while MAFOCOPS remains robust.

Key Results

  • Computational Efficiency: MAFOCOPS is significantly faster. In the "ManyAgent Ant 8x1" task, it achieved a 57.53% improvement in Frames Per Second (FPS) compared to MACPO.
  • Memory Savings: Because it avoids large matrix operations, it used up to 12.93 MiB less memory in complex tasks, a crucial factor for scaling to even larger systems.
  • Superior Safety: In the ShadowHandReOrientation task, other methods like MAPPO-Lagrangian showed a "delay" in guaranteeing safety or suffered sudden drops in reward. MAFOCOPS optimized the reward while consistently staying within the safety cost budget.
  • Performance: Across almost all tested environments, MAFOCOPS either matched or significantly outperformed MACPO in total reward while maintaining a lower or equal constraint violation.

Limitations and Future Work

While MAFOCOPS is a major step forward, the authors note a few areas for growth:

  • Single Cost Focus: The current benchmarks typically return only one cost value per agent. The authors haven't yet evaluated how the system handles multiple, competing safety constraints (e.g., "don't hit the wall" AND "don't exceed battery temperature").
  • On-Policy Constraints: The current version is an on-policy algorithm, meaning it requires fresh data for every update. Moving toward off-policy or offline safe MARL would make the algorithm even more data-efficient for real-world robotics where data collection is expensive.

Summary updated

BibTeX
@inproceedings{zhao2023multi,
  author = {Youpeng Zhao and Yaodong Yang and Zhenbo Lu and Wengang Zhou and Houqiang Li},
  title = {{Multi-Agent First Order Constrained Optimization in Policy Space}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=UgomCjCWjC},
}
Figure