Learning Adaptive Safety for Multi-Agent Systems

Luigi Berducci, Shuo Yang, Rahul Mangharam, Radu Grosu

TL;DR

Researchers have developed ASRL (Adaptive Safe Reinforcement Learning), a framework that allows autonomous agents to "learn" how to be safe while interacting with unpredictable others. By using Reinforcement Learning to dynamically tune the parameters of Control Barrier Functions (CBFs), the system automates the delicate balance between cautious safety and aggressive goal-seeking in complex multi-agent environments.

What Problem Does This Paper Address?

In the world of autonomous systems—think self-driving cars or warehouse robots—safety is often managed by Control Barrier Functions (CBFs). A CBF acts like a "safety shield," mathematically ensuring an agent stays within a safe set of states. However, CBFs rely on a specific parameter (often called $\gamma$ or the "class-$\mathcal{K}$ function") that determines how quickly an agent can approach the boundary of safety.

The problem? In multi-agent systems, there is no "one-size-fits-all" value for this parameter. If the agent is too cautious (low $\gamma$), it might get stuck in "frozen robot" syndrome, unable to reach its goal because it's too afraid of others. If it's too aggressive (high $\gamma$), it might cause a collision. Traditionally, engineers have had to manually tune these values—a process that is tedious, doesn't scale, and fails when other agents behave in unexpected or non-cooperative ways.

Methods

The authors propose ASRL, a hierarchical framework that combines the rigor of control theory with the flexibility of deep learning:

  1. High-Level Learning (The "Brain"): A multi-head neural network architecture. One head learns the Policy (what action to take to reach the goal), while a second, novel head learns the Safety Model. This safety model outputs state-dependent CBF coefficients ($\gamma_t$) in real-time.
  2. Low-Level Control (The "Shield"): A model-based CBF controller. It takes the suggested action from the high-level brain and the learned safety coefficient, then solves a Quadratic Program (QP) to find the closest safe action.
  3. Joint Optimization: The system uses a constrained RL approach (specifically PPO-Lagrangian). It treats safety violations as a "cost" and uses a PID-based update rule to adjust the penalty for these violations, ensuring the agent stays within a predefined "safety budget" while maximizing performance.

Unlike previous "Adaptive CBF" methods that only focus on making the math feasible in the short term, ASRL optimizes for long-term objectives (like winning a race) through direct interaction with other agents.

Datasets

The framework was evaluated in two simulated multi-agent environments:

  • Multi-Robot Navigation: A scenario where 3 to 7 robots must reach goal positions while avoiding each other. The "other" robots have randomized safety distances, forcing the ego-agent to adapt to different levels of "assertiveness."
  • Multi-Agent Racing (F1TENTH): A high-speed competitive racing environment. The agent must overtake opponents on a track. Opponents use different planners (like "Follow the Gap" or "Lattice" planners) and varying velocity profiles.

Key Insights and Ideas

  • Safety as a Learnable Parameter: The most significant "aha moment" is treating the CBF's conservativeness as a learnable, state-dependent variable. This allows the agent to be "brave" when the situation is clear and "cautious" when it's ambiguous.
  • Direct Interaction over Historical Data: Many safety methods require huge datasets of how others behave. ASRL learns "on the fly" by interacting, which is crucial for non-cooperative settings where other agents won't reveal their strategies.
  • Modularity Matters: By separating the policy (what to do) from the safety filter (how to stay safe), the agent can explore more effectively during training without constantly crashing, leading to faster convergence.

Key Results

  • Superior Performance: ASRL significantly outperformed standard safe-RL baselines (like CPO and PPO-Lagrangian) in both return (reaching the goal) and cost (staying safe).
  • Fast Convergence: In the multi-robot task, ASRL reached high performance while keeping violations below the desired limit ($d=0.25$), whereas on-policy baselines often failed to reach the safety threshold even after 1 million training steps.
  • Generalization and Scalability: An agent trained against only 2 opponents in the racing scenario successfully generalized to races with up to 8 opponents, consistently securing podium finishes. It also successfully adapted to "out-of-distribution" opponents using planning strategies it had never seen during training.

Limitations and Future Work

  • Relative Degree Constraints: The current work focuses on systems with a "relative degree of 1" (where the control input directly affects the safety boundary). Extending this to higher-order systems (like complex drone dynamics) remains a challenge.
  • Action Space Complexity: As more safety coefficients are added to handle multiple constraints, the action space for the RL agent grows, which could make training more difficult.
  • Perfect State Knowledge: The model assumes the agent can observe the positions and velocities of others. Future work could integrate uncertainty quantification to handle noisy sensor data or occlusions.
  • Chance Constraints: While ASRL is highly effective, it provides "probabilistic" safety (staying below a violation budget) rather than the "hard" mathematical guarantees of traditional CBFs, which may be a concern for ultra-critical hardware.

Summary updated

BibTeX
@inproceedings{berducci2024learning,
  author = {Luigi Berducci and Shuo Yang and Rahul Mangharam and Radu Grosu},
  title = {{Learning Adaptive Safety for Multi-Agent Systems}},
  booktitle = {IEEE International Conference on Robotics and Automation},
  year = {2024},
  doi = {10.1109/icra57147.2024.10611037},
}
Figure