Skip to content
Open access

Comparative Analysis of LSTM and PatchTST Models for Urban Street Traffic Time Series Forecasting

Aug 2026 · Applied and Computational Engineering · 0 citations

TL;DR

Although the forecasting accuracy of both models decreases with longer prediction horizons, PatchTST maintains relatively lower errors and better stability, and the results indicate that the patch-based representation and attention mechanism provide advantages in capturing both local variations and long-term temporal dependencies in urban traffic sequences.

Abstract

With the increasing complexity of urban traffic systems, reliable forecasting of road conditions has become an important requirement for congestion management and intelligent transportation applications. This study develops a multivariate and multi-horizon traffic speed forecasting framework using real-world traffic monitoring data collected from 75 street segments in Shenzhen, China. LSTM and PatchTST are selected as representative recurrent and Transformer-based forecasting models for comparative evaluation. Average travel speed is considered the prediction target, while traffic index, total sample travel length, and total sample travel time are incorporated as additional input variables. Historical observations from the previous 48 hours are used to forecast traffic speeds over three future horizons, including 30, 60, and 120 minutes. To increase the dependability of experimental outcomes, the dataset is split chronologically, and several random seeds are used. MAE, RMSE, MAPE, and R2 are used to assess the model's performance. According to the experimental findings, PatchTST consistently outperforms LSTM in predicting across all prediction horizons. The MAE values of PatchTST are 2.0710, 2.1960, and 2.3552 for 30-, 60-, and 120-minute forecasting tasks, corresponding to reductions of 6.81%, 7.86%, and 5.89% compared with LSTM. Meanwhile, PatchTST obtains R² values of 0.8886, 0.8795, and 0.8670, respectively. Although the forecasting accuracy of both models decreases with longer prediction horizons, PatchTST maintains relatively lower errors and better stability. The results indicate that the patch-based representation and attention mechanism provide advantages in capturing both local variations and long-term temporal dependencies in urban traffic sequences.

Read PDF

Similar papers

Conference Aug 2026

Bus Travel Time Prediction under Heterogeneous Traffic Conditions Using a Transformer Encoder-Based Model: A Comparative Study

Accurate bus travel time prediction is essential for improving service reliability, passenger information systems, and operational efficiency in public transportation. However, predictions remain challenging under heterogeneous traffic conditions commonly observed in developing countries due to mixed traffic flow, weak lane discipline, and highly variable delays. This study presents a comparative evaluation of three forecasting approaches, namely ARIMA, LSTM, and a Transformer encoder-based model, using real-world automatic vehicle location data collected from the Digana-Kandy corridor in Sri Lanka. The data set consists of 5,126 bus journeys recorded over five months. Travel times were aggregated into 30-minute intervals, and all models were evaluated using the same preprocessing procedure, 80:20 train-test split, and error metrics. Mean Absolute Error (MAE), Mean Absolute Percentage Error (MAPE), and Root Mean Squared Error (RMSE) were used for evaluation. Results show that the Transformer encoder-based model achieved the best predictive performance with an MAE of 2.10 min, MAPE of 4.52%, and RMSE of 3.76 min, outperforming both LSTM and ARIMA models. The findings highlight the potential of Transformer encoder-based architecture for intelligent public transport applications and real-time bus arrival prediction under heterogeneous traffic conditions.

Hasanka Wijesundara, Damayanthi Herath, Sara Moridpour et al. · 0 citations
Conference Aug 2026

Traffic Volume Prediction Using Temporal and Weather Features with Explainable Machine Learning

Accurate traffic volume prediction is essential for effective traffic management and transport planning, particularly on major freeway corridors. This study examines hourly traffic volume prediction using the Metro Interstate Traffic Volume Dataset by applying classical machine learning models together with systematic feature analysis and Explainable Machine Learning (ML). Temporal features derived from timestamps and selected weather variables were used to train four regression models: Linear Regression, Support Vector Regression, K-Nearest Neighbors, and XGBoost. A structured backward feature elimination approach was applied at the feature-group level to explicitly compare the predictive contributions of temporal (hour-of-day, day-of-week, month) and weather variables (temperature, rainfall, cloud coverage). The results show that XGBoost, KNN, and SVR outperform linear regression, with XGBoost achieving the best performance (RMSE = 479.07 vehicles/hour, R2 = 0.94). Quantitative analysis using the XGBoost model reveals a clear contrast between feature groups: removing weather features results in an RMSE change of less than 1%, whereas removing temporal features, such as day-of-week, increases RMSE by up to 94%. To improve interpretability, SHapley Additive exPlanations (SHAP) were applied to the XGBoost model, to acquire clear global and local explanations of predictions. The explainability results confirm that traffic patterns are mainly driven by recurring human activity rather than short-term weather effects for this research. By combining robust modeling with Explainable ML, this research moves beyond mere accuracy to provide transparent, actionable insights. These findings equip urban and transport planners with the quantitative evidence needed to prioritize peak-hour demand management and develop focused, evidence-based congestion mitigation strategies. While this specific study is limited to continuous-flow freeway data from the USA, future work will validate the framework using additional datasets from different geographic regions and functional road classifications, with a particular focus on expressways and urban road networks.

S. Nissanka, Damayanthi Herath, Panduka Neluwala et al. · 0 citations
Open access Aug 2026

A Multi-Source Machine Learning Framework for Segment-Level Travel Time Prediction in Urban Arterial Corridors: Toward Sustainable Traffic Management

A multi-source machine learning framework for segment-direction-level prediction in the Denizli city center showed that temporal and traffic-state variables dominate predictions, while weather and public transport provide complementary value.

Muhammed Enes Karaoğlan, Yetis Sazi Murat · 0 citations
Open access Aug 2026

Efficient Spatiotemporal Traffic Forecasting for Smart Cities Using DCRNN-Lite in a Digital Twin Environment

Urban traffic congestion remains a critical challenge for smart city development, particularly in the context of real-time monitoring and prediction for intelligent transportation systems. To address this issue, this study proposes a Digital Twin-based urban traffic prediction framework using a lightweight Diffusion Convolutional Recurrent Neural Network (DCRNN-Lite). The proposed model integrates spatial dependencies among road segments through diffusion convolution and temporal traffic dynamics through recurrent modeling, enabling effective spatiotemporal traffic forecasting with reduced computational complexity. Experiments were conducted on the real-world METR-LA dataset, consisting of traffic speed data from 207 sensors deployed across the Los Angeles highway network. The experimental results demonstrate that DCRNN-Lite achieves stable prediction performance, as reflected by low Mean Absolute Error (MAE) and Root Mean Square Error (RMSE), consistent convergence behavior, and strong correlation between predicted and actual traffic speeds at both node and city-wide levels. Despite its simplified architecture, the model effectively captures local traffic variations and global mobility trends, making it suitable for real-time deployment. The findings indicate that the proposed approach provides a favorable balance between accuracy and efficiency, highlighting its potential as a core component for digital twin-enabled smart cities and metaverse-based urban traffic management systems.

H. Awad · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.