Safeguarding Multi-Agent Reinforcement Learning for Connected and Automated Vehicles with Recursively Feasible Control Barrier Functions
Authors: Jianye Xu, Yousef Sayed, Bassam Alrifaee
Organizations: Department of Computer Science, RWTH Aachen University, Germany · Department of Aerospace Engineering, University of the Bundeswehr Munich, Germany
Multi-Agent Reinforcement Learning (MARL) shows promise in coordinating connected and automated vehicles but offers no safety guarantee. Although Control Barrier Functions (CBFs) can add this guarantee, their optimization problem can become infeasible in practice due to control bounds. Moreover, they often overapproximate vehicle and road geometry, which makes them conservative. This paper proposes the Backup-Horizon CBF (BH-CBF), which evaluates safety along a horizon until all vehicles stop. BH-CBF is recursively feasible under control bounds, and it considers the exact vehicle and road geometry. Based on BH-CBF, we derive a fully decentralized safety filter that only needs a single broadcast of vehicle states and routes per step and stays real-time in dense traffic. We use BH-CBF to safeguard a MARL policy over its life cycle: as a reward during pre-training, as a run-time filter at deployment, and as a filter in the training loop that keeps fine-tuning on unseen maps collision-free. In simulations on real-world maps of a roundabout and an intersection, BH-CBF avoids all collisions of unsafe MARL policies and keeps its safety guarantee at every step. Existing filters either collide, lose the guarantee, or fall back to full braking far more often. In recorded roundabout traffic with 1264 human-driven vehicles over 115 km, our safeguarded policies shorten the median travel time by 14% compared with the human drivers, without any collision.
Figures & tables
Fig. 1 : An unsafe MARL policy safeguarded by our BH-CBF. Light trails: predictions of braking to a standstill along the route. Red: standstill distance of a vehicle pair.
Fig. 3 : Margin geometry. (a) Facet margin hl , whose minimum over all facets is the lane margin. p : position; elon,elat : body axes; qc : corner; ℓlon,ℓlat : half-length, half-width; Fl=[bl,bl+1] : facet of the left boundary ( s=L ); nl : inward normal; red: clearance εlane . (b) Pair margin hij . Red: clearance εveh ; nij : separating normal; dashed: separating line.
Fig. 4 : Prediction of vehicle i at step k over t (schematic). Blue: candidate prediction ξk+t∣ki(ui) for a control ui that accelerates and steers away from the route; gray: backup prediction ξˉk+t∣ki , which tracks the route centerline (dashed). (a) Poses; ξk+1∣ki is the same for both predictions. (b) Speed. (c) Margin he of the right lane constraint; ( 7 ) keeps the blue curve above (1−λ)Be(xk) from t=2 on.
Fig. 5 : Candidate predictions of vehicles i (blue) and j (green) and their backup predictions (gray) at step k over t (schematic). (a) Poses at a crossing; the backup predictions come closest at t=3 . (b) Pair margin hij of the backup predictions (gray) and of the candidate predictions (black). The budget between the gray curve and (1−λ)Bij(xk) is split into the shares of i (blue fill) and j (green fill).
Fig. 6 : Decentralized corner inequalities ( 10 ) at step k for one prediction step t (schematic), drawn with the separating normal nk+t∣kij . Candidate predictions of vehicles i (blue) and j (green) and their backup predictions (gray). Blue and green fills: shares of i and j , as in Fig. 5 . Gray dot: closest corner of Rˉk+t∣ki along nk+t∣kij ; blue dot: a corner of Rk+t∣ki that uses the full share ρijηk+t∣kij of the budget.
Fig. 8 : The evaluation stages along a MARL policy’s life cycle.
Fig. 9 : Stage 1: training rollouts over pre-training by safety reward, smoothed over ten iterations, mean and standard error over five training seeds.
Own map
Unseen map
Collisions ↓
Throughput ↑
Collisions ↓
Throughput ↑
Reward method
[1/km]
[veh/s]
[1/km]
[veh/s]
TTC
0.86
1.08
1.27
0.92
One-Step CBF
0.71
1.03
1.61
0.80
BH-CBF (ours)
0.05
1.05
0.59
0.91
TABLE I : Stage 1: the 30 pre-trained policies (ten per safety reward, iteration 500) deployed without a filter.
Filter
Geometry
Condition
Split
BH-CBF (ours)
exact
backup horizon
corner budgets
A-Geometry
capsules
backup horizon
corner budgets
A-Condition
exact
one step
corner budgets
A-Split
exact
backup horizon
half split
A-Centralized
exact
backup horizon
centralized
B-SAT [ 19 ]
smoothed SAT
one step
half split
TABLE II : Compared safety filters; gray: as in BH-CBF.
Collisions ↓
Runs ↓
Fallbacks ↓
Throughput ↑
Time ↓
Filter
[1/km]
∈/C
[1/1000]
[veh/s]
[ms]
Unfiltered
1.39
60/60
–
0.87
–
B-Frenet
1.22
60/60
–
0.75
4.7
A-Condition
0.61
60/60
–
0.91
8.0
B-Disk
0.47
60/60
–
1.04
7.1
B-SAT
0.38
60/60
–
0.91
11.3
TABLE III : Stage 2: the ten unsafe source policies (TTC reward, iteration 100) deployed with fully decentralized filters, except A-Centralized; 60 runs (own and unseen map, three seeds each) per row. Runs ∈/C : runs that leave the certified set; time: computation time per step.
Fig. 10 : Unsafe policies on the roundabout (a)–(d) and the intersection (e)–(h), without (top) and with (bottom) our BH-CBF filter. Blue: yielding vehicle 1; green: vehicle 2; red: collisions; gray: others (last footprint only); footprint interval: 1.0s .
Fig. 11 : Collisions of the TTC-reward policies over pre-training and fine-tuning, mean over runs (20 fine-tuning runs per setting, own and unseen map taken together) with standard deviation in ( 11(a) ) and standard error in ( 11(b) ).
Travel time ↓
Stops ↓
Gap
RMS jerk ↓
Controlled by
median [s]
[%]
[m]
median [ ms−3 ]
Humans
12.0
13.8
1.40
0.94
BH-CBF (ours)
10.3
2.0
1.22
3.66
TABLE IV : Stage 4: Human-comparison results over 115 km of 1264 recorded human-driven vehicles. Stops: stop before the ring entry; gap: 5th percentile of the minimum gap.
Fig. 12 : Stage 4: two roundabout scenarios over 7s . Filled: our BH-CBF-filtered policies; unfilled: recorded humans (time stamps with dashed lines). Other vehicles not shown.
Fig. 13 : Stage 4: entering the ring. (b) Median and 2575% band. (c) Probability of entering the ring before the circulating vehicle (dots: share per time-to-arrival bin with 95% confidence intervals; thick curves: logistic fits with 95% confidence bands; thin blue curves: logistic fits of the ten single policies).
Fig. 14 : Computation time of the BH-CBF filter per step on the roundabout, mean over 500 steps per bar; sampling period Δt=100\text{,}\mathrm{ms}$$ .