Abstract
The Internet of Things (IoT) continues to expand dramatically, connecting a growing number of smart devices such as home automation systems and wearables. However, this growth also introduces significant cybersecurity risks, as attackers increasingly exploit vulnerabilities in these interconnected devices. Protecting IoT networks requires comprehensive Intrusion Detection Systems (IDSs) that can intelligently identify and mitigate malicious activities. The proposed approach integrates dimensionality reduction through Principal Component Analysis (PCA) to streamline data, feature selection using Ant Colony Optimization (ACO) to identify relevant indicators, and classification through the Extreme Gradient Boosting (XGBoost) algorithm for accurate threat detection. The proposed approach achieved far superior results compared to existing IDS methods on three different datasets: 99.2% accuracy, 99.6% precision, 98.8% recall, and 99.2% F1- score on NSL-KDD, 99.3% accuracy, 92.8% precision, 99% recall and 95.8% F1-score on UNSW- NB15, and 99.9% accuracy, 99.5% precision, 99.8% recall, and 99.7% F1-score on CIC-IDS.