## 4 Experiment
### Comparison with Existing Methods  
This section provides a comprehensive comparison of the classification accuracy and time of SwiftSession against four representative methods across three datasets, assessing the advantages and disadvantages of SwiftSession relative to current mainstream approaches. The selected comparison algorithms are all notable for their classification performance, computational efficiency, and applicability to diverse datasets. **FSNet**: An efficient encrypted traffic classifier based on GRU [21], FSNet embeds the raw packet sequences of flows and utilizes a double-layer bidirectional GRU to extract deep features. **ETC-PS**: This method classifies encrypted traffic based on path signature features [7]. ETC-PS constructs traffic paths to represent bidirectional client-server interactions, utilizing only packet length information within sessions. **FineWP:** A fine-grained webpage fingerprinting method that utilizes only packet-length information from encrypted traffic [53]. This classifier extracts critical features from the uplink-dominant stage, including block and sequence features. **ITCT Transformer:** Based on the Tab Transformer architecture [54], it classifies IoT traffic through unique feature processing and attention mechanisms. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Thresholds** & **0.70** & **0.75** & **0.80** & **0.85** & **0.90** & **0.95** \\ \hline Packet Number & 4.4104 & 4.7152 & 4.9514 & 5.3585 & 5.8727 & 6.5637 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The average number of packets awaited when classification results are given. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Classifiers** & **Parameters** & **Size** & **Result (F1)** & **Time (s)** \\ \hline
**C4.5** & _Criterion_ =’entropy’ & 243 KB & 77.26\% & 97.71 \\
**RF** & _max\_features_ = None, _n\_estimators_ = 100 & 23 MB & 84.47\% & 94.06 \\
**ET** & _n\_estimators_ = 10 & 60.4 MB & 83.86\% & 91.98 \\
**XGBoost** & _n\_estimators_ = 100, _eval\_metric_ = _“logloss’, _probability_ = _True_ & 2.1 MB & 88.45\% & 91.87 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Hyperparameters and size of ML classifiers. The specific experimental results are shown in Table 6. In the experiment on the VPN-nonVPN dataset, SwiftSession (XGBoost) demonstrated outstanding performance. It far exceeded other methods in terms of accuracy and recall and had a relatively short classification time, thus showing significant advantages in both efficiency and accuracy. In contrast, FineWP had a relatively low precision rate, indicating a potential for many misjudgments. The performance of FSNet and ETC-PS was at a medium level, and all three of them had relatively long classification times. For the Tor-nonTor dataset, SwiftSession (XGBoost) still maintained a high standard, with almost perfect indicators in all aspects, and its classification time was significantly shorter. ETC-PS also showed good performance and could effectively identify categories. However, FineWP had a relatively low recall rate, which might lead to missing many true categories, and the overall performance of FSNet was relatively weak. In the ICSC-Dataset, both ETC-PS and SwiftSession (XGBoost) exhibited extremely high classification accuracy. SwiftSession (XGBoost) had a significant advantage in classification time, as it was much faster than other methods. In the experiment on the MQTT-IDS-2020 dataset, SwiftSession (XGBoost) was significantly higher than the ITCT Transformer in both accuracy and recall. Although their classification times were similar, SwiftSession (XGBoost) was superior in terms of accuracy. Based on the experimental results of various datasets, SwiftSession (XGBoost) has the advantages of high accuracy and fast classification on multiple datasets and thus has greater potential in practical applications. ETC-PS has high accuracy in some datasets, but its classification time needs to be optimized. The performance of FSNet and FineWP is relatively unstable, and their classification times are generally long.