## 4 Results
### Baseline Systems
Table 17 shows that XAI-IDS has superior performance (given by bold text) in eleven of fourteen AI models for the first two datasets (i.e., six of the seven models for CICIDS-2017 and five models (including two ties) for RoEduNet-SIMARGL2021). For the NSL-KDD dataset, as shown in Table 18, XAI-IDS consistently outperforms K-best in four out of seven AI models (RF, DNN, KNN, and LightGBM). Moreover, in ADA and MLP, there are tied metrics, but XAI-IDS remains dominant. The only model where K-best has an edge or ties significantly with XAI-IDS is SVM. **Effect of XAI-Based Feature Selection on Precision and Recall:** We interpret the results of our metrics when comparing them with the baselines as follows. We compare these metrics under our top features against those selected by the baselines (K-best and information gain). Tables 17 and 18 show the results. In particular, when analyzing \begin{table}
\begin{tabular}{l c c c c c c c c c c c c c} \hline \hline \multicolumn{1}{c}{} & \multicolumn{6}{c}{**CICIDS-2017**} & \multicolumn{6}{c}{**RoEduNet-SIMARGL2021**} \\ \hline
**AI Model** & **Acc** & **Prec** & **Rec** & **F1** & **Bacc** & **Acc** & **AuxRoc** & **AI Model** & **Acc** & **Prec** & **Rec** & **F1** & **Bacc** & **Mcc** & **AuxRoc** \\ \hline RF (XAI-IDS) & **0.99** & **0.96** & **0.96** & **0.96** & **0.98** & **0.97** & **0.98** & RF (CAI-IDS) & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** \\ RF (G [36]) & 0.97 & 0.90 & 0.90 & 0.90 & 0.94 & 0.89 & 0.98 & RF (Ket [35]) & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & 0.98 & **0.99** \\ \hline ADA (CAI-IDS) & **0.93** & **0.78** & **0.78** & **0.78** & **0.87** & **0.74** & **0.95** & ADA (XAI-IDS) & **0.84** & **0.76** & **0.76** & **0.76** & **0.82** & **0.64** & 0.36 \\ ADA (G [36]) & **0.93** & 0.76 & 0.76 & 0.76 & 0.86 & 0.73 & 0.93 & ADA (K-best [35]) & (0.69) & 0.53 & 0.53 & 0.53 & 0.65 & 0.30 & **0.48** \\ \hline DNN (CAI-IDS) & **0.94** & **0.80** & **0.80** & **0.80** & **0.88** & **0.77** & 0.47 & DNN (XAI-IDS) & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & **0.98** & **0.99** \\ DNN (G [36]) & 0.89 & 0.64 & 0.64 & 0.64 & 0.79 & 0.58 & **0.53** & DNN (K-best [35]) & **0.99** & **0.99** & **0.99** & **0.99** & **0.98** & **0.99** \\ \hline SVM (AAI-IDS) & **0.99** & **0.97** & **0.97** & **0.97** & **0.90** & **0.97** & **0.66** & SVM (XAI-IDS) & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & **0.95** \\ SVM (G [36]) & 0.97 & 0.89 & 0.89 & 0.89 & **0.94** & 0.88 & 0.53 & SVM (K-best [35]) & 0.43 & 0.15 & 0.15 & 0.15 & 0.36 & \(-\)0.27 & **0.40** \\ \hline KNN (AAI-IDS) & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & **0.99** & **0.89** & KNN (AAI-IDS) & **0.75** & **0.63** & **0.63** & **0.63** & **0.63** & **0.72** & **0.45** & **0.59** \\ KNN (G [36]) & 0.97 & 0.90 & 0.90 & 0.90 & 0.94 & 0.89 & 0.88 & KNN (K-best [35]) & **0.75** & **0.63** & **0.63** & **0.63** & **0.63** & **0.72** & **0.45** & **0.59** \\ \hline MLP (CAI-IDS) & **0.96** & **0.88** & **0.88** & **0.88** & **0.93** & **0.86** & **0.98** & MLP (XAI-IDS) & **0.76** & **0.64** & **0.64** & **0.64** & **0.73** & **0.46** & 0.46 \\ MLP (G [36]) & **0.96** & 0.87 & 0.87 & 0.87 & 0.93 & 0.85 & 0.96 & MLP (K-best [35]) & **0.76** & **0.64** & **0.64** & **0.64** & **0.73** & **0.46** & **0.60** \\ \hline LightGBM (XAI-IDS) & **0.97** & **0.92** & **0.92** & **0.92** & **0.95** & 0.90 & **0.56** & LightGBM (XAI-IDS) & 0.55 & 0.33 & 0.33 & 0.33 & 0.49 & 0.00 & 0.69 \\ LightGBM (LG [36]) & **0.97** & **0.92** & **0.92** & **0.92** & **0.95** & **0.91** & 0.38 & LightGBM (K-best [35]) & **0.87** & **0.81** & **0.81** & **0.81** & **0.86** & **0.71** & **0.96** \\ \hline \hline \end{tabular}
\end{table} 
Table 18: A comparison of the models’ performance metrics under top features selected by XAI-IDS versus those by K-best [35]. XAI-IDS has superior performance (bold text) in six of seven AI models for the NSL-KDD dataset.