External Sinkhole Attack Detection in Large-Scale WSNs Using Metaheuristic Feature Selection

TL;DR

Using bee swarm optimization (BSO) for feature selection, achieving 0.997 detection accuracy with only 8 features out of 16 in large-scale WSNs.

cs.CR 🔴 Advanced 2026-08-15 88 views
Seungwoo Han Sawako Kitagata Ingon Chanpornpakdi Toshihisa Tanaka Su Man Nam
Wireless Sensor Networks Security Detection Feature Selection Metaheuristic Algorithm Machine Learning

Key Findings

Methodology

This paper introduces a metaheuristic feature selection framework based on bee swarm optimization (BSO) to enhance external sinkhole attack detection in large-scale wireless sensor networks (WSNs). The study employs PyWSNSim to simulate a 3000×3000 meter environment with 2000 sensor nodes, generating attack data with 16 features. The feature space is treated as a search domain, where BSO explores potential feature subsets through iterative neighbor solutions, guided by detection accuracy evaluated via support vector machine (SVM). The algorithm initializes with a random feature subset, then iteratively performs local searches by flipping bits in the feature vector, simulating bee foraging behavior. The fitness function is defined by the classification accuracy, and multiple iterations refine the feature set. The approach balances exploration and exploitation, avoiding local optima, and ultimately identifies an optimal subset of 8 features that maximizes detection performance while reducing computational load.

Key Results

  • The BSO-selected 8-feature subset achieves a detection accuracy of 0.997, surpassing LASSO (0.992) and variance threshold methods (0.995). The model maintains high precision (1.000) and recall (0.900), demonstrating robust detection capabilities.
  • Computational efficiency is significantly improved, with FLOPs/sample reduced to 912, roughly half of the cost when using all 16 features, enabling faster inference suitable for resource-constrained environments.
  • Comparison across feature selection methods shows BSO's superiority in balancing detection accuracy and computational cost, validating its effectiveness for large-scale WSN security applications.

Significance

This work addresses a critical challenge in large-scale wireless sensor network security: how to efficiently detect external sinkhole attacks with minimal computational overhead. Existing solutions often rely on high-dimensional features, which are impractical for resource-limited sensor nodes. The proposed BSO-based feature selection method not only enhances detection accuracy but also reduces inference complexity, making real-time security monitoring feasible in extensive deployments. This approach bridges the gap between high performance and resource efficiency, paving the way for scalable, intelligent intrusion detection systems. Its success demonstrates the potential of metaheuristic algorithms in optimizing feature subsets for complex network security tasks, contributing valuable insights to both academia and industry.

Technical Contribution

The primary technical innovation lies in integrating bee swarm optimization with machine learning-based classification to perform high-dimensional feature subset selection in large-scale WSNs. Unlike traditional methods such as LASSO or variance thresholding, BSO employs a population-based search inspired by natural bee foraging, which explores the feature space more thoroughly. The algorithm involves initializing a random feature subset, then iteratively generating neighboring solutions by flipping bits, evaluating their fitness via classification accuracy, and updating the best solutions based on a greedy criterion. The multi-iteration process ensures convergence toward an optimal feature set that maximizes detection performance while minimizing feature count. The framework effectively balances exploration and exploitation, avoids premature convergence, and reduces computational costs during inference, as evidenced by the 50% reduction in FLOPs/sample compared to using all features.

Novelty

This study is the first to apply bee swarm optimization for feature selection in the context of large-scale WSN external sinkhole attack detection. While previous work primarily relied on static or single-metric feature selection techniques, BSO offers a dynamic, population-based search that can navigate complex, high-dimensional spaces more effectively. The combination of BSO with SVM classification yields a highly accurate, computationally efficient detection model, validated in a large-scale simulation environment. This approach introduces a novel paradigm for feature optimization in network security, demonstrating superior performance in accuracy, recall, and computational efficiency over traditional methods, and establishing a new benchmark for scalable intrusion detection systems.

