# Machine Learning-Based Adaptive Synthetic Sampling Technique for Intrusion Detection
## 5 Discussion
According to the estimates, 6945 of the 7460 persons were in class 0, 1467 were in class 1, 2215 were in class 2, and 36 were in class 3 out of the remaining 67. Figure 17 shows that the hybrid model's ROC curves' AUC values for classes 0, 1, 2, and 3 were 0.97, 0.95, 0.95, and 0.93. For all-class classification, the same hybrid model outperformed the MLP model. It was possible to use the ADAM optimizer to train the MLP model with a learning rate of 0.001 and batch size of 128, while using the categorical cross-entropy loss function. The MLP classifier had 94% above-average results for accuracy, precision, recall, and F1. The hybrid CNN + LSTM model, on the other hand, was trained over 30 iterations using the binary cross-entropy loss function and the ADAM optimizer, with a learning rate of 0.001 and a batch size of 128. The hybrid model's metrics--accuracy, precision, AUC score, recall, and F1--were all greater than 97%. Figure 18 displays the MLP model's confusion matrix. Each row in the algorithm consists of a prediction class, whereas each column in the matrix indicates an actual type. For example, anticipated values of 6499, 974, and 2192 were adequately predicted to be class 1, class 2, and class 3, correspondingly, while class 0 was adequately predicted to be 9711, compared to 9325. The hybrid model's ROC curves have an AUC value for class 0, 1, 2, 3, and 4, respectively, of 0.96, 0.97, 0.89, 0.97, and 0.93. Finally, a comparison was made between the model developed in this study and earlier research, which included the MLP and hybrid models. The accuracy of the binary classifications, such as SVM, KNN, RF, NB, DT, and FFDNN, was below 80%, whereas the proposed models achieved scores of about 87.50% for MLP and 89% for the hybrid model. DNN, CNN, Deep-MLP, RF, DLS-IDS, and MFFSEM models scored 78.5%, 79.48%, and 84.34% for attack categorization. The proposed hybrid model and model-like MLP scored 83.5% and 86.20%, respectively. Three techniques were supported: the channel attention mechanism coupled with the BiLSTM network as the core network, the layered learning algorithm with higher dropout arrangement as the statistics data assimilation method to improve the model's generalization capacity, and the ADASYN resampling algorithm as the data pre-processing technique to resolve the intrusion prevention data imbalance problem. As a result, the F1 score and accuracy of the proposed network model were 89.12% and 90.45% on the KDDTest+ test set. Furthermore, the suggested DLIND model outperformed several reference network models in evaluation metrics. Therefore, the proposed model is helpful for the present phase of NID development. Although the Machine Learning-Based Adaptive Synthetic Sampling Technique for Intrusion Detection has shown promise, there are various limitations that need to be taken into account. One of the significant limitations is dataset bias, as the effectiveness of the proposed technique is heavily reliant on the quality and representativeness of the training dataset. If the dataset used for training is biased or lacks diversity, it may limit the model's generalizability to different network environments and real-world scenarios. Another limitation is the dependency on manual feature engineering, even though the deep learning model combines an attention mechanism with an LSTM network to capture sequence properties. This process can be time-consuming and requires expert knowledge to select and engineer relevant features. Automating this process or exploring more efficient feature extraction techniques could enhance the model's effectiveness. The scalability of the proposed technique may also be a concern when dealing with large-scale IoT networks. As the number of devices and the amount of network traffic increases, the computational requirements and processing time of the model may become impractical. Ensuring the scalability of the proposed approach to handle large volumes of data is essential for its practical implementation.