Hybrid streaming LSTM and transformer XL model for real-time urban traffic congestion prediction
Introduction Urban traffic congestion results in substantial economic and environmental costs. However, conventional fixed-timing and linear models (ARIMA) lack the ability to accurately model the intricate and non-linear dynamics of real-time traffic. Even though deep learning models like LSTMs have improved temporal modeling, they cannot handle very long-term dependencies. Methods In this study, we propose a hybrid streaming LSTM-transformer XL model combining LSTM’S strength in capturing short-term patterns with the long-range contextual interpretation of transformer XL, tailored for streaming inference of large-scale spatio-temporal data for sensor-level continuous forecasting. Our experiments were carried out on benchmark datasets METR-LA and PEMS-BAY. Besides that, we employed a robust preprocessing pipeline and an interactive Streamlit-based deployment for real-time visualization. Results For a six-step (30-min) horizon, the reported denormalized results are MAE/RMSE = 4.32/7.91 mph for METR-LA and 2.40/4.39 mph for PEMS-BAY. Discussion The results showed that the accuracy of the prediction, computational efficiency and feasibility of deployment in the context of ITS are well balanced. With the help of an interactive Streamlit dashboard and Ngrok, the live deployment occurs by streaming, making it possible to have live visualization, sensor comparison, and monitoring of dynamic forecasts. These findings demonstrate the advantages of fusion of recurrent and attention-based deep learning architectures. The system can provide traffic speed forecasts to scalable, interpretable and deployable intelligent urban mobility.
Authors
- P. M. Harikrishnaa
- Perepi Rajarajeswari
Institutions
- Vellore Institute of Technology University (IN)
Publication Details
- Journal
- Frontiers in Artificial Intelligence
- Published
- 2026-11-26
- DOI
- https://doi.org/10.3389/frai.2026.1894467
- Primary Topic
- Traffic Prediction and Management Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00