Limitations

  • The iterative nature of BSO results in higher training computational costs, which may limit its practicality for frequent retraining or deployment on resource-constrained devices. Future work should explore acceleration techniques or hybrid methods to mitigate this issue.
  • The evaluation is based solely on simulated data; real-world deployment may encounter environmental variability, noise, and unforeseen attack patterns that could affect model robustness. Field validation is necessary to confirm effectiveness.
  • The current framework employs SVM as the classifier, which, while effective, may be sensitive to hyperparameter tuning and data imbalance. Exploring more robust or adaptive classifiers could further improve detection performance.

Future Work

Future research will focus on developing unsupervised or semi-supervised models that require less training data and lower energy consumption, suitable for real-time deployment on sensor nodes. Additionally, integrating adaptive feature selection mechanisms that respond to environmental changes and attack evolution will be explored. Extending the framework to detect other types of network threats, such as DDoS or malware, is also planned. Finally, real-world experiments and field tests will be conducted to validate the approach's robustness, scalability, and practicality in diverse operational environments.

AI Executive Summary

Wireless sensor networks (WSNs) have become integral to modern infrastructure, enabling applications from environmental monitoring to smart cities. However, their widespread deployment exposes them to various security threats, notably sinkhole attacks, where malicious nodes lure traffic to disrupt or eavesdrop on data transmission. Detecting such attacks in large-scale environments remains a significant challenge due to resource constraints and the high dimensionality of network data.

Traditional detection methods often rely on extensive feature sets and computationally intensive classifiers, which are impractical for real-time monitoring on sensor nodes. To address this, the present study introduces a novel feature selection framework based on bee swarm optimization (BSO), a metaheuristic inspired by natural bee foraging behavior. The approach aims to identify a minimal subset of features that maximizes attack detection accuracy while minimizing computational overhead.

Using PyWSNSim, the researchers simulated a large-scale environment with 2000 nodes over a 3000×3000 meter area, generating attack data characterized by 16 features such as hop count, neighbor nodes, and energy levels. The BSO algorithm initialized with a random feature subset, then iteratively explored neighboring solutions by flipping bits in the feature vector, guided by classification accuracy evaluated via support vector machine (SVM). Multiple iterations refined the feature set, ultimately selecting 8 features that achieved a detection accuracy of 0.997, surpassing traditional methods like LASSO and variance thresholding.

The experimental results demonstrated that the BSO-based feature selection not only improved detection performance but also significantly reduced computational costs, with FLOPs per sample dropping to 912—about half of that required for the full feature set. This reduction makes real-time detection feasible in resource-constrained sensor nodes, marking a substantial step forward in scalable network security.

Beyond technical performance, this work highlights the potential of metaheuristic algorithms in optimizing complex feature spaces for cybersecurity applications. It offers a promising pathway for deploying intelligent, efficient intrusion detection systems in large-scale, real-world WSNs. Nonetheless, challenges remain, including the high training costs associated with iterative algorithms and the need for real-world validation. Future efforts will focus on developing adaptive, low-energy models and extending the framework to other threat types, ultimately contributing to more resilient and autonomous sensor networks.

Deep Dive

Plain Language Accessible to non-experts

Imagine you’re managing a large school with hundreds of classrooms. Your goal is to quickly find which classrooms have issues—maybe a broken projector or a noisy student—so you can fix things fast. Checking every detail in every classroom would take forever, so instead, you decide to focus on just a few key signs, like whether the projector is working or if the noise level is high. This way, you can quickly identify problem areas without wasting time.

Scientists doing similar work in computer networks face a big challenge: how to detect attacks or problems quickly without analyzing tons of data. They use a clever trick inspired by bees searching for flowers. The bees try different flower patches (features), and over time, they learn which patches have the best nectar (most useful information). The bees keep exploring and sharing their findings, gradually focusing on the best patches.

In the computer world, this means the system tests different combinations of data features—like hop count, energy level, or neighbor nodes—to see which ones best tell if the network is under attack. The bees’ search helps find the smallest set of features that still catch all the bad guys. This way, the system can work faster and use less energy, just like the teacher can quickly find classrooms with issues by focusing on a few key signs. It’s a smart way to keep the network safe without overloading it with unnecessary information.

