# Displacement Patterns and Predictive Modeling of Slopes in the Bayan Obo Open-Pit Iron Mine
## Appendix B  
LSTM introduces memory cells and gating mechanisms to control information storage/forgetting, overcoming traditional RNN limitations. LSTM primarily includes three gating structures:  
Forget Gate: The forget gate determines the retention or discard of historical information, as shown in Equation (A5). \[\mathrm{f_{t}}=\sigma(\mathrm{W_{f}}\cdot[\mathrm{h_{t-1}},\mathrm{x_{t}}]+ \mathrm{b_{f}})\] (A5)  
where \(\mathrm{x_{t}}\) is the current input, \(\mathrm{h_{t-1}}\) is the previous hidden state, \(\mathrm{W_{f}}\) and \(\mathrm{b_{f}}\) are the weight matrix and bias term, and \(\sigma\) is the Sigmoid activation function with outputs in [0, 1]. Input Gate: The input gate controls whether the current input information is added to the memory cell, as shown in Equations (A6) and (A7). \[\mathrm{\overset{\sim}{i_{t}}}=\sigma(\mathrm{W_{i}}\cdot[\mathrm{h_{t-1}}, \mathrm{x_{t}}]+\mathrm{b_{i}})\] (A6)  
\[\mathrm{\overset{\sim}{C_{t}}}=\tanh(\mathrm{W_{C}}\cdot[\mathrm{h_{t-1}}, \mathrm{x_{t}}]+\mathrm{b_{C}})\] (A7)  
where \(\mathrm{\overset{\sim}{i_{t}}}\) is the input gate activation value and \(\mathrm{\overset{\sim}{C_{t}}}\) is the candidate cell state using \(\tanh\) activation for information smoothness. The memory cell state update is shown in Equation (A8). \[\mathrm{C_{t}}=\mathrm{f_{t}}\odot\mathrm{C_{t-1}}+\mathrm{i_{t}}\odot\mathrm{ \overset{\sim}{C_{t}}}\] (A8)  
where \(\odot\) denotes element-wise multiplication (Hadamard product) and \(\mathrm{C_{t}}\) is the updated memory cell state. Output Gate: The output gate determines current output by controlling information passed to the next hidden state \(\mathrm{h_{t}}\), normalized via \(\tanh\), as shown in Equations (A9) and (A10). \[\mathrm{o_{t}}=\sigma(\mathrm{W_{o}}\cdot[\mathrm{h_{t-1}},\mathrm{x_{t}}]+ \mathrm{b_{o}})\] (A9)  
\[\mathrm{h_{t}}=\mathrm{o_{t}}\odot\tanh(\mathrm{C_{t}})\] (A10)  
where \(\mathrm{o_{t}}\) is the output gate activation value and \(\mathrm{h_{t}}\) is the hidden state at current time step. As shown in Figure 11, each line connecting one node's output to another node's input represents a complete vector. The circles denote pointwise operations, such as vector addition, while the boxes indicate the neural network layers that are learned during training. The core of LSTM is the cell state, represented by the horizontal line running across the top of the diagram. The cell state functions somewhat like a conveyor belt. It flows through the entire chain with only minor linear interactions, making it easy for information to pass unchanged along it. LSTM has the ability to add or remove information from the cell state, carefully regulated by structures called gates. The gates are mechanisms that selectively allow information to pass through. Each gate consists of a sigmoid neural network layer and a pointwise multiplication operation. The sigmoid layer outputs values between 0 and 1, indicating the proportion of each component that should be allowed through. A value of 0 means \"block everything\", while 1 means \"let everything through\". LSTM contains three such gates to protect and control the cell state. The first step in an LSTM analysis is to decide what information to forget from the cell state. This decision is made by the forget gate layer, a sigmoid layer that takes \(\mathrm{h_{t-1}}\) and \(\mathrm{x_{t}}\) as inputs and outputs values between 0 and 1 for each component of the cell state. The next step is to decide what new information to store in the cell state. First, the input gate layer, another sigmoid network, determines which values will be updated. Then, a tanh layer generates a vector of candidate values, \(\widetilde{C}_{t}\), that could be added to the state. In the following step, these two components are combined to update the state. This update is governed by the cell state update equation (Equation (A8)), where the old state is partially forgotten and the new candidate values are added, each scaled by how much we decided to update that state component.