Introduction
Standard Reinforcement Learning (RL) algorithms prioritize reward maximization through unconstrained exploration. While effective in simulated environments, this approach is often untenable for real-world robotics where exploratory actions can lead to catastrophic hardware failure or safety hazards. The field of Safe RL addresses this by modeling tasks as Constrained Markov Decision Processes (CMDPs), requiring agents to maximize rewards while adhering to predefined safety budgets. However, existing methods often fail to guarantee safety during the training phase or suffer from high computational complexity.
This paper introduces a novel framework that leverages Lyapunov functions—a foundational concept in control theory—to ensure safety throughout the entire learning process. By defining state-wise safety budgets, the authors develop projection-based methods that can be integrated with both on-policy and off-policy deep RL algorithms.
Methodology: Lyapunov-based Projections
The core innovation lies in using Lyapunov functions to define a "feasible set" of safe actions or policy parameters. The authors propose two primary mechanisms for enforcing these constraints:
- $\theta$-projection (Policy Parameter Projection): This method operates on the policy network's weights. When a gradient update threatens to move the policy into an unsafe region of the parameter space, the update is projected back onto the set of safe parameters. This provides a stable generalization of previous methods like Constrained Policy Optimization (CPO).
- $a$-projection (Action Projection/Safety Layer): This approach introduces a differentiable "Safety Layer" at the output of the policy network. If the network proposes an action that violates linearized Lyapunov constraints, the safety layer intercepts and projects it to the nearest safe action in real-time.
To ensure computational efficiency for real-time control, the authors utilize a first-order Taylor expansion to linearize the Lyapunov constraints. Because these methods rely on projections, they are compatible with data-efficient off-policy algorithms like Deep Deterministic Policy Gradient (DDPG), as well as on-policy methods like Proximal Policy Optimization (PPO).
Experimental Results
The proposed methods, termed SDDPG and SPPO, were evaluated on safety-augmented MuJoCo environments (e.g., HalfCheetah-Safe, Point-Gather, Ant-Gather) and real-world robot navigation tasks.
As shown in the experimental results, Lyapunov-based methods demonstrate superior stability in constraint satisfaction compared to traditional Lagrangian approaches. While Lagrangian methods often exhibit oscillatory behavior around the constraint threshold, the Lyapunov-based agents quickly converge to a safe policy and maintain it throughout training. Furthermore, the $a$-projection (Safety Layer) was found to be particularly effective, allowing for faster learning by correcting actions at the output level rather than constraining the high-dimensional weight space of the entire neural network.
In real-world tests, a Fetch robot equipped with the Safety Layer successfully navigated cluttered office environments. It demonstrated learned obstacle avoidance behaviors—such as "wobbling" to avoid moving humans—while strictly adhering to collision energy constraints over a 500-meter course.
Conclusion and Future Work
By bridging deep RL and classical control theory, this work provides a robust framework for safe continuous control. The use of Lyapunov projections enables safety guarantees during training and compatibility with off-policy learning, significantly improving data efficiency over previous state-of-the-art methods.
Future research directions include automating the construction of optimal Lyapunov functions for complex tasks and improving the robustness of the framework against function approximation errors in the cost critic. Additionally, scaling these methods to handle multiple simultaneous constraints remains an important area for development.
Summary updated