[Paper Review] It's Time to Play Safe: Shield Synthesis for Timed Systems
This paper proposes timed post-shields and pre-shields for real-time systems, synthesizing them from timed automata specifications to enforce safety with minimal interference. It introduces recovery guarantees in post-shields and demonstrates their effectiveness in reinforcement learning for car platooning, significantly reducing crashes while enabling safe learning.
Erroneous behaviour in safety critical real-time systems may inflict serious consequences. In this paper, we show how to synthesize timed shields from timed safety properties given as timed automata. A timed shield enforces the safety of a running system while interfering with the system as little as possible. We present timed post-shields and timed pre-shields. A timed pre-shield is placed before the system and provides a set of safe outputs. This set restricts the choices of the system. A timed post-shield is implemented after the system. It monitors the system and corrects the system's output only if necessary. We further extend the timed post-shield construction to provide a guarantee on the recovery phase, i.e., the time between a specification violation and the point at which full control can be handed back to the system. In our experimental results, we use timed post-shields to ensure the safety in a reinforcement learning setting for controlling a platoon of cars, during the learning and execution phase, and study the effect.
Motivation & Objective
- To address the challenge of ensuring safety in safety-critical real-time systems where formal verification is infeasible due to complexity.
- To develop a method for automatically synthesizing timed shields that enforce timed safety properties without disrupting system behavior.
- To extend post-shields with guaranteed recovery times, ensuring timely resumption of system control after intervention.
- To evaluate the approach in a reinforcement learning setting for autonomous vehicle platooning.
- To demonstrate that shielding during both training and execution improves safety without compromising learning efficiency.
Proposed method
- Synthesizes timed shields using Uppaal Tiga and Uppaal Stratego to generate safety strategies from timed automata specifications.
- Implements two types of shields: pre-shields that restrict system outputs to safe choices, and post-shields that monitor and correct unsafe outputs.
- Introduces recovery guarantees in post-shields by modeling fault scenarios and ensuring intervention ends within bounded time.
- Applies timed post-shields in a reinforcement learning pipeline, where the shield corrects unsafe actions from the learning agent in real time.
- Uses a car platooning model with velocity and distance constraints to evaluate shield performance under dynamic conditions.
- Employs a reward function that penalizes unsafe distances (≤5m or ≥200m) to guide RL training and evaluate safety.
Experimental results
Research questions
- RQ1Can timed shields be automatically synthesized from timed automata to enforce safety in real-time systems?
- RQ2How can post-shields be extended to guarantee bounded recovery times after intervention?
- RQ3What is the impact of applying post-shields during both training and execution in a reinforcement learning setting?
- RQ4Does shielding during training improve safety without degrading learning performance in real-time control tasks?
- RQ5How do pre-shields and post-shields compare in terms of interference and safety enforcement?
Key findings
- In the unshielded setting, 983 crashes occurred across 10,000 simulations with 10 cars, indicating high risk during execution.
- With post-shielding during execution only, crashes were reduced to zero, and average simulation time before crash increased to 544 time units.
- When shielding was applied during both training and execution, the average reward was 342, compared to 608 in the unshielded case, suggesting a trade-off between safety and reward.
- The shielded training phase consistently lasted 2000 time units, as safety was guaranteed, unlike the unshielded case where episodes terminated early due to crashes.
- The combination of unshielded training and post-shielding during execution yielded better average rewards than shielding during both phases, indicating potential benefits of learning without constraints.
- The results confirm that timed post-shields effectively prevent crashes in car platooning, even under dynamic and uncertain leader behavior.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.