## 3 Methodology
### Model Architecture
#### 3.2.2 Deep-Learning-Based Forecasting Module  
The further purpose of this section is to provide accurate information on transfer passenger flow. Referring to the related literature, we find that transfer passenger flow is influenced by several factors in time and space and thus we consider their effects on transfer passenger flow in our forecasting model. As is known, LSTM is an excellent variant [37] of the RNN algorithm which is capable of learning the long-term dependencies of time series data well so that it exhibits excellent performance in traffic data forecasting tasks. Hence, we applied the LSTM to accurately predict transfer passenger flow after considering multiple feature variables. The key for LSTM to effectively tackle the gradient vanishing and gradient explosion problems of RNN lies in its designed gating structures, i.e., input, output and forget gates. Of these, given in Equation (6), the main function of the forget gate \(f_{t}\) is to decide which information should be discarded or reserved. Specifically, the information from the previous hidden state (\(C_{t-1},h_{t-1}\)) and the current input \(x_{t}\) is passed into the sigmoid function concurrently. Additionally, the output \(f_{t}\) is between 0 and 1, with a value closer to 0 meaning it should be discarded and a value closer to 1 meaning it should be retained:  
\[f_{t}=\delta_{\text{sigmoid}}\left(\mathbf{\omega}_{g}\cdot[\mathbf{h}_{t-1},x_{t}]+ \mathbf{b}_{g}\right) \tag{6}\]  
where \(\mathbf{\omega}_{g}\) and \(\mathbf{b}_{g}\) represent the weight and bias of the forget gate, respectively; \(\delta\) is an activation function and \([\mathbf{h}_{t-1},x_{t}]\) is the new vector obtained by merging the vector \(\mathbf{h}_{t-1}\) and \(x_{t}\). As shown in Equation (7), the input gate \(\mathbf{i}_{t}\) is used for updating the cell state. In particular, the sigmoid function receives this information from the previously hidden layer \(\mathbf{h}_{t-1}\) and the current input \(x_{t}\), and then outputs a value between 0 and 1 to determine which information to update, where 0 denotes that the information is not important and 1 signifies importance. Additionally, in Equation (7), the above information is also passed into the \(\tanh\) function to create a new candidate vector \(\widetilde{C}_{t}\), whose output is multiplied by the result of the sigmoid function and the output \(\mathbf{i}_{t}\) from the sigmoid function determines which information needs to be preserved in the output \(\widetilde{C}_{t}\) of the \(\tanh\) function. \[\mathbf{i}_{t}=\delta_{\text{sigmoid}}(\mathbf{\omega}_{t};[\mathbf{h}_{t-1},x_{t}]+\mathbf{ b}_{i}) \tag{7}\]  
\[\widetilde{C}_{t}=\delta_{\text{tanh}}(\mathbf{\omega}_{c};[\mathbf{h}_{t-1},x_{t}]+ \mathbf{b}_{c}) \tag{8}\]  
where \(\mathbf{\omega}_{i}\) and \(\mathbf{b}_{i}\) represent the weight and bias of the input gate, respectively, when the activation function is sigmoid; \(\mathbf{\omega}_{c}\) and \(\mathbf{b}_{c}\) are the weight and bias of the input gate when the activation function is \(\tanh\). Later, the previous cell state \(C_{t-1}\) is multiplied point-by-point with the forget vector \(\mathbf{f}_{t}\). If it is multiplied by a value close to 0, this means that the information is to be discarded in the new cell state \(C_{t}\). Further, this value is added point-by-point with the output value \(\mathbf{i}_{t}\) of the input gate to update the new information found by a neural network to \(\widetilde{C}_{t}\). Thus, the updated cell state \(C_{t}\) is obtained. \[C_{t}=\mathbf{f}_{t}\bigotimes C_{t-1}+\mathbf{i}_{t}\bigotimes\widetilde{C}_{t} \tag{9}\]  
Since it contains the information of the previous input, the output gate is utilized to determine the next hidden state. First, the sigmoid function processes the previous hidden state \(\mathbf{h}_{t-1}\) and the current input \(x_{t}\), and the new cell state \(C_{t}\) is then fed to the \(\tanh\) function.