<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Safe Reinforcement Learning via Probabilistic Logic Shields</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Wen-Chi Yang</string-name>
          <email>wenchi.yang@kuleuven.be</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Giuseppe Marra</string-name>
          <email>giuseppe.marra@kuleuven.be</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gavin Rens</string-name>
          <email>gavinrens@sun.ac.za</email>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Luc De Raedt</string-name>
          <email>luc.deradet@kuleuven.be</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Centre for Applied Autonomous Sensor Systems, Örebro University</institution>
          ,
          <country country="SE">Sweden</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Leuven AI, KU Leuven</institution>
          ,
          <country country="BE">Belgium</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Stellenbosch University</institution>
          ,
          <country country="ZA">South Africa</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Safe Reinforcement learning (Safe RL) aims at learning optimal policies while ensuring that the agent stays safe. A popular solution to Safe RL is shielding, which uses a logical safety specification to prevent an RL agent from taking unsafe actions. Traditional rejection-based shielding techniques provide rigorous safety guarantees, however, they are dificult to integrate with continuous, end-to-end deep RL methods for three reasons. 1. Previous shielding approaches have been limited to symbolic state spaces. 2. Rejection-based shields are deterministic, assuming that any action is either safe or unsafe in a particular state. However, this is an unrealistic assumption as the world is inherently uncertain, and safety is often a matter of degree rather than an absolute concept.</p>
      </abstract>
      <kwd-group>
        <kwd>probabilistic shields</kwd>
        <kwd>statistical relational AI</kwd>
        <kwd>probabilistic logic programming</kwd>
        <kwd>safe reinforcement learning</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>Italy</p>
      <p>
        https://wenchiyang.github.io/ (W. Yang)
program, as shown in Fig. 1. To ensure safety, we consider a set of noisy sensors  surrounding
the agent. These sensor are represented in the probabilistic logic program as neural predicates,
which take an image as input and generate probabilities indicating the presence of obstacles
or potential dangers. The program can then be automatically compiled into a diferentiable
structure, allowing for the optimization of a single loss function through the shield, enforcing
safety directly in the neural policy. Therefore, PLS can be seamlessly applied to any policy
gradient algorithm while still providing the same convergence guarantees. Overall, probabilistic
logic shields have the following benefits compared to rejection-based shields.
• Realistic Safety Function. PLSs allow for risk control by using probabilistic safety measure.
• Simpler Model. PLSs use a simpler safety model that only represents internal safety-related
properties, which is less demanding than many model-based approaches that require the
full MDP (e.g. [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]).
• End-to-end Deep RL. PLSs are diferentiable and can be seamlessly applied to any
modelfree RL agent such as PPO, TRPO, A2C, etc.
      </p>
      <p>• Convergence. PLSs in deep RL provide convergence guarantees.</p>
      <p>Our experiments show that applying PLS to policy gradients leads to safer and more
rewarding policies compared to other state-of-the-art shielding techniques in diferent discrete and
continuous Atari domains. The sources are available on https://github.com/wenchiyang/pls.</p>
      <p>This work has been accepted at IJCAI 2023 Main Track. A preprint can be found on https:
//arxiv.org/abs/2303.03226.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>N.</given-names>
            <surname>Hunt</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.</given-names>
            <surname>Fulton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Magliacane</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. N.</given-names>
            <surname>Hoang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Das</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Solar-Lezama</surname>
          </string-name>
          ,
          <article-title>Verifiably safe exploration for end-to-end reinforcement learning</article-title>
          ,
          <source>in: Proceedings of the 24th International Conference on Hybrid Systems: Computation and Control</source>
          ,
          <source>HSCC '21</source>
          ,
          <year>2021</year>
          . URL: https: //doi.org/10.1145/3447928.3456653.
          <source>doi:1 0 . 1 1</source>
          <volume>4 5 / 3 4 4 7 9 2 8 . 3 4 5 6 6 5 3 .</volume>
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>