Short-term Road Traffic Flow Prediction based on LSTM and Transformer Models
DOI:
https://doi.org/10.61173/v8jczt67Keywords:
LSTM, Transformer, Short-term road flowAbstract
With the acceleration of urbanization, traffic congestion has become a prominent problem that hinders the operational efficiency of cities and affects the travel experience of residents. Accurate short-term traffic flow prediction is the support for intelligent transportation systems to achieve early prediction and congestion warning. Traditional prediction models have difficulty capturing the nonlinear and time-series dependent characteristics of traffic flow, resulting in limited prediction accuracy. This paper takes the 2-minute traffic flow data of the Creteil Ring Road in France from 7:00 to 9:00 as the research object. It adopts a Long Short-Term Memory (LSTM) and a Transformer model to preprocess traffic flow data, construct a standardized data set, and conduct comparative experiments on LSTM, Transformer models. The experimental results are presented intuitively through flow time series comparison diagrams, training loss curve diagrams, and model evaluation index comparison diagrams. The mean absolute error (MAE) of the LSTM model is 0.65, the root mean square error (RMSE) is 0.82, and the coefficient of determination(R²) reaches 0.9061. The predicted values are highly consistent with the actual traffic flow fluctuations, and the error distribution is concentrated. Research shows that compared with the Transformer model, the LSTM model has more advantages in short-term traffic prediction tasks. These models can provide precise data support for practical applications such as traffic signal timing optimization and route planning, and provide technical references for the efficient operation of intelligent transportation systems.