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

Towards Safe Continuing Task Reinforcement Learning

Miguel Calvo-Fullana, Luiz F. O. Chamon, Santiago Paternain

TL;DR

This paper tackles the challenge of training reinforcement learning (RL) agents to be safe in real-world, continuous tasks without requiring system restarts. They propose a primal-dual RL algorithm that guarantees safety by learning in the "dual domain," allowing for safe exploration and convergence even when the system cannot be reset.

What Problem Does This Paper Address?

Designing safe controllers for physical systems is crucial, but traditional methods often rely on accurate models of the system. Reinforcement learning (RL) offers a model-agnostic approach to control but typically lacks theoretical safety guarantees. While constrained RL methods have emerged to address this, they often require the system to be reinitialized after each "rollout" (a sequence of actions and observations). This is impractical for real-world systems that cannot be easily reset, such as autonomous vehicles or industrial robots operating continuously. Furthermore, even if a policy is guaranteed to be safe, the process of learning that policy might not be safe (i.e., unsafe exploration). This paper focuses on the first problem: enabling safe RL for continuing tasks without restarts.

Methods

The authors leverage recent theoretical results on the "strong duality" of constrained RL problems. This allows them to reframe the constrained safety problem as a sequence of unconstrained problems, effectively learning in the "dual domain." Their approach involves:

  • Safety Formulation: Defining safety as a probabilistic guarantee of remaining within a "safe set" of states. They use an ergodic relaxation of this definition to make it amenable to optimization.
  • Primal-Dual Updates: They employ a primal-dual optimization algorithm. The "primal" part updates the policy parameters to maximize rewards, while the "dual" part updates Lagrange multipliers to enforce the safety constraint.
  • Continuing Task Adaptation: The core innovation is adapting this primal-dual approach to continuing tasks. Instead of using full system rollouts from an initial state, they use samples from the system's current state and its estimated future states. This allows for online learning without restarts.
  • Theoretical Guarantees: They provide theoretical analysis showing that their adapted primal and dual gradients act as ascent and descent directions, respectively, for the Lagrangian, even without reinitialization. This is supported by propositions relating the discount factor and mixing time of the MDP to the similarity of occupation measures, which are crucial for the gradient estimates.

Datasets

Not discussed in the paper. The evaluation is performed on a simulated continuous navigation problem.

Key Insights and Ideas

  • Learning in the Dual Domain for Safety: By reformulating the constrained problem into an unconstrained one in the dual space, the authors can leverage existing RL techniques while still enforcing safety constraints.
  • Primal-Dual for Continuing Tasks: The adaptation of primal-dual methods to handle continuous tasks without restarts is a significant step towards real-world deployability. The key is using state-dependent estimates for gradients and constraints.
  • Safety Guarantees via Theoretical Analysis: The paper provides theoretical backing for why their adapted primal-dual updates work, connecting the convergence of their algorithm to properties of the underlying Markov Decision Process (MDP), such as its mixing time and stationary distribution.
  • Safe Exploration as a Consequence: While the primary focus is on learning safe policies for continuing tasks, the paper hints that their approach can also contribute to safe exploration by initializing the dual variable to a large value, making the agent more conservative initially.

Key Results

  • The proposed primal-dual algorithm is shown to be theoretically capable of solving constrained RL problems in continuing tasks.
  • Numerical results on a simulated continuous navigation task demonstrate the agent's ability to reach a goal while avoiding obstacles and maintaining a high runtime safety level (above 0.99).
  • The agent's online trajectory, while different from an optimal offline policy, successfully navigates the environment safely, showcasing the practical applicability of the method.

Limitations and Future Work

  • Safe Exploration Guarantees: The paper acknowledges that while their approach can induce safe exploration (as seen in the numerical results), providing theoretical guarantees for safe exploration itself is a focus for future work.
  • Practical Estimation of MDP Properties: The theoretical propositions rely on properties like mixing time and minimum state occupation probability, which can be difficult to estimate in practice, especially for complex or safety-critical systems.
  • Generalization to More Complex Scenarios: While the navigation example is illustrative, further evaluation on more diverse and complex environments would be beneficial.

Summary updated

BibTeX
@inproceedings{calvofullana2021towards,
  author = {Miguel Calvo-Fullana and Luiz F. O. Chamon and Santiago Paternain},
  title = {{Towards Safe Continuing Task Reinforcement Learning}},
  booktitle = {ACC},
  year = {2021},
  doi = {10.23919/acc50511.2021.9482748},
}
Figure