Reachability-Based Confidence-Aware Probabilistic Collision Detection in Highway Driving

Risk assessment is a crucial component of collision warning and avoidance systems in intelligent vehicles. To accurately detect potential vehicle collisions, reachability-based formal approaches have been developed to ensure driving safety, but suffer from over-conservatism, potentially leading to false-positive risk events in complicated real-world applications. In this work, we combine two reachability analysis techniques, i.e., backward reachable set (BRS) and stochastic forward reachable set (FRS), and propose an integrated probabilistic collision detection framework in highway driving. Within the framework, we can firstly use a BRS to formally check whether a two-vehicle interaction is safe; otherwise, a prediction-based stochastic FRS is employed to estimate a collision probability at each future time step. In doing so, the framework can not only identify non-risky events with guaranteed safety, but also provide accurate collision risk estimation in safety-critical events. To construct the stochastic FRS, we develop a neural network-based acceleration model for surrounding vehicles, and further incorporate confidence-aware dynamic belief to improve the prediction accuracy. Extensive experiments are conducted to validate the performance of the acceleration prediction model based on naturalistic highway driving data, and the efficiency and effectiveness of the framework with the infused confidence belief are tested both in naturalistic and simulated highway scenarios. The proposed risk assessment framework is promising in real-world applications.


Introduction
Autonomous vehicles (AVs) are expected to significantly benefit future mobility, while one of the prerequisites for enabling AVs publicly available is to ensure autonomous driving safety [1]. Highways are structured environments designed for vehicles to drive at a consistently high speed for efficient road trips, and are the first applications of Level 1 and Level 2 automated vehicles. In the transition from human-driven and lower-level automated vehicles to high-level AVs, it is essential to address driving safety on highways both for conventional vehicles and AVs. To identify driving risk and potential vehicle crashes, extensive research on risk assessment and collision detection has been conducted [2,3]. To accurately detect potential vehicle collisions, reachabilitybased formal approaches have been developed [4], since they can mathematically check whether the behavior of a system, satisfies given safety requirements.
Reachability analysis (RA) has been widely employed to formally verify driving safety [5,6]. RA computes a complete set of states that an agent (e.g. a vehicle) can reach given an initial condition within a certain time interval [7]. Based on RA, a safety verification thus can be performed by propagating all possible reachable space of the AV and other traffic participants on the road. In doing so, safety is ensured if such forward reachable set (FRS) of the automated vehicle does not intersect that of other traffic participants during the propagation period. In line with such a definition, the FRS can formally verify safety between road users, but easily lead to over-conservative results because the state propagation is feedforward and ignore traffic participant interactions (i.e., vehicles react to the surrounding environment and adjust the control output) [7].
Alternatively, RA can be conducted in a closed-loop manner [8]. Given a target set representing a set of undesirable states (e.g., collision states between two vehicles) and worst-case disturbances, we define the backward reachable set (BRS) as the set of states that could lead to being in the target set during a certain time horizon. Specifically, a BRS is the state set in which a control strategy does not exist to prevent the AV from the target set under worst-case disturbances. An unsafe area thus can be directly identified by the BRS with initial vehicle states. Note that one can compute BRS offline in advance, and then use the cached BRS in real-time. Although BRS considers control reactions from the AV and is less conservative compared to FRS, it still suffers from over-conservatism due to the worst-disturbance closed-loop reactions.
We aim to use the RA for driving risk evaluation and potential collision detection. However, both these two RA approaches suffer from over-conservatism. To reduce the over-conservative nature of forward reachability, the time horizon for a FRS is typically kept small and is recomputed frequently. Although BRS incorporates a closed-loop feedback to consider the worst disturbance from the surrounding vehicle, general interactions between vehicles are not a pursuit-evasion [9]. It is reasonable to consider a more realistic situation: the interactions are not adversarial, but leading to crashes is still possible.

Related work
Driving risk assessment is crucial to identify potential collision and quantify risk level. Various Surrogate Measures of Safety (SMoS) have been constructed to represent the likelihood/severity of future possible collision events. Typically, SMoS can be calculated in a time-series manner, including Time To Collision [10,11], Time Headway [12], and Time to Lane Crossing [13]. Unfortunately, these developed SMoS are mostly deterministic, which means that uncertainties in vehicle motion and environment are not considered. Although several probabilistic approaches [14,15,16] have been integrated to address uncertainties and improve the performance of SMoS, these methods could suffer from additional computational load (especially for long-term prediction) and cannot formally ensure driving risk.
One could also assess driving risk by estimating the current collision probability given surrounding road participants. Collision detection can be generally divided into three methodologies, i.e., neural network-based approaches, probabilistic approaches, and formal verification approaches. Neural networks have potential to provide accurate vehicle collision detection through classifying safety-critical scenarios. For instance, a collision detection model using a neural network-based classifier was developed in [17]. The proposed model takes onboard sensor data, including acceleration, velocity, and separation distance, as input to a neural network based classifier, and outputs whether alerts are activated for a possible collision. A specific animal detection approach was proposed in [18], where a deep semantic segmentation convolutional neural network is trained to recognize and detect animals in dynamic environments. Although neural network-based approaches are effective to identify potential collisions, the trained classifier generally cannot include clear decision rules and is hard to interpret.
To address uncertainties of surrounding vehicles, probabilistic based approaches have also been widely adopted for collision detection. A conceptual framework to analyze and interpret the dynamic traffic scenes was designed in [19] for collision estimation. The collision risks are estimated as stochastic variables and predicted relying on driver behavior evaluation with hidden Markov models. A probability field for future vehicle positions was defined in [20], where an intention estimation and a long-term trajectory prediction module are combined to calculate the collision probability. Given a set of local path candidates, a collision risk assessment considering lane-based probabilistic motion prediction of surrounding vehicles was proposed in [21]. However, these methods typically require pre-defined parameters of position distributions, which can impact the adaptability of the probabilistic collision detection.
Formal verification approaches, which can formally ensure system safety given specific control input range and safety requirements, have also been employed to address collision detection [22,23]. As one of the formal approaches, RA computes a complete set of states that an agent (e.g. a vehicle) can reach given an initial condition within a certain time interval [7]. Based on RA, a safety verification thus is performed by propagating all possible reachable space of the automated vehicle (AV) and other traffic participants forward in time and checking the overlaps. To reduce the over-conservative nature of forward reachability, a stochastic FRS discretizing the reachable space into grids with probability distributions was developed [24]. At each time step, a collision probability is provided by summing probabilities of the states that vehicles intersect. However, this approach is based on Markov chains, which assume that the vehicle state and its control input evolve only in line with the current state. Besides, it cannot explicitly address two-dimensional motion, as lane-change maneuvers are not considered.
RA can also be conducted in a closed-loop manner with worst-case disturbances, namely the BRS [8]. Although BRS can be constructed offline by employing advanced PDE solvers [25], it suffers from overconservatism due to the worst-disturbance assumptions, which are not realistic. To fill the research gap, we aim to combine the BRS and stochastic FRS technique into an integrated collision detection framework, which cannot only theoretically ensure safety in non-risky interactions, but also provide an accurate collision estimation in safety-critical scenarios.

