category: literaturenote citekey: howladeropposingthroughcrashrisk2025 title: "Opposing-through crash risk forecasting using artificial intelligence-based video analytics for real-time application: integrating generalized extreme value theory and time series forecasting models" authors: "Howlader, Md Mohasin; Haque, Md Mazharul" year: 2025 date: 2025-00-00 2025 doi: 10.1016/j.aap.2025.108073 publication: "Accident Analysis & Prevention" url: "https://doi.org/10.1016/j.aap.2025.108073" zotero_key: 2N7JE2FB zotero_storage: M8CCQ798 collections: transpordi_planeerimine folder: 001_artiklid/Road Safety Indicators firstAuthor: "Howlader, Md Mohasin"
Contents lists available at ScienceDirect
journal homepage: www.elsevier.com/locate/aap
Md Mohasin Howlader, Md Mazharul Haque *
Queensland University of Technology (QUT), School of Civil and Environmental Engineering, Faculty of Engineering, Brisbane, QLD 4000, Australia
Recent advancements in artificial intelligence (AI) and traffic sensing technologies provide significant opportunities for real-time crash risk forecasting. While forecasting based on historical crash data yields macroscopic insights into future crash risks, such information is often insufficient for real-time applications. In contrast, traffic conflict techniques (TCTs) leveraged by extreme value theory (EVT) and AI-based video analytics have enabled crash risk estimation to a granular level, presenting a promising potential for real-time applications. This study develops a unified framework of integrating generalized extreme value (GEV) theory with parametric and nonparametric forecasting models to predict opposing-through crash risks at signalized intersections. A deep neural network-based computer vision technique was employed to extract post encroachment time (PET) traffic conflicts from 97 h of video footage. Crash risks were estimated using a non-stationary GEV model, incorporating traffic conflict counts, speed variations, and signal timing characteristics. These risk estimates were then forecasted using autoregressive integrated moving average (ARIMA), gated recurrent unit (GRU), and long shortterm memory (LSTM) models to analyze short-term crash trends. Results show that the mean crash frequency estimates fell within the 95 % confidence limits of observed crashes and confirm the adequacy of the developed EVT model in estimating opposing-through crashes. The autoregressive and recurrent neural network models exhibit similar forecasting accuracy for crash risk forecasting, with reliable predictions extending up to 11 future signal cycles. The proposed real-time crash risk forecasting framework can be a crucial component of an intelligent transport system, leading to proactive safety management for signalized intersections.
Crash risk forecasting is an emerging topic for real-time road safety applications with advancements in artificial intelligence (AI) and traffic sensing technologies. Although crash forecasting models have been extensively used for traffic safety analysis (Quddus, 2008), their applications are limited to historical crash data leading to aggregated level information or binary outcomes (crash or no crash). In contrast, the use of crash risks, sourced from microscopic road user behaviour at a granular level, has the inherent capacity to identify crash-prone traffic situations in advance, monitor safety in real-time and implement suitable interventions to prevent potential casualties (Cai & Di, 2023). However, the application of disaggregated level crash risks has mostly been used in real-time crash prediction models that evaluate crash
proneness in subsequent periods, given the available traffic information, but not for future periods where traffic information has not yet been generated. A framework for crash risk forecasting by integrating the microscopic road user dynamics and their temporal correlation or distribution pattern can significantly advance proactive road safety management.
Although seemingly interchangeable, real-time crash forecasting and crash prediction are two distinct approaches with varying scopes and methods. The key concept of real-time crash prediction relates to the hypothesis that the probability of a crash occurrence on a traffic entity within a very short time window can be predicted using instantaneous traffic dynamics (Abdel-Aty et al., 2006; Lee et al., 2003). Crosssectional or panel data are used to develop the crash prediction model, which can be utilized for prediction corresponding to the
E-mail addresses: mdmohasin.howlader@connect.qut.edu.au (M.M. Howlader), m1.haque@qut.edu.au (M.M. Haque).
https://doi.org/10.1016/j.aap.2025.108073
☆ This article is part of a special issue entitled: 'ISAAP2024' published in Accident Analysis and Prevention.
* Corresponding author.
significant covariates of the estimated model. Unlike fitting the crosssectional or panel data, forecasting uses time series data that considers its temporal structure and serial correlation for out-of-sample prediction of future events (Liu et al., 2021). Forecasting is the early estimation of future crashes using the time series crash and pertinent traffic data to allow instant decision-making. On the contrary, the crash prediction model cannot be used to identify future states as the model covariates in future are unknown. As such, while advanced statistical techniques can be utilized to develop crash prediction models capable of estimating crashes within a brief time frame, such models may not be suitable for real-time application.
Traffic conflict technique (TCT) has the potential to overcome the limitations of conventional crash-based safety assessment techniques. Besides the questionable statistical properties of crash data (low sample mean, omitted variable bias), traffic conflict techniques have several benefits for real-time applications. First, the estimation of crash risk from a minimal observation of traffic events (several days or weeks) avoids typical challenges of crash data models, including the regressionto-mean bias, the effects of maturation (i.e., traffic count, weather, economic growth) and external causal factors (policy change). Second, TCT offers the quantification of crash risk from near-crash events by examining the microscopic interactions of road users and respective crash mechanisms. Finally, the ability to quantify crash risks at granular time periods offers unprecedented advantages for real-time safety management by reasonably understanding crash risks for future periods. In this regard, the suitability of traffic conflict techniques for crash risk forecasting needs to be rigorously tested, which motivates the current study.
Extreme value theory (EVT) based crash prediction model is a powerful tool for estimating crash risk using traffic conflict techniques (Songchitruksa & Tarko, 2006). Leveraging the benefits of AI-based video analytics, EVT has shown promising performance in building meaningful crash-conflict relationships at short intervals, such as signal cycles at intersections. Over the last decade, several studies have focussed on examining the reliability of this approach and establishing the relationship between different types of conflicts and crashes in realtime (rear-end crashes by Hussain et al. (2023), Zheng and Sayed (2020) and Fu et al. (2020); pedestrian crashes by Ali et al. (2023); opposingthrough crashes by Howlader et al. (2024a)). Instead of monthly or yearly crash data, the crash risk estimates at signal cycles can be considered time series data collected throughout consecutive hours of a day or multiple days. Employing these crash risks from the EVT model as time series data, the temporal correlation analysis can potentially predict crash risk in future time intervals. However, despite being capable of reasonably estimating crash risks at disaggregated and contiguous time intervals, the application of EVT models for real-time forecasting is scarce. A significant research gap exists in developing a joint framework by integrating forecasting models with EVT models' quantitative crash risk estimates.
A crash forecasting framework based on crash risk estimated by extreme value theory (EVT) models can provide vital information on future crash risks. At first, the EVT estimates at signal cycles represent the heterogeneity of crash risks based on different road user level covariates, such as speed and speed variability of a particular road user type (Ali et al., 2023; Zheng & Sayed, 2020). In addition, while developing crash forecasting models, additional variables can provide contextual information about the input sequences, improving the model's ability to capture complex patterns and dependencies in the data (Chen & Tjandra, 2014). However, the choice of variables should be based on their relevance to the target variable and their ability to provide meaningful information for the prediction task. Therefore, a significant research question is whether the microscopic road user behaviour can be reflected in crash risk forecasting models for real-time road safety management.
One of the major challenges associated with forecasting methods is the diminishing prediction reliability with the increase in forecasting horizon in future. The extent to which the forecasts show reliable and accurate measures is vital to the advanced application of suitable interventions. Several studies have used spatiotemporal correlation among crashes to identify safety deterioration over time (Chung et al., 2011). However, the application of extreme value models is novel to crash forecasting studies, and the outreach of forecasting reliability integrating such models is still unknown, and this study intends to contribute in this direction.
This study proposes a unified framework of extreme value theory and risk forecasting models to estimate crash risks of future periods at signalised intersections. The proposed method has been demonstrated for the opposing-through crash risks at signalised intersections. Several parametric and non-parametric methods, like auto-regressive integrated moving average (ARIMA) models and recurrent neural network (RNN) structures, are applied to a time series of crash risk data estimated by non-stationary generalized extreme value (GEV) models. In particular, seasonal and non-seasonal ARIMA models and long short-term memory (LSTM) and gated neural network (GRU) architectures of RNN are employed to compare the reliability of opposing-through crash forecast and its real-time applicability in a signalized intersection. The study is unique in developing a traffic conflict-based opposing-through crash risk forecasting framework dealing with quantitative crash risks and microscopic road user behaviour at signal cycles of intersections.
The paper begins with the relevant literature related to real-time crash risk forecasting in section 2. Section 3 briefly demonstrates the data collection process and provides the summary statistics of the data. Section 3 presents the methodology, including the techniques for forecasting opposing-through crash risk. Section 4 presents the analysis results based on the proposed framework. Section 5 discusses the significant findings of this study, and section 6 presents the conclusions.
A body of literature based on crash prediction at a short time window has set the stepping stones to realise the concept of real-time safety. The development of these studies can be categorized into three broad areas: studies focusing on crash data, those utilizing traffic conflict data, and those incorporating traffic conflict data within the extreme value theory framework. As described earlier, crash risk forecasting is fundamentally different from crash prediction, and the relevant literature is presented in a separate subsection.
Many real-time crash prediction models used police-reported crash data and traffic data sourced from various sensory devices with a dominant focus on freeways (Ahmed et al., 2012; Basso et al., 2018; Lee et al., 2003; Theofilatos et al., 2019). For signalized intersections, Yuan and Abdel-Aty (2018) investigated the relationship between intersection approach-level crash risk with real-time traffic, signal phasing, and weather characteristics, considering a time interval of only 5 min. Mussone et al. (2017) investigated the real-time traffic flow and environmental characteristics at signalized intersections and found that realtime traffic flow characteristics (at 5-minute time intervals) play a significant role in predicting crash severity levels. Similarly, Yuan et al. (2020) investigated the crash risk in relation to cycle-level factors, including traffic volume, signal timing, headway, occupancy, shockwave characteristics, and weather. All these studies are case-control studies comparing the characteristics of a crash condition with those of a similar but non-crash condition to identify the factors associated with the occurrence of crashes at a disaggregated time window. Despite the granular level traffic factors being introduced, crash data-based realtime analysis lacks in quantification of potential crash risk associated with marginally avoided near-crash traffic interactions, cannot incorporate road user behaviour to establish the connection between crash and traffic data, and often runs the risk of unbalanced case-control data due to the sporadic nature of crash events.
Several studies have applied traffic conflict techniques for real-time crash risk predictions at signalized intersections (Essa & Sayed, 2018, 2019; Guo et al., 2020; Machiani & Abbas, 2016). Essa and Sayed (2018) developed conflict-based safety performance functions (SPFs) to investigate how changes in traffic parameters and signal control affect the safety of intersections at the signal cycle level employing generalized linear model (GLM) and Poisson Lognormal (PLN) models. Essa and Sayed (2019) develop conflict-based SPFs of signalized intersections at the cycle level using multiple traffic conflict measures (e.g., time to collision, deceleration required to avoid a crash) using PLN models in the full Bayesian approach. Further, Guo et al. (2020) developed traffic conflict-based real-time safety models for signalized intersections using several Tobit models in the Bayesian framework. However, expected traffic conflict frequencies are a coarse measure of crash risks of a road entity.
Extreme value theory (EVT) models opened the door to real-time crash risk prediction. For instance, using a Bayesian estimation approach, Zheng and Sayed (2020) predicted real-time rear-end crash risk at signalized intersections by applying generalized extreme value (GEV) models. Each signal cycle was considered a block, and a modified time to collision (MTTC) conflict measure was used for rear-end conflicts. Following the study, several authors attempted to develop realtime crash risk prediction models for different crash types at signalised intersections. Ali et al. (2023) developed a real-time vehicle–pedestrian crash risk modelling framework using Bayesian generalized extreme value models for signalized intersections. Fu et al. (2020) estimated rear-end crash risks, and Howlader et al. (2024a) estimated opposing-through crash risks at signal cycles using multivariate GEV models. All these studies showed promising results in terms of prediction accuracy and precision.
Forecasting techniques using time-series data can be broadly categorized into parametric and non-parametric approaches. The main difference between these approaches lies in the functional dependence between independent and dependent variables. Parametric methods assume that the data used to make predictions follows a particular distribution, implying that distribution parameters can be estimated from the data and can used to make predictions about the future. On the other hand, non-parametric methods do not make any assumptions about the underlying distribution of the data. Instead, these methods make future predictions by looking for patterns or similarities in past data.
Autoregressive Integrated Moving Average (ARIMA) models are a widely used statistical model for time series forecasting in several road safety research (Carnis & Blais, 2013; Commandeur et al., 2013; Quddus, 2016; Sebego et al., 2014). Since the traffic crash data are usually collected in a certain time unit as a sequence, a variety of ARIMA time series models have been applied as a time sequential analysis technique with serial correlation (Quddus, 2008). The traditional ARIMA framework enables projections based solely on the forecasted variable's historical performance. The framework assumes that a variable places a considerable correlation on both its previous values and the magnitudes of any prior disruptions. An extension of the ARIMA model with the inclusion of explanatory variables, namely ARIMAX, can combine historical information alongside the forecasting variable. ARIMAX was found to effectively capture short-term data features while predicting near-future movements (Christoforou et al., 2011; Ihueze & Onwurah, 2018). Another extension of ARIMA that supports direct modelling of the seasonal component of the series is called SARIMA or Seasonal ARIMA. SARIMA models have been able to adapt and make good predictions even in the presence of anomalies (Almeida et al., 2022; Dereti´c et al., 2022). In addition, the SARIMAX model is another version with the added capability to include seasonality and exogenous parameters (Lunacek et al., 2021; Nassiri et al., 2022; 2023). A summary of crash forecasting studies using different ARIMA models is shown in Table 1.
In addition to parametric statistical modelling, non-parametric approaches like Bayesian networks, genetic algorithms, artificial neural networks and deep learning algorithms have also been tested for crash risk forecasting (Gutierrez-Osorio & Pedraza, 2020). As the latest development of all, recurrent neural networks (RNNs) are considered best suited for crash forecasting as they allow information to propagate from one layer to another using hidden layers reflecting the long-term and short-term correlations of time series data. Several studies have shown the superior prediction performance of RNN algorithms in crash forecasting (Almeida et al., 2022). However, while selecting neural network models for forecasting, it is essential to assess the nature of the data and the specific prediction requirements to ensure optimal performance. Variants of recurrent neural network (RNN) models, specifically designed for capturing time dependencies, such as long short-term memory (LSTM) and gated recurrent unit (GRU), may offer superior accuracy by effectively retaining long-term dependencies and sequential patterns. Unlike convolutional neural networks (CNNs), which are optimized for spatial feature extraction, LSTMs and GRUs excel at modelling temporal correlations, making them more effective for sequential data (Lara-Benítez et al., 2021). While CNN-LSTM hybrids attempt to integrate spatial and temporal feature extraction, they may introduce unnecessary computational complexity when spatial relationships are minimal. A summary of RNN crash forecasting studies compared to other approaches is presented in Table 2.
The investigation of real-time safety through crash prediction has advanced across several domains, including the capability of incorporating granular-level traffic factors, improving prediction accuracy and precision, and utilizing traffic conflict techniques. The recent application of extreme value theory (EVT) has shown promising results by leveraging traffic conflict techniques to predict crash risk, focusing on the microscopic interactions of road users and respective crash mechanisms. On the other hand, crash risk forecasting using time-series data has also evolved through parametric (Autoregressive Moving Average Models) and non-parametric (Recurrent Neural Networks) approaches and demonstrated satisfactory accuracy in predicting future crash trends. Despite the progress made in both real-time crash prediction and crash forecasting, a comprehensive model that integrates the predicted crash risk data into the forecasting models needs to be developed to address several outstanding research needs: a) to develop a joint framework by integrating forecasting models with quantitative crash risk estimated from traffic conflicts, b) to incorporate the microscopic road user behaviours in crash risk forecasting models, and c) to examine the forecasting reliability of the integrated models for real-time safety applications. Such novel applications also need to be examined for crash types and traffic entities. This study develops a unified framework for forecasting opposing-through crash risks, integrating quantitative crash risk estimates from traffic conflicts at signalised intersections.
Table 1 Parametric crash risk forecasting using auto-regressive integrated moving
| Source | Model used | Findings |
|---|---|---|
| Quddus (2008) | ARIMA | Introduced the class of integer-valued autoregressive (INAR) models for the time series analysis of traffic crashes in Great Britain. Results suggest that the performance of the ARIMA (MAPE = 4.16 %) and INAR (MAPE = 4.73 %) models is quite similar in terms of coefficient |
| Carnis and Blais (2013) |
ARIMA | estimates and goodness of fit. Evaluated automated speed enforcement program introducing various parametrizations of time after the intervention. The mean absolute percentage errors (MAPE) of different ARIMA models are 3.35 ~ 6.60 %, |
| Commandeur et al. (2013) |
ARIMA, ARIMAX |
showing acceptable accuracy. Time series analysis techniques of varying complexity of ARIMA were employed to describe the development of crashes over time, relating to various explanatory factors like exposure, speeding, seat belt use, and alcohol use. (ARIMAX MAPE = 5.9 %, ARIMA MAPE = 6.3 %). |
| Chen and Tjandra (2014) |
SARIMAX | A series of SARIMAX models of different orders were estimated along with a generalized linear model (GLM) for validation. Results showed that both SARIMAX and GLM are adaptable; however, the SARIMAX models are a viable and preferable option because they can provide greater accuracy (SARIMAX MAPE = 15.1 %, GLM MAPE = 19.5 %). |
| Ihueze and Onwurah (2018) |
ARIMA, ARIMAX |
Analyzed monthly crash data using both ARIMA and ARIMAX modelling techniques. The result showed that the ARIMAX (MAPE = 12.25) model outperformed the ARIMA (MAPE = 50.41). |
| Dereti´c et al. (2022) |
SARIMA | Investigated the pattern in the time series of traffic crashes. Time series crash data has a pronounced seasonal character. The mean absolute percentage error (MAPE) of the model was 5.22 %, showing acceptable accuracy. |
| Nassiri et al. (2022) |
SARIMAX | Compared the forecast efficiency of the Random Forest model with the classical seasonal autoregressive integrated moving average (SARIMAX) model. The random forest model (MAPE = 2.6 %) with the exogenous variables of traffic flow, crash year, and month outperformed the best SARIMA model (MAPE = 5.7 %) with traffic flow as the regressor. |
| Nassiri et al. (2023) |
ARIMA, SARIMA, SARIMAX |
Aimed at evaluating the distinct impacts of mean speed on total and fatal monthly crashes. Results illustrated that the SARIMAX model outperformed the univariate ARIMA and SARIMA models. In addition, SARIMA was more appropriate than simple ARIMA when seasonality existed in the monthly crash data time series. The average speed was found to be negatively associated with total crashes and positively associated with fatal crashes. |
Note: ARIMA: Autoregressive Integrated Moving Average, ARIMAX: Autoregressive Integrated Moving Average with exogenous variables, SARIMA: Seasonal Autoregressive Integrated Moving Average, SARIMAX: Seasonal Autoregressive Integrated Moving Average with Exogenous Variables, MAPE: Mean Absolute Percentage Error.
Table 2 Non-parametric crash forecasting using recurrent neural networks.
| Source | Model used | Findings |
|---|---|---|
| Sameen and Pradhan (2017) |
MLP, BLR, LSTM |
Several network architectures and configurations were tested through a systematic grid search to determine an optimal network for predicting the injury severity of traffic accidents. The results of the comparative analyses showed that the LSTM model outperformed the Multilayer perceptron (MLP) and Bayesian Logistic Regression (BLR) models. The validation accuracy of the LSTM model was 71.77 %, whereas the MLP and BLR models achieved 65.48 % and 58.30 %, respectively. |
| Bao et al. (2019) |
LSTM, ANN, ARIMA, Random Parameter, random effect |
Constructed a long short-term memory network for predicting the citywide short-term crash risk. LSTM (MAPE-73.10) outperformed ANN (MAPE-76.54), ARIMA (MAPE 77.52), Random parameter (MAPE 77.31) and Random effect (MAPE 77.30) regression models. |
| Li et al. (2020) | LSTM, CNN, BLR, Sequential LSTM |
A long short-term memory convolutional neural network (LSTM-CNN) was proposed to predict the real-time crash risk at arterials. Different data types were utilized to predict the crash risk, including traffic, signal timing, and weather data. Other benchmark models developed include Bayesian Logistics Regression (BLR), LSTM, CNN, and Sequential LSTM-CNN. Experimental results suggest that the proposed LSTM-CNN outperforms others in terms of Area Under the Curve (AUC) value, sensitivity, and false alarm |
| Choi (2022) | LSTM, ARIMA | rate. Developed a model for predicting the frequency of marine accidents using a long short-term memory (LSTM) network. The proposed LSTM model performed reliably to predict the frequency of marine accidents with a small mean absolute percentage error (best MAPE: 0.059) that outperformed a traditional ARIMA statistical method. |
| Deva Hema and Kumar (2022) |
CNN-LSTM Hybrid model |
CNN-LSTM Hybrid model was proposed for Multivariate time series crash risk prediction through the augmentation of Convolutional Neural Network (CNN) with Attention-based Long Short-Term Memory (ATT-LSTM). The proposed model outperformed state-of-the-art models where CNN-ATT-LSTM enhanced the accuracy of the crash risk prediction. |
| Raja et al. (2023) |
BPNN, FFNN, MLPNN, RBFNN, RNN, LSTM |
Proposed six different neural network architectures, namely back propagation neural network (BPNN), feed-forward neural network (FFNN), multilayer perceptron neural network (MLPNN), recurrent neural network (RNN), radial basis function neural network (RBFNN) and long short-term memory (LSTM) models for crash severity prediction. Results suggested that the RNN model showed the best prediction accuracy of 97.18 %, whereas MLP, LTSM, RBFNN, FFNN, and BPNN (continued on next page) |
Table 2 (continued )
| Source | Model used | Findings |
|---|---|---|
| models showed accuracy of 97.13 %, 91.00 %, 87.00 %, 80.56 %, and 77.26 %, respectively. |
Note: ARIMA: Autoregressive Integrated Moving Average, ANN: Artificial Neural Network, ATT-LSTM: Attention-based Long Short-Term Memory, BLR: Bayesian Logistic Regression, BPNN: Back Propagation Neural Network, CNN: Convolutional Neural Network, FFNN: Feed-Forward Neural Network, LSTM: Long Short-Term Memory, MLP: Multilayer perceptron, MLPNN: Multilayer Perceptron Neural Network, RBFNN: Radial Basis Function Neural Network, RNN: Recurrent Neural Network.
This study uses traffic conflicts and relevant covariates per signal cycle for estimating and forecasting right-turn or opposing-through1 crash risks at signalised intersections. Unlike static and conventional data sources for real-time crash risk prediction, this study employs continuous video recordings to generate the analysis data from the dynamic interactions of road user movements. The video footage in this study was collected from a four-legged signalized intersection, namely, Bruce Hwy-Lily intersection, located in the Far North Queensland district (Cairns), Australia. A total of 97 h of video footage was collected and used in this study. The target approaches of the intersection for capturing opposing-through interactions and the geometry are depicted in Fig. 1. Table 3 details the data collection schedule for these intersections.
To extract a suitable measure for opposing-through traffic conflicts, a deep neural network-based computer vision technique was applied to process the road user movements from raw footage. The automated extraction process can be explained in four major sub-processes: (a) camera calibration and validation, (b) object detection and tracking, (c) trajectory generation, and (d) traffic conflict extraction, as shown in Fig. 2.
Camera calibration includes translating the three-dimensional realworld video footage to two-dimensional image space and tracking the vehicles from the image space to their positions in the real world. Following the calibration, road user detection was performed using the YOLOv3 ("You only look once") algorithm (Yang & Deng, 2020), and road users were tracked by employing the Deep SORT ("Simple online and real-time tracking") algorithm (Wojke et al., 2017). The YOLOv3 algorithm is considered the state-of-the-art object detection module with the proven performance of high-accuracy vehicle detection from high vantage points (Feng et al., 2020; Zhao et al., 2019). Deep SORT is also a high-accuracy multiple object tracking (MOT) algorithm that is used for tracking the objects detected by the YOLOv3 algorithm (Chan & Suandi, 2019; Zhang et al., 2020). Deep SORT connects the objects of the current frames with the same objects detected in the previous frames simultaneously with tracking. The connected Euclidean coordinates generate the road user trajectories. Finally, the selected conflict measures are automatically extracted by analysing the trajectories in a cloud computing platform. More details on the automated traffic conflict extraction process can be found elsewhere (Arun et al., 2022).
This study adopted the traffic conflict extraction process utilising the SMART SafetyTM platform developed at Advanced Mobility Analytics Group, Australia (Advanced Mobility Analytics Group (AMAG), 2021). The original process was developed and validated at the Queensland University of Technology Australia, the University of Queensland, Australia, and the University of British Columbia, Canada (Arun et al., 2022; Saunier & Sayed, 2008; St-Aubin et al., 2015).
In the automated traffic conflict extraction method, post encroachment time (PET) was used as the traffic conflict measure for opposingthrough conflicts. The signal cycles were identified, and corresponding variables for each signal cycle were generated from the road user trajectories using an automated covariate extraction algorithm. Only the extreme conflict events with PET values less than or equal to 3.0 s were considered for analysis. The 3.0 s threshold was employed in the study to ensure that all extreme events are captured while minimizing needless data processing (Zheng & Sayed, 2019b). This threshold should have little impact on the results as only extreme conflicts (block maxima) are used to fit the model. Moreover, the PET traffic conflict measure was tested for opposing-through crash risk estimation by GEV models, and a 3.0 s threshold was found to build a reasonable crash-conflict relationship (Howlader et al., 2024b; Howlader et al., 2024c). A total of 489 opposing-through traffic conflicts were identified. The traffic conflicts and the covariates were used as input to the extreme value theory (EVT) models for estimating opposing-through crash risks at signal cycles. The opposing-through crash risks estimated from a non-stationary generalized extreme value model were used as the input to the crash risk forecasting models. The methodological framework is presented in the next section.
The proposed framework for forecasting crash risks consists of two main components: 1) estimating crash risk within the signal cycle using an extreme value theory model, and 2) forecasting signal cycle crash risk by applying parametric and non-parametric approaches in time series analysis. The overall process of the proposed framework is shown in Fig. 3.
This study estimated the right-turn or opposing-through crash risk for each signal cycle using a block maxima (BM) approach fitting generalized extreme value (GEV) distribution. A non-stationary univariate generalized extreme value model was developed to account for time-varying heterogeneity across signal cycles. The block maxima approach has been reported to be efficient in data utilization when extremes are sampled at shorter time intervals, like signal cycles at an intersection (Zheng & Sayed, 2019a). Similar practices have been observed in several studies applying extreme value models for crash risk estimation (Ali et al., 2023; Fu et al., 2020; Zheng & Sayed, 2019b).
A generalized extreme value distribution is fitted to a set of block maxima, considering each maximum represents the extreme traffic conflicts of individual blocks. Let {*z*1, *z*2, …, zn} is a series of independently and identically distributed conflict measures (for example, post encroachment time (PET) with a common distribution function F(z), and let Mun = max {*z*1, *z*2, …, zn} represents the set of most extreme post encroachment time measures in each block or signal cycle. According to Coles et al. (2001), when n→∞, Mun or Fn(z) will converge to a univariate generalized extreme value distribution function of the following form
1 Right-turn crashes in countries with the left-hand drive rule corresponds to left-turn crashes in right-hand drive rule countries. The opposing-through crashes are the most common type of right-turn crash and this study primarily focuses on opposing-through crashes. Since the study employed data from Australia where driving environment is left-hand driving, "right-turn" terminology has been interchangeably used with opposing-through conflicts throughout the paper.
Fig. 1. Study intersections with permissible right-turn approaches in the north–south direction.
μi = μi0 + μik Xʹ
ik
Table 3 Daily data collection schedule at Bruce Hwy-Lily intersection.
| Day | Date | Data collection period | ||
|---|---|---|---|---|
| Start | End | Hours/day | ||
| D1 | Tuesday, 05 October 2021 | 5:39 | 18:10 | 12:21 |
| D2 | Wednesday, 06 October 2021 | 5:54 | 19:31 | 13:37 |
| D3 | Thursday, 07 October 2021 | 5:56 | 18:49 | 12:53 |
| D4 | Friday, 08 October 2021 | 5:51 | 18:24 | 12:33 |
| D5 | Saturday, 09 October 2021 | 5:14 | 18:41 | 13:27 |
| D6 | Monday, 11 October 2021 | 5:15 | 16:04 | 10:49 |
$$F(z) = \exp \left{ -\left[1 + \xi \left(\frac{z - \mu}{\sigma}\right)\right]^{-\frac{1}{\xi}} \right}. \tag{1}$$
where, z: 1 + ξ z-μ σ > 0 and satisfying, location parameter: μ є (− ∞, ∞), scale parameter: σ є (0, ∞) and shape parameter: ξ є (− ∞, ∞).
To take into account non-stationarity, several signal cycle level covariates are introduced in Eq. (1) by linear parameterisation of the model parameters as
$$\begin{split} &\sigmai = &~\sigma{i0} + \sigma{ik}~X{ik}\ &\xii = &~\xi{i0} \end{split} \tag{2}$$
Fig. 2. Automated extraction of opposing-through traffic conflicts through video analytics.
Fig. 3. Flow chart for proposed crash risk forecasting framework.
where, μi0, σi0, ξi0 are the intercepts, μik( = μ11, ......., μ1k) and σik( = σ11, ......., σ1k) denotes the regression parameters to the covariates, Xik( = X11 ........., X1k ) ʹis the vector of k covariates at signal cycle i.
The probability of a crash for a univariate extreme value model is estimated at or beyond the threshold value of zero from the following equation:
$$P_{crash,i} = \Pr(Z_i \ge 0) = 1 \cdot F(0) = 1 \cdot \exp \left{ -\left[1 + \xi_i \left(\frac{0 \cdot \mu_i}{\sigma_i}\right)\right]^{\frac{1}{\xi_i}}\right}$$ (3)
where, μi, σi, ξi are the fitted model parameters estimated at each signal cycle from the fitted distribution of post encroachment time (PET) traffic conflict measure. Note that the negated values2 of PET were used in the study to estimate the crash risk from the tail distribution of maxima.
The expected number of crashes for a period T (usually one year) is calculated from the estimated crash probabilities of the short conflict observation period T0 (signal cycle) as
$$N_{crash} = \frac{T}{T0} P{crash}. (4)$$
Pcrash is estimated from Eq. (3).
The above estimates were validated by comparing them with the Poisson confidence intervals of the observed opposing-through crash frequencies proposed by Songchitruksa and Tarko (2006). The Poisson confidence intervals are estimated as follows:
$$\left{\lambda: \frac{1}{2T}\chi^{2}{2\psi{0},1-\alpha/2} \le \lambda \le \frac{1}{2T}\chi^{2}{2(\psi{0+1}),\alpha/2}\right}$$ (5)
where, ψ0 is the observed crash frequency in time period T, λ is the estimated crash frequency for time period T, and α is the significance level.
Two approaches of crash risk forecasting models were employed in this study: the parametric approach with families of autoregressive integrated moving average process and the non-parametric approach with two recurrent neural network algorithms. Details of these approaches are presented in the following subsections.
2 To estimate the maxima and fit the empirical observations corresponding to the distribution that is best suited to typical crash distribution (right skewed with heavy tail), the Fr´echet family of GEV distribution is assumed to be appropriate to fit the extreme traffic events. Following this idea, negated values of traffic conflict measures are used to estimate the crash risk from the tail distribution of maxima.
In the parametric approach, the autoregressive time series models, as initially proposed by Box et al. (1970), have been used in this study. The Box and Jenkins model, particularly the autoregressive integrated moving average (ARIMA) model, enjoys widespread application in time series forecasting, spanning fields such as economics, finance, and environmental sciences. The model combines an autoregressive (AR) process and a moving average (MA) process. The AR process forecasts a series based solely on the past values in the series called lags, whereas the MA process forecasts a series based solely on the past errors in the series called error lags. In addition, integration (I) is a crucial process that transforms the non-stationarity time series into stationary form, making it amenable for modelling with AR and MA components. Combining these processes, the stochastic variation or noise component identifying the underlying pattern in time series data can be denoted as ARIMA (p, d, q). To take into account seasonality in time series, an extension of the ARIMA model was introduced, namely seasonal autoregressive integrated moving average (SARIMA) model, by repeating the seasonal components for the same three processes and a seasonal frequency term (s) for which the noise component can be denoted as SARIMA (p, d, q) × (P, D, Q)S(Vanlaar et al., 2014). In these models, p is the order of the non-seasonal AR process, P is the order of the seasonal AR process, d is the order of the non-seasonal difference, D is the order of the seasonal difference, q is the order of the nonseasonal MA process, Q is the order of the seasonal MA process, and the subscript S is the length of seasonality.
In an individual AR model, the observation (Yt), dependent on its lags only, can be expressed as
$$Y_t = \varphi1 Y{t-1} + \varphi2 Y{t-2} + \dots + \varphiu Y{t-u} + \varepsilont = \left(\sum{i=1}^u \varphi_i L^i\right) Y_t + \varepsilon_t$$ (6)
where, t = u + 1, …, n, Yt is the observation at time t; φ is the coefficient of lags that the model estimates; *εt*is the error term; L is the lag distance operator; u is the order autoregressive model (AR order) indicating how many previous time steps are considered; i represents the index of the lagged term within the autoregressive model.
In an individual MA model, the observation (Yt), dependent on its lagged errors only, can be expressed as
$$Y{t} = \varepsilon{t} - \omega{1}\varepsilon{t-1} - \omega{2}\varepsilon{t-2} - \dots - \omega{\nu}Y{t-\nu} = \left(1 - \sum{i=1}^{\nu} \omega{i}L^{i}\right)\varepsilon_{t}$$ (7)
where, t = v + 1, …, n, ω is the coefficient of lagged errors; *εt*is the error term; L is the lag distance operator; v is the order of the moving average model (MA order), indicating how many previous error terms are considered; i represents the index of the lagged error term within the moving average model. The error terms ε are the inaccuracies of AR models of respective lags.
Applying integration to smoothen the time series and combining the AR and MA processes, the ARIMA expression can be given as
(
(
)
$$\left(1 - \sum{i=1}^{u} \varphi{i} L^{i}\right) (1 - L)^{d} Y{t} = \left(1 - \sum{i=1}^{v} \omega{i} L^{i}\right) (1 - L)^{d} \epsilon{t} + c$$ (8)
)
Replacing Δ = 1-L as the differencing operator, ARIMA expression can be simplified as
$$\varphi_u(L)\Delta^d Y_t = \omega_v(L)\Delta^d \varepsilon_t + c \tag{9}$$
Repeating the process for seasonal component, SARIMA expression can be simplified as
$$\varphi_u(L)\psi_U(L_S)\Delta^d\Delta_S^DY_t = \omega_v(L)\theta_V(L_S)\Delta^d\Delta_S^D\varepsilon_t + c$$ (10)
where, φ and ψ are the non-seasonal and seasonal AR parameters, respectively; ω and θ are the non-seasonal and seasonal MA parameters, respectively; d and D are the degree of non-seasonal and seasonal differencing, respectively, and c is the intercept term.
Further extensions of ARIMA and SARIMA were proposed by Box and Tiao (1975) with the additional ability to examine the effects of various explanatory variables along with the usual trend and seasonal components, known as ARIMAX and SARIMAX. These models can be expressed (Chatfield & Xing, 2019) in Eqs. (11) and (12), respectively.
$$\varphi_u(L)\Delta^d Y_t = \omega_v(L)\Delta^d \varepsilont + c + \sum{i=1}^m \beta_j x_t^i$$ (11)
$$\varphi_u(L)\psi_U(L_S)\Delta^d\Delta_S^DY_t = \omega_v(L)\theta_V(L_S)\Delta^d\Delta_S^D\epsilont + c + \sum{i=1}^m \beta_j x_i^i \tag{12} \label{eq:psi_u}$$
where m is the number of exogenous variables defined at each time step t, denoted by x t for j ≤ m with coefficients βj.
Long short-term memory (LSTM) and gated recurrent unit (GRU) models are the most widely used recurrent neural network (RNN) architectures that are specially designed to capture the long-term dependencies in sequential data. LSTM and GRU can be trained to remember important past information and selectively retain or discard information. Although LSTM and GRU are types of artificial neural networks (ANN), they differ in terms of data processing approaches. In a traditional feed-forward neural network (FFNN), data flows in one direction, from the input layer to the output layer, without any feedback connections. The input data is processed independently, and each layer generates an output that is passed forward to the next layer until the final output is generated. In contrast, recurrent neural networks have feedback connections that allow them to process the current input data in the context of the previous input data. Thus, the output of a neuron at a given time step is influenced not only by the current input but also by the output of the same neuron at the previous time step. RNNs also have a "memory" component that allows them to preserve information about previous inputs. Thus, the neurons in a recurrent neural network can remember the previous states, making it useful for forecasting future states.
The long short-term memory (LSTM) network is a class of recurrent neural networks (RNN) designed to address the vanishing gradient problem for processing long data sequences. The LSTM introduces a "memory cell" that helps to determine when to forget certain information (Hochreiter et al., 1997). The memory cell is a key component of the LSTM and is found in the network's hidden layers, creating memory blocks rather than traditional neuron nodes (Olah, 2015). Each block comprises several self-connected memory cells and three multiplicative units known as input, output, and forget gates. LSTM generates a mapping from an input sequence vector x ¼ (x1........., xN ) to an output probability vector by calculating the network unit activations using the following equations (Li et al., 2020):
$$i{t} = \sigma(W{ix}X{t} + W{ih}h{t-1} + W{ic}C{t-1} + b{i})$$ (13)
$$f{t} = \sigma(W{fx}xt + W{fh}h{t-1} + W{fc}c_{t-1} + b_f$$ (14)
$$o{t} = \sigma(W{ox}x{t} + W{oh}h{t-1} + W{oc}c{t} + b{o})$$ (15)
$$c_t = ft \odot c{t-1} + it \odot relu(W{cx} xt + W{ch} x_{h-1} + b_c)$$
$$\tag{16}$$
$$h_t = o_t \odot relu(c_t) \tag{17}$$
$$yt = W{yh} h_{t-1} + b_y$$ (18)
The above long short-term memory (LSTM) architecture, illustrated in Fig. 4, includes weight matrices, denoted by W, which are used to control the input, forget, and output gates. For example, Wix is the weight matrix from the input gate to the input. The logistic sigmoid function, denoted by σ, is used for gating, and the symbol ⊙ represents
Fig. 4. The architecture of LSTM network.
the element-wise multiplication of vectors. The forget gate, represented by ft, determines the extent to which the previous time step's memory cell is forgotten. The input gate, denoted by it, decides how much information should be updated for each unit. The output gate, represented by ot, controls how much of the internal memory state should be exposed. As the values of the gating variables change for each time step, the LSTM model can learn to represent information over multiple time steps, which enables it to efficiently handle time-series data.
Gated neural unit (GRU) is another popular Recurrent Neural Network (RNN) architecture that is efficient in handling short-term dependencies in small datasets. Unlike LSTM, GRU is computationally faster and more efficient as it contains only two gates (reset and update) instead of three in LSTM. Firstly, the reset gate rj and the update gate zj are calculated using Eq. (19) and Eq. (20), respectively. The definitions of σ, x, h are the same as in LSTM; K is the hidden layer weight matrix, and j stands for the j th element of a vector. The actual activation of the hidden unit hj is calculated using Eq. (21) (Wang et al., 2020). The architecture of GRU, illustrating the interaction between reset and update gates, is presented in Fig. 5.
$$r_j = \sigma(W_r x_t + Kr h{t-1})^j \tag{19}$$
$$z_j = \sigma(W_z x_t + Kz h{t-1})^j \tag{20}$$
$$h_j^t = z_j h_j^{t-1} + z_l^{t} \widetilde{h}_j^t \tag{21}$$
This study estimated the generalized extreme value (GEV) models to predict the opposing-through crashes at signal cycles using post encroachment time (PET) traffic conflict measure. Models were estimated using the maximum likelihood model estimation technique. The goodness-of-fit of the estimated models was examined from their diagnostic plots (quantile, density, and return level plots) and by comparing the Akaike Information Criterion (AIC).
Table 4 provides the estimates of the best-fit generalized extreme value (GEV) model for estimating opposing-through crash risks. To account for the non-stationarity of traffic extremes and incorporate timevarying heterogeneity in crash risk, the GEV models' location and
Fig. 5. The architecture of GRU unit.
Table 4 Generalized extreme value model results for opposing-through crash risk estimation.
| Extreme value parameters | Mean | Std. dev. | |
|---|---|---|---|
| Location | Intercept | − 2.544 | 0.056 |
| Conflict count (PET ≤ 3.0 s) | 0.294 | 0.034 | |
| Standard deviation of right-turning vehicle speed |
0.067 | 0.034 | |
| Signal cycle duration | − 0.082 | 0.042 | |
| Scale | Intercept | 0.460 | 0.016 |
| Shape AIC |
Intercept | − 0.147 710.779 |
0.029 |
PET: Post encroachment time; AIC: Akaike information criterion. All parameters are statistically significant at a 10% significance level.
scale parameters were attempted to parameterise with different covariates, as shown in Table 5. Based on the AIC goodness-of-fit measure, the GEV models with parameterized location parameters with traffic conflict counts (PET ≤ 3.0 s) per cycle, the standard deviation of rightturning vehicle speed per cycle, and the signal cycle duration were found to perform better than their counterparts. The relationship of these covariates with the crash risk is intuitive. The positive association of conflict counts (PET ≤ 3.0 s) represents that the risk of a crash increases with the higher number of conflicts within a signal cycle. The positive association of the standard deviation of right-turning vehicle speed indicates higher crash risks with higher uncertainty involved with speed variability. The negative association of signal cycle duration indicates that higher signal cycle duration lowers the risk of opposing-through crashes.
For validation, the mean crash estimates were compared against the historical crash records that occurred at the study site. The confidence intervals of mean predictions were obtained by using a simulation method based on the uncertainty associated with the model parameters. For calculating the confidence interval of the observed crashes, the 95 % Poisson confidence interval of the observed crashes using the true mean annual crashes, as shown in Eq. 5. The mean and 95 % confidence intervals of the predicted and observed opposing-through crashes were found 0.4 [0.0484: 1.445] and 0.18 [0.000: 13.210], respectively. The results show that the mean estimates fell within the 95 % confidence limits of observed crashes and confirm the adequacy of the developed EVT model in estimating opposing-through crashes.
Based on the signal cycle-specific non-stationarity variables, generalized extreme value distributions were generated at each signal cycle. For illustration, the distributions of six representative signal cycles are shown in Fig. 6. For each signal cycle, different sets of generalized extreme value (GEV) parameters led to distinct shapes of the distributions, denoting the distinct margin of exceedance of the tail. In particular, the tail of a generalized extreme value distribution exceeding the negated post encroachment time (PET) = 0 indicates a positive crash risk or no risk otherwise. As such, risky and non-risky signal cycles can be objectively identified from this threshold exceedance (PET = 0). In addition, the margin of crash risk can be estimated from the portion of cumulative distribution exceeding the threshold. Fig. 6 indicates that three (out of six) cycles (cycle numbers: 04, 54 and 58) exhibit positive crash risk since their distributions exceed the negated PET = 0 threshold. Note that the numbers at the top of each subfigure indicate the signal cycle number, and the signal cycle number in red indicates a signal cycle with positive crash risk. The signal cycle crash risks, thus estimated, were used to develop and test the performance of the crash forecasting models, as described in the subsequent sections.
The proposed crash forecasting framework used the opposingthrough crash risks estimated from a non-stationary univariate generalized extreme value model shown in Table 4. The crash risk estimated
Table 5
| Variables | Day 1: Tuesday | Day 2: Wednesday | Day 3: Thursday | Day 4: Friday | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Min | Max | Mean | Std. Dev. |
Min | Max | Mean | Std. Dev. |
Min | Max | Mean | Std. Dev. |
Min | Max | Mean | Std. Dev. |
|
| Continuous variables | ||||||||||||||||
| Right-turn crash risk | 0.000 | 0.038 | 0.003 | 0.005 | 0.000 | 0.051 | 0.003 | 0.005 | 0.000 | 0.055 | 0.003 | 0.006 | 0.000 | 0.045 | 0.003 | 0.005 |
| Log of right-turn crash risks | − 4.000 | − 1.425 | − 2.833 | 0.504 | − 4.000 | − 1.291 | − 2.819 | 0.515 | − 4.000 | − 1.261 | − 2.789 | 0.542 | − 4.000 | − 1.343 | − 2.746 | 0.519 |
| Total Volume | 6.000 | 134.000 | 30.673 | 16.576 | 6.000 | 131.000 | 31.202 | 18.883 | 4.000 | 131.000 | 31.853 | 19.533 | 6.000 | 141.000 | 34.485 | 20.837 |
| Signal cycle duration (sec) | 62.000 | 630.000 | 109.318 | 62.926 | 61.000 | 621.000 | 117.186 | 66.105 | 61.000 | 446.000 | 119.147 | 65.887 | 61.000 | 444.000 | 116.949 | 66.611 |
| Number of heavy vehicles | 0.000 | 10.000 | 1.515 | 1.554 | 0.000 | 14.000 | 1.531 | 1.621 | 0.000 | 7.000 | 1.485 | 1.577 | 0.000 | 10.000 | 1.466 | 1.484 |
| Proportion of heavy vehicles | 0.000 | 0.260 | 0.057 | 0.054 | 0.000 | 0.400 | 0.060 | 0.061 | 0.000 | 0.500 | 0.055 | 0.059 | 0.000 | 0.310 | 0.053 | 0.055 |
| Conflict counts with PET ≤ 3 s | 0.000 | 3.000 | 0.240 | 0.564 | 0.000 | 4.000 | 0.340 | 0.684 | 0.000 | 5.000 | 0.376 | 0.750 | 0.000 | 4.000 | 0.353 | 0.667 |
| Mean speed of all vehicles | 5.010 | 12.510 | 7.768 | 1.240 | 4.350 | 12.200 | 7.847 | 1.285 | 4.160 | 12.380 | 7.718 | 1.212 | 4.060 | 14.270 | 7.691 | 1.310 |
| Standard deviation of all vehicle speed | 2.350 | 9.290 | 4.432 | 0.675 | 2.310 | 5.920 | 4.462 | 0.603 | 1.480 | 13.470 | 4.449 | 0.802 | 2.310 | 8.960 | 4.418 | 0.668 |
| Mean speed of right-turning vehicles | 1.520 | 18.520 | 7.204 | 2.447 | 1.520 | 15.500 | 7.271 | 2.369 | 1.530 | 17.100 | 7.100 | 2.387 | 0.960 | 21.750 | 6.839 | 2.577 |
| Standard deviation of right-turning vehicle | 0.000 | 28.030 | 3.905 | 2.047 | 0.010 | 9.260 | 3.886 | 1.531 | 0.040 | 27.010 | 3.974 | 1.986 | 0.110 | 16.230 | 3.801 | 1.720 |
| speed | ||||||||||||||||
| Categorical variables | Frequency (percentage) | |||||||||||||||
| Morning peak (6 am − 9 am) | 86 (21.500) | 84 (22.642) | 77 (20.981) | 87 (23.450) | ||||||||||||
| Afternoon peak (3 pm − 5 pm) | 73 (18.250) | 57 (15.364) | 52 (14.169) | 60 (16.173) | ||||||||||||
| Hour 6 am-7 am | 21 (5.250) | 31 (8.356) | 27 (7.357) | 26 (7.008) | ||||||||||||
| Hour 7 am-8 am | 25 (6.250) | 24 (6.469) | 23 (6.267) | 27 (7.278) | ||||||||||||
| Hour 8 am-9 am | 40 (10.000) | 29 (7.817) | 27 (7.357) | 34 (9.164) | ||||||||||||
| Hour 3 pm-4 pm | 38 (9.500) | 31 (8.356) | 30 (8.174) | 28 (7.547) | ||||||||||||
| Hour 4 pm-5 pm | 35 (8.750) | 26 (7.008) | 22 (5.995) | 32 (8.625) | ||||||||||||
| Number of signal cycles | 400 | 371 | 367 | 371 |
Fig. 6. Signal cycle crash risk estimation from Generalized extreme value distribution.
at signal cycles was considered time series data collected throughout consecutive hours of a day. However, the forecasting approaches were not applied to the whole dataset collected for six days. For the Bruce Hwy-Lily intersection, it was observed that the crash risk occurrences are high at peak traffic periods on weekdays, whereas they are high in off-peak traffic periods on weekends. Therefore, for continuity in the observation of consecutive days and to capture the day-to-day crash risk occurrence as seasonal variation, crash risks estimated for four weekdays (D1 to D4 in Table 3) were considered in the study for developing forecasting models.
The signal cycle level covariates were considered in the forecasting models to take into account their time-series correlation in the consecutive signal cycles. The variables include intersection traffic volume, traffic volumes in the subject approaches, proportion of heavy vehicles, average speed, and speed variability of directional traffic. In addition to the dataset for individual days, the models were also estimated for a combined dataset, aggregating the data from the first three days. For the combined dataset, the data for the first three days was considered the training dataset, and the last day's data was used for validation. Only the signal cycles from 6 a.m. to 6 p.m. were considered. The summary statistics of the signal cycle level variables for different days are presented in Table 5.
The first step in the autoregressive integrated moving average (ARIMA) process is to examine the dependency or stationarity in time series data. The stationarity of data was attained by applying transformation or differencing techniques. The Box-Cox lambda test was used to determine the optimum lambda value to stabilize the variance and make the data more closely approximate a normal distribution. A lambda value close to 1 was found (lambda = 1.037451) for the entire data series, suggesting a log transformation. Thus, depending on the test, logarithmic transformations of the crash risk datasets were performed. However, even after the transformation, the trend was not obviously removed. As such, non-seasonal differencing was needed to remove the
non-stationary behaviour. After both transformation and differencing, the series became stationary, which was also confirmed by the ADF (Augmented Dickey-Fuller) test (test statistic = 6.8179; p = 0.01). It can be further observed from Fig. 7 that there is no trend or evident seasonality component, reflecting the non-stationary of the time series along the days of observations. As such, no transformation or differencing was needed to stabilise the seasonal variance in the series.
The identification of a suitable autoregressive integrated moving average (ARIMA) model is a complex process. Various ARIMA (p,d,q) models were examined to obtain the best-fit model. The autocorrelation function (ACF), partial autocorrelation function (PCF) plots, mean absolute error (MAE), root mean square error (RMSE), R-squared value, Akaike information criterion (AIC), Bayesian information criterion (BIC) along with the model parameter significances were compared to determine the best models. At first, an initial examination was performed between ARIMA models with and without explanatory variables. The exogenous variables (please see Table 5) related to opposing-through crashes were examined in the ARIMA models to add explanatory values in forecasting. Fig. 8 shows the distribution of different exogenous variables with the movements of their means along the day (Day 1). These variables were examined in combination to find the best fit autoregressive integrated moving average models with exogenous variable (ARIMAX). The heavy vehicle volume, mean speed and the indicator variable for the peak period were found to be statistically significant in the ARIMAX model (details are presented later). Table 6 shows the RMSE of different candidate ARIMA models. The RMSE for ARIMA models with exogenous variables, hereby named ARIMAX models, was found to outperform the best-fit ARIMA models for all four data series for individual days.
The autoregressive integrated moving average model with exogenous variable (ARIMAX) have two parts: 1) the ARIMA part and 2) the regression part. Table 7 shows the summary of the parameter estimation of the various best-fit ARIMAX models with explanatory variables for each day. For the autoregressive integrated moving average (ARIMA)
Fig. 7. Signal cycle crash risk in time series for consecutive days.
Fig. 8. Distribution of explanatory variables along signal cycles at Bruce Hwy-Lily intersection (Day 1).
part of the models, the autoregressive (AR) and moving average (MA) estimates are statistically significant at a 5 % significance level in all cases. AR1 signifies crash risk correlation exists with the first lag (at, (t-1)) in the data series, whereas AR2 signifies crash risk correlation with the second lag (at, (t-2)) in the data series. MA1 signifies that the current value of the time series is correlated with the error terms of the previous period (t-1), whereas MA2 refers to the significance of the moving average piece with two lagged error terms (t-1) and (t-2)). For the
regression part, a positive association between opposing-through crash risk and mean speed was found in all ARIMAX models from Day 1 to Day 4. Evidence from past studies shows that crashes are positively associated with higher speed of vehicles (Aarts and Van Schagen (2006); Huang et al. (2008)). In addition to traffic variables, indicator variables for different hours of the day were examined. Results show that rightturn crash risk is significantly higher during 7–8 am on Days 1, 3 and 4 and 6–7 am on Day 2. Diagnosis of the selected ARIMAX models was
Table 6 Goodness-of-fit statistics of ARIMA Models.
| Day 1 | Day 2 | Day 3 | Day 4 | ||||
|---|---|---|---|---|---|---|---|
| Model_Id | RMSE | Model_Id | RMSE | Model_Id | RMSE | Model_Id | RMSE |
| ARIMA (1,0,1) | 0.472 | ARIMA (1,0,1) | 0.489 | ARIMA (1,0,1) | 0.515 | ARIMA (1,0,1) | 0.492 |
| ARIMA (0,1,1) | 0.473 | ARIMA (0,1,1) | 0.490 | ARIMA (0,1,1) | 0.517 | ARIMA (0,1,1) | 0.492 |
| ARIMA (1,1,0) | 0.570 | ARIMA (1,1,0) | 0.566 | ARIMA (1,1,0) | 0.599 | ARIMA (1,1,0) | 0.596 |
| ARIMA (1,1,1) | 0.473 | ARIMA (1,1,1) | 0.487 | ARIMA (1,1,1) | 0.516 | ARIMA (1,1,1) | 0.490 |
| ARIMA (2,1,1) | 0.470 | ARIMA (2,1,1) | 0.487 | ARIMA (2,1,1) | 0.515 | ARIMA (2,1,1) | 0.491 |
| ARIMA (2,1,2) | 0.470 | ARIMA (2,1,2) | 0.487 | ARIMA (2,1,2) | 0.514 | ARIMA (2,1,2) | 0.488 |
| ARIMA (2,2,2) | 0.471 | ARIMA (2,2,2) | 0.487 | ARIMA (2,2,2) | 0.515 | ARIMA (2,2,2) | 0.491 |
| ARIMA (3,1,1) | 0.470 | ARIMA (3,1,1) | 0.487 | ARIMA (3,1,1) | 0.515 | ARIMA (3,1,1) | 0.490 |
| ARIMA (3,1,2) | 0.470 | ARIMA (3,1,2) | 0.487 | ARIMA (3,1,2) | 0.515 | ARIMA (3,1,2) | 0.488 |
| ARIMA (3,2,2) | 0.471 | ARIMA (3,2,2) | 0.487 | ARIMA (3,2,2) | 0.515 | ARIMA (3,2,2) | 0.490 |
| ARIMA (3,2,3) | 0.471 | ARIMA (3,2,3) | 0.485 | ARIMA (3,2,3) | 0.516 | ARIMA (3,2,3) | 0.488 |
| ARIMA (3,3,3) | 0.490 | ARIMA (3,3,3) | 0.505 | ARIMA (3,3,3) | 0.532 | ARIMA (3,3,3) | 0.548 |
| ARIMAX (1,0,1) | 0.427 | ARIMAX (1,0,1) | 0.443 | ARIMAX (1,0,1) (3,3,3) | 0.470 | ARIMAX (0,1,1) | 0.462 |
Table 7 Estimates of different ARIMA models with explanatory variables.
| Variables | Combined data from Day 1 to Day 3 | Day 1 | Day 2 | Day 3 | Day 4 | |||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| SARIMAX (3,0,3) (0,0,0)367 |
SARIMA (1,1,2) (0,0,0)367 |
ARIMAX-1 (1,0,1) | ARIMAX-2 (1,0,1) | ARIMAX-3 (0,1,1) | ARIMAX-4 (0,1,1) | |||||||
| Explanatory variables | ||||||||||||
| AR1 | 0.372 | <0.001 | 0.830 | <0.001 | 0.911 | <0.001 | 0.708 | <0.001 | − | − | − | − |
| AR2 | − 0.582 | <0.001 | − | − | − | − | − | − | − | − | − | − |
| AR3 | 0.851 | <0.001 | − | − | − | − | − | − | − | − | − | − |
| MA1 | − 0.303 | <0.001 | − 1.723 | <0.001 | − 0.840 | <0.001 | − 0.635 | <0.001 | − 0.967 0.95151 |
<0.001 | − 0.961 | <0.001 |
| MA2 | 0.612 | <0.001 | 0.733 | <0.001 | − | − | − | − | − | − | − | − |
| MA3 | − 0.770 | <0.001 | − | − | − | − | − | − | − | − | − | − |
| Constant | 1.387 | <0.001 | − | − | 1.373 | <0.001 | 1.479 | <0.001 | − | − | − | − |
| Mean speed of all vehicles (m/sec) | 0.176 | <0.001 | − | − | 0.185 | <0.001 | 0.169 | <0.001 | 0.192 | <0.001 | 0.136 | <0.001 |
| Number of heavy vehicles | 0.017 | 0.048 | − | − | − | − | − | − | − | − | − | − |
| Morning peak (6 am – 9 am) | 0.145 | 0.003 | − | − | − | − | − | − | − | − | − | − |
| Hour 6 am-7 am | − | − | − | − | − | − | 0.221 | 0.033 | − | − | − | − |
| Hour 7 am-8 am | − | − | − | − | 0.288 | 0.024 | − | − | 0.253 | 0.033 | 0.247 | 0.031 |
| Model fit statistics | ||||||||||||
| Sigma-squared | 0.202 | 0.249 | 0.185 | 0.199 | 0.224 | 0.216 | ||||||
| Log-likelihood | − 677.35 | − 796.20 | − 210.03 | − 206.29 | − 225.29 | − 221.88 | ||||||
| AIC | 1376.71 | 1600.41 | 432.00 | 424.59 | 458.58 | 451.75 | ||||||
| BIC | 1431.75 | 1620.42 | 455.55 | 447.58 | 473.85 | 467.07 | ||||||
| Within sample prediction accuracy | ||||||||||||
| RMSE | 0.448 | 0.498 | 0.427 | 0.443 | 0.470 | 0.462 | ||||||
| MAE | 0.351 | 0.397 | 0.324 | 0.351 | 0.372 | 0.363 |
AR = Autoregressive; MA = Moving average; AIC = Akaike information criterion; BIC = Bayesian information criterion; RMSE = Root mean square error; MAE = Mean absolute error.
performed using the autocorrelation function (ACF) and the partial autocorrelation function (PACF) plots to determine the adequacy of the models, as shown in Fig. 9. The ACF and PACF plots of the residuals did not show significant spikes outside the 95 % confidence intervals (shown in blue dotted lines) indicating that the residuals are independent and there is no significant autocorrelation and partial autocorrelation that the models have not accounted for.
The seasonal autoregressive integrated moving average models with and without exogenous variable (SARIMAX and SARIMA), known as the extensions of autoregressive integrated moving average (ARIMA) model for seasonal effects with and without explanatory variables, were also estimated for crash risk forecasting. For the ARIMA part, similar to the non-seasonal components, the AR and MA processes were also tested for seasonal data. However, the seasonal components of the AR and MA processes were not found to be statistically significant. Visual inspection from Fig. 7 showed no trend (increase or decrease) for crash risks on consecutive days. Pertaining to the visual observation of the trend in crash risks, the autocorrelation (ACF) and partial autocorrelation
(PACF) plots, as shown in Fig. 9, did not show non-stationarity in the seasonal data (no pattern like exponential decay indicating potential under-differencing or alternating positive and negative spikes indicating potential over-differencing). Apart from the ARIMA part, SARIMA and SARIMAX models were expected to benefit by aggregating information from multiple-day data through the regression part. The heavy vehicle count and mean speed were found to be significant at a 5 % significance level for these models. The positive association of heavy vehicles explains the effects of large vehicle class on right-turn crash risk. A higher proportion of heavy vehicles can cause more risk to opposing-through interactions due to a combination of factors, including longer turning maneuvers and wide turning radii (Howlader et al. (2024b)). Among the indicator variables of different hours of the day, a higher crash risk association was found in the morning peak hours (6 am-9 am). This association is intuitive due to the high amount of traffic and speed variabilities during morning peak hours. Several studies showed that congested traffic leads to higher crash risk due to the stop-and-go oscillation during peak hours and the opposite in off-peak hours (Das
Fig. 9. Auto correlation (ACF) and partial auto correlation (PACF) plots for the best fit ARIMA models.
et al., 2008; Zheng et al., 2010). Similar to autoregressive integrated moving average models with exogenous variable (ARIMAX), the associations of crash risk with non-peak hours and afternoon peak hours were not statistically significant.
The performances of the selected seasonal autoregressive integrated moving average models with and without exogenous variables (SAR-IMAX and SARIMA) and autoregressive integrated moving average models with exogenous variables (ARIMAX) in terms of model fit statistics and forecasting accuracy are presented in Table 7. Given that the datasets are different for the SARIMA and ARIMA models, the performances are not directly comparable using model fit statistics. Therefore, the prediction accuracy measures, root mean squared error (RMSE) and mean absolute error (MAE) for all the models were investigated, and comparatively better performances of SARIMAX model were found in most of the cases. In addition, the association of more explanatory variables (for example, number of heavy veicles) and the combined effect of explanatory variables for policy level decision making (for example, instead of 'Hour 6 am-7 am' or 'Hour 7 am − 8 am' in individual days, Morning peak (6 am – 9 am) was found significant in SARIMX model) were found in SARIMAX models than those of ARIMAX models. However, the ARIMAX model results are shown in Table 7 to represent the association of significant explanatory variables related to forecasting on individual days. On the other hand, the comparison of model fit statistics showed lower sigma-squared, log-likelihood, AIC and BIC values for SARIMAX model compared to SARIMA model. In addition, the SARIMAX model showed a lower RMSE (0.448) and MAE (0.351) than that of the SARIMA model (RMSE (0.498) and MAE (0.397)). Thus, the SARIMAX (3,0,3) (0,0,0)367 model was selected as the best-performing model. The SARIMA model was also used in the subsequent analysis to compare the performance of the neural networkbased approaches with and without explanatory variables (explained in the subsequent sections). Figs. 10 and 11 represent the out-of-sample forecasting performances by the ARIMAX, SARIMA and SARIMAX models. For ARIMAX models, the last 30 signal cycles of each day were treated as datasets for validation, whereas for SARIMA and SARIMAX
models, the fourth-day signal cycles were retained for validation. The out-of-sample predictions reveal that models incorporating explanatory variables (ARIMAX and SARIMAX) effectively capture the impact of traffic-related variables on each signal cycle. In contrast, the SARIMA model, which lacks explanatory variables, fails to account for these effects. Additionally, the SARIMAX model successfully captures the pattern of crash risk variation throughout the day, validating the higher prediction accuracy compared to the SARIMA model.
The future signal cycle crash risks were also predicted using deep neural network approaches based on the long short-term memory (LSTM) and gated recurrent unit (GRU) methods. It is worth mentioning that the models were estimated with and without explanatory variables to compare them with the seasonal autoregressive integrated moving averal models with and without explanatory variables (SARIMA and SARIMAX) developed in section 5.3.1. To improve the convergence and address the gradient stability issues, the dataset was normalized (min-–max) before training. The first three-day data were used as a training dataset, and the fourth-day data were used as a validation dataset. For the testing dataset, the exogenous variables of the fourth day were replaced by the data of day six (please see D6 in Table 3; Day 5 data (saturday) was not considered to keep the consistency of analysis with weekday data only) as representative of future traffic scenarios.
The long short-term memory (LSTM) and gated recurrent unit (GRU) networks were trained with Backpropagation Through Time (BPTT) and RMSprop (Root Mean Square Propagation) optimizer algorithms in TensorFlow. The training environment was built in R using the 'keras' package, which provides an interface to the Keras deep learning library with the TensorFlow backend. The RMSprop optimization algorithm was used to mitigate the vanishing and exploding gradient problems that are often encountered in deep learning models. For the training, there are several important hyper-parameters that affect the performance, including batch size, hidden layer number, hidden unit size, epochs,
Fig. 10. Validation of crash risk forecast by ARIMAX models.
Fig. 11. Validation of crash risk forecast by SARIMA and SARIMAX models.
lookback, delay, dropout rate, and time steps. These hyper-parameters were selected by performing a random search. Models with various combinations of parameters were constructed, and a 3-fold crossvalidation was used to evaluate each model. The parameters of the model with the highest validation accuracy were considered to be the best parameters among the evaluated ones.
At first, the models were trained with hidden units (neurons) 32, 64 and 128 with long short-term memory (LSTM) and gated recurrent unit (GRU) models, respectively. The selected network architecture consisted of a GRU or LSTM layer, fully connected intermediate dense layers, and a final dense layer. The rectified linear unit (ReLU) activation function was applied to the dense layers due to its ability to capture non-linear relationships in the data and address the vanishing gradient problem. Next, to avoid over-fitting, the dropout technique with a probability of 0.1, 0.2, 0.3, 0.4 and 0.5 was applied. In addition, the performance of the validation dataset was monitored, and the early stopping using the callback option was set to avoid overfitting the training data and determining the optimized number of epochs. Similarly, different batch sizes, lookback, delay and time steps were tested. Table 8 shows the optimized hyper-parameters used in the proposed recurrent neural network (RNN) models.
The validation loss was used as the primary metric to select the long short-term memory (LSTM) and gated recurrent unit (GRU) models. The loss function was set to mean absolute error (MAE). Based on the MAE of the validation dataset, the performance of the models was checked for the number of hidden units, which was equal to 32, 64, and 128. For LSTM and GRU networks without exogenous variables, the model performance has shown improvement for higher numbers of hidden units. The percentage MAEs of LSTM models are 13.52, 13.45, and 13.40, whereas the percentage MAEs for GRU models are 13.43, 13.48, and 13.34 for networks with 32, 64 and 128 hidden units, respectively. Further, an overfitting test on the models was done with dropout probabilities 0.1, 0.2, 0.3, 0.4 and 0.5. Both the LSTM and GRU models with 128 hidden units showed that the best result is obtained with a 0.1 dropout probability. For LSTM and GRU models with exogenous variables, the model performance also showed improvement for higher numbers of hidden units. The percentage MAEs of LSTM models are 13.90, 13.88, and 13.86, whereas the percentage MAEs for GRU models are 13.97, 13.90, and 13.85 for models with 32, 64 and 128 hidden units, respectively. The overfitting test showed that both the LSTM and GRU models with 128 hidden perform best with a 0.3 dropout probability. Tables 9 and 10 show the percentage MAEs found for different LSTM and GRU models with and without exogenous variables. Fig. 12 shows the comparison of predicted and EVT crash estimates of the finally selected LSTM and GRU models with and without exogenous variables on the validation dataset. The figure show how closely the forecasted crash risks by LSTM and GRU models (with and without taking into consideration the effect of traffic variables) match with the estimated crash risks by extreme value theory models in each signal
Table 8 The optimized hyper-parameters for the proposed RNN models.
| Hyper parameter |
The optimized hyper-parameters for the proposed RNN models. Best value (Models without exogenous variables) |
Best value (Models with exogenous variables) |
Description |
|---|---|---|---|
| Hidden layers |
2 | 4 | The LSTM/GRU layer is the first hidden layer, followed by two dense layers. |
| Hidden units (neurons) |
32 | 128 | The number of hidden units in the LSTM/GRU layer. |
| Loss function |
MAE | MAE | The objective function or optimization score function. |
| Optimizer | RMSprop | RMSprop | Root Mean Square Propagation optimizer. |
| Learning rate |
0.001 | 0.001 | The default learning rate used by the RMSprop optimizer. |
| Lookback | 30 | 30 | The number of previous time steps or observations that the network takes into account when making predictions for the current time step. |
| Batch size | 128 | 128 | The number of training cases over which RMSprop (Root Mean Square Propagation) update is computed. |
| Delay | 30 | 30 | The time gap or lag between the input and output. |
| Dropout | LSTM: 0.1 GRU: 0.1 |
LSTM: 0.3 GRU: 0.3 |
The proportion of the input units was randomly set to 0 during training. |
| Recurrent dropout |
0.5 | 0.5 | The proportion of the recurrent units was randomly set to 0 at each time step during training. |
| Time steps per epoch |
500 | 500 | The number of time steps or sequences that are processed during a single epoch of training. |
| Epoch | 40 | 40 | The number of iterations or complete passes over the entire training dataset. |
cycle. The accuracy of the forecasting is described in the following subsection.
Table 11 shows the performance measures of opposing-through crash forecasts by the best-performing autoregressive and recurrent neural network models. Two approaches were followed in this study to
Table 9 Validation loss (mean absolute error) by LSTM and GRU models without exogenous variables.
| RNN models without exogenous variables | Mean absolute error (%) | |||||||
|---|---|---|---|---|---|---|---|---|
| Hidden units (dropout probability) | ||||||||
| 32(0.0) | 64(0.0) | 128(0.0) | 128(0.1) | 128(0.2) | 128(0.3) | 128(0.4) | 128(0.5) | |
| LSTM GRU |
13.52 13.43 |
13.45 13.48 |
13.40 13.34 |
13.27 13.29 |
13.35 13.31 |
13.34 13.30 |
13.36 13.32 |
13.36 13.33 |
Table 10 Validation loss (mean absolute error) by LSTM and GRU models with exogenous variables.
| RNN Models with exogenous variables | Mean absolute error (%) | |||||||
|---|---|---|---|---|---|---|---|---|
| Hidden units (dropout probability) | ||||||||
| 32(0.0) | 64(0.0) | 128(0.0) | 128 (0.1) | 128(0.2) | 128(0.3) | 128 (0.4) | 128(0.5) | |
| LSTM GRU |
13.90 13.97 |
13.88 13.90 |
13.86 13.85 |
13.40 13.66 |
13.54 13.37 |
13.39 13.34 |
13.40 13.39 |
13.41 13.32 |
Fig. 12. Validation of crash risks by gated recurrent unit (GRU) and long short-term memory (LSTM) networks.
test the predictive performances:
Approach 1: No exogenous variable was used for predicting future risks. Risks were forecasted solely from the correlation of crash risks from the time series data. Models with no exogenous variables were used for prediction.
Approach 2: The exogenous variables for a different date (out of training or validation datasets) were taken as representative of future traffic data. Models with exogenous variables were used for prediction.
The performance measures were compared with respect to the extreme value model crash risk estimates on the fourth day of observation. It is worth mentioning that the first three-day crash risk
estimates were used as a training/model dataset for forecasting, and fourth-day data were used for validation. However, the traffic variables of the sixth day of observation were assumed to be the future values of required exogenous variables for the prediction dataset (please see Table 3; Day 5 data (saturday) was not considered to keep the the consistency of analysis with weekday data only). Three accuracy measures in terms of root mean square error (RMSE), mean absolute error (MAE) and mean absolute percentage error (MAPE) were calculated. Among the autoregressive models, the seasonal autoregressive integrated moving average model with exogenous variables (SARIMAX) model was found to outperform the same without exogenous variables
Table 11 Predictive performance of the forecasting models.
| Forecasting method | RMSE | MAE | MAPE |
|---|---|---|---|
| Seasonal autoregressive integrated moving average model (SARIMA) |
0.188 | 0.146 | 0.421 |
| Seasonal autoregressive integrated moving average model with exogenous variables (SARIMAX) |
0.173 | 0.135 | 0.405 |
| Recurrent neural network: Long short-term memory (LSTM) without exogenous variables |
0.244 | 0.195 | 0.429 |
| Recurrent neural network: Long short-term memory (LSTM-X) with exogenous variables |
0.202 | 0.159 | 0.414 |
| Recurrent neural network: Gated recurrent units (GRU) without exogenous variables |
0.217 | 0.174 | 0.428 |
| Recurrent neural network: Gated recurrent units (GRU X) with exogenous variables |
0.198 | 0.156 | 0.412 |
(SARIMA) in terms of RMSE, MAE and MAPE (SARIMA-0.188,0.146, 0.421, SARIMAX-0.173, 0.135, 0.405). Similar performances were shown by the long short-term memory (LSTM) and gated recurrent unit (GRU) networks with exogenous variables (LSTM: 0.244, 0.195, 0.429; LSTM-X: 0.202, 0.159, 0.414, GRU: 0.217, 0.174, 0.428; GRU-X: 0.198, 0.156, 0.412). For simplicity, LSTM and GRU networks with exogenous variables are denoted as LSTM-X and GRU-X, respectively. The performance measures for autoregressive models (SARIMAX) and the recurrent neural network models (LSTM-X, GRU-X) with exogenous variables did not differ by a significant margin. The overall comparative results showed that the SARIMAX model performed the best in terms of all three accuracy measures. A comparative illustration of the forecasted crash risks by the SARIMAX, GRU-X and LSTM-X models, compared to the crash risk estimates by extreme value theory (EVT) model, is shown in Fig. 13. The model predictions by SARIMAX, GRU-X, and LSTM-X show high variability but follow the similar pattern of EVT signal cycle crash risks. However, the variability of peaks and troughs is comparatively lower for SARIMAX forecasts compared to those of GRU-X and LSTM-X forecasts, reflecting the superior performance of the SARIMAX models.
For real-time applications, crash risks are required to be reliably predicted for future time periods. One of the major challenges associated with forecasting methods is the diminishing prediction reliability with the increase in forecasting horizon. Although the autoregressive (ARIMA) and recurrent neural network (RNN) models have shown promising results for the validation dataset, the reliability of future predictions needs to be tested for real-time applications. Following the two approaches mentioned in section 5.4, forecasting reliabilities of the best-fit ARIMA and best-performing RNN models were examined.
The variability of forecast accuracy in terms of root mean square error (RMSE) was employed to examine the forecast reliability. The
Fig. 13. Crash risk forecasting by gated recurrent unit network, long short-term memory network and seasonal autoregressive integrated moving average model with exogenous variables.
RMSE of the successive predictions were computed for the models shown in Table 11, and their variabilities were checked for the confidence intervals with one and two standard deviations. Fig. 14(a) and (b) show the forecast reliability in terms of the variability of RMSE for the seasonal autoregressive integrated moving average models with and without exogenous variables (SARIMAX and SARIMA), respectively. For the SARIMA model, RMSE for eight future predictions fell within one standard deviation, and ten predictions fell within two standard deviations. For the SARIMAX model, RMSE for the 11 future predictions fell within one standard deviation. Fig. 14(c) and (d) show the forecast reliability for the long shot term memory (LSTM) models. For the LSTM model without exogenous variables (LSTM-X), RMSE for future eight predictions fell within two standard deviations. In contrast, future ten predictions fell within two standard deviations for LSTM models with exogenous variables. Fig. 14(e) and (f) show the variability of RMSE for the gated recurrent unit (GRU) models. For the GRU model without exogenous variables (GRU-X), RMSE for future eight numbers of predictions fell within two standard deviations, whereas future 11 numbers of predictions fell within two standard deviations. The approaches with exogenous variables showed superior performance in forecasting higher numbers of future signal cycle crash risks than those without exogenous variables. Overall, the GRU-X and SARIMA-X models (i.e., GRU and SARMA models with exogenous variables) showed the best forecasting performance.
Integrating microscopic road user dynamics in time series crash risk forecasting is a novel prospect for real-time road safety management by applying traffic conflict techniques. This study utilizes the signal cycle crash risk estimated by generalized extreme value (GEV) models and feeds them into different families of autoregressive integrated moving average (ARIMA) models and recurrent neural networks (RNN) models to develop a framework for objectively determining the crash risk at future time periods.
A major contribution of the study is using non-stationary generalized extreme value (GEV) models to construct the time series data for opposing-through crash forecasting. The non-stationary extreme value theory approach has the ability to capture the time-varying nature of traffic characteristics at granular time periods (signal cycles of an intersection) and subsequently reflect those in the crash risk estimation. The non-stationary generalized extreme value model estimated in this study examined several signal cycle traffic variables and found a significant association between traffic conflict count, signal cycle duration, and speed variability to capture the time-varying heterogeneity of crash risks along the signal cycles. For example, a positive association of the standard deviation of right-turning vehicle speed (per signal cycle) with opposing-through crashes was observed in this study, indicating that a higher chance of opposing-through crashes is involved with a higher speed variability of right-turning vehicles. Building upon these inherent advantages offered by extreme value theory models, the proposed framework for forecasting crash risk establishes a robust platform to capture the dynamic nature of real-time safety analysis.
The proposed framework introduced seasonal autoregressive integrated moving average model (SARIMA) and recurrent neural network (RNN) models (long short-term memory (LSTM), gated recurrent unit (GRU)) for evaluating comparative forecasting performances. This study carefully dealt with the correlation of time series inputs (crash risks and explanatory variables) in SARIMA models and optimization algorithms and parameters in LSTM and GRU models. The performances of all the models were promising in terms of accuracy measures (root mean square error (RMSE), mean absolute error (MAE) and mean absolute percentage error (MAPE)), with slightly better accuracy for SARIMA models. Statistical models like SARIMA models are transparent and reproducible, whereas RNNs are seen as 'black boxes' (Almeida et al., 2022). RNN models are often used for their ability to deal with multi-dimensional
Fig. 14. Out-of-sample forecasting reliability of forecasting models with and without exogenous variables.
data, adaptability, and handling of outliers or noisy data (Karlaftis & Vlahogianni, 2011). However, the SARIMA models are useful in detecting patterns related to time as they are often simpler and easier to interpret than RNN models. As such, the forecasting approaches bear distinct benefits and can offer specific complementary benefits. Therefore, both these models can be employed for utilization of the disaggregated crash risk data for real-time application.
Another significant observation from the study is the improved performance of the forecasting models with exogenous variables. Additional exogenous variables provide more information about the input sequences, which can improve the model's ability to capture complex patterns and dependencies in the data. By including these variables, the model can better capture the contextual relationships and dependencies that exist in the data, leading to improved predictions. For example, in addition to AR and MA components, the heavy vehicle counts per signal cycle, the mean speed of vehicles per signal cycle and morning peak hour were found to be significant at a 5 % significance level for the seasonal autoregressive integrated moving average model with exogenous variables (SARIMAX) model with exogenous variables. These associations provide additional behavioural information for forecasting based on the context of sample data. Moreover, adding more variables to the recurrent neural network model can act as a form of regularisation, preventing overfitting and improving generalization performance (Lv et al., 2014). For neural network models, additional variables introduce diversity into the training data, reducing the model's tendency to memorize specific instances and improving its ability to generalize to unseen data (Zhang et al., 2021). However, the choice of variables should be based on their relevance to the target variable and their ability to provide meaningful information for the prediction task. It is worth mentioning that a careful investigation of the contributing variables to opposing-through crash risk was made in this study while selecting additional variables for the forecasting models.
This study shows promising results for forecasted crash risks to be applied for real-time applications at signalized intersections. Findings suggest that the best autoregressive integrated moving average model with exogenous variables (seasonal autoregressive integrated moving average model with exogenous variables (SARIMAX)) and the best recurrent neural network with exogenous variable (gated recurrent unit with exogenous variables (GRU-X)) can forecast the opposing-through crash risk for 11 signal cycles with reasonable accuracy, which translates to about 22 to 28 min ahead. This advanced prediction can facilitate prompt and efficient implementation of suitable countermeasures. Notably, the advanced forecasting of crash risk addresses the challenge of minimizing latency, referring to the time needed to process data and extract real-time safety insights (Hussain et al., 2023). Forecasted crash risks can also be utilized for designing signal cycles that consider quantitative safety along with the current practice of using dynamic traffic variables like traffic volume, saturation flow rate, delay, and others. In the near future, emerging technologies like adaptive traffic signal control, collision avoidance systems and connected and automated vehicles can benefit from such forecasting. Thus, real-time forecasting of crash risk can play a crucial role in the development of proactive road safety management systems in association with real-time traffic data.
This study presents a unified modelling framework for forecasting opposing-through crash risk at signalized intersections by applying traffic conflict techniques. In particular, opposing-through crash risks estimated from non-stationary generalized extreme value (GEV) models were used as time series data in different families of autoregressive integrated moving average (ARIMAX, SARIMA, SARIMAX) models and recurrent neural networks (RNN), i.e., long short-term memory (LSTM) and gated recurrent unit (GRU), for forecasting crash risks in future periods. The proposed framework is comprised of two major parts. At first, a non-stationary Block Maxima model, corresponding to GEV distribution, was developed using opposing-through traffic conflicts in a signal cycle characterized by post encroachment time (PET) as a traffic conflict measure. Using AI-based video analytics, traffic conflicts and covariates were extracted at the signal cycle level and used as input to the extreme value model to capture heterogeneity associated with timevarying crash risk. For the later part of the framework, the crash risks corresponding to each signal cycle were considered time series data. Using the time series data, the autoregressive integrated moving average models and recurrent network models were developed to forecast the crash risk for future cycles.
The seasonal autoregressive integrated moving average model with exogenous variables (SARIMAX) has been found to outperform the other families of the ARIMA models. Similar performances have been observed for the LSTM and GRU networks with exogenous variables. This study has found that opposing-through crash risks could be reliably forecasted for 11 signal cycles with reasonable accuracy corresponding to about 22 to 28 min ahead. This advanced prediction facilitates a window for prompt and efficient decision-making and forms the basis for developing a real-time safety management system.
The proposed methodological framework coupled with artificial intelligence (AI)-based analytics is promising for predicting future crash risks at signalised intersections. The leeway of advance prediction addresses the challenge of latency needed to process data and decisionmaking on real-time interventions. However, dataset constraints pose a generalizability issue in this study. Traffic conflict data from multiple intersections may provide a better indication of the applicability of the unified forecasting framework developed. The application of the unified framework has been tested only for opposing-through crashes, and its validation across multiple crash types is necessary. Furthermore, analyzing the impact of explanatory variables on the forecast can provide deeper insights for informed decision-making.
Extending the framework to multiple intersections and incorporating multiple traffic conflict measures, where crash risk probability estimation can be performed using multivariate generalized extreme value (GEV) models, presents a promising future research direction (Fu et al., 2020; Howlader et al., 2024a). While using multiple intersections or traffic entities within such a framework, hybrid neural network models can be employed to analyze spatial feature extraction along with capturing time dependencies. No seasonal effect was detected in the statistical models due to the short duration of the data in this study. A worthwhile future research direction would be to investigate the effect of the seasonal components with a larger dataset. In addition, feature importance analysis techniques, such as SHAP (SHapley Additive Explanations), LIME (Local Interpretable Model-Agnostic Explanations) or similar for neural network models and marginal effect analysis for statistical models can be used to enhance the understanding of variable contributions to crash risk.
Md Mohasin Howlader: Writing – original draft, Visualization, Validation, Methodology, Formal analysis, Data curation, Conceptualization. Md Mazharul Haque: Writing – review & editing, Validation, Supervision, Methodology, Investigation, Funding acquisition, Conceptualization.
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
The authors would like to acknowledge the Department of Transport and Main Roads (TMR) of Queensland for providing the data used in this study. Special thanks to Andrew Burbridge, Andrew Odyn, and Samantha Taylor of the Department of Transport and Main Roads (TMR) for their contribution to the project. The first author gratefully acknowledges the scholarship support provided by the Queensland University of Technology (QUT) to carry out this PhD research. This research is partially funded by the Australian Research Council, Australia, under grant LP220100226.
The data that has been used is confidential.
Aarts, L., Van Schagen, I., 2006. Driving speed and the risk of road crashes: a review. Accid. Anal. Prev. 38 (2), 215–224.
Hochreiter, S., Urgen Schmidhuber, J., Elvezia, C., 1997. Long short-term memory. Neural Comput. 9 (8), 1735–1780.
Howlader, M.M., Bhaskar, A., Yasmin, S., Haque, M.M., 2024a. A bivariate, nonstationary extreme value model for estimating opposing-through crash frequency by severity by applying artificial intelligence-based video analytics. Transp. Res. Part C Emerg. Technol. 160, 104509.
Howlader, M.M., Ali, Y., Burbridge, A., Haque, M.M., 2024b. Before-after safety evaluation of part-time protected right-turn signals: an extreme value theory approach by applying artificial intelligence-based video analytics. Accid. Anal. Prev. 194, 107341.
Howlader, M.M., Mannering, F., Haque, M.M., 2024c. Estimating crash risk and injury severity considering multiple traffic conflict and crash types: a bivariate extreme value approach. Anal. Methods Accid. Res. 42, 100331.
Huang, H., Chin, H.C., Haque, M.M., 2008. Severity of driver injury and vehicle damage in traffic crashes at intersections: a Bayesian hierarchical analysis. Accid. Anal. Prev. 40 (1), 45–54.
Hussain, F., Ali, Y., Li, Y., Haque, M.M., 2023. Real-time crash risk forecasting using Artificial-Intelligence based video analytics: a unified framework of generalised extreme value theory and autoregressive integrated moving average model. Anal. Methods Accid. Res., 100302 https://doi.org/10.1016/j.amar.2023.100302.
Ihueze, C.C., Onwurah, U.O., 2018. Road traffic accidents prediction modelling: an analysis of Anambra State, Nigeria. Accid. Anal. Prev. 112, 21–29. https://doi.org/ 10.1016/j.aap.2017.12.016.
Karlaftis, M.G., Vlahogianni, E.I., 2011. Statistical methods versus neural networks in transportation research: differences, similarities and some insights. Transp. Res. Part C Emerg. Technol. 19 (3), 387–399. https://doi.org/10.1016/j.trc.2010.10.004.
Lara-Benítez, P., Carranza-García, M., Riquelme, J.C., 2021. An experimental review on deep learning architectures for time series forecasting. Int. J. Neural Syst. 31 (03), 2130001.
Lee, C., Hellinga, B., Saccomanno, F., 2003. Real-time crash prediction model for application to crash prevention in freeway traffic. Transp. Res. Rec. 1840 (1), 67–77. https://journals.sagepub.com/doi/pdf/10.3141/1840-08.
Li, P., Abdel-Aty, M., Yuan, J., 2020. Real-time crash risk prediction on arterials based on LSTM-CNN. Accid. Anal. Prev. 135, 105371.
Liu, X., Lin, Z., Feng, Z., 2021. Short-term offshore wind speed forecast by seasonal ARIMA-A comparison against GRU and LSTM. Energy 227, 120492.
Lunacek, M., Williams, L., Severino, J., Ficenec, K., Ugirumurera, J., Eash, M., Ge, Y., Phillips, C., 2021. A data-driven operational model for traffic at the dallas fort worth international airport. J. Air Transp. Manag. 94, 102061. https://doi.org/10.1016/j. jairtraman.2021.102061.
Lv, Y., Duan, Y., Kang, W., Li, Z., Wang, F.-Y., 2014. Traffic flow prediction with big data: a deep learning approach. IEEE Trans. Intell. Transp. Syst. 16 (2), 865–873.
Machiani, S.G., Abbas, M., 2016. Safety surrogate histograms (SSH): a novel real-time safety assessment of dilemma zone related conflicts at signalized intersections. Accid. Anal. Prev. 96, 361–370. https://doi.org/10.1016/j.aap.2015.04.024.
Mussone, L., Bassani, M., Masci, P., 2017. Analysis of factors affecting the severity of crashes in urban road intersections. Accid. Anal. Prev. 103, 112–122. https://doi.org/ 10.1016/j.aap.2017.04.007.
Nassiri, H., Mohammadpour, S.I., Dahaghin, M., 2022. Forecasting time trends of fatal motor vehicle crashes in Iran using an ensemble learning algorithm. Traffic Inj. Prev. 1–6. https://doi.org/10.1080/15389588.2022.2130279.
Nassiri, H., Mohammadpour, S.I., Dahaghin, M., 2023. Forecasting time trend of road traffic crashes in Iran using the macro-scale traffic flow characteristics. Heliyon 9 (3). https://doi:10.1016/j.heliyon.2023.e14481.
Olah, C. (2015). Understanding lstm networks.
Quddus, M.A., 2008. Time series count data models: an empirical application to traffic accidents. Accid. Anal. Prev. 40 (5), 1732–1741. https://doi.org/10.1016/j. aap.2008.06.011.
Quddus, M.A. (2016). Non-Gaussian interrupted time series regression analysis for evaluating the effect of smart motorways on road traffic accidents.
Raja, K., Kaliyaperumal, K., Velmurugan, L., Thanappan, S., 2023. Forecasting road traffic accident using deep artificial neural network approach in case of Oromia Special Zone. Soft. Comput. 1–21.
Sameen, M.I., Pradhan, B., 2017. Severity prediction of traffic accidents with recurrent neural networks. Appl. Sci. 7 (6), 476. https://doi.org/10.3390/app7060476.
Saunier, N., Sayed, T., 2008. Probabilistic framework for automated analysis of exposure to road collisions. Transp. Res. Rec. 2083 (1), 96–104. https://doi.org/10.3141/ 2083-11.
Sebego, M., Naumann, R.B., Rudd, R.A., Voetsch, K., Dellinger, A.M., Ndlovu, C., 2014. The impact of alcohol and road traffic policies on crash rates in Botswana, 2004–2011: a time-series analysis. Accid. Anal. Prev. 70, 33–39. https://doi.org/ 10.1016/j.aap.2014.02.017.
Songchitruksa, P., Tarko, A.P., 2006. The extreme value theory approach to safety estimation. Accid. Anal. Prev. 38 (4), 811–822. https://doi.org/10.1016/j. aap.2006.02.003.
St-Aubin, P., Saunier, N., Miranda-Moreno, L., 2015. Large-scale automated proactive road safety analysis using video data. Transp. Res. Part C Emerg. Technol. 58, 363–379. https://doi.org/10.1016/j.trc.2015.04.007.
Theofilatos, A., Yannis, G., Kopelias, P., Papadimitriou, F., 2019. Impact of real-time traffic characteristics on crash occurrence: Preliminary results of the case of rare events. Accid. Anal. Prev. 130, 151–159.
Vanlaar, W., Robertson, R., Marcoux, K., 2014. An evaluation of Winnipeg's photo enforcement safety program: results of time series analyses and an intersection camera experiment. Accid. Anal. Prev. 62, 238–247. https://doi.org/10.1016/j.
Wang, S., Zhao, J., Shao, C., Dong, C., Yin, C., 2020. Truck traffic flow prediction based on LSTM and GRU methods with sampled GPS data. IEEE Access 8, 208158–208169.
Wojke, N., Bewley, A., Paulus, D., 2017. Simple online and realtime tracking with a deep association metric. 2017 IEEE International Conference on Image Processing (ICIP).
Yang, Y., Deng, H., 2020. GC-YOLOv3: you only look once with global context block. Electronics 9 (8), 1235. https://doi.org/10.3390/electronics9081235.
Yuan, J., Abdel-Aty, M., 2018. Approach-level real-time crash risk analysis for signalized intersections. Accid. Anal. Prev. 119, 274–289. https://doi.org/10.1016/j. aap.2018.07.031.
Yuan, J., Abdel-Aty, M.A., Yue, L., Cai, Q., 2020. Modeling real-time cycle-level crash risk at signalized intersections based on high-resolution event-based data. IEEE Trans. Intell. Transp. Syst. 22 (11), 6700–6715.
Zhang, S., Abdel-Aty, M., Cai, Q., Li, P., Ugan, J., 2020. Prediction of pedestrian-vehicle conflicts at signalized intersections based on long short-term memory neural network. Accid. Anal. Prev. 148, 105799.
Zhang, X., Kuehnelt, H., De Roeck, W., 2021. Traffic noise prediction applying multivariate bi-directional recurrent neural network. Appl. Sci. 11 (6), 2714.
Zhao, X., Pu, F., Wang, Z., Chen, H., Xu, Z., 2019. Detection, tracking, and geolocation of moving vehicle from uav using monocular camera. IEEE Access 7, 101160–101170.
Zheng, L., Sayed, T., 2019a. Bayesian hierarchical modeling of traffic conflict extremes for crash estimation: a non-stationary peak over threshold approach. Anal. Methods Accid. Res. 24, 100106. https://doi.org/10.1016/j.amar.2019.100106.
Zheng, L., Sayed, T., 2019b. From univariate to bivariate extreme value models: approaches to integrate traffic conflict indicators for crash estimation. Transp. Res. Part C Emerg. Technol. 103, 211–225. https://doi.org/10.1016/j.trc.2019.04.015.
Zheng, L., Sayed, T., 2020. A novel approach for real time crash prediction at signalized intersections. Transp. Res. Part C Emerg. Technol. 117, 102683. https://doi.org/
Zheng, Z., Ahn, S., Monsere, C.M., 2010. Impact of traffic oscillations on freeway crash occurrences. Accid. Anal. Prev. 42 (2), 626–636.