## 4 Experimental Analysis
### TCReC's Reconstruction Ability Under Different Packet Loss Rates  
To test the reconstruction ability of the model under different packet loss rates, experiments were implemented based on the CIC-IDS-2017 dataset. The results are shown in Figure 11. To show the effect of reconstruction, RAI is used as the metric. The results demonstrate a consistent trend where the RAI of all the models decreases as the packet loss ratio increases. Additionally, the discrepancy between the RAI of the reconstructed data and the data without reconstruction increases with higher packet loss ratios. This indicates that the advantage of the reconstruction models becomes more pronounced as the packet loss ratio grows. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Classifier** & \multicolumn{3}{c}{**CNN**} & \multicolumn{3}{c}{**LSTM**} \\ \hline
**Input Data** & **Original Data** & **Packet Loss** & **TCReC** & **Original Data** & **Packet Loss** & **TCReC** \\ \hline DOSGoldenEye & 0.9492 & 0.4279 & 0.8710 & 0.9457 & 0.4184 & 0.8867 \\ DOSlowhttptptest & 0.9678 & 0.5151 & 0.8762 & 0.9721 & 0.5391 & 0.9137 \\ DOSlowloris & 0.9811 & 0.5255 & 0.8362 & 0.9796 & 0.4518 & 0.9063 \\ DOSLOIT & 0.9897 & 0.5940 & 0.9348 & 0.9943 & 0.7783 & 0.9859 \\ DOSHulk & 0.9621 & 0.4710 & 0.8401 & 0.9628 & 0.5128 & 0.8337 \\ Benign & 0.9621 & 0.4865 & 0.9009 & 0.9714 & 0.5965 & 0.9558 \\ FIT\_Patator & 0.9934 & 0.6678 & 0.9653 & 0.9893 & 0.4359 & 0.9720 \\ SSH\_Patator & 0.9896 & 0.3965 & 0.6687 & 0.9884 & 0.5670 & 0.8239 \\ Infiltration & 0.9897 & 0.2424 & 0.9810 & 0.9937 & 0.0119 & 0.9774 \\ WebAttack & 0.9874 & 0.3776 & 0.8707 & 0.9849 & 0.2491 & 0.9099 \\ PortScan & 0.9897 & 0.7001 & 0.9904 & 0.9926 & 0.7390 & 0.9930 \\ Botnet & 0.9831 & 0.6517 & 0.9541 & 0.9760 & 0.5122 & 0.9584 \\ HeartbleedPort & 0.9995 & 0.2655 & 0.9884 & 0.9995 & 0.3386 & 0.9985 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Comparison between different downstream tasks. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Models** & **Packet Loss** & \begin{tabular}{c} **Mean** \\ **Padding** \\ \end{tabular} & **KNN** & **RNN** & **Transformer** & \
\begin{tabular}{c} **TCReC** \\ **(CNN)** \\ \end{tabular} &
\begin{tabular}{c} **TCReC** \\ **(LSTM)** \\ \end{tabular} \\ \hline DOSGoldenEye & 45.08\% & 50.96\% & 67.31\% & 49.35\% & 59.45\% & 91.76\% & 93.76\% \\ DOSlowhttptptest & 53.22\% & 48.16\% & 65.63\% & 56.25\% & 70.28\% & 90.54\% & 93.99\% \\ DOSlowloris & 53.56\% & 56.29\% & 68.25\% & 66.24\% & 71.50\% & 85.23\% & 92.52\% \\ DOSLOIT & 60.02\% & 66.39\% & 80.95\% & 69.06\% & 73.11\% & 94.45\% & 99.16\% \\ DOSHulk & 48.96\% & 22.24\% & 73.70\% & 38.59\% & 60.32\% & 87.32\% & 86.59\% \\ Benign & 50.57\% & 10.02\% & 75.47\% & 53.67\% & 55.07\% & 93.64\% & 98.39\% \\ FTP\_Patator & 69.24\% & 41.63\% & 80.25\% & 53.54\% & 66.01\% & 97.17\% & 98.25\% \\ SSH\_Patator & 40.07\% & 21.22\% & 42.66\% & 14.31\% & 55.40\% & 67.57\% & 83.36\% \\ Infiltration & 24.49\% & 0.81\% & 97.15\% & 68.06\% & 52.13\% & 99.12\% & 98.36\% \\ WebAttack & 38.24\% & 35.47\% & 66.95\% & 51.99\% & 61.72\% & 88.18\% & 92.39\% \\ PortScan & 70.74\% & 98.52\% & 98.79\% & 99.24\% & 87.20\% & 100.00\% & 100.00\% \\ Botnet & 66.29\% & 54.56\% & 84.29\% & 64.43\% & 77.69\% & 97.05\% & 98.20\% \\ HeartbleedPort & 26.56\% & 0.00\% & 98.27\% & 87.43\% & 94.40\% & 98.89\% & 99.90\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: RAI of different models. The RAI values of TCReC and KNN are close when the packet loss ratio is lower than 50%, while the RAI values of other models are much lower. When the ratio exceeds 50%, TCReC shows significantly better reconstruction ability than the other models. The RAI of TCReC (combined with LSTM) is 94.99% even when the packet loss ratio reaches 70%, while the RAI of traffic before reconstruction is only 49.77%. It is noteworthy that there may be variations in the RAI values of TCReC when using CNN or LSTM as the detection classifier.