## 2 Literature Review  
Many different ML algorithms for WSN ID have been studied recently. In this section, we summarize and analyze a large body of literature on optimization techniques, deep learning methods, machine learning models, and their combined applications. In order to detect different types of attacks successfully, a groundbreaking MBOLT (MegaBAT optimized Long Short-Term Memory)-IDS for WSNs was created and introduced. Using this method to fine-tune deep LSTM's hyperparameters led to better performance with less computational overhead. The proposed ID was tested with the use of the publicly available WSN-DS datasets. Normalizing the data, changing the letters to numbers, and adding multi-class labelling to better attack identification are all steps in the pre-processing that boost classification performance [2]. By grouping the SN using the DFFF algorithm, the study suggested a way to gather data throughout the WSN and ID stages. The data were organized in the pre-processing step, and the matrix values were reduced using ELDA (entropy-based linear discriminant analysis). The QN3 (Quasi-Newton Neural Network) classifier inspects the data for signs of assault or normalcy after matrix reduction and sorts them into DoS, R2L, and U2R categories [3]. In order to implement ID in IoT-WSN, one research study developed and implemented a BCOA-MLID (Binary Chimp Optimization Algorithm with Machine Learning-based Intrusion Detection). To protect the IoT-WSN, this method makes an effort to differentiate between different kinds of attacks. The BCOA-MLID method outperformed XGBoost and KNN (K-Nearest Neighbor)-AOA in terms of accuracy (99.36 percent) in experimental findings conducted on the Kaggle invasion dataset [4]. The FA with SVM was employed for the classification of attacks, where GWO (Grey Wolf Optimizer) optimizes the parameter 'a' that linearly decreases the value from 2 to 0 during the iterations, where a is given by \(a=2-(\frac{2}{7}\ x\ t)), where 'T' is the total number of iterations and 't' is the current iteration. Simulations of FA-SVM use the NSL-kDD dataset with 99.34% accuracy. The kNN-PSO and XGBoost models had lower accuracies of 96.42% and 95.36%, respectively [5]. The authors presented a number of potential hybrid intrusion detection systems (IDSs) for SAT-IDSs that made use of feature selection in conjunction with ML or DL models. The methods utilized were ANN, GRU, LSTM, and RF for SFS. The proposed SAT-IDSs were placed through their paces with STIN on satellite networks and UNSW-NB15 on land networks [6]. To detect the numerous assaults documented in the IoT-IDS dataset, one study employed the GWDTO (Grey Wolf Dipper Throated Optimization) and contrasted it with other approaches found in previous research. In the fields of statistics and signal processing, SVD finds use in data partitioning, feature extraction, matrix approximation, and pattern recognition [7]. An ensemble model was suggested in another research study that uses the recursive feature reduction technique with RF assistance to enhance the IDS's prediction capabilities. To extract meaningful information from the datasets, the writers employed a data normalization strategy and a wrapper-based feature removal method. With the goal of generating attack class probabilities through majority voting, a hybrid stacking ensemble was constructed by merging RF-RFE, MLP, RF, and SVM for classification [8]. The CMPRO (Chimp social incentive-based Mutated Poor Rich Optimization) algorithm was used for optimal cluster head selection. Blockchain was deployed on optimal cluster heads and a base station for storage and computational resources [9]. In another research article, a CRNN (convolutional recurrent neural network) model along with MSO for optimal hyperparameter selection was presented with the aim of improving the classifier model's performance. The investigational results of the MSODL-ID (Moth Search Optimizer with Deep Learning Enabled Intrusion Detection) method were analyzed on the WSN-DS with 374,661 samples.