## 2 Model Structure
### LSTM Network  
The LSTM network, as illustrated in Figure 2a, is controlled by three gates: the forget gate, the input gate, and the output gate. These gates regulate the information flow within the network, ensuring that the cell state is appropriately updated and maintained over time. The core of the LSTM is the cell state, which acts as a memory that preserves useful information over time steps. The cell state in an LSTM is dynamically adjusted based on the input and the previous state, which is crucial for handling long-term dependencies in sequence data. In an LSTM, the gates selectively regulate what information is forgotten from the previous state, what new information is added to the cell state, and how the output of the LSTM cell is generated. The mathematical operations governing the LSTM can be expressed by the following equations:  
\[i(t)=\sigma(W_{ih}h(t-1)+W_{ix}x(t)+W_{ix}c(t-1)+b_{i}) \tag{1}\]  
\[f(t)=\sigma\Big{(}W_{fh}h(t-1)+W_{fx}x(t)+W_{fx}c(t-1)+b_{f}\Big{)} \tag{2}\]  
\[c(t)=f(t)\odot c(t-1)+i(t)\odot tanh(W_{ch}h(t-1)+W_{cx}x(t)+b_{c}) \tag{3}\]  
\[o(t)=\sigma(W_{oh}h(t-1)+W_{ox}x(t)+W_{oc}c(t)+b_{o}) \tag{4}\]  
\[h(t)=o(t)\odot tanh(c(t)) \tag{5}\]  
In the above formula, \(f(t)\) represents the forget gate, \(i(t)\) represents the input gate, \(o(t)\) represents the output gate, \(c(t)\) represents the cell state, \(h(t)\) represents the hidden layer state value, and \(W\) and \(b\) represent the weight and bias. \(\odot\) denotes the scalar product of two vectors, \(\sigma\) represents the sigmoid function, and \(tanh\) is defined as \(tanh(x)=\frac{e^{x}-e^{-x}}{e^{x}+e^{-x}}\). The amount of information for the cell memory to update, forget, and output its state is determined by the gating vectors in (1), (2), and (4). The cell state and output are updated according to (3) and (5). Note that depending on the state of the forget gating vector \(f(t)\), the cell state can be reset or restored, and the other two gating vectors \(i(t)\) and \(o(t)\) operate in a similar manner to regulate the input and output. Each gate plays a specific role in the functioning of the LSTM network, contributing to its ability to handle long-term dependencies in sequential data:  
Forget Gate: The first step in the LSTM is determining which information to discard or retain. The forget gate, using the sigmoid function, decides this by outputting values  
Figure 2: A schematic diagram of the model structure: (**a**) LSTM; (**b**) combining LSTM and Seq2 Seq. between 0 and 1. A value close to 0 indicates more forgetting, while a value close to 1 indicates more retention. This gate helps the network selectively forget irrelevant parts of the previous state, preventing the accumulation of unnecessary information. This is represented by Equation (2). Input Gate: The input gate determines which new information to add to the cell state. It controls how much new information from the current input \(x(t)\) and the previous hidden state \(h(t-1)\) is added to the cell state. This gate helps update the cell state with new relevant information while ignoring the irrelevant parts. This mechanism is defined in Equation (1). The input gate decides which values to update through the sigmoid function, and the \(\tanh\) function generates new candidate values. The output of the sigmoid function is then multiplied by the output of the \(\tanh\) function, determining which content is important and needs to be retained. Sigmoid is an artificial neuron, similar to a perceptron, and its output y is calculated as follows:  
\[y=\frac{1}{\left(1-e^{-l\times s}\right)} \tag{6}\]  
\[s=\sum_{i=1}^{n}W_{i}x_{i}+b \tag{7}\]  
where \(b\) is the bias, \(l\) is a constant determining the steepness of the sigmoid function, and \(W_{i}x_{i}\) are the weight and input, respectively. Its main function is to compress a wide range of inputs into a smaller range. Cell State Update: The cell state is updated by combining the information from the forget gate and the input gate.