Online Update of Safety Assurances Using Confidence-Based Predictions

Robots such as autonomous vehicles and assistive manipulators are increasingly operating in dynamic environments and close physical proximity to people. In such scenarios, the robot can leverage a human motion predictor to predict their future states and plan safe and efficient trajectories. However, no model is ever perfect -- when the observed human behavior deviates from the model predictions, the robot might plan unsafe maneuvers. Recent works have explored maintaining a confidence parameter in the human model to overcome this challenge, wherein the predicted human actions are tempered online based on the likelihood of the observed human action under the prediction model. This has opened up a new research challenge, i.e., \textit{how to compute the future human states online as the confidence parameter changes?} In this work, we propose a Hamilton-Jacobi (HJ) reachability-based approach to overcome this challenge. Treating the confidence parameter as a virtual state in the system, we compute a parameter-conditioned forward reachable tube (FRT) that provides the future human states as a function of the confidence parameter. Online, as the confidence parameter changes, we can simply query the corresponding FRT, and use it to update the robot plan. Computing parameter-conditioned FRT corresponds to an (offline) high-dimensional reachability problem, which we solve by leveraging recent advances in data-driven reachability analysis. Overall, our framework enables online maintenance and updates of safety assurances in human-robot interaction scenarios, even when the human prediction model is incorrect. We demonstrate our approach in several safety-critical autonomous driving scenarios, involving a state-of-the-art deep learning-based prediction model.


I. INTRODUCTION
When a robot operates in close proximity to humans, it often employs a model of the human's behavior to predict her future actions, and subsequently, her future states. Given the possible future states of the human, the robot may leverage online motion planning methods to plan around these moving obstacles, and generate real-time dynamically feasible and safe trajectories. However, when the predictions deviate from the true human behavior, the robot might confidently plan unsafe maneuvers, leading to violations of critical safety constraints.
To overcome this challenge, recent works have proposed estimating a confidence parameter in the human model based on how well the predictions align with the observed human behavior [1]. The confidence parameter is then used to dilate the possible future actions of the human, essentially predicting every possible human action when the confidence is low. Even though promising, this approach is hard to scale for many human-robot applications because an update in the confidence parameter requires recomputing the future human 1 Author is with the MAE Department at Princeton University; k.nakamura@princeton.edu.. 2 Author is with the ECE department at the University of Southern California; somilban@usc.edu. states online, which can be computationally demanding even for common, nonlinear dynamical systems.
In this work, we cast the computation of future human states as a Hamilton-Jacobi (HJ) reachability problem [2]- [4] and leverage recent advances in high-dimensional reachability analysis to quickly update human state predictions online. Specifically, in reachability analysis, the future human states can be obtained by computing the forward reachable tube (FRT) of the human -the set of all states that the human can reach starting from its current state under predicted control actions. Our key idea to update the FRT online is to compute a parameter-conditioned FRT of the human, wherein a family of the FRT is computed and a member of this family can be obtained by specifying the confidence parameter value. Thus, the FRT can be updated online with a simple query of the parameterized family, corresponding to the current confidence estimate.
The parameterized FRT can be obtained by adding the confidence parameter (and other environment factors that might change online) as "virtual states" to the human dynamics and computing the FRT for the augmented system using the standard reachability tools. This, however, results in a high-dimensional reachability problem, especially for high-capacity predictive models that leverage semantic envi-ronment factors for accurate predictions, which now become additional parameters in the model that are only known online. To overcome this challenge, we leverage DeepReach [5] -a reachability toolbox that builds upon recent advances in neural PDE solvers to compute high-dimensional reachable sets. DeepReach along with a parameterized FRT allows us to ensure safe human-robot interaction despite erroneous predictions.
To summarize, the key contributions of this work are: (1) incorporating confidence estimation in high-capacity human prediction models, e.g., models based on deep neural networks. The proposed framework allows us to exploit the predictive power of these models to plan efficient robot trajectories, yet ensure safety when the predictions cannot be trusted; (2) developing a Hamilton-Jacobi reachability framework to update the model confidence and the corresponding safety assurances online for safe human-robot interaction.
II. RELATED WORK Human Modeling and Prediction. It is a common viewpoint that humans are rational agents, that is, that humans act with intent. Prior work in the human-robot interaction literature has taken models stemming from econometrics and cognitive science to model humans as noisily-rational agents [6], [7]. A common model used in human-robot interaction domains is the Boltzmann model, which captures the notion that humans are exponentially more likely to choose actions that maximize some reward function [1], [8], [9]. However, reward functions that incorrectly specify human intent can lead to overly confident incorrect predictions. Furthermore, the reward functions used to model the human's goals often fail to capture semantic information that impacts human decision-making. Specifically, in contexts such as autonomous driving, semantic information like stop signs or crosswalks shape how humans make decisions. One way to leverage semantic information and make predictions in the continuous action space is to use a neural network-based human model. These models have enabled inference and planning around human arm motion [10], [11], navigation [12], [13], and autonomous driving [14]- [16] (see [17] for a survey). However, data-driven approaches are in general subject to incorrect predictions in scenarios not captured in the training data. In this work, our goal is to ensure safe human-robot interaction despite erroneous predictions. Safe Motion Planning. The notion of safety in the context of human-robot interaction is well studied [18], [19]. One common framework to verify safety of human-robot systems is Hamilton-Jacobi reachability, which computes reachable sets for systems with general nonlinear dynamics and bounded controls [2]- [4]. Works in [8], [20] use backward reachability to find the set of unsafe states and utilize them within a model predictive control framework to plan efficient trajectories. Although some of these works [8] track human model confidence, the safety-enforcing backward reachable set is typically computed for a fixed set of parameters. [1], [21]- [23] add flexibility by precomputing a small discrete bank of reachable sets that reflect different potential beliefs of the human model. The system switches between these reachable sets based on which one fits the robots estimate best at runtime. However in practice, the parameters that affect the model predictions (and subsequently the unsafe set) are not known a priori and must be observed online, such as semantic information in the environment and the model confidence parameter. Any precomputed bank of reachable sets will suffer from being overly conservative in such scenarios. This necessitates an online computation of the reachable set, which in general is too expensive to do in real time. In this work, we propose a method to update such reachable sets online in an effective fashion.

