Boundary Sampling to Learn Predictive Safety Filters via Pontryagin's Maximum Principle
Authors: James Dallas, Thomas Lew, John Talbot, Jonathan DeCastro, Somil Bansal, John Subosits
Organizations: Toyota Research Institute, Los Altos, CA 94022, USA. · Department of Aeronautics and Astronautics, Stanford University, Stanford, CA 94305, USA.
Safety filters provide a practical approach for enforcing safety constraints in autonomous systems. While learning-based tools scale to high-dimensional systems, their performance depends on informative data that includes states likely to lead to constraint violation, which can be difficult to efficiently sample in complex, high-dimensional systems. In this work, we characterize trajectories that barely avoid safety violations using the Pontryagin Maximum Principle. These boundary trajectories are used to guide data collection for learned Hamilton-Jacobi Reachability, concentrating learning efforts near safety-critical states to improve efficiency. The learned Control Barrier Value Function is then used directly for safety filtering. Simulations and experimental validation on a shared-control automotive racing application demonstrate PMP sampling improves learning efficiency, yielding faster convergence, reduced failure rates, and improved safe set reconstruction, with wall times around 3ms.
Figures & tables
Fig. 1 : Left : Extremal trajectory that barely stays in the safe set S and reachable sets from x0 . Right : Generation of boundary trajectories to learn a safety filter.
Fig. 3 : Experimental platform.
Fig. 4 : Failure rate between PMP and uniform sampling. Performance vs training epochs and prediction horizon (top). Performance vs dataset size (bottom). PMP consistently improves failure rate. Shaded regions denote ±1 S.D. Significance shown with ∗p<0.05 and ∗∗p<0.01 .
Fig. 5 : Value function at a speed of 10.5 m/s for 50k epochs and 30k samples for PMP sampling (center) and uniform sampling (right). Ground truth (Sec. V-A ) is shown on left. Brown solid line is the 0-level set of the value function and black dashed lines are track edges and centerline.
Layers
Setting
PMP
Uniform
2
30k epochs
0.7±0.01
0.40±0.01
2
50k epochs
0.73±0.01
0.46±0.04
2
70k epochs
0.74±0.01
0.57±0.08
2
45k samples
0.72±0.01
0.52±0.02
2
60k samples
0.73±0.01
0.51±0.04
3
30k epochs
0.6±0.03
0.51±0.05
TABLE I : IOU across model capacity and dataset size. Bold indicates where PMP sampling outperforms uniform sampling with statistical significance.
Fig. 6 : Shared control experiment with γ=0.1 for steering difference (left) torque difference (center), and velocity (right). Color depicts intervention (left, center) and velocity magnitude (right).
Fig. 7 : Segment of γ=0.1 experiment for steering (left) and position (right). CBVF-QP output is shown in blue and driver request in green). Track edges are shown in red.
Safety filters have been shown to be effective tools to ensure the safety of control systems with unsafe nominal policies. To address scalability challenges in traditional synthesis methods, learning-based approaches have been proposed for designing safety filters for systems with high-dimensional state and control spaces. However, the inevitable errors in the decisions of these models raise concerns about their reliability and the safety guarantees they offer. This paper presents Adaptive Conformal Filtering (ACoFi), a method that combines learned Hamilton-Jacobi reachability-based safety filters with adaptive conformal inference. Under ACoFi, the filter dynamically adjusts its switching criteria based on the observed errors in its predictions of the safety of actions. The range of possible safety values of the nominal policy's output is used to quantify uncertainty in safety assessment. The filter switches from the nominal policy to the learned safe one when that range suggests it might be unsafe. We show that ACoFi guarantees that the rate of incorrectly quantifying uncertainty in the predicted safety of the nominal policy is asymptotically upper bounded by a user-defined parameter. This gives a soft safety guarantee rather than a hard safety guarantee. We evaluate ACoFi in a Dubins car simulation and a Safety Gymnasium environment, empirically demonstrating that it significantly outperforms the baseline method that uses a fixed switching threshold by achieving higher learned safety values and fewer safety violations, especially in out-of-distribution scenarios.
Sacha Huriot, Ihab Tabbara, Hussein Sibai
Computer Science & Engineering Washington University in St. Louis
Latent safety filters extend Hamilton-Jacobi (HJ) reachability to operate on latent state representations and dynamics learned directly from high-dimensional observations, enabling safe visuomotor control under hard-to-model constraints. However, existing methods implement "least-restrictive" filtering that discretely switch between nominal and safety policies, potentially undermining the task performance that makes modern visuomotor policies valuable. While reachability value functions can, in principle, be adapted to be control barrier functions (CBFs) for smooth optimization-based filtering, we theoretically and empirically show that current latent-space learning methods produce fundamentally incompatible value functions. We identify two sources of incompatibility: First, in HJ reachability, failures are encoded via a "margin function" in latent space, whose sign indicates whether or not a latent is in the constraint set. However, representing the margin function as a classifier yields saturated value functions that exhibit discontinuous jumps. We prove that the value function's Lipschitz constant scales linearly with the margin function's Lipschitz constant, revealing that smooth CBFs require smooth margins. Second, reinforcement learning (RL) approximations trained solely on safety policy data yield inaccurate value estimates for nominal policy actions, precisely where CBF filtering needs them. We propose the LatentCBF, which addresses both challenges through gradient penalties that lead to smooth margin functions without additional labeling, and a value-training procedure that mixes data from both nominal and safety policy distributions. Experiments on simulated benchmarks and hardware with a vision-based manipulation policy demonstrate that LatentCBF enables smooth safety filtering while doubling the task-completion rate over prior switching methods.
Hamilton-Jacobi reachability constructs safety certificates for specified dynamics and safety constraints, tying each certificate to the deployment context for which it is synthesized. We ask whether a single certificate can instead represent a family of context-dependent safety problems and be queried across deployment conditions without re-synthesis. We learn a backward reachable tube for an eight-state vehicle model conditioned on local boundary geometry, friction coefficient, and adversarial disturbance scale. Geometry enters through an ego-frame boundary observation that defines the local containment constraint, while friction and disturbance scale enter as explicit operating-condition variables. This allows the same value function to be queried across friction coefficients from 0.4 to 2.0 and on geometries absent from synthesis. On 11 held-out evaluation geometries, the certificate maintains containment across the full tested friction range, including simultaneous geometry and grip shifts, while remaining within 1.2 percentage points in intervention rate and 0.09 m/s in speed of certificates re-synthesized with knowledge of the test geometry. We then deploy the certificate as a sampled discrete-time control barrier function filter on a full-scale vehicle near the handling limit. Lateral containment holds in every hardware session under both adversarial driving and autonomous racing, with 99th-percentile acceleration magnitude reaching 0.99 g. Across three certificates evaluated under a fixed autonomous racing controller, lap time varies by only 3.1%, demonstrating that a context-conditioned reachability certificate can transfer to deployment geometries absent from synthesis with modest performance cost.
Ali Fuat Sahin, Yunus Yazoglu, John Talbot +3
Ecole Polytechnique Fédérale de Lausanne · Stanford University · Toyota Research Institute