## 4 Evaluation and Performance Optimization
### Feature Engineering  
This section discusses the adopted feature engineering to enhance the GAORed models. RF and XGBoost were selected as tree-based models to give insights into feature importance, which, when perturbed, has the capability of evading detection. After dataset preprocessing, the first optimization process uses the min-max algorithm. Feature importance was adopted to reduce the features. These features were trained and tested (the perturbation on the models). Figures 5 and 6 present feature importance with hyperparameter tuning with the RF and XGBoost. The red and blue spikes for the models reveal features that are capable of being perturbed to evade detection. Figure 6 shows a more robust XGBoos. To prevent overfitting due to over-optimization issues, which can affect RF and XGBoost as presented in Figure 7, we use k-fold cross-validation as part of the fitness evaluation to ensure the model's generalization performance is prioritized over training accuracy. In addition, the GA-optimized RF model performs poorly on test data due to overfitting on noisy features in the training data; in order to ensure imbalanced data were resolved, we use robust fitness metrics, such as F1-score and ROC-AUC instead of simple accuracy for fitness evaluation. Overall, the following are suggestions to handle the negative impact depending on the task at hand that may be introduced by GA: regularization and multi-objective fitness functions, average fitness evaluations across multiple runs, parallelize operations and surrogate models to reduce computation time, and data preprocessing with robust metrics for fitness evaluation. Hence, GA methods can become a reliable tool for improving RF and XGBoost model performance without compromising accuracy or robustness. Figure 5: (**a**,**b**). Feature importance with GA’s parameter mutation probability = 0.5 and crossover = 0.1. Figure 6: (**a**,**b**). Feature importance with GA’s parameter mutation probability = 0.05 and crossover = 0.01. The performance of the trained models was evaluated with the traditional ML set of metrics that capture different aspects of the model's predictive capabilities. Table 3 shows that both the base model (trained with minimax adversarial samples) and the GAOR model (trained with our adversarial samples) give high accuracy. The AUC (area under the curve, i.e., the ratio of correctly labeled samples) establishes 99% of the model's performance in benign and attack correctly. This correlates with the model's confusion matrix. In Figure 8, the ZooAttack adversarial attacks were evaluated with GAOR to be classified as benign or attacks; accuracy from these classifiers is observed as 100 and 60. In adversarial training, robustness measures a model's resilience to adversarial attacks--small, intentionally crafted perturbations to input data designed to mislead the model into making incorrect predictions. Robustness in this context refers to the model's ability to maintain accurate predictions even in the presence of these adversarial examples. Figure 8: Attack evaluation accuracy with ART library. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Evaluation Metrics** & \multicolumn{3}{c}{**Base Model**} & \multicolumn{3}{c}{**GAOR Model**} \\ \hline  & **RF** & **XGBoost** & **ANN** & **RF** & **XGBoost** & **ANN** \\ \hline Mean Cross-Validation & 99.93 & 99.96 & 99.62 & 99.94 & 99.95 & 99.53 \\ Accuracy & 99.91 & 99.93 & 99.77 & 99.93 & 99.93 & 99.29 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Classification result. Figure 7: Accuracy of feature importance with GA’s parameter for Figures 5 and 6. In adversarial training, accuracy is one of the primary metrics for evaluating robustness. It is the accuracy of the model when tested on a set of adversarially perturbed examples, rather than clean data. For instance, if a model maintains high accuracy on adversarial examples crafted by a certain attack method (e.g., ZooAttack), it is considered robust to that particular type of attack.