Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 811 https://internationalpubls.com A Cross-Layer-Routing Protocol with Malicious node detection using BiRNN in WSN 1S.Saritha, 2Dr.E.Sreenivasa Reddy 1Research Scholar, 2Professor 1Department of Computer Science and Engineering, Acharya Nagarjuna University, Guntur, Andhra Pradesh, India 2School of Computer Science and Engineering, VIT-AP University, Amaravathi, Andhra Pradesh, India Email: 1sarithanune@gmail.com, 2sreenivasareddy.e@vitap.ac.in Article History: Received: 08-11-2024 Revised:23-12-2024 Accepted:08-01-2025 Abstract: A wireless sensor network (WSN) is a standalone device that consists of a discrete group of sensor nodes (SN) for information gathering, device monitoring, and environmental position sensing. The main challenge is to present an energy-efficient framework and conserve energy while building a route path alongside each sensor node at SN due to the limited energy resources available. Nonetheless, a great deal of energy-efficient methods concentrated heavily on energy harvesting and decreased energy usage, but they were unable to enable energy-efficient routing in WSNs with low energy usage. The research work uses Kinetic Gas Molecules Optimization (KGMO) based Modified Reptile Search Algorithm for cluster head selection to minimise the energy consumption in order to address this issue. Utilising a modified version of the Reptile search algorithm, the inertia weight of the KGMO is determined by evaluating trust (direct and indirect) based on energy, distance, probability of risk, delay, and Received Signal Strength Indicator (RSSI), with the optimal CH being chosen. Lastly, to find the shortest path, use an energy-efficient cross-layer-based expedient routing protocol (E-CERP), which lowers network overhead dynamically. Assuring security for the massive amounts of data being generated by sensors is the most difficult task. It must balance the trade-offs with a number of other factors, including power consumption, delay, latency, and data aggregation, in order to ensure security and make room for different types of research. The work's concept is to use a Bidirectional Recurrent Neural Network (BiRNN) model to identify the malicious nodes. When compared to previous methods, the proposed model demonstrated exceptional results by achieving a Packet Delivery Ratio (PDR) of 0.99, Throughput of 0.98, Packet Delay reduced to 0.05, Power Consumption minimized to 1.52, and an outstanding Accuracy of 99.21%. These findings underscore its efficacy in enhancing both network performance. Keywords: Wireless Sensor Network, Reptile Search Algorithm, Energy-Efficient Cross- Layer-based Expedient Routing Protocol, Clustering Head, Kinetic Gas Molecules Optimization. 1. Introduction Small, reasonably priced sensor nodes make up a wireless sensor network (WSN). It has been demonstrated that WSNs are among the best methods for moving data from remote locations to a central data processing centre. By self-organizing, these sensors create a multihop network that can adapt and data compression and send it to a base station [1]. In addition to collecting more data for applications like Multimedia WSNs, inexpensive healthcare, intelligent buildings, military surveillance, agricultural and industrial monitoring, they also facilitate the transmission of multimedia data, including images and videos. More resources may be needed by larger sensor nodes, and multimedia data is usually larger. This problem has been studied and attempted to be resolved by some researchers [2]. One of the most important ways to increase energy conservation extends the lifespan of sensor nodes in wireless sensor networks. Most energy is used in packet sending and receiving [3]. In WSNs, sensor nodes frequently use batteries. The complexity of battery charging stems from the network of devices, and the battery's capacity becomes the most crucial resource for WSNs [4]. Energy mailto:1sarithanune@gmail.com mailto:2sreenivasareddy.e@vitap.ac.in Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 812 https://internationalpubls.com conservation therefore becomes crucial for WSNs. It is necessary to create a new optimisation algorithm in order to maximise network lifespan and energy efficiency. One of WSNs' power management features is clustering, which divides the network into several clusters, each of which has one node, referred to as the cluster head (CH) [5]. The base station (BS)'s overhead is decreased by the CH by merging the information it gets from every node and sending it to the BS. In scenarios where resources are limited, the WSN conserves energy since less nodes send data to the BS. In WSNs, clustering algorithms help cut down on power consumption [6]. The formation and stabilisation phases make up each round of the clustering algorithm's operation. The nodes are arranged into discrete groups, or clusters. Every group is assigned a CH [7]. The CH gathers data from sensor nodes and transmits the sensed data to the recipient. Moreover, while there are other factors that contribute to clustering, the reduction of energy consumption has been examined from that angle in some survey reports [8]. Most publications that cluster data contrast and compare the efficacy of different clustering techniques, but they hardly ever examine the goals of the strategies. As far as we are aware, no survey study has looked at the characteristics of WSN networks, like heterogeneity and mobility, that are made possible by current clustering algorithms [9]. As a result, cluster-oriented techniques also contributed to the network's ability to expand its lifespan. The techniques that are most frequently used are Low Energy Adaptive Clustering Hierarchy (LEACH) and Fuzzy C-Means (FCM). Additionally, based on the calculated likelihood, the cluster- oriented LEACH approach operates in a dispersed manner and favours CH. As a result, increasing the WSN's energy efficiency is crucial since it shortens the network's lifespan. Using clustering to reduce transmission energy consumption and increase network lifetime is a successful strategy [10]. Clustering prevents packet collisions, increases throughput, and expands network scalability. Moreover, clustering reduces total energy usage. Up until now, several meta-heuristic scheme-based central cluster-oriented techniques have been presented. Particle Swarm Optimisation (PSO), the Harmony Search Algorithm (HSA), and other schemes are examples of specific, broad schemes. Further difficult aspects of modelling the routing schemes are the network's EE, QoS, and lifespan. The main drawback of using a mobile sink is information loss, which is why they are used in the conventional model in spite of their low energy consumption and high throughput [11]. When data packets are transferred using the suggested architecture from the destination node from the source node, information loss is prevented. Utilising the static node also lowers energy consumption. When paired with a mobile sink, a cluster head's mobility results in a higher transmission loss of data. When used in conjunction with a static sink, the cluster head's immobility reduces the likelihood of data loss [12]. Motivation: In Wireless Sensor Networks (WSNs), locating malicious nodes is critical to maintaining network security, dependability, and data integrity. Through the identification and isolation of these rogue elements, the network can continue to function, guaranteeing dependable operation and accurate data transmission. Malicious node detection protects against denial-of-service attacks, unauthorised access, and data manipulation while fostering greater trust among network users. Proactive steps not only reduce possible risks but also make WSNs more durable and effective. This promotes innovation and progress in a number of industries that depend on WSNs, including industrial automation, environmental monitoring, and healthcare systems. Main Contributions: • Introduction of a KGMO-based Modified Reptile Search Algorithm for efficient cluster head selection in WSNs, prioritizing factors like distance, energy, security, delay, trust evaluation, and RSSI. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 813 https://internationalpubls.com • Development of an energy-efficient cross-layer-based routing protocol (E-CERP) to dynamically minimize network overhead by determining the shortest route. • Proposal of an BiRNN model to detect malicious nodes, addressing security concerns without compromising on factors like power consumption, delay, latency, and data aggregation. • Evaluation of the proposed method's performance through metrics including error estimation, network lifetime, packet loss rate, packet delivery ratio (PDR), packet delay, throughput, power consumption, and packet loss rate, demonstrating superior results compared to existing methods. Organization of the Paper: The following is the order of the residual sections: Related works are exhibited in Section 2, dataset details are provided in Section 3, the suggested approach is presented in Section 4, the experimental analysis is presented in Section 5, and a conclusion is reached in Section 6. 2. Literature Survey In the work by Nouman, M., et al. [13], In order to address several security concerns and enable nodes to be registered using login credentials, blockchain technology was deployed on base stations (BSs) and cluster heads (CHs). To further categorise the nodes as malicious or legitimate, a machine learning (ML) classifier known as the histogram gradient boost (HGB) was applied to the BSs. The node's registration was removed from the network in the event that it was discovered to be malicious. On the other hand, the data of a node that was determined to be authentic was kept in an Interplanetary File System (IPFS). After creating IPFS stored the data in chunks and used it as a hash that were subsequently recorded in the blockchain. Verifiable Byzantine Fault Tolerance (VBFT) was also employed to carry out consensus and validate transactions in place of Proof of Work (PoW). Furthermore, extensive simulations were run with the WSN-DS (Wireless Sensor Network) dataset. The balanced dataset as well as the original dataset were used to evaluate the model. Moundounga, A. R. A., et al. [14] intended to create an anomaly identification method that would increase the accuracy and security of the sensor network. In order to achieve this, a detection system that recognised network malicious entries by learning from routing datasets was defined using machine learning techniques. The models relied on the stochastic assumptions of the Gaussian Mixture Model (GMM) and the Hidden Markov Model (HMM). In addition, the most pertinent features for the training were chosen using the dimensionality reduction technique. A dataset representing various network scenarios, including both normal and attacked cases, was used in the independently executed experimentation phase. A 2 HMM/3 GMM classifier was used to achieve a 92.18% classification accuracy as the method's output. The study conducted by Gebremariam, G. G., et al. [15] outlined a technique for secure attack localization and detection that improves security and service delivery in IoT-WSNs. Prior to beacon nodes transmitting information to the base station, the method generated blockchain trust values using a hierarchical design and Blockchain-based trust assessment and cascade encryption. According to simulation results, nodes' trust value was measured by cascading encryption and feature assessment, which rewarded nodes for their trust and service provisioning. This led to the removal of malicious nodes, which compromised the network's quality of service and localization accuracy. Federated machine learning, which combined unprocessed device data and added malicious threat intelligence to the blockchain, enhanced data security and transmission. Federated learning was utilised to categorise malicious nodes by applying a feature evaluation procedure. This method combined support vector machines, gradient boost, ensemble learning, hybrid random forests, and k-means clustering. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 814 https://internationalpubls.com The paper by Lai, Y et al. [9] presented a correlation theory-based malicious-node identification technique to prevent fault data injection attacks. Initially, anomalies between related types of sensor data were found using time correlation. Malicious nodes were then identified using spatial correlation. In the end, event correlation was employed to confirm the presence of the detected malicious nodes. Ahlawat, P., et al. [16] presented the convolution coding approach, a method based on a sophisticated encoding technique. The first bits were assigned based on the requirements of the network, and each node's final code was generated using the convolution technique. Since it was a digital method, the binary number system could be used to represent the codes. Every node within the network possessed its unique final binary code, represented by the letter C. Before transmitting the data, each node was verified by comparing the generated code C together with the security code during a set amount of time. This procedure made it easier to identify hostile or intruding nodes. Additionally, the system was divided into clusters to improve flexibility and performance. The paper by Sharma, T., et al. [17] aims to increase wireless sensor networks' dependability and security by introducing a malicious node detection algorithm based on the density-based unsupervised learning technique known as the DBSCAN algorithm. The main goal of the algorithm was to create a routing system that could identify malicious nodes, increase network stability, and extend the life of the network. Within machine learning, two widely used methods were clustering and classification that worked well across a range of applications. In many different fields, density-based clustering was a well-liked and widely applied method. The most well-known and widely used density-based clustering algorithm, known for its ability to identify clusters of any shape, was called DBSCAN. The study focused on two WSN anomalies: malicious node identification and spatial redundancy. In order to save energy and prevent data falsification by malicious nodes, an algorithm was proposed in the article to identify suspicious nodes and reduce redundant data transmission. Ding, J., et al. [18] used an algorithm for reinforcement learning (RL) to model a selective forwarding attack against malicious nodes with intelligence. The purpose of the double-threshold density peaks clustering (DT-DPC) algorithm was to effectively identify the selective forwarding attack in a difficult setting. Because of persistent abnormalities, abnormal nodes were classified as malicious and isolated. As a result of distinct malicious behaviours and a severe setting that caused agglomerate nodes to malfunction universally, suspicious nodes were identified using the neighbour voting method. DT- DPC increased network throughput even when cunning malicious nodes avoided being discovered by an RL algorithm. As demonstrated by DT-DPC demonstrated a low missed detection rate (MDR) in the simulation results of approximately 10% and a low false detection rate (FDR) of approximately 1%. In a challenging environment, the network throughput increased by roughly 4%. Research Gaps Several research gaps persist in the domain of securing Wireless Sensor Networks (WSNs). Firstly, while existing studies propose various detection and prevention techniques, there's a need for more comprehensive approaches that address evolving threats, including sophisticated attacks targeting network infrastructure and data integrity. Additionally, the scalability and efficiency of proposed solutions require further investigation, especially in large-scale WSN deployments. Moreover, the integration of emerging knowledges such as blockchain, federated learning, and reinforcement learning into WSN security frameworks remains relatively unexplored. Bridging these gaps is crucial for enhancing the resilience and reliability of WSNs in the face of emerging security challenges. 3. Methods Figure 1 shows the proposed work flow of the malicious node discovery model. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 815 https://internationalpubls.com Figure 1: Block Diagram Network Model By WSN clustering seeks to reduce energy consumption. Common nodes constantly keep an eye on their surroundings and relay sensory information towards the cluster leader. There is only one common node from which the CH node is selected. Transmitting data to the BS from each cluster node requires the CH to perform a critical function. Grouping helps to prevent direct communication between sensors and receivers. In Figure 2, the WSN system model is shown [19]. Figure 2. An all-encompassing wireless sensor network architecture. Conditions for the Ideal Selection of CH The following are the many criteria that were employed to choose the best CH [20]: • Energy; • Security; • Distance; • Delay. Energy Model Energy exploitation is the main problem with WSNs. Given that the WSN battery does not use the re- energizing method, it is impossible to provide energy in the event that the battery runs out. Furthermore, data from entire SNs is capable of being transmitted to the BS through additional resources. Energy use is essential for data transmission. The network consumes more power as a result of does so many different things, such as aggregation, sensing, transmission, and reception. Normally, Equation (1) implies the necessary energy for the entire data broadcast; under the suggested energy model, however, Equation (2) implies the necessary energy for the entire data broadcast, where E^i denotes initial energy. According to the modules mentioned, the implied electron energy is E_el, in which E_ea indicates the energy used to aggregate data over time. E_e implies that which Equation (4). E_TX (Z:di) shows the total amount of energy used for communication Z packets' bytes at different distances. High energy is necessary for an effective system, utilising the energy of the receiver, E_RX, necessary to obtain Z packet bytes at di is represented by Equation (5) illustrates the energy needed to amplify, E_am. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 816 https://internationalpubls.com 𝐸𝑇𝑋(𝑍: 𝑑𝑖) = 𝐸 { 𝐸𝑒𝑙 × 𝑍 + 𝐸𝑟𝑠 × 𝑍 × 𝑑𝑖 2, if 𝑑𝑖 < 𝑑𝑖0 𝐸𝑒𝑙 × 𝑍 + 𝐸𝑝𝑣 × 𝑍 × 𝑑𝑖 2, if 𝑑𝑖 ≥ 𝑑𝑖0 (1) 𝐸𝑇𝑋(𝑍: 𝑑𝑖) = 𝐸 { 𝐸𝑖 − 𝐸𝑒𝑙 × 𝑍 + 𝐸𝑟𝑠 × 𝑍 × 𝑑𝑖 2, if 𝑑𝑖 < 𝑑𝑖0 𝐸𝑖 − 𝐸𝑒𝑙 × 𝑍 + 𝐸𝑝𝑣 × 𝑍 × 𝑑𝑖 2, if 𝑑𝑖 ≥ 𝑑𝑖0 (2) 𝐸𝑒𝑙 = 𝐸𝑇𝑋 + 𝐸𝑒𝑑 (3) 𝐸𝑅𝑋(𝑍: 𝑑𝑖) = 𝐸𝑒𝑙𝑍 (4) 𝐸𝑎𝑚 = 𝐸𝑓𝑟𝑑𝑖 2 (5) 𝑑𝑖0 = √ 𝐸𝑓𝑟 𝐸𝑝𝑎𝑚 (6) In the above equations, di_0 stands for threshold distance; E_"pam " represents energy of PA; E_fr represents the necessary energy when using the free space method; E_1 symbolises the energy of the whole inactive state; E_C shows the cost of energy for the entire sense phase. Equation (7) indicates the total energy required to transmit data. 𝐸total = 𝐸𝑇𝑋 + 𝐸𝑅𝑋 + 𝐸1 + 𝐸𝐶 (7) Security Mode of security: This chooses the CH that meets the requirements for security. In Equation (8), q_r&q_s mentions, in that order, security rank and CHS-related security requirements. The symbols for the nodes are CH, if q_s≤q_r. Risky mode: To obtain the best CH for capturing every risk, an existing CH is chosen in this case. Consequently, during the CHS procedure, this mode is referred to as insistent mode. γ-risky mode: In γ-risky mode, the CH who are subject to a severe risk are selected. Furthermore, γ- risk is referred to as u_"risk " . Then, as in the other two modes, γ indicates the probability metric with η=0 and γ=1. Equation (8) illustrates the probability of security variables. Furthermore, if the selected CH accomplishes the state q_s>q_r, less than 50% of the risk should exist. If the circumstance is 0 0 (17) 𝐾𝑦 𝑧(𝑜, 𝑜 + 1) = { 1− ln⁡(𝐿𝑦 𝑧 (𝑜,𝑜+1)) ln⁡ 𝜑 ; if (𝐿𝑦 𝑧 (𝑜, 𝑜 + 1)) > 𝜑 0; else (18) Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 818 https://internationalpubls.com 𝐿𝑦 𝑧 (0,0+ 1) = { 𝐿𝑦−1 𝑧 (0,0+ 1) + 1−𝐿𝑦−1 𝑧 (0,0+1) 𝜔 ; if ℜ𝑦 𝑧(0,0+ 1) < 𝑙 𝐿𝑦−1 𝑧 (0,0+ 1) − 1−𝐿𝑦−1 𝑧 (0,0+1) 𝛿 ; else (19) RSSI According to Fris, RSSI becomes distorted when the inverse square of the separation between the sender and the recipient. Equation (20) can be used to model it, and Equation (21) can be used to compute B, which stands for distance. An effective system requires a high RSSI. RSSI = −36 × log⁡(B) − 55 (20) B = 10 (RSSI+55)/−36⁡⁡⁡⁡⁡(21) Objectives Equation (22) illustrates the goal of the method based on BEA-SSA for choosing the best CH, where 𝑑𝑖 is the distance, 𝐸𝑝 is the energy, 𝑆𝑒 is the security, 𝐷𝑒 is the delay, Tr is the trust, and the term "Received Signal Strength Indicator" refers to RSSI. Below is a representation of the goal function. The goal is to minimise the parameters of distance, security, and delay while maximising the RSSI, energy, and trust parameters. In this case, security analysis considers the risk factor. So, the lowest possible risk factor is necessary. 𝑂𝑏𝑗 = min [ (𝑤𝑒1 × 𝑑𝑖) + (𝑤𝑒2 × (1− 𝐸 𝑝)) + (𝑤𝑒3 × (𝑆𝑒)) +(𝑤𝑒4 × 𝐷𝑒) + (𝑤𝑒5 × (1− Tr)) + (𝑤𝑒6(1− RSSI)) ] (22) 𝑤𝑒1 − 𝑤𝑒6 are weighing variables that vary from 0 to 1; 𝑤𝑒1 is paired with 0.2, 𝑤𝑒2 is paired with 0.3, 𝑤𝑒3 is paired with0.1, 𝑤𝑒4 is paired with 0.2, 𝑤𝑒5 is paired with 0.1 , and 𝑤𝑒5 is paired with 0.1 . Clustering using KGMO based MRSA The initial use of KGMO [21] in this paper has an inertia weight disadvantage. To solve this problem this paper uses a MRSA. A recently created optimisation method that effectively addresses a variety of optimisation issues is called the RSA. However, the RSA has certain disadvantages, involving high computational complexity, sluggish convergence, and local minima trapping, when attempting to solve nonconvex, high-dimensional optimisation problems. As a result, some modifications to the original RSA algorithm are suggested in order to address these problems [22]. It is necessary for the solution candidates to look as far across the search space as they can to avoid local minima trapping. Consequently, a sine operator was added to the high walking stage of the RSA algorithm to improve exploration. The sine cosine algorithm's dynamic exploration mechanism (SCA) served as the inspiration for this modification. One can perform global exploration with the help of the sine operator. Therefore, by performing a thorough search of the solution space, one way to avoid local minima trapping in the IRSA is to include a sine operator. Using the sine operator, the MRSA equation was changed to the following one. 𝑥𝑗𝑘(𝜏 + 1) = Best𝑘⁡(𝜏) + (𝑟1 × sin⁡( rand ) × |𝑟2 × Best𝑘⁡(𝜏) − 𝑥𝑗𝑘|, ⁡ for ⁡𝜏 ≤ 𝑇 3 (23) where 𝑟1, 𝑟2, and Randomly selected numbers are known as rand 0 and 1. 𝑥𝑗𝑘 is the situation as it stands now, and Best ⁡𝑘 is the ideal remedy. The Levy distribution function is followed by a random process known as the Levy flight. levy = 0.01 × 𝑢 𝑣 1 𝜁 (24) Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 819 https://internationalpubls.com where 𝑢 and 𝑣 obey normal distribution. ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑢 ∼ (0, 𝜎𝑢 2), 𝑣 ∼ (0, 𝜎𝑣 2)⁡⁡⁡⁡⁡(25) ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝜎𝑢 = ( 𝛿(1+ 𝜁)sin⁡ 𝜋𝜁 2 𝛿 [ 1+ 𝜁 2 ] 𝜁 ∗ 2 𝜁− 1 2 ) 1/𝜁 ⁡⁡⁡(26) ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝜎𝑣 = 1⁡⁡⁡⁡(27) where 𝛿 is a typical gamma function. 𝜁 is a crucial factor that establishes the jump size in the Levy fight. The reduced amount of 𝜁 leads to sporadic, tiny steps. This enhances exploitation capabilities by allowing the region nearest the obtained solution should be searched by the solution candidates. The enhanced utilisation ensures worldwide convergence. In the last stages of MRSA, the position is updated using the Levy operator 𝑥𝑗𝑘(𝜏 + 1) = Best𝑘⁡(𝜏) + randn × levy ⊕ (𝑥𝑗𝑘 − Best𝑘⁡(𝜏)), for 𝜏 ≤ 𝑇 and 𝜏 > 3 𝑇 4 (28) where ⊕ indicates multiplication by entry, and rand 𝑛 is a random number with a uniform distribution. The algorithm's complexity is significantly reduced by these improvisations. Nevertheless, we are able to remove these equations from the algorithm by making the aforementioned modifications. This implies that the time complexity of the suggested MRSA algorithms is reduced by nearly three to four times since they are not required to calculate these equations. The suggested technique shows improvements in global exploration, speed, low time high efficiency, and high efficiency. When combined, the MRSA's pseudocode is displayed in Algorithm 1. Algorithm 1 Pseudocode of MRSA Initialize random population x Initialize iteration counter τ=0, extreme iteration T, alpha, beta while τT/3 else if τ≤3 T/4 and τ>2 T/4 else Solve using Equation (28) end if end for Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 820 https://internationalpubls.com end for t=t+1 end while Return best solution WSN Routing Algorithm for E-CERP The energy-efficient cross-layer-based transfers data over the shortest paths in a scalable and energy- efficient manner. It lowers packet delays and improves the communication link's dependability [19]. There are various issues with the current CORP algorithm, this is an opportunistic routing protocol that operates across layers: • Because of the limited computing power of the WSNs, an increasing number of constraints results in high data transmission complexity. • It is difficult to integrate them. • They use a lot of power and have high delivery rates, packet losses, and communication delays. The objective of the suggested E-CERP technology, which addresses the issues with traditional routing protocols, is to optimise the broadcast power of the nodes by making use of the network's residual energy. (i) Local broadcast The ID, path cost, and hop every node is infinite, it may vary from round to round. Considering the HELLO messages that it gets, every node arranges its list of neighbours. The received signal strength indicator (RSSI) of incoming correspondence is used to calculate signal strength. The link reliability metric is calculated using the average RSSI 𝐿(𝑛,𝑚), expressed in Equation (29). 𝐿𝑛,𝑚 = 𝑇𝑚𝑡𝑝 − 𝑇𝑎𝑟𝑝 (29) The following is how the link cost is estimated using the Lagrange multiplier: cos⁡(𝑛,𝑚) = 𝑋𝑐𝑖𝑟 + 𝑋𝑎𝑟𝑝 + In⁡ 𝐼 𝑣 ⋅ 1 ℎ𝑛𝑚 (30) (ii) Routing algorithm A parent Par⁡(𝑛) must be selected to serve as the subsequent hop sensor node for a given sensor node 𝑛 in order to send information to the BS from node n. The formula in mathematics can be expressed in the following way: Par⁡(𝑛) = arg 𝑚∈𝑁𝑖(𝑛) ⁡min[cost⁡(𝑚) + cost⁡(𝑛,𝑚)] (31) A cost-based route is constructed using the parent route selection and the cost function as indicated in Equation (10). Updates are made to the parent preferences in every round. (iii) Transmission Power Control (TPC) Equation (32) can be used to determine the optimal transmit power based on hop count: Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 821 https://internationalpubls.com ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑇𝑡𝑥(𝑛) = 1 ℎ𝑛 [ln⁡ 𝐼 + ln⁡ (ℎ𝑛∑  𝐻 𝑛=1   1 ℎ𝑛 )]⁡⁡⁡(32) Relatively speaking, the transmitted execution is simplified, and Equation (33) can be used to determine the upper bound: ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡(∑   𝐻 𝑛=1   1 ℎ𝑛 ) ln 𝐼 ≤∑   𝐻 𝑛=1  𝑋𝑡𝑥(𝑛) ≤ (∑   𝐻 𝑛=1   1 ℎ𝑛 ) (ln 𝐼 + ln𝐻)⁡⁡⁡(33) Equation (34) is thus used to estimate the upper bound for the given sensor node. ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑋𝑡𝑥(𝑛) = 1 ℎ𝑛𝑚 [ln⁡ 𝐼 + ln⁡ 𝐻(𝑛)] (34) where " 𝐼 " is the intended end-to-end success likelihood and " 𝐻 " symbolises the number of hops. After assessing the transmitting power, the optimal path for data broadcast and reception has been identified. It uses very little energy conservation and has very little packet loss and delay. Malicious node detection WUSTL-IIOT-2018 Dataset Targeting reconnaissance attacks on SCADA is the goal of the ICS data set WUSTL-IIoT-2018 for SCADA cyber security studies. Among recognition's components the use of examining tools by intruders to find network devices and potential vulnerability sites [23]. The subsequent reconnaissance attacks Address scanning, port scanning, and device identification and exploitation were carried out against the testbed. Using FS, the writers were able to pinpoint traits that hold the greatest promise for the success of the data set, even though the basic data contained 25 networking features: The total transaction packet count (Totpkts), total transaction bytes (TotBytes), source/destination packet count (SrcPkts), and destination/source packet count (DstPkts) are all displayed. These features serve as a prototype for researching model evaluation and machine learning decisions. Additionally, a system for audit record production and implementation was in place to monitor all network traffic, of which 6.07% was malicious and 93.93% was benign. Classification using Bidirectional Recurrent Neural Networks The network that is bidirectional in rather than eliminating individual components, the model begins with a spatial dropout layer that eliminates entire feature maps [24]. The bidirectional RNN (BiRNN) layer, which links two hidden layers with opposing directions (forward and backward) to the same output, is then fed the result of this layer. GRU is the foundation of BiRNN. The output of the BiRNN layer is subsequently simultaneously received by the global average and global maximum pooling layers. The next step's new input is created by combining the outputs of these two layers. A feature map grid (window) or several windows are created from each input feature map. The mean of an n-sized window is determined by the average pooling function in the following manner: ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡ 𝑥1 + 𝑥2 +⋯+ 𝑥𝑛 𝑛 (35) The input window's maximum value number is selected by max-pooling {𝑥1, . . 𝑥𝑛}. The objective of average and maximising the number of dimensions in the data while preserving important information is the goal of pooling [25]. The one GRU cell has the following functions: Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 822 https://internationalpubls.com ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑧𝑡𝑖 = 𝜎(𝑊𝑥𝑧𝑥𝑡𝑖 +𝑊𝑠𝑧𝑠𝑡𝑖−1 + 𝑏𝑧) (36) ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑒𝑡𝑖 = 𝜎(𝑊𝑥𝑒𝑥𝑡𝑖 +𝑊𝑠𝑒𝑠𝑡𝑖−1 + 𝑏𝑒) (37) ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑔𝑡𝑖 = tanh⁡(𝑊𝑥𝑔𝑥𝑡𝑖 +𝑊ℎ𝑔(𝑒𝑡𝑖⊙ ℎ𝑡𝑖−1) + 𝑏𝑔) (38) ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑠𝑡𝑖 = (1− 𝑧𝑡𝑖) ⊙ 𝑠𝑡𝑖−1 + 𝑧𝑡𝑖 ⊙𝑔𝑡𝑖 . (39) where 𝑥𝑡𝑖 is the GRU cell's input at that moment 𝑡𝑖.𝑊𝑥𝑔,𝑊𝑥𝑧 and 𝑊𝑥𝑒 are the input-receiving weight matrices 𝑋𝑡𝑖.𝑊𝑠𝑔,𝑊𝑠𝑒 and 𝑊𝑠𝑧 are the weight matrices with the prior cell state vector as their input. tanh is an activation function for hyperbolic tangents, and 𝜎 is an activation function for sigmoid. 𝑏𝑒 , 𝑏𝑔, and 𝑏𝑧 the bias units. 𝑠𝑡𝑖 is the result at that moment 𝑡𝑖. ⊙ alludes to the Hadamard item [26]. Each GRN cell in a BiRNN computes the hidden state moving forward 𝑠𝑡𝑖−1⃗⃗ ⃗⃗ ⃗⃗ ⃗⃗ and the reverse path 𝑠𝑡𝑖+1⃖⃗ ⃗⃗ ⃗⃗ ⃗⃗ ⃗ As a result, Features that benefit the BiGRU in both directions. The concept of BiRNNs is explained by the following equation. ⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡⁡𝑠𝑡𝑖 = 𝑠𝑡𝑖−1⃗⃗ ⃗⃗ ⃗⃗ ⃗⃗ ⁡⊕⁡𝑠𝑡𝑖+1⃖⃗ ⃗⃗ ⃗⃗ ⃗⃗ ⃗ (40) where ⊕ represents the elementwise sum of the two vectors in the left and right directions. 4. Results and Discussions Experimental Setup Python was utilised in the implementation of the suggested approach. A number of Python libraries were used for preprocessing, cleaning the data, and implementing the model. The scikit-learn library was used to assess the deep learning model after it was put into practice using the Keras library. Rather than utilising a graphics processing unit, it employed the tensor cloud-based Python notebook designed to foster teamwork. Table 1 lists the parameters taken into account when setting up the simulation. Table 1. Configuration parameters for the simulation. Parameters Value Number of nodes 500 Deployment area 500 × 500 Total Clusters 6 Packet size 512 bytes Packet sending rate 1 packet/s Initial energy 0.5J Data testers 55 Performance Metrics Packet Delivery Ratio (PDR): PDR = Number of Packets Received Number of Packets Sent × 100% (41) Packet Delay: Packet Delay = Total time taken for all packets to reach destination Number of Packets Sent (42) Throughput: Throughput = Total amount of datatransferred Total time taken (43) Power Consumption: Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 823 https://internationalpubls.com Power Consumption = Voltage × Current × Time (44) Accuracy: 𝐴𝑐𝑐𝑢𝑟𝑎𝑐𝑦⁡(𝐴𝐶𝐶) = 𝑁𝑜.𝑜𝑓⁡𝑐𝑜𝑟𝑟𝑒𝑐𝑡𝑙𝑦⁡𝑒𝑥𝑝𝑟𝑒𝑠𝑠𝑖𝑜𝑛𝑠 𝑇𝑜𝑡𝑎𝑙⁡𝑛𝑜.𝑜𝑓⁡𝑖𝑚𝑎𝑔𝑒𝑠 × 100 (31) Precision: 𝑝𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛⁡(𝑃𝑅) = 𝑇𝑃 𝑇𝑃+𝐹𝑃 × 100 (32) F1-score: 𝐹1− 𝑠𝑐𝑜𝑟𝑒⁡(𝐹1) = 2 × 𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛×𝑅𝑒𝑐𝑎𝑙𝑙 𝑃𝑟𝑒𝑐𝑖𝑠𝑖𝑜𝑛+𝑅𝑒𝑐𝑎𝑙𝑙 × 100 (33) Recall: 𝑅𝑒𝑐𝑎𝑙𝑙⁡(𝑅𝐶) = 𝑇𝑃 𝑇𝑃+𝐹𝑁 × 100 (34) Specificity: 𝑆𝑝𝑒𝑐𝑖𝑓𝑖𝑐𝑖𝑡𝑦⁡(𝑆𝑃) = 𝑇𝑁 𝑇𝑁+𝐹𝑃 × 100 (35) Clustering Evaluation Table 2-5 shows the performance analysis of the projected KGMO based MRSA with various number of nodes. Table 2: PDR validation Models 100 200 300 400 500 RSA 0.94 0.93 0.92 0.91 0.90 MRSA 0.95 0.94 0.93 0.92 0.91 KGMO 0.97 0.96 0.95 0.94 0.93 Proposed KGMO based MRSA 0.99 0.98 0.97 0.96 0.95 In Table 2 and figure 3, the Packet Delivery Ratio (PDR) validation results for various models across different nodes are presented. The models evaluated include the Reptile Search Algorithm (RSA), which achieved PDR values of 0.94, 0.93, 0.92, 0.91, and 0.90 for nodes of 100, 200, 300, 400, and 500 nodes respectively. The Modified Reptile Search Algorithm (MRSA) exhibited slightly higher PDR values, with measurements of 0.95, 0.94, 0.93, 0.92, and 0.91 for the same respective network sizes. Meanwhile, the Kinetic Gas Molecules Optimization (KGMO) algorithm demonstrated even better performance, yielding PDR values of 0.97, 0.96, 0.95, 0.94, and 0.93. Notably, the proposed approach, leveraging a KGMO based Modified Reptile Search Algorithm, showcased superior PDR values across all nodes, reaching 0.99, 0.98, 0.97, 0.96, and 0.95 correspondingly. These results underscore the efficacy of the proposed method in significantly enhancing packet delivery reliability compared to conventional algorithms. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 824 https://internationalpubls.com Figure 3: PDR analysis of the malicious node detection Table 3: Throughput validation Models 100 200 300 400 500 RSA 0.93 0.93 0.93 0.92 0.92 MRSA 0.94 0.94 0.95 0.93 0.93 KGMO 0.96 0.97 0.96 0.95 0.95 Proposed KGMO based MRSA 0.98 0.98 0.97 0.97 0.97 Table 3 and figure 4 outlines the results of Throughput validation for different models across varying nodes. The models evaluated include the Reptile Search Algorithm (RSA), which achieved Throughput values of 0.93, 0.93, 0.93, 0.92, and 0.92 for nodes of 100, 200, 300, 400, and 500 nodes respectively. The Modified Reptile Search Algorithm (MRSA) showed slightly improved Throughput, with measurements of 0.94, 0.94, 0.95, 0.93, and 0.93 for the same respective nodes. On the other hand, the Kinetic Gas Molecules Optimization (KGMO) algorithm demonstrated even higher Throughput performance, yielding values of 0.96, 0.97, 0.96, 0.95, and 0.95. Notably, the proposed KGMO based MRSA approach exhibited superior Throughput values across all nodes, reaching 0.98, 0.98, 0.97, 0.97, and 0.97 correspondingly. These results highlight the efficacy of the proposed method in enhancing data transfer efficiency compared to conventional algorithms. Figure 4: Throughput analysis Table 4: Packet delay validation Models 100 200 300 400 500 RSA 2.94 4.14 5.19 7.32 8.72 MRSA 1.96 3.62 4.16 5.15 6.11 KGMO 1.25 2.13 3.26 4.24 5.16 Proposed KGMO based MRSA 0.05 1.06 2.12 3.18 4.98 Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 825 https://internationalpubls.com Table 4 and figure 5 displays the results of Packet Delay validation for different models across various nodes. The Reptile Search Algorithm (RSA) yielded Packet Delay values of 2.94, 4.14, 5.19, 7.32, and 8.72 for nodes of 100, 200, 300, 400, and 500 nodes respectively. The Modified Reptile Search Algorithm (MRSA) exhibited improved Packet Delay, with measurements of 1.96, 3.62, 4.16, 5.15, and 6.11 for the corresponding nodes. In comparison, the Kinetic Gas Molecules Optimization (KGMO) algorithm demonstrated even lower Packet Delay, with values of 1.25, 2.13, 3.26, 4.24, and 5.16. Particularly noteworthy is the proposed KGMO based MRSA approach, which significantly reduced Packet Delay across all nodes, achieving values as low as 0.05, 1.06, 2.12, 3.18, and 4.98 correspondingly. These results underscore the effectiveness of the proposed technique in minimizing data transmission delays compared to conventional algorithms. Figure 5: Packet Delay validation Table 5: Power consumption validation Models 100 200 300 400 500 RSA 8.45 9.42 10.21 11.13 11.67 MRSA 7.74 5.52 7.89 7.49 7.56 KGMO 5.43 4.23 3.55 4.25 5.14 Proposed KGMO based MRSA 1.52 1.09 2.32 2.16 3.21 In Table 5 and figure 6, the Power Consumption validation results for different models across various nodes are presented. The Reptile Search Algorithm (RSA) exhibited power consumption values of 8.45, 9.42, 10.21, 11.13, and 11.67 for nodes of 100, 200, 300, 400, and 500 nodes respectively. The Modified Reptile Search Algorithm (MRSA) showed varied power consumption, with measurements of 7.74, 5.52, 7.89, 7.49, and 7.56 for the corresponding nodes. In contrast, the Kinetic Gas Molecules Optimization (KGMO) algorithm demonstrated lower power consumption, with values of 5.43, 4.23, 3.55, 4.25, and 5.14. Particularly notable is the proposed KGMO based MRSA approach, which significantly reduced power consumption across all nodes, achieving values as low as 1.52, 1.09, 2.32, 2.16, and 3.21 respectively. These results highlight the effectiveness of the projected method in minimizing energy usage compared to conventional algorithms, thus contributing to enhanced efficiency and sustainability in wireless sensor networks. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 826 https://internationalpubls.com Figure 6: Power Consumption analysis Classification validation Table 6 presents the malicious node detection validation of the proposed BiRNN classical. Table 6: Attack detection validation using various DL models Models ACC (%) PR (%) RC (%) F1 (%) SP (%) AE 85.22 85.17 85.14 85.12 85.11 DBN 87.54 88.21 82.26 89.53 88.47 ANN 88.38 89.52 87.36 92.23 88.27 RNN 94.1 95.72 95.26 95.23 95.92 Proposed BiRNN model 99.21 99.13 98.02 98.09 98.77 Table 6 and figure 7 summarizes the results of Attack Detection validation using various Deep Learning (DL) models. The models evaluated include Autoencoder (AE), Deep Belief and the proposed Bidirectional Recurrent Neural Network (BiRNN) model. Each model's performance is assessed based on several metrics, including Accuracy (ACC), Precision (PR), Recall (RC), F1-score (F1), and Specificity (SP). The Autoencoder (AE) achieved an accuracy of 85.22% with corresponding precision, recall, F1-score, and specificity values of 85.17%, 85.14%, 85.12%, and 85.11% respectively. The Deep showed an accuracy of 87.54% with precision, recall, F1-score, and specificity values of 88.21%, 82.26%, 89.53%, and 88.47% respectively. The Artificial Neural Network (ANN) exhibited an accuracy of 88.38% with precision, recall, F1-score, and specificity values of 89.52%, 87.36%, 92.23%, and 88.27% respectively. The Recurrent Neural Network (RNN) demonstrated the highest accuracy of 94.1% with precision, recall, F1-score, and specificity values of 95.72%, 95.26%, 95.23%, and 95.92% respectively. Notably, the proposed Bidirectional Recurrent Neural Network (BiRNN) model outperformed all other models with an impressive accuracy of 99.21% and consistently superior capability in accurately detecting attacks in wireless sensor networks. Figure 7: Attack classification analysis of the malicious node Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 827 https://internationalpubls.com 5. Conclusion To sum up, this study tackles the vital issue of security and energy efficiency in wireless sensor networks (WSNs). To ensure optimal routing while minimising energy consumption, the study incorporates various parameters like distance, energy, security, delay, trust evaluation, and RSSI. For cluster head selection, it uses a KGMO-based Modified Reptile Search Algorithm. Furthermore, by figuring out the shortest path, the suggested energy-efficient cross-layer-based expedient routing protocol (E-CERP) dynamically lowers network overhead. Moreover, implementing the BiRNN model makes it easier to identify malicious nodes, improving network security. The suggested approach outperforms current methods in terms of power consumption, delay, throughput, and error estimation, among other extensive assessment metrics. All things measured, this work makes a substantial contribution to the development of safe and energy-efficient routing protocols for WSNs, opening the door to improved network presentation and dependability in a variety of applications. The proposed model exhibited superior performance across various metrics of Packet Delivery Ratio (PDR) of 0.99, Throughput of 0.98, Packet Delay reduced to 0.05, Power Consumption minimized to 1.52, and an impressive Accuracy of 99.21%, indicating its effectiveness in enhancing network efficiency. Future work may explore ensemble DL models, edge computing integration, and adaptive security mechanisms for enhanced attack detection in WSNs. References [1] Mittal, N.; Singh, U.; Salgotra, R. Tree-based threshold-sensitive energy-efficient routing approach for wireless sensor networks.Wirel. Pers. Commun. 2019, 108, 473–492 [2] Gomathi, S., & Gopala Krishnan, C. (2020). Malicious node detection in wireless sensor networks using an efficient secure data aggregation protocol. Wireless Personal Communications, 113, 1775-1790. [3] Ramasamy, L. K., KP, F. K., Imoize, A. L., Ogbebor, J. O., Kadry, S., & Rho, S. (2021). Blockchain-based wireless sensor networks for malicious node detection: A survey. IEEE Access, 9, 128765-128785. [4] Kumar, M., Mukherjee, P., Verma, K., Verma, S., & Rawat, D. B. (2021). Improved deep convolutional neural network based malicious node detection and energy-efficient data transmission in wireless sensor networks. IEEE Transactions on Network Science and Engineering, 9(5), 3272-3281. [5] Yang, H., Zhang, X., & Cheng, F. (2021). A novel algorithm for improving malicious node detection effect in wireless sensor networks. Mobile Networks and Applications, 26, 1564-1573. [6] Gomathy, V., Padhy, N., Samanta, D., Sivaram, M., Jain, V., & Amiri, I. S. (2020). Malicious node detection using heterogeneous cluster based secure routing protocol (HCBS) in wireless adhoc sensor networks. Journal of Ambient Intelligence and Humanized Computing, 11, 4995-5001. [7] Kshirsagar, P. R. (2021). Malicious Node Detection in Adhoc Wireless Sensor Networks Using Secure Trust Protocol. Research Journal of Computer Systems and Engineering, 2(2), 12-16. [8] Morsi, A. M., Barakat, T. M., & Nashaat, A. A. (2020). An efficient and secure malicious node detection model for wireless sensor networks. International Journal of Computer Networks & Communications (IJCNC) Vol, 12. [9] Lai, Y., Tong, L., Liu, J., Wang, Y., Tang, T., Zhao, Z., & Qin, H. (2022). Identifying malicious nodes in wireless sensor networks based on correlation detection. computers & security, 113, 102540. [10] Teng, Z., Pang, B., Du, C., & Li, Z. (2020). Malicious node identification strategy with environmental parameters. IEEE Access, 8, 149522-149530. [11] Ramalingam, V., Mariappan, D. B., Gopal, R., & Baalamurugan, K. M. (2020). An effective social Internet of Things (SIoT) model for malicious node detection in wireless sensor networks. Artificial Intelligence Techniques in IoT Sensor Networks, 181. [12] Rani, K. S. K., & Vijayalakshmi, R. (2021, May). Experimental Evaluations of Malicious Node Detection on Wireless Sensor Network Environment. In 2021 5th International Conference on Intelligent Computing and Control Systems (ICICCS) (pp. 185-191). IEEE. [13] Nouman, M., Qasim, U., Nasir, H., Almasoud, A., Imran, M., & Javaid, N. (2023). Malicious Node Detection Using Machine Learning and Distributed Data Storage Using Blockchain in WSNs. IEEE Access, 11, 6106-6121. [14] Moundounga, A. R. A., Satori, H., Boutazart, Y., & Abderrahim, E. (2023). Malicious attack detection based on continuous Hidden Markov Models in Wireless sensor networks. Microprocessors and Microsystems, 101, 104888. [15] Gebremariam, G. G., Panda, J., & Indu, S. (2023). Blockchain-Based Secure Localization against Malicious Nodes in IoT-Based Wireless Sensor Networks Using Federated Learning. Wireless Communications and Mobile Computing, 2023. Communications on Applied Nonlinear Analysis ISSN: 1074-133X Vol 32 No. 8s (2025) 828 https://internationalpubls.com [16] Ahlawat, P., Singhal, P., Goyal, K., Yadav, K., & Bathla, R. (2022). Malicious Node Detection Using Convolution Technique: Authentication in Wireless Sensor Networks (WSN). In Advances in Malware and Data-Driven Network Security (pp. 94-111). IGI Global. [17] Sharma, T., Mohapatra, A. K., & Tomar, G. (2022). SDBMND: Secure Density-Based Unsupervised Learning Method with Malicious Node Detection to Improve the Network Lifespan in Densely Deployed WSN. Wireless Communications and Mobile Computing, 2022. [18] Ding, J., Wang, H., & Wu, Y. (2022). The detection scheme against selective forwarding of smart malicious nodes with reinforcement learning in wireless sensor networks. IEEE Sensors Journal, 22(13), 13696-13706. [19] Cherappa, V., Thangarajan, T., Meenakshi Sundaram, S. S., Hajjej, F., Munusamy, A. K., & Shanmugam, R. (2023). Energy-Efficient Clustering and Routing Using ASFO and a Cross-Layer-Based Expedient Routing Protocol for Wireless Sensor Networks. Sensors, 23(5), 2788. [20] Gurumoorthy, S., Subhash, P., Pérez de Prado, R., & Wozniak, M. (2022). Optimal Cluster Head Selection in WSN with Convolutional Neural Network-Based Energy Level Prediction. Sensors, 22(24), 9921. [21] Mano, A., & Anand, S. (2023). Local Average Based Kinetic Gas Molecular (LA-KGMO) Optimized MR Brain Image Segmentation Using Modified Self Organizing Map (MSOM). Wireless Personal Communications, 128(4), 2703-2723. [22] Khan, M. K., Zafar, M. H., Rashid, S., Mansoor, M., Moosavi, S. K. R., & Sanfilippo, F. (2023). Improved Reptile Search Optimization Algorithm: Application on Regression and Classification Problems. Applied Sciences, 13(2), 945. [23] Ahakonye, L. A. C., Nwakanma, C. I., Lee, J. M., & Kim, D. S. (2023). Agnostic CH-DT technique for SCADA network high-dimensional data-aware intrusion detection system. IEEE Internet of Things Journal. [24] Alotaibi, M., Alotaibi, B., & Razaque, A. (2021). A multichannel deep learning framework for cyberbullying detection on social media. Electronics, 10(21), 2664. [25] Thirumalraj, A., & Rajesh, T. (2023). An Improved ARO Model for Task Offloading in Vehicular Cloud Computing in VANET. [26] Aruna, T. M., Kumar, P., Srinidhi, N. N., Divyaraj, G. N., Asha, K., Thirumalraj, A., & Naresh, E. (2023). Effective utilisation of Geospatial Data for peer-to-peer communication among autonomous vehicles using Optimized Machine learning algorithm.