## 4 Experimental Results
### MLP-Based IoT Attack Classification with Data Augmentation for Generative Adversarial Networks  
The dataset and processing used in this section are the same as the experiments in the previous section. The classification model used in this section is MLP-based IoT attack classification with data augmentation for GANs. After the overall performance of the MLP classification model is improved, the single classification performance of each class is examined separately. Use GANs to augment a single type of data. Both the augmented and original data will be sent to MLP for retraining to improve the classification accuracy of a single class. The experimental results of the loss of MLP-based IoT attack classification with data augmentation for GANs in the class \"Theft\" and class \"Normal\" are shown in Figure 5.  
Experimental results show that in the early stages of training, it can be observed that the generator's ability to simulate real data is relatively weak. This allows the discriminator to easily identify the fake data produced by the generator, causing the two loss curves to become unstable. However, as the training period increases, the generator will continuously strengthen the data it produces based on the feedback from the discriminator. This results in generated data that are closer to, but not identical to, real data, making it difficult for the discriminator to differentiate between real and generated data. At the same time, as the discriminator has difficulty distinguishing true from false, its loss value gradually increases, while the generator's loss value decreases because the data it generates are closer to the real data. Eventually, the generator and the discriminator gradually become stable  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Classes** & **Precision** & **Recall** & **F1-Score** \\ \hline DoS & 100\% & 100\% & 100\% \\ DDoS & 100\% & 100\% & 100\% \\ Reconnaissance & 99.06\% & 98.37\% & 98.71\% \\ Theft & 75.23\% & 62.33\% & 68.18\% \\ Normal & 100\% & 88.22\% & 93.74\% \\ \hline \hline \end{tabular}
\end{table}
Table 6: The performance of the MLP-based IoT attack classification.  
Figure 4: (**a**) The accuracy of the MLP-based IoT attack classification and (**b**) the loss of the MLP-based IoT attack classification.  
in their confrontation with each other, causing the loss value curve to converge stably. In Figure 5a, the GANs for the \"Theft\" class completed their training after 4932 epochs, with the generator's loss reaching 0.7632 and the discriminator's loss at 0.6853. In Figure 5b, the GANs handling the \"Normal\" class stopped training at the 3993 rd epoch.  
Based on the aforementioned results, once the GANs converge, it means that the data generated by GANs is close to the real data of the same class. Therefore, the GANs generator can be used to augment data for a specific class. The experimental results of the accuracy and loss of MLP-based IoT attack classification with data augmentation for GANs are shown in Figure 6. The accuracy of both training and validation remains at 99%, while the loss value is only about 1%. In addition, after using GANs for data augmentation, the performance of each class is shown in Table 7. The experimental results show that the classification performance of the two classes, \"Theft\" and \"Normal\", has been significantly improved. That is, the accuracy, precision, recall, and F1-score are all higher than 90%. The training time and testing time are 1500 s and 60 s, respectively.  
Figure 5: (**a**) The loss of the MLP-based IoT attack classification with data augmentation for GANs in the class “Theft” and (**b**) the loss of the MLP-based IoT attack classification with data augmentation for GANs in the class “Normal”.  
Figure 6: (**a**) The accuracy of the MLP-based IoT attack classification with data augmentation for GANs and (**b**) the loss of the MLP-based IoT attack classification with data augmentation for GANs.