Robust Safe Reinforcement Learning under Adversarial Disturbances

Zeyang Li, Chuxiong Hu, Shengbo Eben Li, Jia Cheng, Yunan Wang · DOI

Introduction

Reinforcement learning (RL) has demonstrated significant potential in complex control tasks, ranging from robotics to autonomous driving. However, the transition from simulation to real-world deployment is often hindered by safety concerns. Most existing safe RL frameworks rely on Constrained Markov Decision Processes (CMDPs), which typically optimize for safety in expectation. In high-stakes environments, "safety on average" is insufficient; a single failure can lead to catastrophic results. Furthermore, the "sim-to-real" gap introduces unpredictable disturbances—such as sensory noise, friction variations, or external forces—that can push an agent beyond its safety boundaries.

This paper introduces a robust framework designed to provide state-wise safety guarantees even under worst-case adversarial disturbances. By framing safety as a two-player zero-sum game, the authors develop a method to identify and maintain the agent within a "Robust Invariant Set" (RIS)—a region of the state space where persistent safety is mathematically guaranteed.

Methodology: SAC-RIS

The proposed approach, termed Soft Actor-Critic with Robust Invariant Set (SAC-RIS), integrates Hamilton-Jacobi (HJ) reachability analysis with modern deep RL. The framework is built upon several core innovations:

Two-Player Zero-Sum Game

The system is modeled as a competition between a "protagonist" (the controller) and an "adversary" (representing worst-case disturbances). The protagonist seeks to maximize the safety value, while the adversary attempts to minimize it. This formulation ensures that if a safety strategy exists against the worst possible disturbance, the agent will find it.

Robust Invariant Set Synthesis

Traditional HJ reachability analysis often struggles with the "curse of dimensionality," making it difficult to apply to complex systems. SAC-RIS overcomes this by using RL-based function approximation. The authors utilize neural networks to approximate the safety value function, allowing the method to scale to higher-dimensional state spaces.

Safety Self-Consistency Operators

A critical theoretical contribution of this work is the introduction of a discounted safety value function and the definition of safety self-consistency operators. The authors prove that these iterative operators are monotone contractions. This provides a rigorous theoretical guarantee that the algorithm will converge to the maximal robust invariant set, ensuring the learned boundaries are reliable.

Constrained Policy Optimization

Once the RIS is identified, it is integrated into the Soft Actor-Critic (SAC) framework. Using the Lagrange multiplier method, the agent is trained to maximize rewards while being strictly constrained by the learned safety boundaries. If an action would lead the agent toward the edge of the RIS where safety can no longer be guaranteed against an adversary, that action is effectively blocked.

Experimental Evaluation

The SAC-RIS framework was evaluated across three distinct control environments, each designed to test different aspects of robustness:

  1. Double Integrator: A classic linear system used to validate the algorithm against an analytically derived ground truth. This served as a proof-of-concept for the accuracy of the learned invariant set.
  2. Cart-pole (MuJoCo): A standard benchmark modified with horizontal force disturbances. The agent must balance the pole while an adversary attempts to knock it over.
  3. Quadrotor (2D): A trajectory tracking task from safe-control-gym. The agent tracks a circular path while motor thrust disturbances attempt to push the vehicle out of a safe vertical zone.

Key Results and Insights

Zero Constraint Violations

In the Cart-pole and Quadrotor tasks, SAC-RIS achieved zero constraint violations under learned worst-case disturbances. In contrast, standard safe RL baselines, such as SAC-Lagrangian (SAC-L) and Reachable Actor-Critic (RAC), failed frequently. These baselines often allowed the agent to operate too close to the safety boundaries, leaving no buffer for adversarial interference.

Accuracy and Generalization

On the Double Integrator task, the learned robust invariant set closely matched the analytical ground truth, validating the mathematical foundation of the RL-based approximation. Interestingly, the authors found that training against an adversary did not degrade performance in nominal (non-adversarial) settings. The agent learned to maintain a "buffer zone" that provided safety without sacrificing the ability to achieve high rewards.

The Adversary as a Teacher

The results suggest that the adversary serves a pedagogical role. By forcing the agent to account for the worst-case scenario during training, the agent develops a policy that is inherently more cautious near the edges of the safe state space, leading to much higher reliability during deployment.

Limitations and Future Work

Despite its success, the framework has limitations. Currently, the agent violates constraints frequently during the training phase as it learns the boundaries of the RIS. Consequently, SAC-RIS is currently restricted to simulation-based training where failures are permissible. Additionally, the requirement to train three separate networks (protagonist, adversary, and safety critic) increases the computational overhead compared to standard RL methods.

Future research directions include extending the framework to even higher-dimensional systems and exploring methods to ensure safety during the learning process itself, potentially moving toward safe on-the-fly learning on physical hardware.

Summary updated

BibTeX
@inproceedings{li2023robust,
  author = {Zeyang Li and Chuxiong Hu and Shengbo Eben Li and Jia Cheng and Yunan Wang},
  title = {{Robust Safe Reinforcement Learning under Adversarial Disturbances}},
  booktitle = {CDC},
  year = {2023},
  doi = {10.1109/cdc49753.2023.10383375},
}
Figure