Optimized feature selection and zero-parameter channel attention BiLSTM for RPL-attack classification in IoT networks Authors: Sudha Rani Unnam, Kareemulla Shaik Published: 2026 ABSTRACT The increasing adoption of Internet of Things (IoT) devices introduces significant security challenges, particularly in networks based on the Routing Protocol for Low-Power and Lossy Networks (RPL), where resource constraints limit the effectiveness of conventional security solutions. This work presents an optimized deep learning framework for detecting and classifying RPL-based routing attacks. The framework integrates Chaotic Pied Kingfisher Optimization (Ch-PKO) for feature selection with a Zero-parameter Channel Attention Bidirectional Long Short-Term Memory (ZCAtt-BiLSTM) model for classification. Data preprocessing includes cleaning, one-hot encoding, and Pareto scaling to improve data quality and learning stability. The approach is evaluated on the IoT-RPL dataset, covering Blackhole, Flooding, DODAG Version Number, and Decreased Rank attacks. Experimental results show strong performance, achieving 99.305% accuracy, 98.57% F1-score, 0.61% false discovery rate, and 97.949% MCC. Comparative analysis indicates improved performance over baseline models. However, the evaluation is based on simulated data, and the training process introduces additional computational cost, which may affect real-time deployment. Introduction The Internet of Things (IoT) represented a critical domain within information technology, interlinking smart devices to enable seamless communication and data sharing across diverse environments. In recent decades, the number of IoT-enabled devices has grown exponentially, and industry forecasts predict that by 2025 the global IoT ecosystem will surpass 100 billion connected devices [1,2]. This rapid growth inevitably gave rise to large-scale, highly complex network infrastructures that processed vast amounts of data in real time. Alongside these benefits, IoT systems faced mounting security concerns that threatened their reliability and trustworthiness. Among the various routing protocols designed for IoT environments, the Routing Protocol for Low-Power and Lossy Networks (RPL), introduced by the Internet Engineering Task Force (IETF), emerged as the most widely used [3,4]. RPL was designed to optimize routing in resource-constrained networks, offering flexibility across diverse topologies and energy-efficient communication. Its adaptability and low computational requirements made it indispensable for applications such as smart homes, industrial automation, and environmental monitoring, where reliable and continuous data transmission was essential [5,6]. Despite these advantages, RPL’s open architecture and lightweight design rendered it highly susceptible to attacks, placing IoT networks at significant risk. The core mechanisms of RPL exposed multiple vulnerabilities that adversaries exploited to launch severe routing-based attacks. In Blackhole attacks, malicious nodes advertised false optimal routes and subsequently dropped all intercepted packets, resulting in substantial data loss [7,8]. Flooding attacks exploited the lack of strong authentication and resource constraints of IoT nodes by injecting excessive control or data packets, rapidly depleting energy and bandwidth while causing network congestion [9]. DODAG Version Number attacks manipulated control messages by broadcasting fraudulent version numbers, forcing unnecessary topology reconstructions that degraded performance and stability [10,11]. Similarly, Decreased Rank attacks falsified rank values to mislead nodes into adopting compromised routes, disrupting network paths and undermining overall reliability. Collectively, these attacks compromised data confidentiality, integrity, and availability, making cyberattack detection in RPL-based IoT networks a critical research challenge [12,13]. In response to these threats, a wide range of attack detection techniques was investigated for IoT systems. ML approaches, in particular, showed considerable promise by analyzing large volumes of network traffic to uncover both known and previously unseen attack patterns [14,15]. By learning complex behavioural signatures from IoT data, machine learning-based systems enhanced detection accuracy and extended the scope of protection against evolving cyber threats. However, despite these advances, existing detection methods still suffer from notable shortcomings [16,17]. Many of the proposed solutions concentrated narrowly on defending against a single type of attack, which limited their applicability when multiple attack vectors occurred simultaneously [18]. Moreover, these approaches frequently relied on computationally intensive algorithms that were unsuitable for resource-constrained IoT devices, making them impractical in real-world deployments. Another critical limitation was that most existing systems struggled to achieve real-time detection while maintaining low computational overhead, an essential requirement for IoT security. These challenges underscore the inadequacy of current solutions in providing robust, scalable, and efficient cyberattack detection against the diverse and continuously evolving threats targeting RPL networks [19,20]. This article introduced a novel DL technique with an effective feature selection scheme for the classification of RPL-IoT attacks. Motivation The increasing prevalence of network attacks targeting the RPL protocol in IoT networks created an urgent need for robust and efficient detection mechanisms. Conventional ML techniques, although widely explored for RPL-based cyberattack detection, suffered from several limitations when applied to the dynamic and resource-constrained nature of IoT environments. Many traditional classifiers relied heavily on manually engineered features, which made them sensitive to noise, redundant attributes, and irrelevant information present in large-scale IoT traffic. This often resulted in reduced detection accuracy, poor adaptability to new or sophisticated attack types, and higher false positive rates. Moreover, conventional ML models typically require significant preprocessing and handcrafted feature extraction, which not only increases computational complexity but also restricts scalability in real-time applications. These limitations made it challenging to effectively classify diverse attacks such as Blackhole, Flooding, DODAG Version Number, and Decreased Rank attacks. In contrast, deep learning techniques provided an effective solution by automatically learning hierarchical representations from raw or minimally processed data, thereby enhancing the ability to capture complex attack patterns and improving detection accuracy. However, DL models still faced performance degradation if trained on high-dimensional or redundant feature sets. To address this, the integration of feature selection techniques became essential, as they reduced dimensionality, eliminated irrelevant data, and highlighted the most informative features. This not only improved the efficiency and interpretability of DL models but also minimized computational overhead, making them more suitable for upcoming real-time attack detection in resource-constrained RPL-IoT networks. The foremost contributions of the proposed framework were encompassed as follows: • To have proposed an optimized deep learning framework that combined advanced preprocessing using Pareto scaling normalization, and Chaotic Pied Kingfisher Optimization (Ch-PKO) for effective feature selection, reducing dimensionality, and minimizing computation time. • To have proposed an optimized deep learning framework that combined advanced preprocessing using Pareto scaling normalization, and Chaotic Pied Kingfisher Optimization (Ch-PKO) for effective feature selection, reducing dimensionality, and minimizing computation time. • To have designed a Zero-parameter Channel Attention Bidirectional Long Short-Term Memory (ZCAtt-BiLSTM) model capable of accurately classifying multiple RPL-specific attacks, including Blackhole, Flooding, DODAG Version Number, and Decreased Rank attacks. • To have designed a Zero-parameter Channel Attention Bidirectional Long Short-Term Memory (ZCAtt-BiLSTM) model capable of accurately classifying multiple RPL-specific attacks, including Blackhole, Flooding, DODAG Version Number, and Decreased Rank attacks. • To have validated the proposed approach through Python-based simulations and demonstrated the superiority of the proposed approach by comparing its results with existing state-of-the-art techniques, showing enhanced detection accuracy and reduced false positives. • To have validated the proposed approach through Python-based simulations and demonstrated the superiority of the proposed approach by comparing its results with existing state-of-the-art techniques, showing enhanced detection accuracy and reduced false positives. The upcoming sections were prearranged as follows: Section 2 outlined the related work, Section 3 deliberated over the suggested approaches, Section 4 presented the results and discussion, and Section 5 represented the conclusion of the proposed framework. Related works: A brief review Among the several studies on cyberattack detection in RPL-IoT technology, several current works were deliberated in this section. Fig 1 illustrates the various studies and their respective attack coverage in RPL-based IoT networks. Attack coverage by recent RPL-based studies (2023–2024). In 2024, Osman et al. [21] introduced an innovative hybrid autoencoder–decision tree framework (HADTF) to detect four major types of RPL attacks, namely decreased rank, version number, DIS flooding, and blackhole attacks. The framework consisted of three primary components: enhanced feature extraction, feature selection, and an HADTF classifier. In the enhanced feature extraction stage, the most relevant features were derived from the raw network data. Subsequently, the feature selection process curated the optimal subset of features to reduce dimensionality and eliminate redundancy. Finally, the HADTF integrated the representation power of AE with the decision-making capability of decision trees, which led to improved accuracy and higher detection rates while minimizing both false positives and false negatives. The effectiveness of the HADTF was evaluated using a self-generated dataset. However, the data preprocessing and feature extraction required collecting detailed network traffic, which might introduce communication overhead in real deployments. In 2024, Ahmadi et al. [22] elucidated an approach to address the susceptibility of the RPL protocol to various known routing attacks by introducing a trust-based identification framework. The expected behaviour of network nodes was estimated using a learning framework trained on historical routing patterns, leveraging recurrent neural networks (RNNs). This approach enabled the identification of attacks with notable accuracy and precision. However, its performance might vary under dynamic network conditions and with limited historical data, indicating potential constraints in real-time adaptability. In 2023, Krari et al. [23] developed an innovative method for identifying the critical RPL VN attack within IoT networks by leveraging LSTM networks and DNNs. Through training the LSTM and DNN models on this dataset, complex behavioural patterns linked to the attack were captured to enhance detection accuracy. Despite its effectiveness, the approach might encounter challenges in handling real-time constraints or adapting to evolving attack strategies without frequent retraining. In 2023, Kowsalyadevi and Balaji [24] encompassed the IoBTSec-RPL to recognize and classify numerous routing attacks in RPL-based networks. The framework followed four main stages: data preprocessing using min-max normalizer and imputation, feature selection via an enhanced pelican optimizer, class balancing with an auxiliary classifier gated adversarial network, and final classification using a combined LSTM and DBN. The model effectively captured complex attack patterns and demonstrated strong detection capabilities. However, scalability and real-time performance in large-scale dynamic IoT environments remained a challenge. In 2024, Abdulkareem et al. [25] presented the BC with the VGG16 scheme to ensure data privacy and secure message transmission. Initially, network fabrication was carried out to optimally position the Mr. Fixit nodes and adapt to network dynamics using the Bettered Remora Algorithm (Be-Remo). Following this, the RPL topology was registered at the Dutiful Advisor (DA) by submitting relevant parameters, after which the DA issued secret keys to nodes via the Boosted CHACHA algorithm (B-CHACHA). The root node in the RPL then propagated DIO messages, allowing each node to choose its parent based on various optimal metrics through the Be-Remo mechanism. These requirements might limit deployment in resource-constrained IoT environments, and real-time responsiveness could be affected under high network load or frequent topological changes. In 2023, Bokka et al. [26] emphasized the GRU-based DL model to detect security threats in RPL IoT networks. The dataset included traffic traces from both normal and attack scenarios, such as SH, BH, Sybil, Selective Forwarding, DIS flooding, and DIO suppression. The GRU model demonstrated strong detection accuracy across multiple attack types. Nonetheless, its performance under dynamic topologies and varying node mobility patterns was not fully explored. In 2024, Kannan et al. [27] established the classification method using a combination of neural networks and genetic algorithms (NGCA). This NGCA effectively identified nodes responsible for RPL and other forms of attacks, thereby enhancing security within IoT networks. Experimental evaluation using the NSL-KDD dataset demonstrated that NGCA achieved higher detection accuracy compared to conventional classifiers. However, its performance might vary under different network conditions and datasets. In 2025, Alemayew et al. [28] suggested a federated DL framework to identify and classify RPL attacks, including blackhole (BH), hello flooding (HF), and version number (VN). A multiclass dataset from IRAD environments, spanning 10–1000-node network sizes, was used for evaluation. Hybrid feature selection combined with Random Forest and XGBoost helped extract significant features. A CNN–GRU architecture captured both spatial and temporal characteristics of network traffic. Decentralized training was enabled through federated learning while keeping data local to clients. The model was compared with CNN-LSTM, LSTM, and GRU baselines. Results indicated improved detection performance across varying network scales. However, higher communication overhead and challenges due to non-uniform client data distribution limited efficiency. In 2026, Nassrullah et al. [29] demonstrated the lightweight secure operating mode for the RPL protocol, termed LSM-RPL, to enhance network security. Hash-Based Message Authentication Code (HMAC) was employed to ensure source authentication and data integrity. Two categories of pre-configured keys were utilized for secure communication. A shared secret key was applied across all nodes to safeguard broadcast messages and block external attacks. A separate private key, maintained between individual nodes and the root, was used to secure unicast communication and mitigate internal threats. This dual-key mechanism strengthened both external and internal attack resistance. Simulation outcomes indicated improved resilience against common RPL attacks. However, key management complexity and potential scalability challenges in large networks remained notable limitations. In 2025, Yang et al. [30] defined a routing attack dataset encompassing four RPL attack types, generated through simulations on the Cooja IoT platform. Feature extraction algorithms were implemented to derive 24 relevant attributes for the IDS model training. An efficient detection approach was designed to improve training speed and classification performance. A hybrid Pearson correlation was applied to identify the most informative features across different attack patterns. A GS-PSO (Grid Search–Particle Swarm Optimizer) strategy was utilized to optimize Random Forest hyperparameters. This combination enhanced detection accuracy while reducing computational complexity. The method demonstrated improved efficiency in identifying routing attacks. However, dependence on simulated data and potential performance variation in real-world deployments remained key limitations. Research gaps Despite significant advancements in RPL attack detection and mitigation, several research gaps remain evident. Existing approaches primarily rely on simulated or self-generated datasets, limiting generalizability to real-world IoT deployments with dynamic and heterogeneous conditions. Many deep learning–based methods, including AE, LSTM, and GRU models, achieve high accuracy but incur substantial computational and communication overhead, making them less suitable for resource-constrained environments. Although feature selection and optimization techniques improve performance, they often depend on centralized training, raising concerns related to data privacy and scalability. Federated learning frameworks partially address privacy issues; however, challenges such as non-IID data distribution, communication cost, and client heterogeneity are insufficiently handled. Trust-based and cryptographic mechanisms enhance security but introduce additional complexity in key management and latency. Furthermore, limited attention has been given to real-time adaptability, evolving attack patterns, and lightweight model design. Scalability across large-scale IoT networks and robustness under varying topologies and mobility conditions also remain inadequately explored. These limitations highlight the need for efficient, scalable, and privacy-preserving detection frameworks capable of operating effectively in realistic and dynamic IoT environments. Methodology This section presents a structured description of the developed framework for detecting and classifying RPL-based attacks in IoT networks. The overall process consists of data acquisition, preprocessing, feature selection, deep learning-based classification, and performance evaluation. The complete workflow is illustrated in Fig 2. Workflow of the proposed method. Initially, the raw dataset from the publicly available source was collected. The raw data were then pre-processed by performing data cleaning, one-hot encoding, and Pareto-scaling-based data normalization. Following this, feature selection was performed by using Chaotic Pied Kingfisher Optimization (Ch-PKO) to optimally select the required attack features for minimizing computational overhead. Finally, the Zero-parameter channel attention Bidirectional Long Short-Term Memory (ZCAtt-BiLSTM) model was introduced to accurately classify various attacks like Blackhole Attack, Flooding Attack, DODAG Version Number Attack, and Decreased Rank Attacks. The proposed method was simulated via the Python platform, and various performance measures were examined and associated with other techniques. Data acquisition An openly available IoT-RPL 2021: Cyber Attack Dataset Based on RPL Routing for IoT [31] is utilized. The dataset is a comprehensive collection designed to support the development and evaluation of cyberattack detection systems in RPL-based IoT networks. The IoT-RPL 2021 dataset is utilized for experimentation, containing both normal and malicious traffic samples. The dataset includes four attack categories: Blackhole, Flooding, DODAG Version Number, and Decreased Rank attacks. It consists of 24,023 instances generated using the Cooja simulator in a 6LoWPAN-based RPL environment. The dataset reflects realistic attack distributions but exhibits class imbalance with 15,328 attack samples and 1,478 normal samples, reflecting the realistic occurrence of attacks in IoT environments. All data had been generated using the Cooja simulator, which accurately modelled RPL-based IoT networks operating in 6LoWPAN environments. Preprocessing stage Raw data is preprocessed to improve model performance and ensure compatibility with learning algorithms. Initially, categorical features are transformed into numerical representations using one-hot encoding. Subsequently, Pareto scaling normalization [32] is applied to standardize feature distributions while preserving data variance. This step reduces the influence of extreme values and enhances learning stability. This process converts the actual values into the binary series representation, where each exclusive value is indicated as a distinct column or attribute with a value of either 1 or 0. After encoding, data normalization is performed using the Pareto Scaling (PS) technique, which operates similarly to the z-score method but with a key difference: the scaling factor is the square root of the standard deviation (SD). As a result, the newly scaled features will exhibit a variance that matches the standard deviation of the original, unscaled features. Every sample y′u,m of the data is modified into yu,m and it can be formulated as, Here, λu and σu represents the mean and SD of uth feature respectively. Feature selection using the Ch-PKO Technique The preprocessed data is then fed into the feature selection phase to choose the most relevant feature for minimizing the time consumption and classification error. Metaheuristic optimization strategies are generally used to extract the optimal features and prevent the dimensionality reduction problem. To reduce redundancy and computational overhead, an optimized feature selection mechanism based on the Chaotic Pied Kingfisher Optimizer (Ch-PKO) algorithm is employed. This metaheuristic approach identifies the most relevant features by balancing exploration and exploitation strategies. The algorithm iteratively evaluates candidate feature subsets using a fitness function and selects an optimal subset that maximizes classification performance while minimizing complexity. The PKO algorithm [33] is a novel swarm-based meta-heuristic technique inspired by the unique hunting and cooperative behaviours of pied kingfishers. It operates through three key phases: perching or hovering for target detection, diving for capturing prey, and resting to ensure coexistence. These behaviours are mathematically formulated to enable the PKO to efficiently tackle complex optimization tasks across various search spaces. The approach effectively avoids being trapped in local optima and demonstrates strong global search capabilities. Step 1: Initialization Phase Similar to other population-based methods, the PKO begins by randomly generating an initial population within the defined search boundaries, as expressed by the following equation (2). Here, Px,d indicates the location of the nth candidate in the dimension d, randsignifies the random values obtained within the interval 0 and 1. Moreover, ub and lbdenotes the upper and lower bounds within the search space, Mand n indicates the total number of candidates and the dimensions, respectively. In the proposed optimizer, the innovative tent Chaos (TCh) mapping function is utilized that minimize the initialization problems within the search space. The mathematical formulation for the TCh mapping is deliberated below: Here, aindicates the control parameter that defines the chaotic mapping and krepresents the number of iterations. Step 2: Random Generation After initialization, a suitable solution is arbitrarily selected from the pool of optimal parameter sets. Step 3: Fitness Function The PKO technique utilizes fitness function (FF) for analysing the optimality of the introduced segmentation model, and it is formulated in equation (4). Step 4: Perching/Hovering Strategy (Exploration Phase) This stage involves drawing its inspiration from the natural hovering and perching actions observed by PKs, where the birds tactically switch between these actions depending on environmental conditions. In the PKO algorithm, the locations of solution agents are initially determined based on these foraging strategies and are subsequently updated iteratively using the following expression (5). Here, i interprets the present iteration, Pu(i+1) manipulates the candidate solution in the following iterations, β denotes the parameter which can be formulated as, β=2×randm(1,n)−1 whereas, randm signifies the random value under a normal distribution. The parameter K stores the necessary location, and it is flexibly determined based on the present strategy. At the time of the perching stage, the parameter K can be mathematically indicated as, Here, T depicts the maximum iteration. At the time of the hovering phase, the parameter K can be articulated as, Here, G(u) and G(v) interprets the fitness of uth and vth candidate. The parameter Y is a fixed constant and its value is 8. Step 5: Diving Strategy (Exploitation Phase) The diving behaviour of the PK determines it to be an extremely effective predator, playing a vital role in its survival and success within its ecosystem. This hunting strategy can be mathematically modelled as follows: Here, Pbest(i) indicates the best location, o and Q presents the hunting performance, which can be interpreted as, Here, G symbolizes the optimal value. The hunting success of the pied kingfisher is shaped by various factors, such as prey availability, individual hunting skills, and the presence of competing or predatory species in the vicinity. During the coexistence stage, this behaviour is represented mathematically as: Here, Pu(i) and Pv(i) depicts the position of two arbitrarily determined candidates in the population. The parameter H symbolizes the PK’s predatory efficacy, the values of Hmax and Hmin are selected as 0.5 and 0, respectively. Step 6: Return the Best Optimal Solution Step 7: Termination criteria The proposed PKO method advanced to the next phase, where the updating procedure was iteratively applied using equations (5) to (10) until the stopping criteria were fulfilled. Once the process concluded, the globally optimal features obtained through these repeated iterations were selected and given to the proposed DL model for effective classification. The selected features derived from the Ch-PKO technique included: frameproof, protocol, control type, type_cont_messg, DOAGID, and DOAGID.1, DOAGID.2, DOAGID.3, DOAG_info, DIO_info, object_cont_pt, lifetime, and prefix_info. These features collectively captured essential protocol characteristics, control message types, object content points, and lifetime parameters necessary for efficient data representation and accurate modeling. Algorithm 1 depicted the pseudocode for the proposed Ch-PKO technique. Algorithm 1: Ch-PKO Feature Selection Algorithm Input: - Pre-processed dataset D - Population size N - Maximum iterations Tmax - Search space bounds [lb, ub] - Control parameter μ for tent chaos mapping Output: - Optimal feature subset 1: BEGIN 2: // Step 1: Initialization Phase with Chaotic Tent Mapping 3: FOR i = 1 to N DO 4: FOR j = 1 to d DO 5: Generate chaotic value using Tent Chaos mapping: 6: x_i^j = lb^j + (ub^j – lb^j) × TCh_i 7: where TCh_i = {μ × TCh_{i-1} if TCh_{i-1} < 0.5 8: {μ × (1 - TCh_{i-1}) if TCh_{i-1} ≥ 0.5 9: END FOR 10: END FOR 11: // Step 2: Random Generation 12: Select a random solution from the initialized population 13: // Step 3: Evaluate Fitness Function 14: FOR each candidate x_i DO 15: Calculate fitness: Fitness(x_i) = f(x_i) 16: END FOR 17: Identify the best solution x_best with optimal fitness 18: t = 1 // Initialize iteration counter 19: WHILE t ≤ T_max DO 20: FOR each candidate i DO 21: // Step 4: Perching/Hovering Strategy (Exploration Phase) 22: Calculate parameter: a = 2 - (2 × t/T_max) 23: Generate a random value r from the normal distribution 25: IF random () < 0.5 THEN // Perching phase 26: x_rand = random candidate from population 27: P = x_rand + r × a × (x_rand - x_i) 28: ELSE // Hovering phase 29: IF Fitness(x_i)