III. PROBLEM SETUP
We consider a robot operating in a human occupied space. We assume that the robot has full knowledge of the environment, and the robot and human states.

A. Agent Dynamics
We model each agent as a dynamical system, where we denote the robot and human states as x R ∈ R n and x H ∈ R m respectively. Their individual dynamics and controls are as follows: We also let ξ(τ ; x i , u i (·), t) denote the agent state at time τ starting at the state x i at time t and applying control u i (·) over the time horizon [t, τ ]. The robot is assumed to have some objective or task, such as reaching a goal state, that it needs to plan and execute a trajectory for. While the robot performs its task, it is imperative for it to never incur any safety violations. We denote by C the set of states the robot should avoid to ensure safety, e.g., because they imply physical collisions with the human. In this work, we will compute C via evaluating a forward reachable tube of the human. Running example: We introduce a running example for illustration throughout the paper. We consider a scenario where an autonomous car is interacting with a human-driven vehicle at a traffic intersection. We model both agents in this scenario as extended unicycles whereẋ = [ẋ,ẏ,θ,v] = [v cos θ, v sin θ, u 1 , u 2 ] . The vehicle controls are given by steering rate and acceleration. The unicycle model is widely used in the literature for modeling autonomous vehicles [15], [16]. Given a collision radius of R col = 4.5 m, we define C as the positions of the autonomous vehicle that are within a distance of R col of the human vehicle.

