## 3 Experimental Settings and Results Analysis
### Experimental Results and Analysis  
1. Anomaly detection based on box plot  
Box plot anomaly detection is applied to the energy consumption model \(Y\) and gas consumption \(y_{1}\) using the experimental data. The results are presented in Figures 11 and 12, where \"Mild Outliers\" and \"Extreme Outliers\" denote anomalous data points. A comparison between the anomalies detected by the box plot and the actual anomalous data reveals a recognition accuracy of 95% for energy consumption model \(Y\) and 98% for gas consumption \(y_{1}\). 2. Root cause tracing based on Adam variational inference Bayesian neural network  
(1) Solving Granger causality coefficient based on LSTM  
The abnormal gas consumption data from Experiment 1, along with the corresponding variables listed in Table 9, are compared using four methods: GC, NN-GC, LSTM-GC, and LSTM-WGC. The true causal relationship diagram is shown in Figure 13, with the optimal path marked in red. Based on Equations (19)-(21), the Granger causality coefficients calculated using the four methods are shown in Tables 10-13. The resulting causal relationships are presented in Figure 14. The arrow represents the causal path, and the red arrow represents the optimal causal path. The causal paths obtained using GC and NN-GC are \(T_{2},T_{4},V_{2},T_{6}\) and \(V_{2},T_{5},T_{6}\), respectively. The arrow represents the causal path, and the red arrow represents the optimal causal path. Compared to Figure 13, these paths differ significantly. The causal paths obtained using LSTM-GC are \(T_{3},T_{2},V_{1},T_{1},V_{2},T_{6}\) and \(T_{3},T_{4},V_{1},T_{1},V_{2},T_{6}\). These two paths have the same length and do not offer substantial differences, which complicates subsequent analysis. In contrast, the causal relationship diagram obtained using LSTM-WGC introduces weights, allowing for the identification of the optimal path even when the paths have the same length. As a result, only one optimal path, \(T_{3},T_{2},V_{1},T_{1},V_{2},T_{6}\), is identified, \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Variable** & \(V_{1}\) & \(V_{2}\) & \(T_{1}\) & \(T_{2}\) & \(T_{3}\) & \(T_{4}\) & \(T_{5}\) & \(T_{6}\) & \(T_{7}\) \\ \hline \(V_{1}\) & - & - & 0.094 & - & - & - & - & - & - \\ \(V_{2}\) & - & - & - & - & - & 0.039 & 0.044 & 0.043 & - \\ \(T_{1}\) & - & 0.045 & - & 0.038 & - & - & - & - & - \\ \(T_{2}\) & 0.094 & - & - & - & - & - & - & - & - \\ \(T_{3}\) & - & - & - & 0.069 & - & 0.088 & - & - & - \\ \(T_{4}\) & 0.125 & - & - & - & - & - & - & - & - \\ \(T_{5}\) & - & - & - & - & - & - & - & 0.040 & 0.053 \\ \(T_{6}\) & - & - & - & - & - & - & - & - & - \\ \(T_{7}\) & - & - & - & - & - & - & - & 0.063 & - \\ \hline \hline \end{tabular}
\end{table} 
Table 13: Causal coefficients between variables obtained by LSTM-WGC. Figure 14: Causal relationship diagrams obtained by different algorithms. (**a**) GC (**b**) NN-GC (**c**) LSTM-GC (**d**) LSTM-WGC. and this path closely matches the true causal relationship diagram in Figure 13. Based on these simulation results, it can be concluded that the LSTM-based weighted Granger causality analysis (LSTM-WGC) method better captures the causal relationships between variables, and it performs well in causal analysis and determining causal paths. (2) Root cause tracing based on Adam variational inference Bayesian neural network  
Based on expert knowledge, the training set is constructed to update the weights of the Bayesian Neural Network (BNN). During the training phase, \(V_{1},V_{2}\) and \(T_{1}\)-\(T_{7}\) are used as the input variables for the BNN. The weighted input vectors are calculated according to Formula (26). The output consists of the 15 factors listed in Section 2.2.3, as shown in Table 14. To evaluate the superiority of the Adam method, a comparison is made with other optimization methods, including SGD, SGD with momentum, and LBFGS.