## 3 Methods
### Overview
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Boundary** & **Pmax** & **Pmin** & **Qmax** & **Qmin** & **pmax** \\ \hline Value & 1.5 P & 0.5 P & 1.5 QP & 0.5 QP & 1.5 P \\ \hline Boundary & qmax & Vmax & Vmin & \(\theta\) max & \(\theta\) min \\ \hline Value & 1.5 q & 1.2 p.u. & 0.8 p.u. & \(15^{\circ}\) & \(-15^{\circ}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The boundary restrictions of BDD. indicates STformer's notable advantage in reducing false positives and ensuring prediction reliability. Its Recall rate of 96.76% is also among the top, highlighting STformer's ability to identify more true positives and enhance detection comprehensiveness. With an F1-score of 97.47%, STformer excels in balancing Precision and Recall, showcasing its superior accuracy and comprehensive detection capability. Although OmniAnomaly and InterFusion also perform well in terms of Precision and F1-score, they do not match STformer's overall balance. Other methods, such as LSSL and THOC, also show strong performance but still fall short of STformer's outstanding metrics. Overall, STformer outperforms all evaluated models, and Figure 3 clearly illustrates that the proposed model excels in Precision, Recall, and F1-score compared to baseline models. In Case 2, we evaluated the performance of the STformer model against 10 baseline methods in the anomaly detection task. Table 3 presents the performance of each model in terms of Precision, Recall, and F1-score. The STformer model excels across all evaluation metrics. Specifically, STformer achieves a Precision of 99.07%, which is significantly higher \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Models** & **Precision** & **Recall** & **F1-Score** \\ \hline OCSVM & 85.13 & 84.93 & 85.03 \\ \hline Deep-SVDD & 88.45 & 90.97 & 89.69 \\ \hline VAR & 89.02 & 86.37 & 87.67 \\ \hline LSTM & 89.77 & 88.52 & 89.14 \\ \hline LSTM-VAE & 91.98 & 94.72 & 93.33 \\ \hline BeatGAN & 88.31 & 96.24 & 92.10 \\ \hline OmniAnomaly & 98.01 & 93.25 & 95.57 \\ \hline InterFusion & 97.93 & 94.15 & 96.00 \\ \hline THOC & 93.12 & 98.31 & 95.72 \\ \hline LSSL & 90.17 & 96.42 & 93.19 \\ \hline Ours & 98.19 & 96.76 & 97.47 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance comparison of STformer and 10 baseline methods in Case 1. Figure 3: Comparison of Precision, Recall, and F1-score of anomaly detection models in Case 1.

than other methods, indicating its effectiveness in reducing false positives and ensuring the high reliability of predicted positives. Additionally, STformer has a Recall of 98.68%, also ranking among the top compared to all baseline methods, meaning that it identifies more true positives and enhances the comprehensiveness of anomaly detection. Considering the balance between Precision and Recall, STformer's F1-score of 98.87% reflects its exceptional capability in accurate prediction and comprehensive detection. Among the baseline methods, OmniAnomaly and InterFusion also perform remarkably well. OmniAnomaly has a Recall of 96.88% and an F1-score of 97.32%, ranking high in these metrics. InterFusion shows strong performance as well, with a Recall of 97.13% and an F1-score of 97.99%, although its Precision of 98.87% is slightly lower than that of STformer. Other methods like LSSL and THOC also perform well, with LSSL achieving a Precision and F1-score of 95.36% and 96.71%, respectively, and THOC with a Precision and F1-score of 94.49% and 95.23%. Although LSTM-VAE and BeatGAN show good performance in anomaly detection, their Precision and F1-scores do not reach the level of STformer. LSTM-VAE has a Precision of 92.83% and an F1-score of 91.98%, while BeatGAN achieves a Precision of 90.35% and an F1-score of 92.32%. The VAR model has relatively lower Precision and Recall, at 84.52% and 82.88%, respectively, indicating its limitations in the anomaly detection task.