B. Human Prediction Model
In human-robot interaction scenarios, the robot typically maintains a model of human behavior in order to aid in the prediction of their future states. In previous works, the robot modeled the human as a utility-maximizing agent with respect to learned reward functions for given state-action pairs [1], [9], [22]. However, these models typically use discrete action sets rather than considering a continuous distribution over actions. Furthermore, these utility maximizing predictors rarely incorporate semantic information, limiting their predictive capabilities.
In this work, we are particularly interested in the settings where the human motion predictors might be high-capacity models that use semantic information about the environment as an input (e.g., the roadgraph and traffic light state in the context of autonomous driving), along with the human states (and possibly their history) to generate continuous distributions over human controls. We assume that at each time step t, the robot has a prediction for each time step over the prediction horizon [t, t + T ] in terms of multivariate Gaussian distribution over human control actions: Here, µ t:t+T and Σ t:t+T are the vectors and matrices of appropriate dimensions that represent the mean and covariance for the human control actions from time t to t + T . Such prediction output representations are quite common in the literature, especially when the model is data-driven (e.g., [15] and [16]). However, despite the benefits provided by semantic information and the use of continuous action distributions, predicted controls can differ significantly from the true actions taken by the human, especially in the scenarios that are scarce or not captured well in the training data. A robot leveraging this predictor can confidently plan unsafe motions in such situations. In this work, our goal is to ensure a safe human-robot interaction despite such predictor failures. To account for such failures, we maintain a model confidence parameter indicating our level of trust in the prediction model [1], [9]. We use this model confidence to scale the covariance matrix in (1) which dilates the predicted controls when model confidence is low. We discuss our approach in more detail in Sec. V-A. Running example: A variety of learned neural networkbased methods have been proposed to predict the future actions of a human-driven car [15], [16], [24], [25]. For our case studies, we use Trajectron++ [15], which takes the semantic road information (such as lane boundaries and roadgraph), the ego agent history, as well as that of the surrounding agents as inputs, and outputs a distribution over future human actions. Thus, the predicted mean and covariance matrices in (1) are functions of these inputs.

C. Safe Planning
Our overall goal is to plan efficient trajectories for the robot to complete its task while avoiding collisions with the human at all times based on an informed prediction of the human's future motion. We leverage the idea of the forward reachable tube (FRT) to investigate how the set of occupancy states of the human evolves over time. Mathematically, the FRT of the human is defined as: Intuitively, the FRT represents the set of all states a human can reach under some control starting from their current state x H . We limit conservative decision-making by considering a restricted set of physically feasible controls during the FRT computation, given by the human motion predictor in (1). These predictions are tempered by a model confidence parameter that expands the possible range of human control inputs when the confidence in the model's accuracy is low, and leave the original predictions in tact when model confidence is high. To tractably compute the FRT, we also limit the human control actions to a bounded set of inputs by defining a probability threshold γ on the distribution in (1). We discuss this further in Sec. V-B. Running example: For our running example, the FRT consists of all possible states of the human-driven car under the Trajectron++ predictions. Once, the FRT is computed, the potential future positions of the human can be obtained as: In other words, K is the projection of V(t) on the position states of the human. Given the potential future states of the human, the unsafe states for the robot at time t are given as: C = K R col , where denotes the Minkowski sum. C is essentially an expansion of the set K by R col .
Since we will maintain a confidence in the human model, as this confidence evolve in time, the control bounds that parameterize the FRT also change. Consequently, the set of unsafe states, C, that the robot needs to use during its planning change. Traditional methods for computing an FRT would require a re-computation of the entire FRT, which is generally a process too slow to do in real-time. On the other hand, using the worst case predictions (e.g., by considering all physically possible human actions) to generate FRTs can be overly conservative. This necessitates the need to be able to update the FRT in real-time as predictions change. We will do so by computing parameter-conditioned FRTs.

