VertexCBF: Improving Neural Control Barrier Functions via Vertex-Restricted Control Search

Bojan Derajić1  ·  Sebastian Bernhard2  ·  Wolfgang Hönig1,3

1Technical University of Berlin    2Technical University of Applied Sciences Augsburg    3Robotics Institute Germany

Technische Universität Berlin IMRC Lab CoRL

01Motivation

A CBF-QP safety filter keeps a robot inside the constraint set \(\mathcal C = \{x : c(x)\ge 0\}\) by modifying a nominal control input:

\[ \begin{aligned} u^{*} = \operatorname*{arg\,min}_{u\,\in\,\mathcal U}\ \ & \tfrac12\lVert u - u_{\mathrm{nom}}\rVert^2 \\[-1pt] \text{s.t.}\ \ & L_f h(x) + L_g h(x)\,u + \alpha\bigl(h(x)\bigr) \ge 0 \end{aligned} \]
  • Under input limits, valid CBFs are hard to design and often overly conservative.
  • Grid-based HJ reachability is exact but scales exponentially with the state dimension.
  • PDE-only neural CBFs tend to converge to trivial solutions.

02The maximal safe set

For dynamics \(\dot x = \phi(x,u) = f(x) + g(x)u\) with a convex input polytope \(\mathcal U\), the HJ safety value function

\[ V(x) = \sup_{u(\cdot)\in\,\mathcal U}\ \inf_{t\ \ge\ 0}\ c\bigl(x(t)\bigr) \]

defines the maximal safe set \(\mathcal S = \{x : V(x) \ge 0\}\), the largest controlled invariant subset of \(\mathcal C\).

We learn a neural CBF \(V_\Theta\) whose safe set approximates \(\mathcal S\).

03Neural CBF from the HJB equation

\(V_\Theta\) is trained on the stationary HJB variational inequality. The Hamiltonian is linear in \(u\), so its maximum is attained at a vertex of \(\mathcal U\):

\[ \min\Bigl\{\, c(x) - V(x),\ \ \max_{u\,\in\,\mathcal V} \nabla V(x)^\top\!\phi(x,u) \,\Bigr\} = 0 \]
A linear objective over \(\mathcal U\) is maximized at a vertex.

04Model architecture and training

\(V_\Theta\) is parametrized as a non-negative residual subtracted from the constraint:

\[ V_\Theta(x) = c(x) - r_\Theta(x), \qquad r_\Theta(x) \ge 0 \]
The learned safe set always lies inside \(\mathcal C\).

Training objective:

\[ \mathcal L(\Theta) = \lambda\,\mathcal L_{\mathrm{PDE}}(\Theta) + (1-\lambda)\,\mathcal L_{\mathrm{data}}(\Theta) \]
  • \(\mathcal L_{\mathrm{PDE}}\): HJB residual on unlabelled states
  • \(\mathcal L_{\mathrm{data}}\): regression on vertex-search labels

05Vertex-restricted control search

Labels come from a finite-horizon search over sequences of vertex controls:

\[ V^{K,B}_{\Delta t}(x) = \max_{u_0,\dots,u_{K-1}\,\in\,\mathcal V}\ \ \min_{0\,\le\, k\,\le\, K}\ c(x_k) \]
  • Beam search keeps the best \(B\) partial trajectories at each of the \(K\) steps.
  • GPU-parallel over states, beams and vertices; no PDE solver is needed.

06Evaluation metrics

Predictions are checked with closed-loop rollouts:

  • \(\rho_{\mathrm{FS}}\) false-safe: predicted safe, but the rollout leaves \(\mathcal C\)
  • \(\rho_{\mathrm{FU}}\) false-unsafe: predicted unsafe, but the rollout stays safe
  • \(\eta_{\mathrm{eff}}\) effective safe volume: ratio of states predicted and validated safe

07Better supervision data

Rollouts from 160 initial states: full-control MPPI (left) stays safe from only a few, vertex beam search (right) from all states of the safe set.

08Recovering the maximal safe set

Inverted pendulum: PDE-only gives an empty safe set, full-control data a conservative one, and vertex data (ours) closely approximates the ground truth.

09Results on 15 systems (\(\eta_{\mathrm{eff}} = \tfrac{\mathrm{vol}(\hat{\mathcal S})} {\mathrm{vol}(\mathcal X)}(1-\rho_{\mathrm{FS}})\))

PDE-only Full-control data VertexCBF (ours)
Inverted Pendulum (2,1)
0.22
1D Double Integrator (2,1)
0.41
2D Vertical Drone (2,1)
0.58
Dubins Car (3,1)
0.93
2D Double Integrator (4,2)
0.93
Kinematic Bicycle (4,2)
0.91
Cart-Pole (4,1)
0.32
Dynamic Unicycle (5,2)
0.93
Relative Unicycle (5,2)
0.93
3D Double Integrator (6,3)
0.97
3-DoF Manipulator (6,3)
0.66
Landing Rocket (7,2)
0.24
Quadruped Trunk (9,4)
0.07
6-DoF AUV (12,6)
0.36
Quadrotor (13,4)
0.91
00.51.0

Mean of five seeds; \((n_x, n_u)\) in brackets.

15/15
systems with the highest or tied-highest effective safe volume
≤ 1.2 %
false-safe rate on every system; baselines exceed 20 % or return an empty safe set on six
96.4 %
IoU with the true safe set on the inverted pendulum, vs. 33.5 % and 1.5 % for the baselines

10Hardware experiments

  • A mobile robot follows an MPC planner, and the learned CBF filters its controls in real time using live pedestrian detections.
  • One or two pedestrians cross the robot's path in each trial; all 10 trials were collision-free.
One trial: robot and pedestrian paths (left); CBF value and nominal vs. filtered controls (right).
Onboard view: front camera, a 2-D slice of the learned CBF, and the robot's perception.

11Conclusion

  • Searching only over the vertices of \(\mathcal U\) provides effective supervision without a PDE solver.
  • Limitations: no formal guarantees yet; the search cost grows with \(|\mathcal V|\) and \(K\).
  • Future work: error guarantees, systems with many control vertices, and uncertain dynamics.