Skip to main content
QUICK REVIEW

[Paper Review] Shielded Reinforcement Learning for Hybrid Systems

Asger Horn Brorholt, Peter Gjøl Jensen|arXiv (Cornell University)|Aug 28, 2023
Adversarial Robustness in Machine LearningComputer Science47 references3 citations
TL;DR

This paper proposes a simulation-based method to synthesize safety shields for hybrid Markov decision processes (HMDPs) using systematic sampling to approximate a two-player safety game, enabling statistically safe and near-optimal reinforcement learning. The approach outperforms reward shaping and post-shielding, with pre-shielding yielding superior performance and safety guarantees in industrial case studies.

ABSTRACT

Safe and optimal controller synthesis for switched-controlled hybrid systems, which combine differential equations and discrete changes of the system's state, is known to be intricately hard. Reinforcement learning has been leveraged to construct near-optimal controllers, but their behavior is not guaranteed to be safe, even when it is encouraged by reward engineering. One way of imposing safety to a learned controller is to use a shield, which is correct by design. However, obtaining a shield for non-linear and hybrid environments is itself intractable. In this paper, we propose the construction of a shield using the so-called barbaric method, where an approximate finite representation of an underlying partition-based two-player safety game is extracted via systematically picked samples of the true transition function. While hard safety guarantees are out of reach, we experimentally demonstrate strong statistical safety guarantees with a prototype implementation and UPPAAL STRATEGO. Furthermore, we study the impact of the synthesized shield when applied as either a pre-shield (applied before learning a controller) or a post-shield (only applied after learning a controller). We experimentally demonstrate superiority of the pre-shielding approach. We apply our technique on a range of case studies, including two industrial examples, and further study post-optimization of the post-shielding approach.

Motivation & Objective

  • Address the challenge of synthesizing safe and optimal controllers for complex hybrid systems with continuous and discrete dynamics.
  • Overcome the intractability of exact shield synthesis in nonlinear and hybrid environments by approximating transition relations via sampling.
  • Demonstrate that a practical, statistically safe shield can be constructed efficiently using the 'barbaric method' and integrated with Uppaal Stratego.
  • Compare pre-shielding and post-shielding strategies to evaluate their impact on controller optimality and safety.
  • Evaluate the method on real-world industrial case studies to validate its robustness and scalability.

Proposed method

  • Construct a finite partition of the state space to create an abstracted, discrete representation of the continuous hybrid system.
  • Approximate the true transition function of the HMDP via systematic sampling of system trajectories, emulating the 'barbaric method' for scalable abstraction.
  • Model the abstracted system as a two-player safety game between the controller (player 1) and the environment (player 2), where the goal is to avoid unsafe states.
  • Use Uppaal Stratego to solve the two-player safety game and synthesize a most-permissive shield strategy that restricts only unsafe actions.
  • Integrate the shield either before learning (pre-shielding) or during deployment (post-shielding), with post-optimization of intervention choices via cost and intervention minimization.
  • Apply the shield to real-world models, including a DC-DC boost converter and an oil pump, to evaluate safety and performance.

Experimental results

Research questions

  • RQ1Can a practical, scalable method for shield synthesis be developed for hybrid Markov decision processes where symbolic computation is infeasible?
  • RQ2Does pre-shielding lead to better controller performance and lower intervention frequency than post-shielding in reinforcement learning for hybrid systems?
  • RQ3To what extent can systematic sampling of system transitions provide statistically safe shields without exact reachability analysis?
  • RQ4How does reward shaping compare to shield-based safety enforcement in terms of safety guarantees and performance?
  • RQ5Can post-shielding be optimized to reduce interference while maintaining safety, and how does it compare to pre-shielding?

Key findings

  • Pre-shielding consistently outperforms post-shielding, achieving a cost of 6912 on the cruise control model—39.2% lower than the best post-optimized alternative.
  • The number of shield interventions in post-shielding can be reduced by 15.3% through intervention-minimizing optimization, though this increases cost by 3.7%.
  • Post-optimization for cost minimization reduces cost by 5.3% but increases interventions by 29.1%, indicating a trade-off between performance and safety enforcement.
  • Reward shaping with penalties up to 1000 still results in safety violations, demonstrating its insufficiency for guaranteeing worst-case safety.
  • The method achieves strong statistical safety in all case studies, including two industrial systems, with only a moderate number of samples (n=4) required for reliable shielding.
  • The shield synthesis process is significantly faster than symbolic methods, enabling practical deployment on complex hybrid systems.

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.