Objectives and contribution
In this work, we integrate the two RA approaches, and propose a collision detection framework to evaluate highway driving risk; see Fig. 1. The BRS is firstly computed based on Hamilton-Jacobi-Isaacs (HJI) partial differential equation (PDE) [8]; if the relative positions of vehicles are identified unsafe by the BRS, a stochastic FRS considering surrounding vehicle manoeuvring modes is further established to calculate a collision probability at each future time step. Here the stochastic FRS shares the same reachable states as FRS. In addition, each state of a stochastic FRS has an estimated probability. It is ideal to directly use a stochastic BRS for collision detection, while the computation of a stochastic BRS is not readily viable due to the closed-loop form of BRS.  Based on the stochastic FRS, a collision probability between two vehicles can be calculated by summing up state probabilities where two vehicles spatially overlap. If the obtained collision probability is above a predefined threshold, the ego vehicle has to execute an emergency brake or swerve to avoid crashes with the other vehicle. The proposed framework benefits from both BRS and FRS: the driving safety could be theoretically ensured when the relative vehicle positions are out of the unsafe area identified by the BRS; otherwise the framework provides a collision probability based on a developed stochastic FRS.
To construct the stochastic FRS, we develop a long-short term memory (LSTM) model for multi-maneuver acceleration prediction on highways. The proposed model has two stages for maneuver prediction (i.e., lanekeeping, turning-left/-right on highways) and acceleration prediction respectively, and the model input features are also selected differently at each stage. We further incorporate a confidence-aware belief vector to generate a group of predicted acceleration distributions, which can dynamically adjust the degree of confidence inferred from current prediction accuracy [26]. The confidence-aware belief vector could result in a concentrated stochastic FRS when the LSTM model has higher prediction accuracy, and lead to a more spread stochastic FRS when vehicles move unexpectedly.
The main contribution in this work is summarized as: • We propose a multi-modal acceleration prediction model for surrounding vehicles, and establish stochastic FRS for each surrounding vehicle by leveraging the proposed acceleration predictor. Furthermore, we incorporate confidence awareness to generate a group of predicted acceleration distributions, and dynamically update the degree of confidence, leading to a more accurate stochastic FRS and more agile collision detection results.
• An integrated probabilistic collision detection framework including both BRS and stochastic FRS is proposed to evaluate the highway driving risk. Within the framework, an offline-computed and cached BRS is used online to check whether the car-car interaction safety can be theoretically ensured; if not, a stochastic FRS is then computed online to provide an accurate collision probability at each future time step.
We have presented the results of stochastic FRS using the LSTM prediction model in [27]. In this paper, we significantly extend [27] by including the integrated collision detection framework and infusing a confidenceaware belief vector for more accurate stochastic FRS. Extensive and comprehensive experiments, which are different from those in [27], have been conducted to validate the proposed framework. The remainder of the paper is as follows: Section 2 provides preliminaries on BRS, FRS and Markov-based stochastic FRS. In Section 3 a specific prediction-based confidence-aware stochastic FRS is developed, and we establish an integrated driving risk framework including BRS and stochastic FRS in Section 4. Extensive experiments are conducted in Section 5 and we conclude our work in Section 6.

Backward reachability set (BRS)
Backward reachability analysis is regarded as an optimal control problem and thus computing the reachable set is equivalent to solving the HJI PDE [8]. Define the system dynamics byẋ = f (x, u, d) where x ∈ R n1 and u ∈ U ⊂ R n2 are the state and control, and d ∈ D ⊂ R n3 is the disturbance. The system dynamics are assumed to be uniformly continuous and bounded.
In the context of two-vehicle interactions, u corresponds to the control of ego vehicle, and d corresponds to the control of the surrounding vehicle, since its actions are treated as disturbance inputs. Specifically, let (x e , u e )/(x s , u s ) represent the state and control of ego/surrounding vehicle, and x rel be the system states between vehicles, e.g., relative two-dimensional distance (y 1,rel , y 2,rel ) and velocity (v 1,rel , v 2,rel ). Thus the system dynamics are given byẋ ref = f (x ref , u e , u s ). The formal definition of the BRS, denoted by BR(t), for the relative system is Here BR(t) represents the set of unsafe statesx rel at time t, from which if the surrounding vehicle followed an adversarial policy u s , any policy u e would lead to the state set T where two vehicles collide within a time horizon.
Assuming optimal (i.e., adversarial) surrounding vehicle actions, BR(t) can be computed by defining a value function V (t, x rel ) which obeys the HJI PDE, where the solution V (t, x rel ) gives the BRS as its zero sublevel set: The HJI PDE is solved starting from the boundary condition V (t, x rel ), which indicates whether state x rel belongs to collision set T . We cache the solution V (t, x rel ) to be used online as a look-up table.