ELI14 Explained like you're 14

Imagine you're trying to find out if your school is having trouble, but there are hundreds of things you could check—like whether the lights are on, if the noise is loud, or if students are late. Checking everything would take forever, so you decide to focus on just a few important clues—maybe if the lights are flickering or if the noise is unusually loud. These clues help you quickly figure out if something's wrong.

Now, think of computers doing something similar. They want to find out if a network is being attacked, but there are tons of data points—like how many messages are sent, how much energy the sensors have left, or how many neighbors each sensor has. Checking all of these takes a lot of time and energy. So, scientists came up with a clever way inspired by bees searching for flowers. The bees try out different patches of flowers, and over time, they learn which patches have the best nectar.

In the computer system, this means the algorithm tests different combinations of data points—called features—to see which ones are most useful for detecting attacks. The bees’ search helps find the smallest set of features that still do a great job. This way, the computer can work faster and save energy, just like you can quickly find problems in school by focusing on a few key clues. It’s a smart way to keep everything safe and running smoothly without wasting time or energy.

Abstract

Sinkhole attacks in large-scale wireless sensor networks (WSNs) pose a serious threat to network functionality. This paper presents a metaheuristic feature selection for sinkhole attack detection using the bee swarm optimization (BSO) algorithm. In an external sinkhole attack simulation with 2000 nodes deployed over a 3000 $\times$ 3000 m$^2$ field, the proposed method achieves a detection accuracy of 0.997 while reducing the 16-feature set to eight features.

cs.CR cs.NE

References (14)

PyWSNSim: A Python-based component-oriented simulation framework for sinkhole attack analysis in large-scale WSNs

Seungwoo Han, Tohishisa Tanaka, Su-Man Nam

2026 1 citations ⭐ Influential

Support-Vector Networks

Corinna Cortes, V. Vapnik

1995 46292 citations ⭐ Influential

Scikit-learn: Machine Learning in Python

Fabian Pedregosa, G. Varoquaux, Alexandre Gramfort et al.

2011 92939 citations ⭐ Influential View Analysis →

Regression Shrinkage and Selection via the Lasso

R. Tibshirani

1996 52780 citations ⭐ Influential

WSN-SES/MB: System Entity Structure and Model Base Framework for Large-Scale Wireless Sensor Networks

S. Nam, H. J. Kim

2021 10 citations

Sinkhole Attack Detection-Based SVM In Wireless Sensor Networks

Sihem Aissaoui, Sofiane Boukli-Hacene

2021 5 citations

BSO-FS: Bee Swarm Optimization for Feature Selection in Classification

Souhila Sadeg, Leila Hamdad, K. Benatchba et al.

2015 14 citations

Time Synchronized Multivariate Regressive Convolution Deep Neural Network Model for Sinkhole Attack Detection in WSN

A. Khedr, P. Raj, S. Rani

2024 8 citations

Detection and mitigation of sinkhole attacks in wireless sensor networks

Hosein Shafiei, A. Khonsari, H. Derakhshi et al.

2014 106 citations

FLOPpy: A hardware-agnostic Python library to monitor the computational cost of machine and deep learning algorithms

Francesco Scala, Francesco Mandarino, Liliana Martirano et al.

2026 1 citations

Cooperative Bees Swarm for Solving the Maximum Weighted Satisfiability Problem

H. Drias, Souhila Sadeg, Safa Yahi

2005 163 citations

Machine Learning Techniques for SinkHole Attack Prediction in IoT

Haima Bensaid

2025 1 citations

Accurate Detection of Sinkhole Attacks in IoT Networks Using Local Agents

Christiana Ioannou, V. Vassiliou

2020 15 citations

An efficient detection of Sinkhole attacks using machine learning: Impact on energy and security

Muhammad Zulkifl Hasan, Z. Hanapi, Z. Zukarnain et al.

2025 12 citations