## 2 Methods
### Root Cause Tracing Based on Adam Variational Inference Bayesian Neural Network
#### 2.2.2 Weighted Granger Causality Analysis Based on LSTM  
A. Granger causality model based on LSTM  
This section establishes a time series-based LSTM model, where the Granger Causality Model (GCM) is modified into a nonlinear regression form:  
\[x_{i}(t)=\text{LSTM}\big{(}x_{i}(t-1),\ldots,x_{i}(t-q)\big{)}+\varepsilon_{i }(t), \tag{6}\]  
where \(\text{LSTM}(\cdot)\) represents the LSTM model, where this form does not include the explicit coefficients typically seen in traditional Granger causality analysis. Instead, it converts the model into one where an additional network layer is added in the LSTM model and its weights are treated as \(a_{ij}\). LSTM effectively maintains long-term memory by introducing a  
Figure 2: Root cause tracing framework. gating mechanism, making it perform better in processing long-term dependent sequence data [27]. Since fixed time lags are independent of each other, LSTM-based GC will be more suitable for causal analysis of process variables in the case of varying transmission delays. As shown in Figure 3, the core idea of LSTM is to control the flow of information by introducing three gates: the forget gate, the input gate, and the output gate. The forget gate determines which information should be discarded from the cell state, i.e., which information to forget. \[f_{t}=\sigma(W_{f}\cdot[h_{t-1},x_{t}]+b_{f}). \tag{7}\]  
The input gate consists of two parts: a sigmoid layer that decides which values will be updated and a tanh layer that creates a new candidate value vector, i.e.,  
\[ \begin{split} i_{t}&=\sigma(W_{i}\cdot[h_{t-1},x_{ t}]+b_{i}),\\ \tilde{C}_{t}&=\tanh(W_{C}\cdot[h_{t-1},x_{t}]+b_{ C}).\end{split}  \tag{8}\]  
The update of the cell state combines the information from the forget gate and the input gate:  
\[C_{t}=f_{t}*C_{t-1}+i_{t}*\tilde{C}_{t}. \tag{9}\]  
The output gate decides which information to output, and the output value is scaled by the tanh function:  
\[ \begin{split} o_{t}&=\sigma(W_{o}\cdot[h_{t-1},x_{ t}]+b_{o}),\\ h_{t}&=o_{t}*\tanh(C_{t}),\end{split}  \tag{10}\]  
where \(\sigma\) represents the sigmoid function; \"\(\cdot\)\" represents the dot product of a vector or matrix; \(*\) represents element-by-element multiplication; \(x_{t}\) is the input at time \(t\); \(h_{t}\) is the hidden state at time \(t\); \(C_{t}\) is the cell state at time \(t\); and \(W\) and \(b\) are the weight and bias, respectively. To prevent the gradients from becoming unstable during both the forward and backward propagation in the neural network, thereby avoiding issues such as vanishing or exploding gradients, the weights \(W\) are initialized using Xavier initialization--that is,  
\[W\sim\mathcal{N}\left(0,\frac{2}{n_{\text{in}}+n_{\text{out}}}\right), \tag{11}\]  
where \(n_{\text{in}}\) represents the number of neurons in the previous layer, \(n_{\text{out}}\) represents the number of neurons in the current layer, and \(\mathcal{N}\) denotes the normal distribution. The model's loss is estimated using the mean squared error, which is given by the following formula:  
Figure 3: LSTM structure diagram. \[L_{i}=\frac{1}{2 nT}\sum_{i=1}^{n}\sum_{t=1}^{T}(x_{i}(t)-\hat{x}_{i}(t))^{2}, \tag{12}\]  
where \(x_{i}(t)\) represents the actual value, and \(\hat{x}_{i}(t)\) represents the predicted value, which is given by the following formula:  
\[\hat{x}_{i}(t)=g(V_{x}h_{t}+b_{x}), \tag{13}\]  
where \(g\) is the activation function, \(V_{x}\) is the training weight, and \(b_{x}\) is the bias term. The training weight derivative of the loss function is  
\[ \begin{split}\frac{\partial L_{i}}{\partial W_{f}}& =\frac{\partial L_{i}}{\partial\hat{x}_{i}(t)}\frac{\partial\hat{x }_{i}(t)}{\partial h_{t}}\frac{\partial h_{t}}{\partial C_{t}}\frac{\partial C _{t}}{\partial f_{t}}\frac{\partial f_{t}}{\partial W_{f}}\\ &=-\frac{1}{nT}\sum_{t=1}^{T}((\frac{\partial L}{\partial C_{t}} \odot C_{t-1})\odot f_{t}(1-f_{t}))\cdot[h_{t-1},x_{t}]^{T},\end{split}  \tag{14}\]  
\[