ORIGINAL RESEARCH article
Front. Artif. Intell.
Sec. Machine Learning
Hybrid Streaming LSTM and TransformerXL Model for Real-Time Urban Traffic Congestion Prediction
- HP
Harikrishnaa PM 1,2
- RR
Raja Rajeswari 1,2
1. VIT University, Vellore, India
2. Vellore Institute of Technology, Vellore, India
Select one of your emails
You have multiple emails registered with Frontiers:
Notify me on publication
Please enter your email address:
If you already have an account, please login
You don't have a Frontiers account ? You can register here
Abstract
Urban traffic congestion results in substantial economic and environmental costs. However, conventional fixed-timing and linear models (ARIMA) lack the ability of accurately modeling the intricate and non-linear dynamics of real-time traffic. Despite the fact that Deep Learning models like LSTMs have improved temporal modeling, they are not capable of handling very long-term dependencies. In this study, we propose a Hybrid Streaming LSTMTransformerXL model combining the LSTM's strength in capturing short-term patterns with the long-range contextual interpretation of TransformerXL, and it is 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 from our experiments indicate that the Hybrid LSTM-TransformerXL significantly beats the standalone LSTM and GRU baselines by delivering superior prediction accuracy resulting in an MAE of 4. 32 mph and RMSE of 7. 91 mph on the METR-LA dataset, as compared to the isolated recurrent and transformer baselines. With the help of an interactive Streamlit dashboard and Ngrok, the live deployment occurs by streaming. This makes it possible to have a live visualisation, a comparison of sensors, and a monitoring of dynamic forecasts. These results highlight the benefits the system achieves by combining recurrent and attention-based deep learning architectures. The system is capable of delivering traffic speed prediction in intelligent urban mobility that is scalable, interpretable, and deployable.
Summary
Keywords
Deep Learning Deployment, Hybrid deep learning, intelligent transportation systems (ITS), LSTM, METR-LA Dataset, Ngrok, PEMS-BAY Dataset, real-time dashboard
Received
29 May 2026
Accepted
16 October 2026
Copyright
© 2026 PM and Rajeswari. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Raja Rajeswari
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.