Development of a bus real-time crash risk prediction framework by using a self-attention-based bidirectional long and short-term memory network with anomaly detection learning and mixed sequence features
Document Type
Journal Article
Publication Date
2026
Subject Area
place - asia, place - urban, mode - bus, planning - safety/accidents, ridership - behaviour, ridership - drivers
Keywords
real-time crash risk prediction, crash warning
Abstract
The accuracy of real-time crash risk prediction and the reasonableness of crash warning time are decisive factors in enabling bus drivers to perform effective crash avoidance maneuvers. However, existing research based on microscopic time-series data often suffers from insufficient crash samples and neglects the historical behavioral patterns of driving behavior. Meanwhile, the bus crash risk warning time needs to be further optimized and selected to satisfy the crash risk response time requirements for drivers. To address these issues, this study proposes a novel framework, a self-attention-based bidirectional long and short-term memory network with anomaly detection learning and mixed sequence features (ADL-Mi-Att-Bi-LSTM), for real-time bus crash risk prediction using bus operational data from Beijing. Specifically, the framework reframes the prediction task as an anomaly detection problem, extracts mixed sequence features through a dual nested sliding time window to learn normal driving patterns and predict rare crash risk, and systematically compares various observation and interval time window combinations to determine the optimal crash warning time that accommodates driver response time. The results demonstrate that the model achieves optimal performance (Accuracy, F1-score, and AUC all exceeding 96.5 %) with a 6 s observation time window and a 1 s interval time window (i.e., crash warning time of 3 s). The ADL-Mi-Att-Bi-LSTM model significantly outperforms the other five kinds of models obtained from the ablation test as well as the traditional LSTM, XGBoost and RF models, confirming the efficacy of the integrated ADL, mixed sequence features, bidirectional LSTM layers, and the self-attention layer. Feature importance analysis further reveals that transient sequence features proximal to the crash warning, the cumulative and lagged effects of jerk, and the statistical features of driver operations are key factors influencing crash risk. This research provides a robust basis for optimizing bus crash warning mechanisms and developing more targeted driver safety training programs.
Rights
Permission to publish the abstract has been given by Elsevier, copyright remains with them.
Recommended Citation
Zhang, N., Wu, Y., Yang, A., & Liu, T. (2026). Development of a bus real-time crash risk prediction framework by using a self-attention-based bidirectional long and short-term memory network with anomaly detection learning and mixed sequence features. Accident Analysis & Prevention, 225, 108306.

Comments
Accident Analysis and Prevention Home Page:
http://www.sciencedirect.com/science/journal/00014575