The present research investigates how to improve Network Intrusion Detection
Systems (NIDS) by combining Machine Learning (ML) and Deep Learning (DL)
techniques, addressing the growing challenge of cybersecurity threats. A
thorough process for data preparation, comprising activities like cleaning,
normalization, and segmentation into training and testing sets, lays the
framework for model training and evaluation. The study uses the CSE-CIC-IDS
2018 and LITNET-2020 datasets to compare ML methods (Decision Trees, Random
Forest, XGBoost) and DL models (CNNs, RNNs, DNNs, MLP) against key performance
metrics (Accuracy, Precision, Recall, and F1-Score). The Decision Tree model
performed better across all measures after being fine-tuned with Enhanced
Particle Swarm Optimization (EPSO), demonstrating the model's ability to detect
network breaches effectively. The findings highlight EPSO's importance in
improving ML classifiers for cybersecurity, proposing a strong framework for
NIDS with high precision and dependability. This extensive analysis not only
contributes to the cybersecurity arena by providing a road to robust intrusion
detection solutions, but it also proposes future approaches for improving ML
models to combat the changing landscape of network threats.