Luccioli, Davide
(2026)
Formal Verification and Runtime Shielding for Safe Reinforcement Learning.
[Laurea magistrale], Università di Bologna, Corso di Studio in
Artificial intelligence [LM-DM270], Documento ad accesso riservato.
Documenti full-text disponibili:
Abstract
Reinforcement learning enables agents to learn effective behaviours through interaction with their environment, but its exploratory nature makes it difficult to guarantee compliance with strict safety requirements. Runtime shielding addresses this problem by separating task optimization from safety enforcement, restricting the actions proposed by a learned policy according to a predefined safety specification. However, the resulting guarantees depend on the correctness of the software implementing the shield.
This thesis presents a general methodology for constructing formally verified runtime shields for reinforcement learning. Lean~4 is used to express safety specifications, implement executable safety decision procedures, and formally prove their correctness within a common formal environment. The methodology is evaluated across four environments, including single-agent navigation, dynamic obstacles, adversarial agents, and multi-agent railway coordination in Flatland. These case studies demonstrate how different safety requirements can be addressed through a common construction process, from which recurring verification patterns for safe continuation, adversarial branching, and sequential reservation are identified.
The results demonstrate that formal safety enforcement can be integrated with reinforcement learning without formally verifying the learning component itself. The resulting methodology provides a general framework for constructing independently verified runtime safety mechanisms while retaining the flexibility of reinforcement learning for task optimization.
Abstract
Reinforcement learning enables agents to learn effective behaviours through interaction with their environment, but its exploratory nature makes it difficult to guarantee compliance with strict safety requirements. Runtime shielding addresses this problem by separating task optimization from safety enforcement, restricting the actions proposed by a learned policy according to a predefined safety specification. However, the resulting guarantees depend on the correctness of the software implementing the shield.
This thesis presents a general methodology for constructing formally verified runtime shields for reinforcement learning. Lean~4 is used to express safety specifications, implement executable safety decision procedures, and formally prove their correctness within a common formal environment. The methodology is evaluated across four environments, including single-agent navigation, dynamic obstacles, adversarial agents, and multi-agent railway coordination in Flatland. These case studies demonstrate how different safety requirements can be addressed through a common construction process, from which recurring verification patterns for safe continuation, adversarial branching, and sequential reservation are identified.
The results demonstrate that formal safety enforcement can be integrated with reinforcement learning without formally verifying the learning component itself. The resulting methodology provides a general framework for constructing independently verified runtime safety mechanisms while retaining the flexibility of reinforcement learning for task optimization.
Tipologia del documento
Tesi di laurea
(Laurea magistrale)
Autore della tesi
Luccioli, Davide
Relatore della tesi
Scuola
Corso di studio
Ordinamento Cds
DM270
Parole chiave
Reinforcement Learning, Formal Verification
Data di discussione della Tesi
6 Ottobre 2026
URI
Altri metadati
Tipologia del documento
Tesi di laurea
(NON SPECIFICATO)
Autore della tesi
Luccioli, Davide
Relatore della tesi
Scuola
Corso di studio
Ordinamento Cds
DM270
Parole chiave
Reinforcement Learning, Formal Verification
Data di discussione della Tesi
6 Ottobre 2026
URI
Gestione del documento: