# A Review of Traffic Flow Prediction Methods in Intelligent Transportation System Construction
## 4 Deep Learning Models
### Long Short-Term Memory (LSTM) Recurrent Neural Networks  
Due to the susceptibility of traditional RNNs to issues such as vanishing and exploding gradients, long short-term memory recurrent neural networks (LSTM-RNNs) were developed to address these limitations. LSTM-RNNs introduce unique gating mechanisms and memory cells, which enable them to effectively capture long-term dependencies within sequential data. Compared to traditional RNNs, the introduction of LSTM has paved new pathways for the development of RNN models. Particularly in the field of natural language processing, LSTM-RNNs have demonstrated superior performance over traditional RNNs, rapidly gaining widespread recognition and practical application. The specific model structure is shown in Figure 6.Compared with RNNs, LSTM introduces an additional gating mechanism, which effectively alleviates the gradient explosion problem. However, this mechanism also significantly increases the computational overhead, making its computational complexity higher than that of an ordinary RNN. In addition, as the sequence length increases, the computational cost of LSTM will increase rapidly, which further limits its scalability in large-scale sequence modeling tasks.  
The memory cell of an LSTM network is primarily composed of an output gate, input gate, and forget gate.  
The forget gate determines which information should be forgotten or retained from the cell state, and its computation is as follows:  
\[f_{t}=\sigma\Big{(}W_{f}\cdot[h_{t-1},X_{t}]+b_{f}\Big{)}. \tag{8}\]  
Figure 5: RNN model diagram.  
The input gate consists of two components: a sigmoid layer that determines which values need to be updated and a tanh layer that creates a new candidate value vector, which will be added to the cell state. The computation formula for the input gate is as follows:  
\[i_{t}=\sigma(W_{i}\cdot[h_{t-1},X_{t}]+b_{i}), \tag{9}\]  
\[\widetilde{C}_{t}=tanh(W_{C}\cdot[h_{t-1},X_{t}]+b_{c}). \tag{10}\]  
The output gate determines the value of the hidden state and contains key information about the observed sequence. The computation formula for the output gate is as follows:  
\[o_{t}=\sigma(W_{o}\cdot[h_{t-1},X_{t}]+b_{o}), \tag{11}\]  
\[ht=ot\odot tanh(Ct). \tag{12}\]  
Traffic flow prediction based on RNNs has been widely applied. [PERSON] et al. [23] employed LSTM networks to predict traffic flows, analyzing the impacts of various factors on the prediction performance of LSTM. They further improved the prediction accuracy by incorporating an attention mechanism-based Conv-LSTM module. [PERSON] et al. [24] proposed a traffic flow prediction model based on LSTM networks, integrating the temporal and spatial interactions of the road network. Unlike traditional prediction methods, the LSTM network considers the spatiotemporal dependencies of the traffic system through a two-dimensional network consisting of multiple memory units. Comparative experiments with other typical prediction models demonstrated that the proposed novel LSTM-based traffic prediction model delivered superior performance.