## 3 Results
### Performance Evaluation
#### 3.1.1 Results of BiLSTM, BiGRU, and GRU-GAN Models during Training on Dataset 1 and Dataset 2
The GRU-GAN model, however, maintained its high performance, with TN and TP values of 246 and 237 each and relatively low FP and FN rates. Dataset 3 in Figure 7C presents the most challenging scenario for all models. The BiLSTM and BiGRU models showed a significant increase in FP rates, with BiLSTM misclassifying 53 benign files as malware (FP) while correctly identifying only about 45 benign  
Figure 7: Confusion matrix of the BiLSTM, BiGRU, and GRU-GAN models on datasets 1, 2 and 3.  
files (TN). This high FP rate could lead to numerous false alarms in a real-world setting. Remarkably, the GRU-GAN model maintained its high accuracy even on this challenging dataset, with TN and TP values of 93 and 747, respectively, and FP and FN rates staying minimal. The consistently high TN and TP rates of the GRU-GAN model across all datasets, coupled with its minimal FP and FN rates, underscore its superior performance in malware detection. This performance stability is required in detection applications, where false positives can lead to unnecessary alerts and resource allocation, while false negatives could allow malicious programs to go undetected. The BiLSTM and BiGRU models' increased FP rates on the more challenging datasets suggest they may be overly sensitive, potentially flagging benign software as malicious. Such outcomes could lead to inefficiencies and false alarms in real-world applications. Furthermore, the evaluation metrics in Table 3 reveal that the GRU-GAN model outperformed BiLSTM and BiGRU on imbalanced data, achieving an accuracy of 98% and an AUC of 98% with low error rates. Conversely, BiLSTM and BiGRU showed decreased performance with accuracy of around 94% and 92%, respectively. Table 4 provides a detailed comparative analysis of the BiLSTM, BiGRU, and GRU-GAN models across three datasets. On dataset 1, all models performed well, with BiLSTM achieving an accuracy of 95%, BiGRU achieving 94%, and GRU-GAN achieving nearly perfect scores across all metrics, including an AUC of 99%. Dataset 2 presents more challenges, with BiLSTM and BiGRU showing decreased performance but GRU-GAN maintaining a high accuracy of 98% and precision of 99%. On dataset 3, the most difficult, BiLSTM and BiGRU's performance dropped significantly, with accuracies falling to 90% and 80%, respectively, while GRU-GAN achieved an accuracy of 99%. Figure 8 visually shows these results, highlighting GRU-GAN's consistent superiority across all datasets. \begin{table}
\begin{tabular}{l c c c c c c c} \hline \hline  & \multicolumn{6}{c}{**Dataset 1**} \\ \hline  & **Accuracy** & **Precision** & **Recall** & **F1 score** & **AUC** & **FPR** & **FNR** \\ BiLSTM & 0.958 & 0.962 & 0.966 & 0.964 & 0.98 & 0.057 & 0.035 \\ BiGRU & 0.947 & 0.958 & 0.954 & 0.956 & 0.98 & 0.045 & 0.051 \\
**GRU-GAN** & **0.999** & **0.999** & **0.999** & **0.999** & **0.000** & **0.001** \\ \hline \hline \multicolumn{10}{c}{**Dataset 2**} \\ \hline BiLSTM & 0.944 & 0.942 & 0.942 & 0.944 & 0.97 & 0.057 & 0.102 \\ BiGRU & 0.924 & 0.921 & 0.923 & 0.923 & 0.97 & 0.053 & 0.094 \\
**GRU-GAN** & **0.981** & **0.997** & **0.998** & **0.992** & **0.98** & **0.057** & **0.063** \\ \hline \hline \multicolumn{10}{c}{**Dataset 3**} \\ \hline BiLSTM & 0.903 & 0.775 & 0.734 & 0.747 & 0.82 & 0.540 & 0.032 \\ BiGRU & 0.805 & 0.716 & 0.714 & 0.756 & 0.79 & 0.693 & 0.012 \\
**GRU-GAN** & **0.998** & **0.997** & **0.996** & **0.997** & **0.99** & **0.051** & **0.004** \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Evaluation metrics results of the BiLSTM, BiGRU, and GRU–GAN models on the three datasets. \begin{table}
\begin{tabular}{l c c c c c c c} \hline \hline  & **Accuracy** & **Precision** & **Recall** & **F1 Score** & **AUC** & **FPR** & **FNR** \\ \hline BiLSTM & 0.941 & 0.936 & 0.945 & 0.943 & 0.89 & 0.123 & 0.071 \\ BiGRU & 0.925 & 0.914 & 0.925 & 0.924 & 0.87 & 0.141 & 0.093 \\
**GRU–GAN** & **0.985** & **0.974** & **0.984** & **0.985** & **0.98** & **0.005** & **0.007** \\ \hline \hline \end{tabular}
\end{table}