Skip to main content
QUICK REVIEW

[Paper Review] Learning Barrier Certificates: Towards Safe Reinforcement Learning with Zero Training-time Violations

Yuping Luo, Tengyu Ma|arXiv (Cornell University)|Aug 4, 2021
Adversarial Robustness in Machine LearningComputer Science8 citations
TL;DR

This paper proposes CRABS, a co-trained reinforcement learning algorithm that learns barrier certificates, dynamics models, and policies iteratively to enable zero training-time safety violations. By using adversarial training to learn safety-certifying barrier functions and co-optimizing with policy and dynamics model learning, CRABS achieves zero safety violations in low-dimensional continuous control tasks where prior methods require hundreds of unsafe interactions.

ABSTRACT

Training-time safety violations have been a major concern when we deploy reinforcement learning algorithms in the real world. This paper explores the possibility of safe RL algorithms with zero training-time safety violations in the challenging setting where we are only given a safe but trivial-reward initial policy without any prior knowledge of the dynamics model and additional offline data. We propose an algorithm, Co-trained Barrier Certificate for Safe RL (CRABS), which iteratively learns barrier certificates, dynamics models, and policies. The barrier certificates, learned via adversarial training, ensure the policy's safety assuming calibrated learned dynamics model. We also add a regularization term to encourage larger certified regions to enable better exploration. Empirical simulations show that zero safety violations are already challenging for a suite of simple environments with only 2-4 dimensional state space, especially if high-reward policies have to visit regions near the safety boundary. Prior methods require hundreds of violations to achieve decent rewards on these tasks, whereas our proposed algorithms incur zero violations.

Motivation & Objective

  • To develop a safe reinforcement learning algorithm that achieves zero training-time safety violations in safety-critical applications.
  • To operate in a challenging setting with only a safe but low-reward initial policy and no prior knowledge of dynamics or offline data.
  • To co-train barrier certificates, policies, and dynamics models in an iterative loop to grow the certified safe region and improve sample efficiency.
  • To avoid relying on unsafe trajectories for safety constraint learning, unlike prior constrained policy optimization methods.
  • To extend model-based safe RL beyond handcrafted barrier functions by learning them end-to-end.

Proposed method

  • CRABS co-trains barrier certificates, policies, and dynamics models in an alternating iterative process.
  • Barrier certificates are learned via adversarial training to certify safe regions of the state space, ensuring policies remain within safe sets.
  • The algorithm uses a regularization term to encourage larger certified regions, enabling better exploration within safety constraints.
  • Dynamics models are refined using data collected only from the certified safe region, improving accuracy and calibration.
  • The method tailors barrier certificates specifically to the trajectories of the current and past policies, focusing expressive capacity on relevant, high-reward regions.
  • Safety is enforced by only allowing environment interactions within the superlevel set of the learned barrier function, which defines the certified safe region.

Experimental results

Research questions

  • RQ1Can we achieve zero training-time safety violations in safe reinforcement learning without prior knowledge of dynamics or offline data?
  • RQ2Can adversarial training of barrier certificates enable safe exploration in high-dimensional state spaces without discretization?
  • RQ3How does co-training barrier certificates, policies, and dynamics models improve safety and sample efficiency compared to sequential or independent training?
  • RQ4To what extent can learned barrier certificates outperform handcrafted or post-hoc safety constraints in terms of safety and reward?
  • RQ5Can the certified safe region be iteratively expanded through co-learning to enable high-reward policies near safety boundaries?

Key findings

  • CRABS achieves zero training-time safety violations on a suite of 2-4 dimensional continuous control tasks, including environments requiring exploration near safety boundaries.
  • In the Swing environment, where the goal is to maximize rod angle under a 90° safety constraint, CRABS reduces safety violations from several hundred to zero.
  • Prior methods require at least 80 unsafe trajectories in the 2D inverted pendulum environment, while CRABS incurs zero violations.
  • The regularization term encouraging larger certified regions improves exploration and enables convergence to high-reward policies.
  • Co-training barrier certificates with policies and dynamics models leads to more accurate and calibrated dynamics models compared to independent training.
  • The method outperforms existing safe RL approaches that rely on contrasting safe and unsafe trajectories, which inherently require some unsafe interactions.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.