IV. BACKGROUND: HAMILTON-JACOBI (HJ) REACHABILITY
Our method for computing FRTs relies on Hamilton-Jacobi (HJ) reachability analysis. In this section, we provide a quick overview of HJ reachability.
HJ reachability is a game-theoretic method for guaranteeing performance and safety for general nonlinear dynamics in the face of bounded disturbances and controls. In the context of this work, HJ reachability is used to compute the forward reachable tube, or the set of states that the human can reach given some set of starting states. To compute the FRT for our system of interest, one must define a set of initial states L of the human 1 . Next, we define a function l(x) whose sub-zero level set yields L, i.e., L = {x : l(x) ≤ 0}. The FRT is then computed by solving the following Hamilton-Jacobi-Bellman variational inequality (HJB-VI) (2) min Here, ∇V (x, τ ) is the spatial derivative of the value function at time τ and H(x, τ, ∇V (x, τ )) is the Hamiltonian defined by (3) H(x, τ, ∇V (x, τ )) = max The solution to the HJB-VI in equation (2) is a value function V (x, τ ), whose zero sub-level set at time (t + T ) describes the set of all states that the human could have potentially occupied from t to (t + T ). This set of potential occupancies V(t) is formally written as Traditionally, these HJB-VIs are solved by discretizing the state space into a grid and updating the value function at those grid points at each time step over the time horizon [t, t + T ] [26]. However, this discretization means that the computational time scales exponentially in dimensions, making it particularly challenging to update the FRT in real-time even for moderately dimensional systems.
A different approach is to solve the HJB equation via learning-based methods. DeepReach is a recently developed neural-network-based HJ reachability solver [5]. DeepReach uses the HJB-VI itself to self-supervise the learning process of the solution. Advantageously, DeepReach does not discretize the state space and the solution time is more dependent on the problem complexity rather than the problem dimension. This enables the computation of highly parameterized reachable sets which can be used to update the reachable set online with a minimal amount of additional computation.

