Reachability Constrained Reinforcement Learning

Dongjie Yu, Haitong Ma, Shengbo Eben Li, Jianyu Chen

Abstract: Constrained reinforcement learning (CRL) has gained significant interest recently, since safety constraints satisfaction is critical for real-world problems. However, existing CRL methods constraining discounted cumulative costs generally lack rigorous definition and guarantee of safety. In contrast, in the safe control research, safety is defined as persistently satisfying certain state constraints. Such persistent safety is possible only on a subset of the state space, called feasible set, where an optimal largest feasible set exists for a given environment. Recent studies incorporate feasible sets into CRL with energy-based methods such as control barrier function (CBF), safety index (SI), and leverage prior conservative estimations of feasible sets, which harms the performance of the learned policy. To deal with this problem, this paper proposes the reachability CRL (RCRL) method by using reachability analysis to establish the novel self-consistency condition and characterize the feasible sets. The feasible sets are represented by the safety value function, which is used as the constraint in CRL. We use the multi-time scale stochastic approximation theory to prove that the proposed algorithm converges to a local optimum, where the largest feasible set can be guaranteed. Empirical results on different benchmarks validate the learned feasible set, the policy performance, and constraint satisfaction of RCRL, compared to CRL and safe control baselines.

Introduction

Reinforcement Learning (RL) has demonstrated remarkable potential in complex decision-making tasks. However, its deployment in safety-critical domains like autonomous driving and robotics is hindered by the lack of rigorous safety guarantees. Traditional Constrained Reinforcement Learning (CRL) typically focuses on minimizing expected discounted cumulative costs. While this approach is mathematically convenient, it fails to ensure "persistent safety"—the requirement that an agent satisfies constraints at every single time step. In real-world scenarios, a single catastrophic failure can outweigh a history of safe behavior.

Persistent Safety and Feasible Sets

In control theory, safety is often framed through the lens of reachability. A state is considered safe if it belongs to a "feasible set"—a subset of the state space from which there exists at least one control policy that can keep the system within safe boundaries indefinitely. States outside this set are "inevitably unsafe"; even if they are currently within safe limits, no future actions can prevent an eventual constraint violation.

The conceptual relationship between the state space, safe sets, and feasible sets.

Existing methods that attempt to incorporate these sets often rely on hand-tuned energy functions, such as Control Barrier Functions (CBFs). These often result in overly conservative boundaries that unnecessarily restrict the agent's performance. RCRL addresses this by learning the largest possible feasible set directly from environment interactions.

Reachability Constrained Reinforcement Learning (RCRL)

The RCRL framework introduces a safety value function ($V_h^\pi(s)$), which quantifies the maximum future constraint violation starting from state $s$. The core of the method lies in three technical innovations:

  1. Self-Consistency Condition: The authors derive a Bellman-like equation for safety: $V_h^\pi(s) = \max \{h(s), V_h^\pi(s')\}$. This allows the safety value function to be learned via temporal difference (TD) methods.
  2. Statewise Lagrangian Multipliers: Unlike standard CRL, which uses a global scalar multiplier, RCRL employs a state-dependent multiplier learned by a neural network. This ensures that constraints are strictly enforced only at the boundaries of the feasible set, allowing for maximum performance elsewhere.
  3. Multi-Time Scale Learning: To ensure stability, the algorithm updates the critic, actor, and Lagrangian multipliers on three distinct time scales, providing convergence guarantees to a local optimum.

Experimental Evaluation

The authors validated RCRL across several benchmarks, including a Double Integrator system, a 2D Quadrotor tracking task in safe-control-gym, and high-dimensional tasks in Safety-Gym (Point, Car, and Doggo agents).

In the Double Integrator task, RCRL was compared against ground-truth feasible sets calculated via numerical methods. The results demonstrate that RCRL accurately recovers the largest feasible set, significantly outperforming conservative energy-based baselines.

RCRL (green) accurately approximates the largest feasible set compared to conservative MPC-CBF and MPC-Terminal baselines.

In the Quadrotor and Safety-Gym environments, RCRL consistently achieved near-zero constraint violations while maintaining higher rewards than its competitors. By identifying the true boundaries of safety, the agent avoids the performance penalties associated with excessive conservativeness.

Conclusion

RCRL represents a significant step toward bridging the gap between reinforcement learning and formal control theory. By shifting the safety paradigm from average costs to reachability-based persistent satisfaction, it enables agents to operate safely at the edge of their physical limits. Future work will focus on "safe exploration" to prevent violations during the initial learning phase, potentially through model-based integration.

Summary updated

BibTeX
@inproceedings{yu2022reachability,
  author = {Dongjie Yu and Haitong Ma and Shengbo Eben Li and Jianyu Chen},
  title = {{Reachability Constrained Reinforcement Learning}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=OGeouX0eUl9},
}
Figure