## 3 Method
### AE-GRU Model
#### 3.2.3 Gated Recurrent Unit Layer  
For tropical cyclone track prediction tasks, we set a customized batch technique for the GRU layer. In general deep learning algorithms, the processing of the input data with mini-batch technology can not only increase the training speed of the model, but also deal with the overfitting problem by introducing randomness into the training process. Nevertheless, in a tropical cyclone dataset, a general mini-batch technique is unsuitable since the lengths of the tropical cyclones differ, such as some tropical cyclones lasting a few hours, whereas another may last days. Therefore, a new customized batch technique is proposed here based on [37] to adapt to the data characteristics of tropical cyclones. The specific process is shown in Figure 3. First, the tropical cyclones records are processed into sequences in chronological order. For example, in Figure 3, \(r_{1,1}\) to \(r_{1,6}\) represent the feature vector records of the first tropical cyclone extracted from the AE layer, where the first number in \(r_{1,1}\) is the tropical cyclone number and the second number represents the timestamps. Then, the input of the first mini-batch is \(\left(r_{1,1},r_{2,1},r_{3,1},\ldots,N_{batch}\right)\), the records of \(N_{batch}\) tropical cyclones at the first timestamp, where \(N_{batch}\) is a predefined batch size. The output is the records of \(N_{batch}\) tropical cyclones at the second timestamp. The input of the second mini-batch is from the second timestamp, and so on. Because the length of tropical cyclone records is different, if any tropical cyclone ends before  
Figure 2: Auto-encoder layer. the batch size, the next available tropical cyclone is appended. For example, in Figure 3, the records of Tropical Cyclone 4 were added at the end of Tropical Cyclone 1, and Tropical Cyclone 5 was added at the end of Tropical Cyclone 2. At last, the results of the customized batch are generated. Then, the customized batch is applied as input data to the GRU layer for model training. The GRU layer has an update gate and a reset gate, shown in Figure 4. The update gate is a combination of an input gate and a forget date of an LSTM model, which is used to retain the history information of the previous states. The reset gate determines how much of the previous information needs to be combined with the new input. The update gate is calculated by Equation (6), where \(\sigma\) is a sigmoid activation function, \(E_{n,t}\) is the input vector at timestamp \(t\), and \(h_{t-1}\) means the output vector from the last GRU cell that retains the information at \(t-1\). \(W\), \(U\), and \(b\) are weights and bias parameters for linear transformations. After the linear transformation of \(E_{n,t}\) and \(h_{t-1}\), the information is added up by an update gate and then activated by a sigmoid activation function. Eventually, the information is compressed between 0 and 1. In our study, assuming all tropical cyclones are independent, when a new tropical cyclone is input to the model, the appropriate hidden state would be reset. \[Z_{t}=\sigma\left(W_{z}E_{n,t}+U_{z}h_{t-1}+b_{z}\right) \tag{6}\]  
The reset gate is calculated through Equation (7). This equation is similar to the update gate, but the parameters \(W_{t}\), \(U_{t}\), and \(b_{r}\) of the linear transformation are different. \[r_{t}=\sigma\left(W_{r}E_{n,t}+U_{r}h_{t-1}+b_{r}\right) \tag{7}\]  
After calculating an output \(r_{t}\) of the reset gate, the candidate state \(\tilde{h}_{t}\) can be obtained by Equation (8), where the hidden state at timestamp \(t-1\) and the reset gate information at timestamp \(t\) are processed by a Hadamard product. Then, the product is added by the input vector \(E_{n,t}\) at timestamp \(t\) multiplied by a weight \(W_{c}\) and added by a bias \(b_{c}\). At last, the tanh activation function is used to compress the information between \(-1\) and \(1\) and then generate \(\tilde{h}_{t}\).