A. Confidence estimation and update.
We assume that at each time step, the robot is able to observe the true action taken by the humanū t−1 H . This means that, in hindsight, the robot can evaluate the likelihood of the true human action under its prediction model. If the human took a low likelihood action, this implies that the predictive model failed to capture some aspects of the human's true intent. Drawing from the literature on model confidence estimations, we define a parameter β ∈ R to describe the level of confidence in the predictive model of the human. This parameter originates from the cognitive science discipline [6], where it captures the rationality of a human being modeled as a reward-maximizing agent. High model confidence leads to the agent being exponentially more likely to take high reward actions and low model confidence transforms the agent's predicted distribution over controls to be uniform [1].
Given the continuous action space, we modify the definition of β. In this work, we define β ∈ [β low , β high ] which scales the covariance matrices Σ t:t+H in (1). β high is always set to be equal to 1, as having full confidence in the predictive model should capture the original predicted distribution over controls. β low is chosen to be a positive number less than β high based on the desired amount of spread in the human action that we want to safeguard against at low model confidence. Incorporating, the model confidence in our predictions leads to: where the covariance is scaled by β ≤ 1.
As opposed to previous work which only allowed a discrete set of β, this work allows β to take any value between β low and β high . This has advantages as discrete values allow less expressiveness in the model confidence and can lead to large differences in the distribution over predicted actions, and subsequently the FRT, as β changes.
To update β online based on the observed human actions, we use a Bayes filter. Specifically, the beliefs are initialized at t = 0 such that b 0 − (β low ) = b 0 − (β high ) = 0.5. The update rule for β is given by: where b(β) t − represents the a priori belief of the robot on the model confidence at time t, i.e., the probability of β =β at time t. b(β) t + represents the same probability a posteriori. f (ū t H ; µ t , 1 β Σ t ) refers to the Gaussian probability density function parameterized by mean µ t and covariance 1 β Σ t and evaluated at the observed actionū t H . Similarly to [1], we use the -static transition model where at each time step, the belief is sampled from b 0 with some probability and otherwise retains the belief computed by (4). This can be expressed as Given a belief of both β low and β high , the value chosen for β to augment the predicted distribution is simply a linear interpolation with weights determined by the beliefs.
After the human predictions are modified by the model confidence parameter, the ego vehicle has knowledge of a Gaussian distribution over human controls, which can be used to compute the FRT and the robot unsafe states as discussed in Sec. III-C. However, most of the available methods to solve HJI-VI including DeepReach deal with a bounded range of possible controls. We use a probability mass threshold γ to trim the control distribution. Specifically, for the ith entry, u i , the range of control is given as [µ i − δ, µ i + δ], where δ is chosen such that the probability density function integrates to γ over that range.
Ultimately, this process provides the robot a deterministic range of human control actions [u min (β), u max (β)] t:t+T that varies as both predictions and model confidence change at each time step.
We next address one of the core challenges of this work, i.e., updating the FRT online as the above control bounds change. We treat u min (β) t:t+T and u max (β)t : t + T as additional virtual states for the human with zero dynamics and compute the FRT for the augmented system dynamics. This results in a family of forward reachable sets characterized by the control bounds which can then be used to query any set of control actions online and obtain the corresponding FRT, and subsequently, the update collision set C.
Computing the FRT family requires solving a highdimensional reachability problem, since now the human control bounds are also states in the system. For this computation, we leverage DeepReach that is equipped to handle such problems. As long as the confidence-modified predictions fall within the control range used during training, updating the collision set for the human driver can be done in real-time. Running Example: The human FRT at any time depends on the current state of the human and the confidence-adjusted control bounds. Without loss of generality, we can assume that the human starts at the origin and has zero initial heading. To be able to compute the human FRT online for any values of the remaining parameters, we augment them to the human states. This leads to new system dynamics: with x being the 14D augmented state. As such, we should add control bounds for every time step as a state; however, in practice we have found that a linear interpolation between the initial and final predicted controls serves as a good approximation. Thus, u τ H ∈ [ũ τ min ,ũ τ max ] approximately, whereũ u τ max can be similarly defined. Finally, the function l(x) encoding the initial state of the robot is given by where (x, y, v, θ) represents the human-driven vehicle state as usual. 1 , 2 , 3 are small margins defined to have some mass in the initial set of states (for numerical purposes). The FRT can now be computed using the HJI-VI as described in Sec. IV. In this case, it is a 14-dimensional computation that would not be possible using traditional reachability methods (typically limited to 6D). Instead, using DeepReach we are able to learn the value function solution to the HJB-VI under these dynamics. Once learned, we can simply query the control bounds given by the current model predictions and the confidence parameter. Correspondingly, the set V(t) describes the set of positions, orientations and velocities  that the human can reach under confidence-adjusted control inputs, starting from v start . The set of unsafe robot states can then be recovered as described in Sec. III-C.

VI. CASE STUDIES
To illustrate our approach, we use the NuScenes dataset [27] to examine human-robot interaction for two traffic scenarios based on our running example. The NuScenes dataset has annotated semantic maps along with trajectory data for every 0.5 seconds. In the first case study, the humandriven vehicle begins a U-turn maneuver from the right most lane as the autonomous vehicle approaches an intersection. In the second case study, the autonomous vehicle attempts to cross a protected intersection, but the human driver fails to yield and proceeds past a stop sign too quickly.
In these case studies, we use Trajectron++, a state-ofthe-art human motion predictor, which utilizes the semantic information provided by NuScenes to better inform the distribution over future human actions. The confidence in Trajectron++ at each timestep further parameterizes these distributions in the predictive model.
For these case studies, the parameters were set such that β low = 0.03 and γ = 0.07. The prediction horizon T was 3 seconds. The value for γ was chosen so that the resulting FRTs were similar to the FRTs computed in [15] which were obtained via random sampling. Beyond our model of the agent dynamics, we also imposed hard constraints on the human control bounds to prevent unrealistic growth of the predictions. Namely, if either the magnitude of the nominal or confidence-adjusted predictions exceeded 10 m/s 2 or 2 rad/s, the prediction was capped to those limits.
In both of these scenarios, we employ a simple planner for the ego vehicle -the ego vehicle nominally moves in its lane at a constant speed. If its current nominal trajectory intersects with C over the planning horizon (3 seconds), it decelerates to stop before the intersection if possible; otherwise, it decelerates maximally until it stops. Although collision could also be avoided by steering or more sophisticated planners, we employ this simple planner to highlight the human-robot interaction aspects and because of the straight lanes in the chosen scenarios.

