Intelligent Fault Detection and Self-Healing Mechanisms in Wireless Sensor Networks Using Machine Learning and Flying Fox Optimization
Abstract
1. Introduction
2. Related Work
3. Methodology
3.1. Dataset Description
3.2. Fault Detection Using LGBM
3.2.1. Model Architecture and Loss Function
3.2.2. Training Strategy and Performance Evaluation
- Accuracy measures the proportion of correct predictions over the total number of forecasts [3]:
- 2.
- Precision evaluates the proportion of correctly identified faults among all instances predicted as faults [3]:
- 3.
- Recall (sensitivity) measures the ability to detect actual faults among all fault instances [3]:
- 4.
- F1-score harmonic mean of precision and recall, providing a balanced measure [3]:
3.2.3. Hyperparameter Tuning and Optimization
- Number of leaves (num_leaves) determines the maximum number of leaves in each tree. A higher value allows for complex decision boundaries but may lead to overfitting.
- Learning rate controls the step size at each iteration of gradient descent. Smaller values result in more robust convergence but require more iterations.
- Maximum depth (max_depth) sets the maximum depth of trees to prevent overfitting.
- Feature fraction (feature_fraction) specifies the proportion of features to consider when building each tree, promoting diversity and reducing overfitting.
- Bagging fraction (bagging_fraction) similar to feature fraction but applied to the training data.
- Minimum data in leaf (min_data_in_leaf) specifies the minimum number of samples required in a leaf node.
3.3. Self-Healing with Flying Fox Optimization Algorithm
3.3.1. Overview of the Algorithm
- “ is the position of the i-th fox at iteration t,”
- “ is the global best solution found so far,”
- “ is the personal best of the i-th fox,”
- “ are learning factors balancing exploration and exploitation,”
- “ are random vectors for stochastic behavior.”
- “: recovery time (to be minimized),”
- “: connectivity ratio (to be maximized),”
- “: residual energy (to be maximized),”
- “: application-dependent weight parameters.”
- Routing Path Reconfiguration: Each fox’s position encodes a candidate routing path for data packets. The dimensionality corresponds to the number of nodes in the network.
- Node Replacement Strategy: Foxes can represent potential replacements for faulty nodes or alternative connections to mitigate link failures.
3.3.2. Objective Function Design
- is the recovery time for the solution represented by (minimized);
- is the connectivity ratio, representing the proportion of nodes successfully reconnected (maximized);
- is the residual energy of the nodes in the network after reconfiguration (maximized);
- represent the weights for each objective, determined based on the application’s priorities.
3.3.3. Implementation Details
Initialization of the Population
Fitness Function Calculation
Exploration and Exploitation Mechanisms
3.4. System Workflow
3.4.1. Fault Detection
3.4.2. Triggering Self-Healing Actions Optimized by FFOA
- Fault Characterization: The system categorizes detected faults (e.g., “Node Down,” “Link Failure”) and identifies their locations within the network. This information serves as the input to the optimization module.
- Problem Representation: The optimization problem is based on the fault type. For example, a “Node Down” fault may require the selection of a replacement node or the rerouting of traffic, while a “Link Failure” fault may involve reconfiguring communication paths. Each potential solution is represented as a position in the FFOA search space.
- Objective Function Evaluation: The FFOA evaluates candidate solutions using the multi-objective function designed to achieve the following goals:
- Minimize recovery time ;
- Maximize network connectivity ;
- Maximize residual energy of the network nodes. As previously defined in Equation (7), the multi-objective function used to evaluate candidate recovery strategies is applied here to guide the optimization process within FFOA. This function simultaneously minimizes recovery time, maximizes connectivity ratio, and enhances residual energy. During the real-time application of self-healing, the same objective function governs the evaluation of candidate solutions.
- Optimization Process: The FFOA iteratively searches for the optimal solution. Foxes in the population explore and exploit the search space, guided by fitness scores computed from the objective function. The algorithm converges with the best solution, representing the most effective self-healing strategy.
- Implementation of Recovery Actions: The optimal recovery actions determined by FFOA are executed in the network. These may include rerouting traffic, replacing faulty nodes, or adjusting transmission power levels to restore connectivity and functionality.
- The LGBM model processes data from the WSN to identify faults in real time.
- Detected faults trigger the self-healing module, which leverages the FFOA to determine and implement recovery actions.
- A feedback loop ensures continuous fault monitoring and system resilience.
4. Experimental Setup
4.1. Hardware and Software Specifications
4.2. Training and Testing Protocol
4.2.1. Cross-Validation for Fault Detection
4.2.2. Benchmarks for Comparison Against Existing Methods
4.2.3. Testing Scenarios for Self-Healing
- Node Failures: Nodes were randomly deactivated to simulate battery depletion or hardware malfunction. The algorithm was required to reroute data using other nodes with a minimum recovery time and without losing any connectivity.
- Communication Breakdowns: The links between some nodes were deleted to simulate environmental interference or signal degradation, which the optimization algorithm should reconnect by changing transmission powers or finding an alternative route.
- Concurrent Faults: Simultaneous node failures and the disruption of links were used to study multi-dimensional fault conditions that involve several recovery strategies.
- Energy-Threshold-Induced Node Failures: Nodes were programmed to fail when battery levels dropped below a dynamically defined threshold, mimicking real-world power depletion patterns under high-load conditions.
- Cascading Faults: Initial failures in critical nodes triggered dependent node and link failures, simulating cascading effects often observed in clustered or hierarchical WSNs.
- Intermittent Link Disruptions: Certain communication links were programmed to degrade periodically due to environmental interference patterns (e.g., sudden humidity spikes), introducing unpredictability in fault timing.
- Simultaneous Multi-Cluster Outages: Entire segments of the network (multi-hop regions) were disabled simultaneously to evaluate the algorithm’s scalability and capacity to reroute across distant, unaffected regions.
5. Results and Discussion
5.1. Fault Detection Results
5.2. Self-Healing Results
- “: population size (number of foxes),”
- “D: dimensionality of the solution space (number of WSN nodes or decision variables),”
- “: number of iterations.”
5.3. Comparative Analysis
5.4. Insights and Challenges
6. Conclusions and Future Work
Author Contributions
Funding
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Akram, M.; Tayyeh, H. Adaptive Multi-Modal Neural Network for Real-Time Threat Detection. J. Cybersecur. Inf. Manag. 2025, 15, 1–10. [Google Scholar] [CrossRef]
- Khan, A.; Mulajkar, R.; Khan, V. A Research on Efficient Spam Detection Technique for Iot Devices Using Machine Learning A Research on Efficient Spam Detection Technique for Iot Devices Using Machine Learning. NeuroQuantology 2023, 18, 625–631. [Google Scholar] [CrossRef]
- Konduru, T.A. Fault Detection and Tolerance in Wireless Sensor Networks: A Study on Reliable Data Transmission Using Machine Learning Algorithms. 2024; preprint. [Google Scholar] [CrossRef]
- Mazibuco, V.A.; Nhung, N.P.; Linh, N.T. Fault detection in wireless sensor networks with deep neural networks. J. Res. Army Sci. Technol. 2023, Special issue No.7, 27–36. [Google Scholar] [CrossRef]
- Fang, J. Artificial intelligence robots based on machine learning and visual algorithms for interactive experience assistance in music classrooms. Entertain. Comput. 2025, 52, 100779. [Google Scholar] [CrossRef]
- Nasser, N. Automated Learning Style Prediction using Weighted Neutrosophic Fuzzy Soft Rough Sets in E-learning Platform. Int. J. Neutrosophic Sci. 2024, 25, 104–116. [Google Scholar] [CrossRef]
- Saeed, M.A.; Rasslan, A.; Emadeldeen, A.I.A.E. Comparative Analysis of Machine Learning Techniques for Fault Detection in Solar Panel Systems. SVU-Int. J. Eng. Sci. Appl. 2024, 5, 140–152. [Google Scholar] [CrossRef]
- Nehete, A.L.; Bankar, D.S.; Asati, R.; Khadse, C.B. Non-contact power system fault diagnosis: A machine learning approach with electromagnetic current sensing. Indones. J. Electr. Eng. Comput. Sci. 2024, 36, 1356–1364. [Google Scholar] [CrossRef]
- Zhang, Y. Comparison of Machine Learning Models and Feature Importance Investigation of Intelligent Fault Diagnosis Methods for Robots. Sci. Technol. Eng. Chem. Environ. Prot. 2024, 1, 3352. [Google Scholar] [CrossRef]
- Feng, J.; Yu, T.; Zhang, K.; Cheng, L. Integration of Multi-Agent Systems and Artificial Intelligence in Self-Healing Subway Power Supply Systems: Advancements in Fault Diagnosis, Isolation, and Recovery. Processes 2025, 13, 1144. [Google Scholar] [CrossRef]
- Quiles-Cucarella, E.; Sánchez-Roca, P.; Agustí-Mercader, I. Performance Optimization of Machine-Learning Algorithms for Fault Detection and Diagnosis in PV Systems. Electronics 2025, 14, 1709. [Google Scholar] [CrossRef]
- Dritsas, E.; Trigka, M. Machine Learning in Information and Communications Technology: A Survey. Information 2025, 16, 8. [Google Scholar] [CrossRef]
- Yilmaz, S.; Dener, M. Security with Wireless Sensor Networks in Smart Grids: A Review. Symmetry 2024, 16, 1295. [Google Scholar] [CrossRef]
- Shyama, M.; Anju, S. Pillai, Alagan Anpalagan, Self-healing and optimal fault tolerant routing in wireless sensor networks using genetical swarm optimization. Comput. Netw. 2022, 217, 109359. [Google Scholar] [CrossRef]
- Kishor, I.; Mamodiya, U.; Agarwal, A.; Bhattacherjee, A. Adaptive Multi-Modal Neural Network for Real-Time Threat Detection. In Deep Learning Innovations for Securing Critical Infrastructures; IGI Global Scientific Publishing: Hershey, PA, USA, 2025. [Google Scholar] [CrossRef]
- Martinez, R.; Alberdi, R.; Fernandez, E.; Albizu, I.; Bedialauneta, T. Improvement of Transmission Line Ampacity Utilization via Machine Learning-Based Dynamic Line Rating Prediction. Electr. Power Syst. Res. 2024, 211, 110931. [Google Scholar] [CrossRef]
- Şenol, A. ImpKmeans: An Improved Version of the K-Means Algorithm, by Determining Optimum Initial Centroids, based on Multivariate Kernel Density Estimation and Kd-Tree. Acta Polytech. Hung. 2024, 21, 111–131. [Google Scholar] [CrossRef]
- Garicano-Mena, J.; Santos, M. Nature–Inspired Metaheuristic Optimization for Control Tuning of Complex Systems. Biomimetics 2025, 10, 13. [Google Scholar] [CrossRef]
- Jeyasri, S. AI-powered fault detection and mitigation in cloud computing infrastructures. World J. Adv. Res. Rev. 2023, 18, 1600–1612. [Google Scholar] [CrossRef]
- Padmasree, R.; Chaithanya, A.S. Fault detection in single-hop and multi-hop wireless sensor networks using a deep learning algorithm. Int. J. Inform. Commun. Technol. 2024, 13, 453–461. [Google Scholar] [CrossRef]
- Takale, D.G.; Mahalle, P.N.; Sule, B. Overview of Fault Diagnosis in Wireless Sensor Network. In Advances in Computer and Electrical Engineering Book Series; IGI Global: Hershey, PA, USA, 2024. [Google Scholar] [CrossRef]
- SP, V.V.R.; Juliet, A.H.; Jayadurga, R.; Sethu, S.; KN, P.; Pandi, V.S. A Novel Method to Identify and Recover the Fault Nodes over 5G Wireless Sensor Network Environment. In Proceedings of the 2024 Asia Pacific Conference on Innovation in Technology (APCIT), Mysore, India, 26–27 July 2024; pp. 1–6. [Google Scholar] [CrossRef]
- Sanjay, P.V.; Prasad, R.; Baghel, R.K. A Comprehensive Review on Fault Detection for Wireless Sensor Networks. In Proceedings of the 2024 IEEE International Students’ Conference on Electrical, Electronics and Computer Science (SCEECS), Bhopal, India, 24–25 February 2024. [Google Scholar] [CrossRef]
- Zhang, Y.; Guo, X. Research on Smart City Road Network Capacity Optimization Configuration Based on Deep Learning Algorithms. Int. J. High-Speed Electron. Syst. 2024, 34, 456–478. [Google Scholar] [CrossRef]
- Gholizadeh, N.; Musílek, P. A Generalized Deep Reinforcement Learning Model for Distribution Network Reconfiguration with Power Flow-Based Action-Space Sampling. Energies 2024, 17, 5187. [Google Scholar] [CrossRef]
- Mokhtari, Y.; Coirault, P.; Moulay, E.; Le Ny, J.; Larraillet, D. Distributed ADMM Approach for Power Distribution Network Reconfiguration. arXiv 2024. [Google Scholar] [CrossRef]
- Jia, T.; Yang, G.; Yao, L. The Low-Carbon Path of Active Distribution Networks: A Two-Stage Model from Day-Ahead Reconfiguration to Real-Time Optimization. Energies 2024, 17, 4989. [Google Scholar] [CrossRef]
- Dehghany, N.; Asghari, R. Multi-objective Optimal Reconfiguration of Distribution Networks Using a Novel Meta-Heuristic Algorithm. Int. J. Electr. Comput. Eng. 2024, 14, 3557–3569. [Google Scholar] [CrossRef]
- Ramachandra, B.; Surekha, T.P. Development and Evaluation of a Network Intrusion Detection System for DDoS Attack Detection Using Machine Learning. Bull. Tek. Elektro Dan Informatika 2024, 13, 4207–4213. [Google Scholar] [CrossRef]
- Zhou, J.; Ren, J.; He, C. Improved Medical Waste Plasma Gasification Modelling Based on Implicit Knowledge-Guided Machine Learning. Waste Manag. 2024, 163, 35–56. [Google Scholar] [CrossRef]
- Venket, K.; Ambica, A.; Freeda, R.A. Meta-Heuristics Algorithm for Computer Communications. In Metaheuristic and Machine Learning Optimization Strategies for Complex Systems; IGI Global: Hershey, PA, USA, 2024. [Google Scholar] [CrossRef]
- Bencheikh, G. Metaheuristics and Machine Learning Convergence. In Advances in Systems Analysis and Software Engineering; IGI Global: Hershey, PA, USA, 2024. [Google Scholar] [CrossRef]
- Li, D.; Xu, P.; Gu, J.; Zhu, Y. A Review of Reliability Research in Regional Integrated Energy Systems: Indicator, Modeling, and Assessment Methods. Buildings 2024, 14, 3428. [Google Scholar] [CrossRef]
- Brandeau, M.L.; Collins, R.; Carter, A.D.S. Research on Network Time Reliability Evaluation Method Based on Uncertainty Theory. J. Appl. Artif. Intell. 2024, 1, 46–62. [Google Scholar] [CrossRef]
- Zhukabayeva, T.; Zholshiyeva, L.; Ven-Tsen, K.; Mardenov, Y.; Adamova, A.; Karabayev, N.; Abdildayeva, A.; Baumuratova, D. Towards Robust Security in WSN: A Comprehensive Analytical Review and Future Research Directions. Indones. J. Electr. Eng. Comput. Sci. 2024, 36, 318–337. [Google Scholar] [CrossRef]
- Cheng, Y.; Petrides, K.V. Evaluating the Predictive Reliability of Neural Networks in Psychological Research with Random Datasets. Educ. Psychol. Meas. 2024, 88, 564–580. [Google Scholar] [CrossRef]
- Singh, K.; Yadav, M.; Singh, Y.; Barak, D. Finding Security Gaps and Vulnerabilities in IoT Devices. In Advances in Environmental Engineering and Green Technologies; IGI Global: Hershey, PA, USA, 2024. [Google Scholar] [CrossRef]
- Zhang, L.; et al. Multi-Layered Machine Learning Framework for Fault Localization in Wireless Mesh Networks. IEEE Trans. Ind. Inform. 2023, 19, 2234–2245. [Google Scholar] [CrossRef]
- Li, J.; Yu, T. Hybrid Deep Learning for Real-Time Fault Detection in Large-Scale Wireless Sensor Networks. IEEE Trans. Netw. Serv. Manag. 2023, 20, 88–102. [Google Scholar] [CrossRef]
- Bhatnagar, R.; Singh, M.; Sahai, A.R. Self-Healing WSNs via Decentralized Reinforcement Learning. Proc. ACM Sen. Syst. 2024, 202–215. [Google Scholar] [CrossRef]
- Dong, S.; Qi, Y. MPDV-HOP: An improved localization algorithm for wireless sensor networks. WSEAS Trans. Commun. 2015, 14, 390–398. [Google Scholar]
- Dong, S.; Zhang, X.; Li, Y. Energy Consumption Model of Wireless Sensor Networks Based on Bang-Bang Optimal Time Control Theory; ResearchGate: Berlin/Heidelberg, Germany, 2015. [Google Scholar]
- Wang, H.; Chen, Y.; Dong, S. Research on efficient routing protocol for WSNs based on improved artificial bee colony algorithm. IET Wirel. Sens. System. 2017, 7, 15–20. [Google Scholar] [CrossRef]
- Dong, S.; Zhang, X.; Zhou, W. A security localization algorithm based on DV-hop against Sybil attack in wireless sensor networks. J. Electr. Eng. Technol. 2020, 15, 919–926. [Google Scholar] [CrossRef]
Model | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) |
---|---|---|---|---|
LGBM | 94.6 | 92.8 | 93.5 | 93.1 |
Random Forest | 90.2 | 88.1 | 89.3 | 88.7 |
SVM | 85.7 | 84.3 | 83.5 | 83.9 |
k-NN | 81.3 | 80.5 | 79.6 | 80.0 |
Algorithm | Average Recovery Time (ms) | Connectivity Ratio (%) | Residual Energy (%) |
---|---|---|---|
FFOA | 120 | 98.5 | 85.2 |
Genetic Algorithm | 160 | 94.7 | 79.4 |
Particle Swarm Optimization | 145 | 96.3 | 82.8 |
System | Detection Accuracy (%) | Recovery Time (ms) | Resilience (%) |
---|---|---|---|
Proposed (LGBM + FFOA) | 94.6 | 120 | 98.5 |
Heuristic (GA + RF) | 90.2 | 160 | 94.7 |
State-of-the-Art (PSO + SVM) | 85.7 | 145 | 96.3 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2025 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Alauthman, A.; Al-Hyari, A. Intelligent Fault Detection and Self-Healing Mechanisms in Wireless Sensor Networks Using Machine Learning and Flying Fox Optimization. Computers 2025, 14, 233. https://doi.org/10.3390/computers14060233
Alauthman A, Al-Hyari A. Intelligent Fault Detection and Self-Healing Mechanisms in Wireless Sensor Networks Using Machine Learning and Flying Fox Optimization. Computers. 2025; 14(6):233. https://doi.org/10.3390/computers14060233
Chicago/Turabian StyleAlauthman, Almamoon, and Abeer Al-Hyari. 2025. "Intelligent Fault Detection and Self-Healing Mechanisms in Wireless Sensor Networks Using Machine Learning and Flying Fox Optimization" Computers 14, no. 6: 233. https://doi.org/10.3390/computers14060233
APA StyleAlauthman, A., & Al-Hyari, A. (2025). Intelligent Fault Detection and Self-Healing Mechanisms in Wireless Sensor Networks Using Machine Learning and Flying Fox Optimization. Computers, 14(6), 233. https://doi.org/10.3390/computers14060233