## 2 Literature Review
In order to identify attacks on the MQTT-based protocol, the authors of another study introduced a DNN and evaluated its efficacy in comparison to other popular ML techniques. The authors evaluated the ID system's efficacy using evaluation measures like recall, accuracy, precision, and the F1 measure and then computed the information gain using entropy [21]. Using ML techniques for the purpose of detecting previously unseen attacks, another article suggested a multi-layer ID architecture for WSNs. In the initial detection layer,network edge sensors used an NB classifier to make decisions about real-time packet inspection [22]. Another research study used a systematic literature review approach to pick papers to examine. The study provided a taxonomy of ID algorithms based on individual DL methods. The research examined and contrasted the ID systems under study in terms of the simulation metrics, settings, languages, software, datasets, and feature extraction approaches that were employed [23]. Another article presented an ID model that combines TVP-IPSO (Time-Varying Parameter-Improved Particle Swarm Optimization), PCA (Principal Component Analysis), and SVM (Support Vector Machines), specifically PCA, with other popular methods. To reduce energy, PCA was utilized to decrease data dimensions, while SVM was used for high detection accuracy. To improve detection accuracy and convergence speed, the TVP-IPSO method was used to find the optimal parameters for the SVM algorithm and optimize them [24]. Another research study presented a novel method for improving the setup of a lightweight DL-HIDS model using parameters supplied by an IoT device. Memory consumption and inference timing were among the many parameters considered by the authors when they optimized the devices used. The article explored the proposed method for deploying the DL-HIDS in a real-world Internet of Things environment [25]. Another study combined the kNN and SCA (Sine Cosine Algorithm), which allowed a lightweight ID model for WSN to enhance classification accuracy while decreasing false alarm rates. The proposed model made up for the optimization accuracy loss with PM, and a CSCA reduced space and time for calculations [26]. One research study looked at several data mining techniques for an effective IDS in detecting DoS assaults. It used a specialized dataset named WSN-DS and performed a thorough empirical analysis. Prior to and following the use of a feature selection algorithm, the detection accuracy and computational cost of those methods were assessed [27]. Another paper explored the use of DNNs to develop an effective IDS for detecting and classifying cyberattacks in real time. DNNs outperformed other ML classifiers on several publicly available benchmark datasets, according to the study [28]. The authors of another study used the WSN-DS dataset to detect the attack using an RF model. They compared the entails by dividing the WSN-DS dataset into training and testing sets, developing an RF algorithm to learn the training data, and utilizing the RF classifier to predict DoS assaults on the testing set [29]. The paper employed various CNN techniques to discover DoS attacks in WSNs. NN algorithms were trained and assessed on the WSN-DS dataset with diverse DoS attacks [30]. GSWO was proposed in another paper, which combines a GA and a modified WOA. This hybrid approach aimed to enhance feature selection and hyperparameter tuning for intrusion detection systems in WSNs. GSWO is specifically applied for feature selection, where it identifies the most relevant features from datasets. The algorithm uses a fitness function that balances classification error and the number of features retained, promoting efficient model performance. The performance of the proposed methods was evaluated using various metrics, including accuracy, precision, recall, and F1-score. Additionally, ROC curves were utilized to visualize the model's performance across different thresholds [31].