Forward reachability set (FRS) and Markov-based stochastic FRS
The computation of a FRS is done by considering all possible control inputs u ∈ U of a systemẋ = f (x, u) given an initial set of states X 0 . The FRS of a system is formally defined as where FR(t) is a forward reachable set of statesx at time t from an initial state x(0) ∈ X 0 at the current time 0 and subject to any input u belonging to the admissible control input set U.
Based on the definition of FRS, we can further mathematically formulate a stochastic version of FRS as SFR(t), where each statex within the FRS is associated with a state probability p(x).
One of the most frequently used techniques is to approximate stochastic processes by Markov chains, which present a stochastic dynamic system with discrete states [24]. The discretized time step series are denoted as {0, 1, . . . , e}, where e is the future final time step, and the duration of each time step is dt. Due to the stochastic characteristics, the system state at the predicted time step is not exactly known, and a probability p i (k) is assigned to each state i at the time step k (the discretized system state is denoted as i, j for simplicity). Then the probability vector p(k + 1) composed of probabilities p i (k) over all states is updated as where Φ is the state transition matrix. Here Φ is time invariant as the model is assumed as Markovian.
To implement a Markov chain model, the system state first needs to be discretized if the original system is continuous. For the vehicle dynamic system, we represent it as a tuple with four discretized elements, including two-dimensional vehicle positions and velocities. Meanwhile, the control input requires to be discretized. Detailed discretization parameters are reported in Section 5.1.
Each element Φ ji in matrix Φ represents the state transition probability from state i to j. Note that the transition probabilities depend on the discrete input u as well, i.e., each discrete input u generates a conditional transition probability matrix Φ u . Specifically, each element Φ u ji in the conditional matrix Φ u is the possibility starting from the initial state i to j under control u ∈ U, where u represents the corresponding control input of Φ u ji . The conditional probability Φ u ji therefore is expressed as where p u i is the control input probability given state i. The time index does not appear here as it is a Markov process. The overall state transition matrix is then constructed as The probability distribution of the control input p u i is dynamically changed by another Markov chain with transition matrix Γ i , depending on the system state i. This allows a more accurate modeling of driver behavior by considering the frequency and intensity of the changes of control input. As a consequence, the transition matrices Γ have to be learned by observation or set by a combination of simulations and heuristics. By incorporating the two transition matrices Φ and Γ, a Markov-based stochastic FRS with probabilities p(k) over all discretized states can be obtained at each predicted time step k.
In [24], the control transition probability matrices Γ only depend on the current control input and the state at the current time. While the computational efficiency is ensured by using such simplified Markovian setting, the future control input and trajectories of a vehicle can be influenced by historical information and interactions with surrounding environment [28]. Therefore in this work, we do not assume that the vehicle system state is Markovian. Instead, to address the historical information and vehicle interactions, we aim to use a vehicle control predictor with multi-maneuvering modes to generate and dynamically update the transition matrices at each time step k as

Prediction-based confidence-aware stochastic FRS
In this section, to provide more accurate prediction of surrounding vehicles, we first introduce a two-stage multi-modal acceleration prediction model consisting of a lane change maneuver prediction module and an acceleration prediction module. Then we detail how the stochastic FRS is established by incorporating the proposed acceleration prediction model and infusing a confidence belief vector. Section 3.1 and Section 3.2 have been presented in [27], and are included here for completeness. Note that the prediction model is replaceable, as long as the accelerations can be predicted by bi-variate normal distributions.

Acceleration prediction of a surrounding vehicle
Typically, the vehicle trajectories and acceleration are predicted using both current and historical information [28]. In doing so, the prediction accuracy can be improved compared to that only using current states as . The two modules both have a encoder-decoder structure, but adopt and process historical information as input in different ways. Abbreviations concat and FC stand for the concatenation operation and fully connect layer respectively. A variant of the model for trajectory prediction was developed earlier in [29].
input. This motivates us to establish an LSTM based network to predict probabilistic future vehicle accelerations both using current and historic vehicle information. An overview of the developed two-stage acceleration prediction model is illustrated in Fig. 2.

Two-stage vehicle acceleration prediction
We have developed a two-stage multi-modal trajectory prediction model in [29]. In this work, we keep the same lane-change maneuver prediction model at the first stage, but develop a new acceleration prediction model at the second stage. This is necessary because the acceleration prediction is employed to enable the dynamic update of the conditional probability Φ u ji (k) in Eq. (8). We first briefly introduce the adopted lane-change maneuver prediction module from [29]. The input of the module is expressed as where X represents all input features from previous time step −h to the current time step 0. At each historic time step, the collected input is composed of three parts: is the position information for vehicle being predicted as well as its surrounding vehicles, b (·) contains two binary values to check whether the predicted vehicle can turn left and right, and d (·) ∈ [−1, 1] is the normalized deviation value from the current lane center.
As shown on the top of Fig. 2, LSTMs are used to encode and decode the lane-change maneuver prediction model, in which the encoding information is passed to fully connected layers before decoding. The output of the model is a probability distribution P(m|X) for each lane-change maneuver mode m (i.e. change to left, change to right, keep the same lane) time step 1 to e.
As for the acceleration prediction at the second stage, the input includes historic positions of the vehicle being predicted and surrounding vehicles, in addition to the historic accelerations x A (−h:0) of the vehicle being predicted: As we use additional acceleration information for the vehicle being predicted, we modify the input size of the LSTM encoder in [29] for the vehicle being predicted, while maintaining the overall network structure unchanged. Detailed information of the second-stage model is referred to [28,29].
Given the input X T and corresponding maneuver mode probability distribution P(m|X), the output P(U|m, X T ) of the second-stage acceleration prediction model is conditional acceleration distributions over where u (·) is the predicted vehicle acceleration at each time step within the prediction horizon. Note that the prediction horizon and time increment are the same as those for the reachable set computation, respectively. Given the three defined maneuvers m, the probabilistic multi-modal distributions are calculated as where outputs Θ = [Θ (1) , . . . , Θ (e) ] are time-series bivariate normal distributions.
, ρ k m } corresponds to the predicted acceleration means and standard deviations along two dimensions, and the correlation at future time step k under each maneuver mode m, respectively.
Under acceleration distributions Θ, the future vehicle trajectories are propagated as are the propagated two-dimensional velocities and positions at future time step k for each maneuver mode m, respectively. (v 0 1m , v 0 2m , y 0 1m , y 0 2m ) denotes the system state at the current time t. The propagated trajectory variances are updated as σ k 1m = σ k 1m · (dt) 4 /4 and σ k 2m = σ k 2m · (dt) 4 /4, and the correlation as ρ k m · (dt) 4 /4. Therefore, the propagated probabilistic distributions of the vehicle position are expressed as

