A comparative evaluation of machine and deep learning models for black hole attack detection in flying ad hoc networks
Imane EL Bahaoui1, Souad Ajjaj2, Hamza Jakha1, Souad EL Houssaini1, Mohammed-Alamine El Houssaini3 and Jamal El Kafi1
Department of Computer Science,Faculty of Sciences, Ibn Tofail University,Kenitra,Morocco2
Higher School of Education and Training,Chouaib Doukkali University,El Jadida,Morocco3
Corresponding Author : Imane EL Bahaoui
Recieved : 09-October-2025; Revised : 14-April-2026; Accepted : 16-April-2026
Abstract
Detecting malicious activities in flying ad hoc networks (FANETs) is critical, as network-layer attacks can disrupt mission-critical communications and compromise fleet security. Machine learning (ML)-based approaches have shown significant potential; however, evaluating their robustness remains challenging due to highly dynamic network topologies and the unique characteristics of aerial communication. The primary objective of this study is to conduct a systematic comparative evaluation of ML models for detecting black hole (BH) routing attacks in ad hoc on-demand distance vector (AODV)-based FANETs. High-fidelity simulation data were generated using Network Simulator 3 (NS-3), incorporating realistic three-dimensional (3D) scenarios with unmanned aerial vehicle (UAV) mobility modeled using the Gauss–Markov algorithm. Three models, random forest (RF), one-dimensional convolutional neural networks (CNNs), and long short-term memory (LSTM) were trained and evaluated using well-defined routing protocol features across varying attacker densities (5%, 10%, and 20%). The evaluation employed a comprehensive, imbalance-aware framework comprising eight performance metrics: accuracy, precision–recall area under the curve (PR-AUC), Matthews correlation coefficient (MCC), precision, recall, F1-score, receiver operating characteristic area under the curve (ROC-AUC), and Cohen’s kappa. The results were validated using rigorous time series cross-validation (TS-CV) and scenario-wise holdout testing. The results demonstrate that LSTM achieved superior performance (98.13% accuracy, 0.896 PR-AUC, 0.835 MCC), followed by RF (96.37%) and CNN (96.31%), with all models enabling early attack detection. Feature analysis revealed interpretable patterns associated with network topology, protocol anomalies, and mobility behavior. These findings establish a transparent and rigorous benchmark for FANET security research, highlighting the effectiveness of early behavioral detection and the importance of comprehensive, imbalance-aware evaluation frameworks for intrusion detection systems (IDS).
Keywords
Flying ad hoc networks (FANETs), Black hole attack detection, Machine learning models, Intrusion detection systems (IDS), NS-3 simulation, UAV communication security.
Cite this article
Bahaoui IE, Ajjaj S, Jakha H, Houssaini SE, Houssaini ME, Kafi JE. A comparative evaluation of machine and deep learning models for black hole attack detection in flying ad hoc networks. International Journal of Advanced Technology and Engineering Exploration. 2026;13(137):566-594. DOI : 10.19101/IJATEE.2025.121221359