A. U-turn
The first case study examined dealt with a human driver executing a U-turn at an intersection. In this scenario, the ego vehicle is approaching the intersection at a speed of 21 m/s. The human vehicle begins at rest in the rightmost lane and slowly starts to execute a U-turn maneuver. Figure 1 shows the difference in behavior when using confidence-based predictions versus trusting the raw Trajec-tron++ predictions. The belief evolution for the entire time horizon of the scenario is shown in Figure 2. Here, as the human vehicle begins the U-turn from rest, Trajectron++ makes incorrect predictions that it will continue to stay in place or move straight very slowly. Whereas, actually, the human vehicle turns much faster towards the left; consequently, the model confidence falls. However, as more of the maneuver is completed, Trajectron++ makes more accurate predictions and model confidence improves.
Notably, the confidence-based predictions enable the ego vehicle to detect a potential collision 47 m away from the stop line and stop safely with a deceleration of -4.67 m/s 2 over 4.5 seconds. In contrast, when the ego vehicle does not take into account model confidence, it fails to detect potential collision until it is 5.31 m away from the stop line. The ego vehicle tries to stop by applying the maximal deceleration of -10 m/s 2 for 2.1 seconds. Despite its best efforts, the ego vehicle ends up stopping in the middle of the intersection and colliding with the human.

B. Running a Stop Sign
In this next scene, the ego vehicle is crossing an intersection at a speed of 21 m/s with the right of way. However, a human vehicle begins to enter the intersection early as the ego vehicle approaches, even though it is supposed to yield to the ego vehicle. Interestingly, this scene also has extra semantic information that leads to poor predictions -the human car is surrounded by other cars that remain stopped behind the stop line. Trajectron++ uses the history of agents in close proximity to the human to inform predictions on their control actions and believing that the human car will also stop. Thus, the robot immediately loses any confidence in the predictive model once the human begins to move forward. This is visualized in Figure 3 along with the FRTs with and without confidence. The belief is steadily regained as Trajectron++ determines the intent of the human.
Using model confidence, the ego vehicle is able to detect a potential collision after 2.5 seconds 37.3 meters away from the stop line, which is indicated by the white road line in Figure 3. This allows the ego vehicle to gracefully stop before entering the intersection, decelerating at a rate of -5.9 m/s 2 for 3.55 seconds. Without using confidence, detecting potential collision takes the robot 4 seconds and results in the robot being 5.8 m away from the stop line. This leads to the ego vehicle ending up 16.2 m past the stop line in the middle of the intersection, which leads to a collision.
Each of the case studies illustrates that the updates of the FRT with respect to both changes in predictions and changes in model confidence result in a safer behavior. The FRTs in both scenarios, despite their differing appearance, were computed by the same value function. This shows that a single parameter-conditioned FRT can be used in different scenarios for safety updates.
VII. DISCUSSION AND FUTURE WORK In this paper, we propose to use parameter-conditioned reachable sets for the purpose of safe human-robot interaction. By making a time-varying parameterization of the human controls and model confidence, we demonstrated a realtime safety assurance updates for high-capacity human-robot interaction systems. Our two running examples grounded in the autonomous driving domain illustrated how our method's ability to quickly update the forward reachable tube of the human enables a safer human-robot interaction.
In future, it would be interesting to apply our framework in the context of other human-robot interaction tasks, such as assistive manipulation and autonomous navigation. We will also investigate closed-loop human-robot interactions and operating around multiple humans.