Model training
Typically a multi-modal prediction model is trained to minimize the negative log likelihood (NLL) of its conditional distributions as For more accurate collision probability estimation, we focus on the potential collision when two vehicles have intersections along the trajectories. We therefore directly minimize the trajectory prediction errors propagated from the acceleration prediction in line with [30] as where Y = [y (1) , . . . , y (f ) ] is the propagated trajectories with distributions Θ, and y (k) = {y k 1m , y k 2m } are the predicted positions of the vehicle at time step k under maneuver mode m.
To further improve the prediction performance, we separately train the lane-change maneuver and vehicle acceleration prediction models. This is because that the proposed approach has a two-stage structure: the maneuver probabilities are first predicted, and then for the corresponding conditional vehicle acceleration distributions. For the maneuver prediction model, it is trained to minimize the NLL of the maneuver probabilities −log ( m P(m|X)); for the vehicle acceleration prediction, the adopted model is to minimize −log m P Θ (Y|m, X T ) .

Prediction-based stochastic FRS of a surrounding vehicle
When predicting future states of a surrounding vehicle, not only the current state but also historical information needs to be considered [28]. In this work, we use the acceleration prediction results from Section 3.1 to dynamically update the state transition probability matrix at each time step.
The system state i of the surrounding vehicle is represented as a tuple with four discretized elements, including two-dimensional vehicle positions and velocities. The system input is expressed as a two-dimensional acceleration (a 1 , a 2 ). Note the current state probability is known in advance. Typically there is an initial state i with p i (0) = 1, or an initial probability distribution is provided to address state uncertainties. In practice, from the current time, we need to calculate multiple stochastic FRSs at multiple forwarded time steps, and check the corresponding FRS at each future time step k ∈ {1, 2, . . . , e}.
At each predicted time step k, the acceleration prediction model provides a bivariate normal distribution function f k m (a 1 , a 2 ) for each maneuver mode m as where µ 1 , µ 2 , σ 1 , σ 2 , ρ provided by the prediction model denote predicted means and standard deviations along two directions, and the correlation at future time instant k for each maneuver mode m, respectively. The time and maneuver indices of the five parameters are omitted here for the sake of brevity. To propagate the system states, the conditional probability p u i (k) at time step k under state i and acceleration u = (a u 1 , a u 2 ) is calculated as where λ m k is the probability for maneuver mode m at time step k, and a u 1 , a u 1 , a u 2 , a u 2 are the integral boundaries of u.
Here the conditional state probability p u i (k) is implicitly relevant to the current state as well as historical states. This is because the current and historical information has been considered when providing the predicted acceleration results. This implies the state transition matrix now has to be computed online.
Substituting Eqs. (17) and (6) into Eq. (7), the overall state transition matrix Φ is obtained. To distinguish the Markov-based approach which can compute the transition matrix offline, we denote the state transition matrix obtained with the prediction model at the predicted time step k as Φ(k). Then at each predicted time step, the state probability vector is iteratively computed as To measure the driving risk, the collision probability at the current time is expressed as the product of collision probability at each predicted time step: where H(k) is the set of states that the ego vehicle position occupies at time step k. The vehicle dimension is considered when calculating the collision probability.

Infusing confidence belief
A prediction model applied in computing the stochastic FRS cannot always be accurate, since the vehicles could move unexpectedly. To address this issue, a confidence-aware belief vector is adopted to modify probabilistic motion predictions that exploit modeled structure when the structure successfully explains vehicle motion, and degrade gracefully whenever the vehicle moves unexpectedly [26]. If the prediction confidence is not considered, the probabilistic acceleration is expressed as in Eq. (16). To address the prediction confidence level, similar to [26], an additional coefficient β is infused into the acceleration probability density function: where a positive coefficient β controls the confidence level of the prediction model. For instance, when setting β to infinity, the acceleration probability would be uniformly distributed and ignore the prediction model. While β is close to 0, the discretized input (a 1 , a 2 ), which is closet to the predicted acceleration mean values (µ 1 , µ 2 ), is assigned with probability one. Consequently, the input conditional probability computation in Eq. (18) is extended as where b k (β) ∈ (0, 1) is the belief value for a specific β at time step k. Note that the performance of a prediction model possibly changes over time. For instance, the model could have a relatively worse prediction accuracy when the surrounding vehicle starts to maneuver a lane change, as the lane-change maneuver may not be timely recognised. To reflect the dynamic property of the confidence level, the belief of each confidence level should be also updated frequently. In doing so, a Bayesian belief vector regarding possible values of β is introduced.
Initially, each β is assigned with a uniform probability b 0 (β); then the belief vector evolves given posterior probabilities of the state and input under each β at time step k: where P (u (s:k) |x (s:k) ; Θ (s:k) , β) = is the posterior probability of the observed actual accelerations u (s:k) with t s = t max(k−k +1,1) from previous k time steps. In practice, the Bayesian belief vector with a relatively small set and small previous time steps, e.g., 5 discrete values of β and k = 2, can achieve significant improvemente [26].

Integrated collision detection framework
In this section, we propose an integrated collision detection framework combing BRS and stochastic FRS described in the previous section. To this end, we also specify the system dynamics models for the BRS and stochastic FRS respectively, and prove the equivalence of different models in the BRS and stochastic FRS.

