Wireless sensor networks (WSNs) are increasingly prevalent in the Internet of Things ecosystem and have been used in several fields such as environmental monitoring, military, and healthcare. However, their limited resources and distributed architecture remain two main challenges: energy and security. Furthermore, denial of service (DoS) attacks are one of the principal cyber threats to WSNs. This research proposes a lightweight machine learning (ML) approach based on the extreme gradient boosting (XGBoost) model to detect these attacks in WSNs. Through an extensive investigation, we evaluate four prominent ML algorithms: random forest (RF), k-nearest neighbor (KNN), stochastic gradient descent (SGD), and XGBoost, using the WSN-DS dataset. In addition, we implement and investigate several feature selection techniques in order to have an improved version of the original dataset. Moreover, we evaluate the performance using various performance metrics, which include accuracy, precision, recall, F1-score, and processing time. The latter is a crucial consideration in WSN environments. For validation, we have employed 5-fold cross-validation to ensure robust and reliable results. The proposed model has achieved good performance in all metrics, with a maximum accuracy of up to 99.73%, and a 68% lower processing time compared to the other investigated classifiers.
Collaboration network of the authors
2 authors ·
1 co-authorship link
Hover or tap a name to highlight its co-authors. Double-click to open the author's page.
Sidi Mohamed Ben Abdellah University
Different organisations
Same organisation
Affiliation unknown
Thicker line = more joint articles · bigger circle = more articles
Show as table
Co-author
Organisation
Joint articles
Affiliations come from OpenAlex; journal OAI-PMH metadata carries none. Authors without an OpenAlex ID are matched by name, which can merge or split people.