Abstract
As security violations increase, cybersecurity is a critical issue for any area of cyberspace. A large number of zero-day attacks are taking place on a continuous basis due to the inclusion of several protocols. Most of these attacks are minor variations of cyberattacks that have been carried out previously. This shows that problems are faced by even the most sophisticated methods, such as conventional machine learning systems, when identifying these minor variations in attacks over time. By considering a few challenges in the existing intrusion detection methods, an effective semisupervised technique is presented in this paper to decrease the false alarm rate and enhance the detection rate for intrusion detection systems (IDSs). The proposed approach proposes an IDS utilizingk-nearest neighbor hyperparameter tuning with fivefold cross-validation on semisupervised learning. For each unlabeled data point, itsk-nearest neighbors in the training set are first identified. After that, based on statistical information gained from hyperparameter tuning of these neighboring data, namely the number of neighboring data points belonging to each possible class, distance metric, and distance weight, the new data are classified as normal or attack class. A widely used dataset NSL-KDD is employed to determine the robustness of the model. In comparison with IDS-based KNN algorithms, the simulation findings demonstrate that the proposed approach performs better.