Patching Approximately Safe Value Functions Leveraging Local Hamilton-Jacobi Reachability Analysis
Sander Tonkens, Alex Toofanian, Zhizhen Qin, Sicun Gao, Sylvia Herbert
TL;DR
The paper tackles the challenge of obtaining formally safe value functions when starting from approximately safe ones by introducing HJ-Patch, a local DP-based patching method guided by Hamilton-Jacobi reachability. By updating only states near the safety boundary, HJ-Patch yields a safe value function $h^*(x)$ whose 0-superlevel set is the viability kernel of the initial safe set, with substantial computational savings compared to global HJ reachability. Empirical results across adaptive cruise control and quadcopter experiments demonstrate that HJ-Patch markedly reduces unsafe trajectories relative to learned barriers while achieving up to 2-order-of-magnitude speedups, thus enabling scalable, formally safer integration of learning-based components. The work provides both theoretical guarantees (under discretization) and practical guidelines for applying patching in higher-dimensional systems, highlighting its role as a bridge between data-driven safety methods and formal reachability analysis.
Abstract
Safe value functions, such as control barrier functions, characterize a safe set and synthesize a safety filter, overriding unsafe actions, for a dynamic system. While function approximators like neural networks can synthesize approximately safe value functions, they typically lack formal guarantees. In this paper, we propose a local dynamic programming-based approach to "patch" approximately safe value functions to obtain a safe value function. This algorithm, HJ-Patch, produces a novel value function that provides formal safety guarantees, yet retains the global structure of the initial value function. HJ-Patch modifies an approximately safe value function at states that are both (i) near the safety boundary and (ii) may violate safety. We iteratively update both this set of "active" states and the value function until convergence. This approach bridges the gap between value function approximation methods and formal safety through Hamilton-Jacobi (HJ) reachability, offering a framework for integrating various safety methods. We provide simulation results on analytic and learned examples, demonstrating HJ-Patch reduces the computational complexity by 2 orders of magnitude with respect to standard HJ reachability. Additionally, we demonstrate the perils of using approximately safe value functions directly and showcase improved safety using HJ-Patch.
