## 2 Related Works
### Generative Adversarial Network  
The generative adversarial network (GAN) [19] was proposed by [PERSON] in 2014. The GAN is different from conventional deep learning techniques. As shown in Figure 1, it comprises two neural networks, namely the generator and the discriminator. \(z\) is the noise vector that, when combined with the generator, aims to produce forged samples \(G(z)\) that are close to the original data (Real data, \(Rd\)) in the discriminator but not exactly the same. This is performed to deceive the discriminator's judgment. The input data for the discriminator are trained using both real data and the generated data from the generator. The discriminator then determines the probability of the data being real and provides feedback via the loss function \(\text{Loss}^{\text{(D)}}\), as indicated in Equation (1). On the other hand, when the discriminator judges the feature data generated by the generator, if the discriminator effectively classifies the generator's data as fake, its loss function is \(\text{Loss}^{\text{(G)}}\), as shown in Equation (2). Moreover, as the two constantly compete and adjust their parameters, the objective is to make it impossible for the discriminator to determine the authenticity of the generator's output. At this point, optimization of the GAN training is obtained, as shown in Equation (3). \[\text{Loss}^{\text{(D)}}=-\frac{1}{2}E_{(Rd)}\log D(Rd)-\frac{1}{2}E_{z}\log(1 -D(G(z))) \tag{1}\]  
\[\text{Loss}^{\text{(G)}}=-\text{Loss}^{\text{(D)}} \tag{2}\]  
\[\underset{G}{minmax}\underset{D}{minmax}V(D,G)=E_{(Rd)}[\log D(Rd)]+E_{z}[ \log(1-D(G(z)))] \tag{3}\]  
The generator network's primary role is to create synthetic data that resemble real data. It starts with random noise as input and gradually refines this noise into data that should resemble samples from the real dataset. The generator network typically uses a series of layers, such as MLP, CNN, RNN, or other learning models, to transform the noise into more complex features that resemble real data. During training, the generator tries to produce data that are indistinguishable from real data. It generates samples and passes them to the discriminator. The discriminator network acts as a binary classifier. Its task is to evaluate whether a given input is real (from the actual dataset) or fake (generated by the generator). The discriminator is trained on both real data and fake data generated by the generator. It learns to distinguish between them and assigns a probability score to indicate how likely it is that the input is real. The discriminator's objective is to maximize its ability to correctly classify real and fake data, while the generator's goal is to minimize the ability of the discriminator to differentiate between real and fake data. In [20], a method was proposed using the generative adversarial network (GAN) and the autoencoder (AE). The BoT-IoT dataset was used for anomaly detection. There were two training modes compared: the first was training solely with the AE, and the second utilized data generated by the GAN's generator for AE training. The experimental results indicated that the second method achieved an accuracy of 97.11%, which was superior to that of the first method's 92.97%. In [21], the author used seven different datasets to address the issue of traditional data imbalance that causes poor classification during the training of the deep learning model. KDD99, NSL-KDD, BoT-IoT, IoT network intrusion, MQTT-IOT-IDS2020, the MQTT set, and IOT-23. A feed-forward neural network (FNN) model was chosen for the final  
Figure 1: Model of GANs. classification. To address the imbalanced data, conditional generative adversarial networks (CGANs) were used. The aim was to enhance the generated features with category-specific conditions. The post-generation enhanced data were combined with the original data for training and comparative analysis. The experimental results showed that the average accuracy across all datasets was 97%.