Machine Learning–Based Anomaly Detection in Smart Home IoT Networks
Authors: Muhammad Zulqarnain, Ali Hamza, Aoun Muhammad, Umar Fiaz, Sehrish Raza
Abstract
In the current era of rapid technological advancement, the Internet of Things (IoT) has permeated nearly every facet of human life, creating highly integrated smart scenarios, residences, and environments. Modern residences are now equipped with an extensive array of IoT devices that operate continuously throughout the day to assist users. To ensure these smart gadgets provide a tranquil and secure living area, it is essential to implement enhanced protection and rigorous verification protocols. Monitoring the activity of these intelligent systems is crucial for enabling IoT devices to operate reliably without malfunctions. However, because these gadgets are often compact and designed for minimal energy consumption, their limited hardware resources leave them highly vulnerable to external cyber-attacks. It is therefore essential to safeguard the authenticity and functional integrity of the smart home environment against these persistent threats. Machine learning has contributed significantly to our ability to identify such harmful actions and malicious endeavors. Various machine learning methodologies are currently employed to distinguish between typical traffic patterns and the unusual data signatures transmitted by compromised IoT devices. This research introduces a specialized machine learning approach to detect anomalies within the smart home ecosystem using a variety of sophisticated classifiers. The proposed method was evaluated and validated through extensive testing on the University of New South Wales (UNSW) BoT-IoT dataset. Our models were constructed utilizing four primary classifiers trained on data extracted directly from IoT devices. Evaluation metrics, including Weighted Precision, Recall, and F1-Score, were calculated specifically for the test dataset. The results show that the Random Forest, Decision Tree, and AdaBoost models achieved a perfect F1-score of 1.0, while the Artificial Neural Network (ANN) model achieved high performance scores of 0.98 and 0.96. These findings indicate that high precision, robustness, and overall performance can be successfully attained through the suggested approach. By implementing this framework, the security and identity of smart home devices can be effectively tracked and managed. Network errors and intrusions can be identified with remarkable precision across various attack categories, including binary classification, multiclass classification, and their respective subcategories. Ultimately, this study indicates that the Random Forest algorithm demonstrates superior performance, making it an ideal candidate for deployment in secure smart system environments.
