## 4 Materials and Methods
### Data Augmentation through Generative Adversarial Networks  
The generative model of the proposed system uses DCGAN. The process of creating a new malware image is shown in Figure 7. In the generative model of the proposed system, there is one generator and one discriminator. The generator considers as input an image made of random noise, while the discriminator receives the malware image and the image created by the generator to determine their authenticity. Malware images are generated by converting binary files into images, and then resizing them to 64 \(\times\) 64 size. Figure 5: Imaging process of malware. Figure 6: Imaging pre-process of malware. Among these images, we divide them into a training set and a test set to evaluate the system's performance. The discriminator's goal is to predict whether an image is real or fake. This is similar to an image classification problem in supervised learning. Therefore, it is possible to use a network structure in which convolutional layers are stacked, and the output layer serves as the connection layer. The structure of the discriminator model in the proposed system is illustrated in Figure 8.  
The input is an image of size 64 \(\times\) 64. The first convolutional layer, Conv2D, employs 64 filters, reducing the feature map size to 32 \(\times\) 32. In the second convolutional layer, 64 filters are used, further reducing the feature map to 16 \(\times\) 16. Subsequently, the third convolutional layer utilizes 128 filters, resulting in an 8 \(\times\) 8 feature map. The last convolutional layer also employs 128 filters, preserving the 8 \(\times\) 8 feature map size. The feature map is then flattened and converted into a vector. Passing through a dense layer with a single unit, the output is transformed into a value between 0 and 1. This model considers an image as input and outputs a number that distinguishes real from fake. Next, we consider the number of parameters in the discriminator. The first convolutional layer contains 64 filters, resulting in 1664 parameters. The second convolutional layer, with 64 filters, contributes 102,464 parameters. The third convolutional layer employs 128 filters and adds 204,928 parameters. Finally, the last convolutional layer has 128 filters and 409,728 parameters. When these parameters are flattened and connected as a single unit, the count becomes 8193. The total number of discriminator parameters sums up to 726,977. The generator typically considers a vector sampled from a multivariate standard normal distribution as input and produces an image of the same dimensions as the original training data. Its role is to transform latent space vectors into images. The structure of the proposed system's generator model is illustrated in Figure 9.  
Figure 8: Composition of the discriminator model of the proposed system. Figure 7: Process of creating malware images. The constructor considers a vector of length 100 as input and passes it through a dense layer with 16,384 units. Batch normalization and ReLU activation functions are applied to transform the feature map into a size of 16 \(\times\) 16 with 64 filters. Subsequently, an upsampling layer increases the feature map to 32 \(\times\) 32. The first convolutional layer uses 128 filters. Another upsampling layer increases the feature map to 64 \(\times\) 64. Through two additional convolutional layers with 64 filters, a final 64 \(\times\) 64 feature map is obtained, which matches the size of the original image. This model considers a vector of length 100 as input and outputs a 64 \(\times\) 64 image. Next, let us consider the parameter sizes of the constructor model. The initial input of 100 vectors is connected to 16,384 neurons, resulting in 1,654,784 parameters. After applying batch normalization, there are 65,536 parameters. The first convolutional layer has 204,928 parameters, and after applying batch normalization, there are 512 parameters. The second convolutional layer contains 204,864 parameters, and batch normalization contributes 256 parameters.