# MT-FBERT: Malicious Traffic Detection Based on Efficient Federated Learning of BERT
## 4 Experiments
### Efficiency Evaluation  
To evaluate the efficiency of MT-FBERT, we conducted experiments comparing speed and GPU memory consumption with baselines. Given that deep learning-based and pre-training-based approaches require GPU resources, our comparative analysis specifically focuses on MT-FBERT versus TFE-GNN and YaTC.  
As shown in Table 10, MT-FBERT achieves the fastest speed and the lowest memory consumption among all compared methods across various input batch sizes. At a batch size of 128, the MT-FBERT requires only approximately 206 MB of GPU memory and completes training in 2 to 5 s, depending on the dataset size. These results indicate that MT-FBERT maintains strong performance while demanding minimal computational resources. This makes it particularly advantageous in resource-constrained environments such as edge computing devices, where efficient hardware utilization is critical for deployment and operation.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Dataset**} & \multirow{2}{*}{**Batchsize**} & \multirow{2}{*}{\begin{tabular}{c} **GPU Memory** \\ **Usage (MB)** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Time** \\ **Consumption** \\ **(Seconds)** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **GPU Memory** \\ **Usage (MB)** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Time** \\ **Consumption** \\ **(Seconds)** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **GPU Memory** \\ **Usage (MB)** \\ \end{tabular} } & \multirow{2}{*}{\begin{tabular}{c} **Time** \\ **Consumption** \\ **(Seconds)** \\ \end{tabular} } & \multirow{2}{*}{\
\begin{tabular}{c} **GPU Memory** \\ **Usage (MB)** \\ \end{tabular} } & \multirow{2}{*}{
\begin{tabular}{c} **Time** \\ **Consumption** \\ **(Seconds)** \\ \end{tabular} } \\ \hline \multirow{3}{*}{USTC-TFC2016} & 32 & **62.73** & **3.07** & 1984.45 & 541.61 & 79.76 & 3.36 \\ \cline{2-7}  & 64 & **110.85** & **3.01** & 2816.71 & 540.59 & 126.23 & 3.27 \\ \cline{2-7}  & 128 & **206.27** & **2.98** & 4147.03 & 522.92 & 219.09 & 3.24 \\ \hline \multirow{3}{*}{IoT-23} & 32 & **62.72** & **4.30** & 2308.53 & 1147.46 & 79.77 & 4.95 \\ \cline{2-7}  & 64 & **110.83** & **4.28** & 3317.26 & 1507.28 & 126.24 & 4.90 \\ \cline{2-7}  & 128 & **206.28** & **4.22** & 5383.61 & 1949.53 & 219.10 & 4.85 \\ \hline \hline \end{tabular}  
* A number in bold means that the corresponding method performs better than its counterpart does, for the same metric and the same dataset.  
\end{table}
Table 10: The speed and GPU memory consumption comparison.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline \multirow{2}{*}{**Dataset**} & \multirow{2}{*}{
\begin{tabular}{c} **Degree of** \\ **Non-I.L.D** \\ \end{tabular} } & \multirow{2}{*}{**AC**} & \multirow{2}{*}{**PR**} & \multirow{2}{*}{**RC**} & \multirow{2}{*}{**F1**} \\ \hline \multirow{3}{*}{USTC-TFC2016} & 1.0 & 0.9996 & 0.9991 & 0.9991 & 0.9992 \\  & 5.0 & 0.9998 & 0.9996 & 0.9995 & 0.9995 \\  & 10.0 & 0.9998 & 0.9996 & 0.9996 & 0.9996 \\ \hline \multirow{3}{*}{CICMalAnal2017} & 1.0 & 0.9501 & 0.9213 & 0.9325 & 0.9147 \\  & 5.0 & 0.9588 & 0.9570 & 0.9741 & 0.9348 \\  & 10.0 & 0.9646 & 0.9342 & 0.9284 & 0.9527 \\ \hline \multirow{3}{*}{IoT-22} & 1.0 & 0.9992 & 0.9993 & 0.9990 & 0.9990 \\  & 5.0 & 0.9998 & 0.9995 & 0.9996 & 0.9996 \\  & 10.0 & 0.9999 & 0.9998 & 0.9998 & 0.9999 \\ \hline \multirow{3}{*}{IoT-23} & 1.0 & 0.9652 & 0.9621 & 0.9666 & 0.9610 \\  & 5.0 & 0.9711 & 0.9637 & 0.9622 & 0.9602 \\ \cline{1-1}  & 10.0 & 0.9715 & 0.9728 & 0.9887 & 0.9821 \\ \hline \hline \end{tabular}  
* A number in bold means that the corresponding method performs better than its counterpart does, for the same metric and the same dataset.  
\end{table}
Table 9: Non-Independent Identically Distributed (Non-I.L.D) experimental results of MT-FBERT.