# Application Layer Protocol Identification Method Based on ResNet
## 4 Experimental Results and Discussion
### Experimental Results and Analysis
#### 4.4.3 Training Performance  
To compare the impact of different models and input data on training performance, we selected three pre-trained models: ResNet18, ResNet34, and ResNet50. These models were trained and tested using five different input datasets. The \"origin\" group consists of grayscale images generated from the original data. The \"composite\" group consists of original and clean data RGB images. Additionally, RGB images were generated using separators A, B, and C, selected earlier in the text as a control group, while the \"our\" group used the RGB images generated by the optimal separator set we selected, as illustrated in Figure 7.  
Under fixed hyperparameters (epoch = 30, batch size = 212, learning rate = 0.001), the three models were trained using the five input datasets. Figure 8a-c depict the comparison of loss values and validation accuracy for each dataset during each training epoch. ResNet18: According to the data, the loss values show a stable decreasing trend during the first five training epochs. However, the validation accuracy of groups A, B, C, and \"our\" fluctuates noticeably, while the \"origin\" group also exhibits some fluctuations. This may be because the model is initially learning the data's basic features, resulting in accuracy fluctuations. However, as training progresses, the model gradually learns more data features that stabilize the accuracy. The \"origin\" group shows fluctuations in accuracy throughout training, with a stable decrease in loss values. The fluctuations in accuracy are only around 1%, which is considered normal in the absence of significant external influences. Eventually, groups A, B, C, and \"our\" stabilize at around 98%, while \"origin\" stabilizes at around 96%. Thus, it can be concluded that the model training is normal. ResNet34: According to the data, the \"origin\" group exhibits a continuous decrease in loss values throughout the entire training process, but the accuracy fluctuates continuously with fluctuations of around 5%. Even at the end of training, the validation accuracy remains in a fluctuating state. This may be due to the increased complexity of the model, causing a poorer generalization ability as obvious features lead to overfitting, especially in the \"origin\" group, where the data features are more prone to causing overfitting. The other four groups are also affected by the complexity of the model, exhibiting larger fluctuations in the early stages of training compared to the ResNet18 model. However, they gradually stabilized, indicating that groups A, B, C, and \"our\" did not experience overfitting. Figure 7: These six images show pictures generated from the same protocol using different algorithms. The first row displays images generated directly from the raw data, while the second row uses the algorithm proposed in this paper. (**a**) represents the BGP protocol, (**b**) represents SMB, and (**c**) represents HTTP. ResNet50: From the data, it can be observed that the fluctuations in the accuracy of the \"origin\" group decrease significantly compared to ResNet34 as the model depth increases. This is likely because ResNet50 has more layers than ResNet34, resulting in a larger model capacity to better learn and adapt to complex data patterns, achieving higher accuracy early in training. However, during the ninth training epoch, there is a significant decrease in validation accuracy followed by recovery, indicating that the model is more accurate. Figure 8: These images show the loss values and accuracy of five datasets in ResNet models with different depths, where (**a**) uses ResNet18, (**b**) uses ResNet34, and (**c**) uses ResNet50. approaching optimal parameters, but the subsequent training process is unstable due to the increased number of training iterations. Groups A, B, C, and \"our\" exhibit smaller fluctuations in the early stages of training compared to ResNet18 and maintain stability throughout subsequent training epochs, demonstrating better stability.