Integrating LTL Constraints into PPO for Safe Reinforcement Learning
Authors: Maifang Zhang, Hang Yu, Qian Zuo, Cheng Wang, Vaishak Belle, Fengxiang He
Organizations: School of Informatics, University of Edinburgh, Edinburgh EH8 9AB, Scotland. · School of Computer Science, Faculty of Engineering, University of Sydney, Darlington NSW 2008, Australia. · School of Engineering and Physical Sciences, Heriot-Watt University, Edinburgh EH14 4AS, Scotland.
This paper proposes Proximal Policy Optimization with Linear Temporal Logic Constraints (PPO-LTL), a framework that integrates safety constraints written in LTL into PPO for safe reinforcement learning. LTL constraints offer rigorous representations of complex safety requirements, such as regulations that broadly exist in robotics, enabling systematic monitoring of safety requirements. Violations against LTL constraints are monitored by limit-deterministic Büchi automata, and then translated by a logic-to-cost mechanism into penalty signals. The signals are further employed for guiding the policy optimization via the Lagrangian scheme. Extensive experiments on the Zones and CARLA environments show that our PPO-LTL can consistently reduce safety violations, while maintaining competitive performance, against the state-of-the-art methods. The code is at https://github.com/EVIEHub/PPO-LTL.
Figures & tables
Fig. 1 : PPO-LTL: environment states are labeled with atomic propositions, monitored by LTL checkers to generate constraint costs, which are integrated with task rewards for policy optimization.
Method
Reward
Hit Wall Rate
λ
PPO
17.95 ± 0.84
3.7 ± 2.1%
-
PPO-Mask
10.14 ± 2.82
6.0 ± 2.0%
-
PPO-Shielding
15.92 ± 0.55
12.0 ± 2.0%
-
PPO-Lagrangian
23.23 ± 1.51
6.0 ± 2.0%
0.00
PPO-LTL-A
17.86 ± 0.73
4.3 ± 3.5%
0.0048
PPO-LTL-B
18.61 ± 0.67
4.7 ± 3.1%
0.0018
TABLE I : Results in ZonesEnv.
Methods
Collision Rate ↓
Routes ↑
Distance
Speed
Length
Col. Num
Cent. Dev
Cost
λ
PPO
0.262 ± 0.115
0.013 ± 0.008
6.58
0.45
4030
8.0
0.77
-
-
TIRL-PPO
0.173 ± 0.129
0.083 ± 0.111
6.37
0.07
9460
7.3
0.87
-
-
TIRL-SAC
0.336 ± 0.063
0.027 ± 0.011
6.92
0.92
926
57.3
0.12
-
-
PPO-Mask
0.408 ± 0.058
0.010 ± 0.012
2.38
1.06
1338
38.0
0.37
-
-
PPO-Shielding
0.267 ± 0.056
0.072 ± 0.036
18.87
10.63
93
164.3
0.52
-
-
PPO-Lagrangian
0.233 ± 0.089
0.077 ± 0.051
7.78
0.96
6616
103.0
0.60
0.00
0.01
TABLE II : Results in CARLA. Arrows ( ↑,↓ ) indicate the direction where values are strictly better.
Configuration
Collision Rate ↓
Routes ↑
Distance
Speed
Length
Col. Num
Cent. Dev
Cost
λ
Ablation of LTL Components
No collision
0.159 ± 0.027
0.009 ± 0.003
2.71
0.68
4123
11.0
0.64
0.07
0.00
No off-track
0.275 ± 0.129
0.032 ± 0.044
3.29
0.06
10501
5.7
0.62
0.07
0.00
No lane invasion
0.207 ± 0.046
0.024 ± 0.009
6.17
1.98
14323
21.7
0.57
0.06
0.01
Sensitivity of Cost Limit (cl) and Dual Learning Rate ( αλ )
cl = 0.001
0.229 ± 0.153
0.033 ± 0.035
5.19
1.10
4749
21.0
0.78
0.06
0.01
TABLE III : Ablation studies and sensitivity analyses in CARLA.
Cost Limit
αλ
Reward ↑
Hit Wall Rate ↓
λ
0.03
0.008
18.04 ± 1.30
6.7 ± 1.2%
0.0072
0.05
0.010
17.86 ± 0.73
4.3 ± 3.5%
0.0048
0.07
0.015
18.61 ± 0.67
4.7 ± 3.1%
0.0018
0.10
0.020
18.35 ± 1.42
5.7 ± 2.1%
0.0002
TABLE IV : Sensitivity analysis of cost limit and Lagrangian learning rate ( αλ ) in ZonesEnv for PPO-LTL.