Framework
We propose an integrated collision detection framework on highways by combining the BRS and stochastic FRS. Before employing the framework, a BRS is computed based on the HJI PDE [31]. Although computing a BRS is time-consuming, this can be done offline and the results of BRS are cached in a look-up table for real-time risk assessment later. Note that we need to interpolate the BRS look-up table in practice, as the cached states are discritized. The flowchart of the framework including three iterative steps is illustrated in Fig. 3.
Step 1 At the current time, we check whether the surrounding vehicle is inside the unsafe area identified by the BRS. If so, go to the next step; otherwise, the safety of vehicle interactions is theoretically ensured at the current time.
Step 2 A stochastic FRS is generated online to calculate collision probability at each predicted time step. Note that the stochastic FRS can be obtained using either heuristic rules [24] and a prediction-based approach that has been introduced in Section 3.
Step 3 If the obtained collision probability is above a pre-defined threshold, the ego vehicle has to replan motion trajectories or the ego driver will receive an alert, to avoid potential crashes with the surrounding vehicle, which is not within the scope of this work.

Vehicle dynamics and equivalent transformation between BRS and stochastic FRS
The computation of BRS and (stochastic) FRS depends on the selection of vehicle dynamic models. Ideally, we can use the same system dynamics for the ego to construct both the BRS and FRS; then the equivalent transformation, which is used to ensure a consistent control input range between different vehicle dynamics, is no longer necessary. However, in this work, we use different system dynamics for the BRS and FRS due to two reasons. First, we construct the BRS using a bicycle model for the ego vehicle and a unicycle model for the surrounding vehicle following [31], since these models are relatively more realistic than a point mass model. Second, we construct the FRS using a point mass model, mainly to accommodate control input predictors, which typically output two-dimensional acceleration values [30,32]. Details of the employed vehicle dynamics in this work are as follows.
To calculate the BRS, the vehicle dynamics of ego and surrounding vehicles are respectively defined in line with [31]. As shown in Fig. 4, we apply a bicycle model for the ego vehicle, where the state includes longitudinal/lateral positions y 1,ego /y 2,ego , the heading angle ψ ego , and the ego vehicle velocity v ego . Its control input is the acceleration a ego and steering angle δ f . O is the vehicle rotation center. δ r = 0 is the rear wheel steering angle and β ego = tan −1 ( lr l f +lr tan(δ f )) is the slip angle of the ego vehicle, where l f /l r is the distance from front/rear to the vehicle reference point. For the surrounding vehicle, we model its state with two-dimensional positions y 1,s /y 2,s , the heading angle ψ s , and the surrounding vehicle velocity v s . The control input is acceleration a s and angular velocity ω s . Then the relative dynamics can be represented as Confidenceaware prediction    where y 1,rel /y 2,rel and ψ rel are relative two-dimensional coordinates and heading angel respectively.
For the calculation of the stochastic FRS, to accommodate acceleration prediction models that typically represent probabilistic accelerations with bivariate distributions, we employ a point mass model to compute the stochastic FRS of the surrounding vehicle. The control input is simplified with two-dimensional accelerations, and the future vehicle positions can then be directly propagated with the predicted accelerations. It is assumed that the planned trajectories of the ego vehicle are deterministic and known in advance. Nevertheless, the motion uncertainties of the ego vehicle can be represented by extending its future position with additional adjacent states, which is left for future work. A summary of the system dynamics used for the BRS and FRS is provided in Table 1. Given different vehicle dynamic models and control inputs are employed for the BRS and stochastic FRS, it is essential to match the control input range among the three dynamic models. We call this process the equivalent vehicle dynamics transformation between the BRS and FRS. We provide a detailed equivalent transformation procedure in the Appendix. Now the BRS and stochastic FRS can be integrated into the same framework.

Experiments
In this section, we first introduce the employed naturalistic highway driving dataset highD for the prediction model training/testing, as well as the experimental setup for the prediction model and the BRS/FRS computation. Then a number of experiments are designed and conducted with respect to three aspects: 1) We test the proposed acceleration prediction model by comparing it with three existing predictors, since the acceleration prediction model plays a vital role in the establishment of the stochastic FRS. 2) We further test the performance of the prediction-based confidence-aware FRS, using both naturalistic driving data from highD, as well as simulated cut-in events. The risky cut-in events are simulated to test collision estimation performance based on the stochastic FRS. 3) In order to validate the integrated collision detection framework, we first compare the compare identified unsafe areas between the BRS and FRS, and then test the framework in both risky and non-risky cut-in events.

Dataset and setup
The highD dataset [33], which contains bird-view naturalistic driving data on German highways, is utilized to train and test the acceleration prediction model. We randomly select equal samples for the three different lane-change maneuver modes, leading to 135,531 (45,177 for each maneuver mode) and 19,482 (6,494 for each mode) samples for the training and testing respectively. The original dataset sampling rate is 25 Hz, and we downsample by a factor of 5 to reduce the model complexity. We consider 2-seconds historic information as input and predict within a 2-second horizon.
The prediction model is trained using Adam with a learning rate 0.001, and the sizes of the encoder and decoder are 64 and 128 respectively. The size of the fully connected layer is 32. The convolutional social pooling layers consist of a 3 × 3 convolutional layer with 64 filters, a 3 × 1 convolutional layer with 16 filters, and a 2 × 1 max pooling layer, which are consistent with the settings in [28].
In line with the vehicle dynamics in Section 4.2, the BRS is offline computed in five dimensions, among which are relative two-dimensional positions and heading angle, and vehicle velocities for the ego and the surrounding, respectively. The relative longitudinal (lateral) positions are discretized from -10 to 40 (-4 to 4) meters with an increment 0.5 (0.4) meters, the heading angle from -45 to 45 degrees with an increment 9 degrees, and the ego/surrounding vehicle velocity from 20 to 40 m/s with an increment 1 m/s, leading to over five million states. The range of control input is set in the Appendix to ensure equivalent model transformation between the BRS and FRS.
The FRS states are expressed in four dimensions, including two dimensions for position and velocities, respectively. The vehicle longitudinal (lateral) positions are discretized from -2 to 80 (-4 to 4) meters with an increment 2 (1) meters, and the longitudinal (lateral) velocities are discretized from 20 to 40 (-2.5 to 2.5) m/s with an increment 0.4 (0.2) m/s, leading to around half a million states. As for the control input, we discretize the longitudinal (lateral) accelerations from -5 to 3 (-1.5 to 1.5) m/s 2 with an increment 1 (0.5) m/s 2 , leading to 63 acceleration combinations. We also add several constraints to limit the acceleration selection, including maximal acceleration, strict forward motion, and maximal steering angle [34]. In the end, 37 million possible state transfers are generated. To alleviate the computational load, we assume that an advanced GPU [35], which enables 2048×28 parallel computation, is available. The stochastic FRS with state probability distributions p(k) is calculated at each predicted future time step within 2 seconds with an increment 0.4 seconds, i.e., {0.4, 0.8, 1.2, 1.6, 2.0}.

