## 3 Data Description and Methods
### The Baseline Methodologies
#### 3.2.2 Lstm  
LSTM is a representative model designed to address the 'Gradient Vanishing' problem that arises in RNNs. Traditional RNNs adopt a simple structure where, at each time step, input information and the previous hidden state are combined to produce a new hidden state. However, as the sequence lengthens, gradients can vanish or explode during the backpropagation process, leading to the inability to properly learn important past information. In contrast, LSTM is designed with a separate pathway called the cell state, which allows the preservation of long-term information. To achieve this, it introduces several gates that serve as key mechanisms. These gates, primarily the input gate, forget gate, and output gate, finely regulate the incoming information, the information to be retained, and the information to be output, thereby ensuring that significant information is maintained even in long sequences. In an LSTM cell, at time step \(t\), let the input vector be \(\mathbf{x}_{t}\), the previous hidden state be \(\mathbf{h}_{t-1}\), and the cell state maintained up to the previous time step be \(\mathbf{C}_{t-1}\). First, the forget gate is calculated as follows. The forget gate determines which parts of the cell state from the previous time step \(\mathbf{C}_{t-1}\) should be erased. Next, the input gate decides how much new information from the current input should be added to the cell state, during which the potential candidate information \(\tilde{\mathbf{C}}_{t}\) is created through the hyperbolic tangent (tanh) function. Subsequently, the updated cell state \(\mathbf{C}_{t}\) is determined by combining the values calculated by the forget gate and the input gate. Finally, the output gate selects which information from the updated cell state should be exposed to the hidden state, thereby producing the final hidden state \(\mathbf{h}_{t}\). In summary, at each time step, the gates and the cell and hidden states follow the flow illustrated below (where \(\sigma\) denotes the sigmoid function and tanh represents the hyperbolic tangent function):  
\[rClf_{t} = \sigma\big{(}W_{f}[\mathbf{h}_{t-1},\mathbf{x}_{t}]+b_{f}\big{)} \;\;\rightarrow\;\;(\text{Forget Gate}) \tag{3}\] \[i_{t} = \sigma\big{(}W_{i}[\mathbf{h}_{t-1},\mathbf{x}_{t}]+b_{i}\big{)} \;\;\rightarrow\;\;(\text{Input Gate})\] (4) \[\tilde{\mathbf{C}}_{t} = \tanh\big{(}W_{C}[\mathbf{h}_{t-1},\mathbf{x}_{t}]+b_{C}\big{)} \;\;\rightarrow\;\;(\text{Cell State Candidate})\] (5) \[\mathbf{C}_{t} = f_{t}\odot\mathbf{C}_{t-1}+i_{t}\odot\tilde{\mathbf{C}}_{t}\;\; \rightarrow\;\;(\text{New Cell State})\] (6) \[o_{t} = \sigma\big{(}W_{o}[\mathbf{h}_{t-1},\mathbf{x}_{t}]+b_{o}\big{)} \;\;\rightarrow\;\;(\text{Output Gate})\] (7) \[\mathbf{h}_{t} = o_{t}\odot\tanh(\mathbf{C}_{t})\;\;\rightarrow\;\;(\text{New Hidden State}) \tag{8}\]  
Figure 2 illustrates the role of each gate in the above equations. Here, the forget gate \(f_{t}\) determines the proportion of the previous cell state \(\mathbf{C}_{t-1}\) that should be erased, removing unnecessary or outdated information. The input gate \(i_{t}\) decides how much new  
information to incorporate into the cell state, and \(\hat{\mathbf{C}}_{t}\) represents the candidate information to be added. The cell state \(\mathbf{C}_{t}\) is obtained by combining the retained part from the previous state (\(f_{t}\odot\mathbf{C}_{t-1}\)) and the new incoming part (\(i_{t}\odot\hat{\mathbf{C}}_{t}\)). The output gate \(o_{t}\) determines the extent to which the updated cell state is reflected in the hidden state \(\mathbf{h}_{t}\). By dividing the roles across different gates and finely controlling the information flow, LSTM can effectively preserve and utilize essential past information even in very long sequences. When modeling an actual LSTM, various hyperparameters such as the dimensionality of the hidden state, the initialization methods for each gate's parameters, and the learning rate must be set. It is necessary to find appropriate values tailored to the characteristics of the data.