## 4 Results and Discussion
### Ablation Experiments on Different Loss Functions  
Through the design of ablation experiments with different loss functions, this study aimed to explore the impact of various loss functions on model performance on the task of detecting cyberattack behaviors. By comparing the performance of traditional Cross-Entropy Loss, Focal Loss, MSE (Mean Squared Error Loss), and the proposed Synchronized Loss on the same dataset, the effects of these loss functions were assessed across the three dimensions of Precision, Recall, and Accuracy. The objective of the experimental design was to verify whether the proposed synchronized loss function could provide superior performance compared to other common loss functions on the specific task of cyberattack behavior detection.  
As can be observed from Table 6, Synchronized Loss achieved the highest values in terms of Precision, Recall, and Accuracy, at 0.93, 0.89, and 0.91, respectively, significantly surpassing the other three loss functions. Cross-Entropy Loss showed the poorest performance, with Precision, Recall, and Accuracy of 0.69, 0.64, and 0.67, respectively. The performance of Focal Loss and MSE fell between the two, reaching scores of 0.79, 0.73, 0.76 and 0.86, 0.82, 0.84, respectively. These results indicate that for the task of cyberattack behavior detection, the proposed synchronized loss function can more effectively optimize the model, enhancing detection precision and robustness compared to other loss functions. Although cross-entropy loss, the most commonly used loss function for classification tasks, performs well in many scenarios, it may not offer sufficient performance optimization when faced with imbalanced datasets or tasks that require a finer delineation of differences between samples. Focal loss, by adjusting weights to address class imbalance, makes the model focus more on hard-to-classify samples, thereby improving the model's recognition capability for minority classes to some extent. Another commonly used loss function in regression problems, MSE shows some applicability in the task of cyberattack behavior detection, especially in providing more continuous gradient information when evaluating the difference between model outputs and actual labels. However, the proposed synchronized loss function, by introducing a synchronization term, considers both the prediction accuracy of individual samples and the synchronicity and consistency of the model when processing multi-source data. This design enables the model to more comprehensively capture and utilize information across data sources during the learning process, thereby improving the model's ability to recognize complex attack patterns.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**Model** & **Precision** & **Recall** & **Accuracy** \\ \hline Cross-Entropy Loss & 0.69 & 0.64 & 0.67 \\ Focal Loss & 0.79 & 0.73 & 0.76 \\ MSE & 0.86 & 0.82 & 0.84 \\ Synchronized Loss & 0.93 & 0.89 & 0.91 \\ \hline \hline \end{tabular}
\end{table}
Table 6: Results of different loss functions in the ablation experiment.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**Model** & **Precision** & **Recall** & **Accuracy** \\ \hline Self-Attention & 0.73 & 0.70 & 0.71 \\ Spacial Attention & 0.81 & 0.76 & 0.78 \\ Channel Attention & 0.89 & 0.85 & 0.87 \\ Synchronized Attention & 0.93 & 0.89 & 0.91 \\ \hline \hline \end{tabular}
\end{table}
Table 5: Results of different attention mechanisms in the ablation experiment.