Acceleration/trajectory prediction models
To validate the proposed two-stage acceleration prediction model (denoted as T-LSTMa), we compare T-LSTMa with three existing probabilistic multi-modal predictors: the two-stage trajectory prediction model T-LSTM [29], the social convolutional trajectory predictor S-LSTM using convolutional neural networks to represent surrounding vehicles [28], and its variation S-LSTMa, where the prediction output is modified to probabilistic accelerations. Utilizing the testing dataset from highD, we report the comparative results in Table 2, including five evaluation indicators, i.e., root mean square error (RMSE), average displacement error (ADE), final displacement error (FDE), NLL (the lower, the better), and average lane-change prediction F1 score (LC-F1). We show predictor performance on the overall testing dataset, and also compare prediction results in terms of three lane-change maneuver modes, respectively. Note that we do not directly evaluate the acceleration prediction accuracy. Instead, we compare vehicle position prediction accuracy, which directly affects the collision estimation.
Looking at the overall comparison results, we observe that using acceleration prediction and then propagating future vehicle position can significantly improve the prediction accuracy (see comparisons between S-/T-LSTMa and S-/T-LSTM). This could be due to the additional physical information when using the predicted acceleration to propagate future positions. Meanwhile, S-/T-LSTMa and S-/T-LSTM have the same LC-F1, as they share the same lane-change prediction submodel. S-LSTMa has the worst performance in terms of NLL and LC-F1. Specifically, the LC-F1 for lane-keeping trajectories is 0%. This indicates jointly predicting acceleration and the lane-change maneuver mode in one neural network leads to undesirable results; it is reasonable to consider decoupling the acceleration and lane-change maneuver mode predictions by two neural networks, which have been employed in T-LSTMa. To summarize, our proposed acceleration predictor T-LSTMa achieves the best performance in terms of all indicators, with ADE < 0.15 meters and FDE < 0.40 meters.
We further test the model prediction performance over different prediction horizons (one and three seconds). As shown in Table 3, the proposed predictor T-LSTMa achieves superior performance over all prediction horizons. In addition, both models obtain more accurate prediction results with a shorter prediction horizon.
For the remainder of this work, we use T-LSTMa with default settings to predict acceleratioins.

Confidence-aware position prediction and collision estimation
In this section, we compare different approaches for generating stochastic FRS. Three different groups of coefficients β are selected: Only one distribution with β = [1]; three normal distributions with β = [1/2, 1, 2]; five normal distributions with β = [1/3, 1/2, 1, 2, 3]. This leads to three different approaches to generating prediction-based stochastic FRS (denoted as PSRS, PSRS-3β and PSRS-5β). Further increasing the number of distribution groups is not considered, since we need to ensure real-time computation of the BRS. The heuristic method in [24] (denoted as HSRS) is also adopted as a baseline to generate the stochastic FRS.
To test the performance of the prediction-based confidence-aware FRS, we use both naturalistic driving data from highD, as well as simulated cut-in events. This is because highD itself does not contain safetycritical events, and we thus create simulated risky events to test collision estimation performance based on the stochastic FRS.

highD trajectories
Assume that the vehicle would occupy the exact space state and four adjacent states along with the longitudinal and lateral directions. We randomly select naturalistic driving trajectories from highD, including both lanekeeping and the lane-change trajectories.
Examples of predicted stochastic FRSs using different approaches are presented in Fig. 5 and Fig. 6   accuracy at time t = 6.4 seconds of the four approaches is 24.54%, 29.38%, 32.58%, and 37.15%. Infusing confidence awareness can indeed improve future vehicle position prediction, in particular for lane-change trajectories. The belief vector changes are illustrated in Fig. 7 for both lane-change and lane-keeping trajectories. In both cases, the belief value with the lowest β converges to one. This is because the prediction model provides an accurate mean value of accelerations, leading to a corresponding higher belief value in line with Eq. (24). We test the four approaches using randomly selected 100 trajectories from highD for both lane-keeping and lane-change situations. The average position prediction performance is summarized in Table 4. Clearly when the prediction horizon is short (e.g. 0.4 seconds), all approaches can generate the stochastic FRS with higher prediction accuracy. However, when the prediction horizon becomes larger, HSRS has the worst performance followed by PSRS. Again, infusing confidence belief effectively improved the prediction accuracy; such improvement is more significant during lane-change situations.

