## 2 Description of Deep Learning Model
### RNN-Based Models
#### 2.1.1 Long Short-Term Memory  
The standard RNN model suffers from short-term memory, gradient explosion, and gradient disappearing problems [32]. LSTM is a variation of the RNN architecture that addresses the gradient disappearance problem by incorporating a gating mechanism [33]. The LSTM architecture lies in its memory cell, which is responsible for storing and passing pertinent information across different time steps. The memory cell comprises distinct components, including an input gate, a forget gate, and an output gate. These gates engage with the input (x\({}_{t}\)) at the current time step (t) and the hidden state (h\({}_{t-1}\)) from the previous time step (t - 1). Subsequently, by means of a sequence of nonlinear operations performed by these gates, the pertinent information contained within (x\({}_{t}\)) and (h\({}_{t-1}\)) is transferred to the cell state (c\({}_{t}\)) and output (h\({}_{t}\)). A visual representation of a LSTM cell's structure is depicted in Figure 2.  
The forget gate (G\({}_{t}\)) controls how much information from the preceding memory cell should be retained or discarded. It takes the previous hidden state (h\({}_{t-1}\)) and the current input (x\({}_{t}\)) and produces an output ranging between 0 and 1. This computation is expressed as:  
\[\mathrm{G_{f}}=\sigma(W_{x}x_{t}+W_{hf}h_{t-1}+b_{f}) \tag{1}\]  
Next, the input gate (G\({}_{i}\)) determines how much new information should be stored in the memory cell. By considering both the previous hidden state (h\({}_{t-1}\)) and the current input (x\({}_{t}\)) as inputs, the input gate generates an output confined within the interval of 0 and 1. This gate includes two operations. A sigmoid layer first updates the values. Then, a hyperbolic tangent (tanh) layer constructs a vector of new candidate values (c\({}_{t}^{\prime}\)). The formulation of the input gate is articulated as follows:  
\[\mathrm{G_{i}}=\sigma(W_{x}x_{t}+W_{hi}h_{t-1}+b_{i}) \tag{2}\]  
\[\mathrm{c_{t}^{\prime}}=\tau\Big{(}W_{xg}x_{t}+W_{hg}h_{t-1}+b_{g}\Big{)} \tag{3}\]  
Subsequently, the cell state (c\({}_{t-1}\)) needs to be updated to (c\({}_{t}\)), which takes the previous memory cell, the forget gate, and the input gate as inputs and produces the current cell state, denoted by c\({}_{t}\).  
\[\mathrm{c_{t}}=\mathrm{G_{f}c_{t-1}}+\mathrm{G_{i}c_{t}^{\prime}} \tag{4}\]  
The output gate (G\({}_{o}\)) determines how much information from the current memory cell should be outputted as the current hidden state. It takes the previous hidden state and the current input and produces an output between 0 and 1. It is composed of a sigmoid layer  
Figure 2: Structure of a LSTM cell with forget gate (G\({}_{t}\)), input gate (G\({}_{i}\)), and output gate (G\({}_{o}\)).  
and a tanh layer. Finally, based on the inputs (x\({}_{t}\)) and (h\({}_{t-1}\)) as well as the cell state (c\({}_{t}\)), the output gate decides what information will be output.  
\[\mathrm{G_{o}}=\sigma(W_{\mathrm{xo}}x_{t}+W_{\mathrm{ho}}h_{t-1}+b_{\mathrm{o}}) \tag{5}\]  
\[h_{t}=G_{o}\tau(c_{t}) \tag{6}\]  
In these equations, W and b represent the weight matrices and bias vectors, respectively. The sigmoid function is mathematically represented as \(\sigma(x)\), and it transforms an input x into a value that falls within the range of 0 and 1. On the other hand, the tanh function is symbolized as \(\tau(x)\), and it operates by mapping an input x onto a value that lies within the span of \(-1\) and 1.  
The LSTM architecture allows for the learning of long-term dependencies by selectively retaining or discarding information in the memory cell through the input and forget gates. This enables the LSTM networks to effectively process and model sequential data with complex temporal dependencies, making them widely used in tasks such as natural language processing, speech recognition, and time series prediction.