## 4 Experimental Setup  
To evaluate the potential of the introduced approach for both detecting and identifying intrusion within IoT networks, a public real-world IoT MQTT dataset [46] ([[https://www.kaggle.com/datasets/cnrieiit/mqttset](https://www.kaggle.com/datasets/cnrieiit/mqttset)]([https://www.kaggle.com/datasets/cnrieiit/mqttset](https://www.kaggle.com/datasets/cnrieiit/mqttset)) accessed on 24 October 2023) is utilized. However, due to the extensive computational demands of model optimization, the reduced version of this dataset is utilized. The dataset is comprised of a total of 6 classes: legitimate traffic, SlowITe, Bruteforce, Malformed data, looking, and DoS attacks. A total of 34 features are present in the dataset. Further details can be accessed in the original work that introduced the dataset [46]. An additional dataset is formulated from the existing dataset for the needs of thread detection. Classes are separated into legitimate data and anomalous activities.  
Due to the large number of features present in the dataset that can result in important features blending into noise, a CNN is utilized for reduction. The reduction network consists of a convolution layer of 128 neurons total and a kernel size of 2 and utilizes a rectified linear unit (relu) activation function. This is followed by an output layer of 6 fully connected neurons that are utilized as an output. The network is trained through 10 epochs to acceptable levels of accuracy (82.7%). Following training, the network output is used as an input for the XGBoost algorithm to further improve accuracy. A graphical representation of the introduced framework for feature reduction and classification can be seen in Figure 1.  
Once the features have been reduced and an intermediate dataset formulated, XGBoost hyperparameters are subjected to optimization with the use of metaheuristic algorithms. XGBoost parameters chosen for optimization and associated constraints include learning rate \([0.9,0.1]\), minimum child weight \([10,1]\), subsample \([1,0]\), colsample \([10,1]\), max depth \([10,1]\)  
Figure 1: Flowchart of the introduced framework.  
and gamma [0.0, 0.8]. These parameters were chosen due to their high influence on XGBoost model performance, and their respective constraints have been empirically determined.  
Several contemporary optimization metaheuristics have been included in a comparative analysis in order to determine an optimal approach. These include the original RSA [44] and GA [30] as the source of inspiration for the introduced GIRSA. Alongside these, established well-performing optimizers are also included, initialized with suggested parameters suggested in the works that originally proposed them. The included algorithms include the SSA [34], FA [33], PSO [31], WOA [35], and the COLSHADE [36] algorithm.  
To provide a comprehensive assessment of the constructed models in comparison to those constructed by other contemporary optimizers a battery of standard classification metrics, including accuracy, precision, recall, and f1-score [47], is utilized, with accuracy being the objective function chosen to guide the optimization. Further metrics include [PERSON]'s kappa [48], described in Equation (10), which gives a more complete easement in cases when unbalanced datasets are utilized.  
\[\kappa=\frac{p_{o}-p_{e}}{1-p_{e}} \tag{10}\]  
in which \(p_{o}\) and \(p_{e}\) represent observed and expected classification values.  
It is important to note that the exact execution times of experimentation can vary depending on the specific hardware simulations the experimentation is carried out on. This work utilized a PC using an Intel i7 CPU and Nvidia 4070 GPU with 32 GB of available ram. Simulations are carried out using Python 3 with the supporting TensorFlow, Pandas, and Numpy libraries. Visualizations are handled using matplotlib and seaborn. Metaheuristics are independently implemented for the needs of this research.