Simulated safey-critical cut-in trajectories
Safety-critical cut-in events are simulated to test the collision detection performance on different stochastic FRSs. In the simulated cut-in scenario, the ego vehicle is in the middle lane and the surrounding travels  in the right lane with constant initial longitudinal speeds v e = 30 m/s and v s = 25 m/s, respectively. The surrounding vehicle is 15 meters ahead of the ego at t = 1 second, and starts turning left with a lane-change duration 7.5 seconds. The vehicle length and width are 4 and 2 meters, respectively. The driving behaviors of the two vehicles are simulated by the classic intelligent driving model (IDM) for car following, and a lateral control model in [36].
The IDM equations are expressed as where s (t) is the current desired longitudinal distance gap, v(t) the longitudinal speed, dv(t) the longitudinal speed difference with the lead, s(t) the current distance gap. If there is no leading vehicle, dv(t) and 1/s(t) are both set as 0. The IDM parameters are longitudinal desired speed v 0 , time headway T , minimum gap s 0 , acceleration coefficients a a and a b , respectively. Table 5: IDM parameters based on car-following trajectories in highD [37]. These IDM parameters are adopted from [37] and summarized in Table 5 in line with car-following trajectories in highD. The ego vehicle has a desired speed as its initial longitudinal speed v e , and the desired speed of the surrounding is set as 36.1 m/s (130 km/h). The two vehicles share the same values of the remaining IDM parameters. As for the lateral cut-in behaviors, we adopt the polynomial curves in [36], which can provide lateral accelerations with smooth trajectories.
Given such cut-in scenario settings, a safety-critical cut-in event is created, and the crash occurs at around t = 5.0 seconds. As seen in Fig. 8, the space state probabilities of the stochastic FRS are more concentrated using PSRS-3β and PSRS-5β. The future position prediction accuracy at the current time is 31.81%, 33.4%, 36.73%, and 37.39% using HSRS, PSRS, PSRS-3β and PSRS-5β, respectively. The belief dynamic updates in the simulated cut-in event are illustrated in Fig. 9. Although the acceleration prediction accuracy provided by the lowest β distribution decreases, it maintains the highest prediction accuracy, and its belief value converges to one.
We also report the collision detection results in Fig. 10. In the beginning (from 0 to 1.2 seconds), the four FRS-based approaches all predict a tiny collision probability, since the surrounding vehicle does not start lane change until t = 1 second. After that, significant differences in the collision estimation are observed for the four approaches. For instance, when the estimated collision probability using PSRS-5β is close to 0.20 at time t = 2.4 seconds, PSRS without infusing confidence awareness predicts the collision probability as 0.10, and HSRS has a predicted collision probability about 0.05. It indicates that the stochastic FRS using confidence-aware prediction is agile and effective to identify potential collisions in the risky cut-in event.
Under the same simulated cut-in scenario settings, we further vary the initial longitudinal speeds of the two vehicles from 20 m/s to 35 m/s with an increment 1 m/s, leading to 16 × 16 = 256 cut-in events. Based on the employed longitudinal and lateral driving behavior models, 33 crashes are identified when 4 ≤ v e − v s ≤ 6 m/s. To compare the collision detection performance, we statistically analyze the simulated 21 cut-in events where a crash occurs. The analysis results are illustrated in Fig. 11, where the timeliness value represents the average time that remains to the crash when the collision probability has reached a threshold. No matter the selection of the collision probability threshold, our proposed approaches infusing confidence awareness (i.e., PSRS-5β/PSRS-3β) can achieve a larger timeliness value, indicating a more adequate reaction time to potential crashes. The selection of a suitable collision probability threshold could vary in different scenarios and we leave it for future research.

The integrated collision detection framework
Based on the BRS and stochastic FRS, we propose an integrated collision detection framework. We first provide comparative results between two reachable set techniques, i.e., BRS and FRS. This explains the selection of BRS rather FRS to formally check driving safety in the first step of the framework.  As shown in Fig. 12, we set the longitudinal speed as 30 and 28 m/s for the ego and the surrounding vehicle respectively, and illustrate comparative results using both the BRS and FRS as an example. The BRS is directly employed to identify unsafe area, once its cached state value function is less than zero. To obtain the unsafe area identified by the FRS, we first need to enumerate initial relative surrounding vehicle positions, and check whether two vehicles could collide using the FRS with a prediction horizon. Then we enclose all relative positions that could lead to a crash and identify the enclosed area in blue line as unsafe. Note that we limit the unsafe area between -3.75 to 3.75 meters in the lateral direction, since we only need to address potential risky interactions between adjacent lanes. Similarly, we do not check relative longitudinal positions behind the ego. As shown in Fig. 12, the FRS indeed identifies a larger unsafe area compared to that using the BRS. This is reasonable, as the BRS further considers ego reaction to the surrounding vehicle, leading to a smaller unsafe area. Specifically, the identified unsafe areas are symmetric in Fig 12(a), since the lateral speed and relative heading angles of the initial vehicle states are both zeros. In contrast, the surrounding vehicle has an initial lateral speed and a relative heading angle in Fig 12(b). Then based on the FRS, we observe that the area with a lateral position between -3 to -3.75 meters is now safe due to the lateral speed of the surrounding vehicle. The BRS now has an asymmetric shape due to the lateral speed, and the area with minus lateral relative position becomes safer. This example verifies that the BRS is indeed less conservative than the FRS,  since the unsafe area identified by the BRS is smaller than that by the FRS, and the BRS identified unsafe area is a subset of the FRS identified area. This observation is consistent with the definitions of BRS and FRS. Then we provide two specific cut-in event to validate the proposed collision detection framework. The cut-in events are both selected from the simulated trajectories in Section 5.3.2. In the first cut-in event, the initial longitudinal speeds of the ego and the surrounding are 30 and 28 m/s, respectively. This leads to non-risky and safe interactions between the two vehicles. As shown in Fig. 13, during the lane change, the integrated framework ensures safety, since the relative positions (see Fig. 13(a) and Fig. 13(b)) are not inside the unsafe area identified by the BRS. Thus, the establishment of stochastic FRS is not activated and the estimated collision probability always remains zero in Fig. 13(c).
In the second cut-in event, the initial longitudinal speeds of the ego and the surrounding are 30 and 25 m/s, respectively, resulting in a collision about t = 5 seconds shown in Fig 14. When we use the proposed collision detection framework in this safety-critical event, safety can be ensured at the beginning (see green squares in Fig 14). This is because the surrounding vehicle starts lane-change maneuver at t = 1.0 second, and driving risk can be only captured until the surrounding vehicle has clear lane-change intention. Thus at t = 2.0 seconds, the proposed framework can no longer ensure driving safety (see Fig. 14 vehicle is inside the BRS unsafe area of the ego), and the stochastic FRS is established to estimate a collision probability accurately. However, the obtained collision probability is below a pre-defined threshold 0.05 at t = 2.0 seconds, and we mark it in blue. Afterwards, the framework provides an estimated collision probability above the threshold until collision happens at t = 5.0 seconds, where the estimated collision gradually increases to one (see Fig 14(f)). In summary, the proposed framework can reasonably ensure safety at the beginning, and then effectively identify the potential crash thanks to the established stochastic FRS. As for the computational efficiency, identifying whether the vehicles are theoretically safe only takes several milliseconds, as the BRS data is cached in a look-up table. To construct the stochastic and sum up a collision probability, the run time is always less than 50 milliseconds given the experimental settings. The proposed framework is promising for real-time risk assessment applications.

