WorksPubMed
Spatial-temporal gated transformer network for freeway secondary crash prediction considering the impact of class imbalance.
A preview from PubMed. Valency holds this work's metadata and abstract, not its full text.
Abstract
The primary objective of this paper is to improve the prediction accuracy of freeway secondary crashes by jointly modeling spatiotemporal dynamics and addressing the challenge of class imbalance. Using secondary-crash data from Interstate 5 (I-5) in California, we develop a Spatial-Temporal Gated Transformer Network (STGT-Net). STGT-Net employs a tri-branch encoder to model upstream, downstream, and differential traffic flows, and dual Transformer modules with a gated fusion mechanism to capture temporal and inter-feature dependencies. To address data rarity, we employ an LSTM-based Wasserstein GAN with gradient penalty (LSTM-WGAN-GP) to generate realistic, sequence-aware crash samples. Comparative results show that the secondary crash data generated by our method aligns more closely with real-world conditions than those produced by existing approaches. STGT-Net achieves substantial relative improvements of 13.08% in F1-score and 13.95% in Matthews Correlation Coefficient (MCC) compared with the best baseline. Finally, SHapley Additive exPlanations (SHAP)-based analysis reveals that upstream traffic variables contribute most strongly to the model's predictions, with downstream and upstream-downstream differential indicators also providing informative cues.