Conclusions
We have developed a reachability-based framework for collision detection in highway driving. A cached backward reachable set is firstly employed to formally verify whether the current interaction safety can be theoretically ensured. Otherwise, a prediction-based confidence-aware stochastic forward reachable set is calculated online at each predicted time step for collision probability estimation. If the estimated collision probability exceeds a pre-defined threshold, the ego vehicle can then execute brakes or swerve to avoid potential crashes. In doing so, the proposed framework can ensure risk-free interactions in non-risky events, and also provide an accurate collision estimation in safety-critical events. Extensive experiments have validated the performance of the proposed acceleration prediction model for the stochastic FRS, and we have shown infusing confidence belief can indeed effectively improve the prediction accuracy, leading to more agile collision detection results. The integrated framework has also been tested in both risky and non-risky events.
The proposed approach assumes the use of an advanced GPU for efficient parallel computing on the stochastic FRS. This requires further efforts to conduct hardware implications and real-world testing. Besides, the developed acceleration predictor is trained on highD dataset, which only contains highway trajectories. We can only apply our approach to diverse scenarios, e.g., urban and country-road environments, by training the predictor with a more diverse dataset. Future works could integrate the risk assessment to enable safer and more efficient motion planning, and employ the proposed risk assessment framework on an actual vehicle.  Each connected position pair in green indicates that the car-car interaction is identified as theoretically safe by the BRS, pair in blue indicates the interaction has an estimated collision probability below a threshold (0.05 in this case), and pairs in red indicate the interaction has a collision probability above the threshold. Subfigures (b) -(d) illustrate the shapes of BRS and FRS at t=0.8, 2.0 and 2.8 seconds respectively. Note that to calculate the collision probability, the stochastic FRS is established at each future time step including the four intermediate time points, and we only show the stochastic FRS at the last prediction time step for convenience. In subfigure (b), the current position of the surrounding vehicle is outside the BRS unsafe area of the ego, thus the stochastic FRS does not need to be constructed in practice. We just show the stochastic FRS at t=0.8 seconds in subfigure (b) for completeness. Subfigure (e) illustrates the relative vehicle positions, where the arrow indicates the evolution direction. The estimated collision probability in subfigure (f) is marked as green at the beginning, then blue and red in the end phase. equivalent transformation.
According to Section 4.2, the point mass vehicle model is applied to describe the motion of the vehicle in the FRS.ÿ = a y (27a) x = a x (27b) Y =ẋ sin ψ +ẏ cos ψ (27c) X =ẋ cos ψ −ẏ sin ψ (27d) whereẊ andẎ are two-dimensional velocities in the global coordinate system, and ψ ∈ (0, 2π) is the yaw angle corresponding to the global coordinates.ẋ andẏ are longitude and lateral speed in vehicle coordinates. a x and a y are longitudinal and lateral accelerations. For the transformation of control input from the point mass model in the FRS to the ego vehicle's bicycle model in the BRS, we add the influence of angular velocitẏ ψ by a y =ψẋ Take the derivative ofẎ andẊ to obtainŸ andẌ: Y =ẍ sin ψ + (ẋ cos ψ)ψ +ÿ cos ψ − (ẏ sin ψ)ψ =ẍ sin ψ + a y cos ψ +ÿ cos ψ − ẏ x a y sin ψ = a x sin ψ + 2a y cos ψ −ẏ x a y sin ψ X =ẍ cos ψ − (ẋ sin ψ)ψ −ÿ sin ψ − (ẏ cos ψ)ψ =ẍ cos ψ − a y sin ψ −ÿ sin ψ − ẏ x a y cos ψ = a x cos ψ − 2a y sin ψ −ẏ x a y cos ψ Finally, the acceleration and velocity in the longitudinal and lateral are formulated byẊ andẎ : a x =ẏ x a y + (Ẍ sin ψ −Ÿ cos ψ) (31a) Meanwhile, considering the ego vehicle model in the BRS: where l r = 1.738 m and l f = 1.058 m are rear and front wheelbase. v = v 2 x + v 2 y and a = a 2 x + a 2 y is the synthesis velocity and acceleration, respectively. β is the slip angle and δ f is the steering angle. For the ego vehicle model (bicycle model) in the BRS, the range of vehicle control input β and a ego can be calculated by the scale ofẌ,Ÿ and ψ based on (28), (31a), (31b) and (32e). In this work, the range ofẌ andŸ are (-5,3) m/s 2 and (-1.5,1.5) m/s 2 . And the range ofẋ andẏ are (20,40) m/s and (-1.5,1.5) m/s, respectively. Considering that the surrounding vehicle model in the BRS is the simplified unicycle model, the range of disturbance a sur is the same as a ego in the ego vehicle model. Meanwhile, the range of disturbance angular acceleration ω sur =ψ can be calculated by (28), (31a) and (31b). Finally, we can obtain the equivalent range of control input (β, a ego ) and disturbance (a sur , ω sur ).