A Distributed Generative–Probabilistic Framework for Scalable Intrusion Detection in Smart Farming IoT Networks
Downloads
Smart farming environments rely heavily on interconnected IoT–fog–cloud infrastructures, making them increasingly vulnerable to sophisticated cyber threats. The objective of this study is to develop a robust, scalable, and interpretable intrusion detection framework tailored for heterogeneous and resource-constrained agricultural IoT systems. The proposed method integrates a multi-stage generative–probabilistic pipeline: Principal Component Analysis (PCA) and Isolation Forest (iForest) operate at the fog layer for lightweight dimensionality reduction and early anomaly isolation, while the cloud layer employs an Intrusion Detection System Generative Adversarial Network (IDSGAN) model for advanced adversarial feature learning and Gaussian Mixture Models (GMM) for probabilistic attack-type clustering. Experimental analysis conducted on CIC IoT 2023 and CIC DIAD IoT 2024 datasets demonstrates strong detection performance, achieving Accuracy between 98.47–99.15%, F1-scores up to 0.996, and AUC values of 0.981–0.987, outperforming baseline IDS models. Clustering metrics including Silhouette (99.01%), ARI (98.97%), and NMI (98.91%) confirm highly coherent attack-grouping across major categories such as DDoS, Mirai, Spoofing, and Web-based intrusions. The novelty of this work lies in its distributed architecture combining edge-efficient processing with cloud-level generative learning, enabling low-latency, high-throughput, and interpretable detection suitable for real-world smart farming ecosystems. This framework thus offers a scalable and high-performing solution for securing agricultural IoT infrastructures.
Downloads
[1] Alsaleh, S. S., El Bachir Menai, M., & Al-Ahmadi, S. (2024). Federated Learning-Based Model to Lightweight IDSs for Heterogeneous IoT Networks: State-of-the-Art, Challenges, and Future Directions. IEEE Access, 12, 134256–134272. doi:10.1109/ACCESS.2024.3460468.
[2] Zolghadri, M., Asghari, P., Dashti, S. E., & Hedayati, A. (2025). Dynamic task offloading for IoT-Fog-Cloud systems: a network traffic-aware decision tree approach. Computing, 107(4), 94. doi:10.1007/s00607-025-01449-4.
[3] Mohy-eddine, M., Guezzaz, A., Benkirane, S., & Azrour, M. (2024). Malicious detection model with artificial neural network in IoT-based smart farming security. Cluster Computing, 27(6), 7307–7322. doi:10.1007/s10586-024-04334-5.
[4] Pal, B., Islam, M. S., & Liew, A. W. C. (2025). Calibrated Uncertainty Estimation for Trustworthy Deep IoT Attack Detection. IEEE Transactions on Dependable and Secure Computing, 22(6), 7571–7584. doi:10.1109/TDSC.2025.3598350.
[5] GabAllah, N., Farrag, I., Khalil, R., Sharara, H., & ElBatt, T. (2023). IoT systems with multi-tier, distributed intelligence: From architecture to prototype. Pervasive and Mobile Computing, 93. doi:10.1016/j.pmcj.2023.101818.
[6] Sagar, A. S. M. S., Islam, M. Z., Haider, A., & Kim, H. S. (2024). Uncertainty-Aware Federated Reinforcement Learning for Optimizing Accuracy and Energy in Heterogeneous Industrial IoT. Applied Sciences (Switzerland), 14(18), 8299. doi:10.3390/app14188299.
[7] Ferreira, R., Bispo, I., Rabadão, C., Santos, L., & Costa, R. L. de C. (2025). Farm-flow dataset: Intrusion detection in smart agriculture based on network flows. Computers and Electrical Engineering, 121, 109892. doi:10.1016/j.compeleceng.2024.109892.
[8] Talpini, J., Sartori, F., & Savi, M. (2024). Enhancing trustworthiness in ML-based network intrusion detection with uncertainty quantification. Journal of Reliable Intelligent Environments, 10(4), 501–520. doi:10.1007/s40860-024-00238-8.
[9] Chakravarthy, V., Bell, D., & Bhaskaran, S. (2025). Emergent Intrusion Detection System for Fog Enabled Smart Agriculture Using Federated Learning and Blockchain Technology: A Review. 2nd International Conference on IT Innovations and Knowledge Discovery, ITIKD 2024, 1–7. doi:10.1109/ITIKD63574.2025.11005327.
[10] Srichandan, S. K., Majhi, S. K., Jena, S., Mishra, K., & Bhat, R. (2024). A Secure and Distributed Placement for Quality of Service-Aware IoT Requests in Fog-Cloud of Things: A Novel Joint Algorithmic Approach. IEEE Access, 12, 56730–56748. doi:10.1109/ACCESS.2024.3390723.
[11] Khan, J., Elfakharany, R., Saleem, H., Pathan, M., Shahzad, E., Dhou, S., & Aloul, F. (2025). Can Machine Learning Enhance Intrusion Detection to Safeguard Smart City Networks from Multi-Step Cyberattacks? Smart Cities, 8(1), 13. doi:10.3390/smartcities8010013.
[12] Logeswari, G., Deepika Roselind, J., Tamilarasi, K., & Nivethitha, V. (2025). A Comprehensive Approach to Intrusion Detection in IoT Environments Using Hybrid Feature Selection and Multi-Stage Classification Techniques. IEEE Access, 13, 24970–24987. doi:10.1109/ACCESS.2025.3532895.
[13] Benameur, R., & Dahane, A. (2025). Sfedrl-ids: secure federated deep reinforcement learning-based intrusion detection system for agricultural internet of things. Cluster Computing, 28(6), 403. doi:10.1007/s10586-024-05091-1.
[14] Yang, Y. M., Chang, K. C., & Luo, J. N. (2025). Hybrid Neural Network-Based Intrusion Detection System: Leveraging LightGBM and MobileNetV2 for IoT Security. Symmetry, 17(3), 314. doi:10.3390/sym17030314.
[15] Rahman, S., Pal, S., Mittal, S., Chawla, T., & Karmakar, C. (2024). SYN-GAN: A robust intrusion detection system using GAN-based synthetic data for IoT security. Internet of Things (Netherlands), 26. doi:10.1016/j.iot.2024.101212.
[16] Chatterjee, S., Shaw, V., & Das, R. (2024). Multi-stage intrusion detection system aided by grey wolf optimization algorithm. Cluster Computing, 27(3), 3819–3836. doi:10.1007/s10586-023-04179-4.
[17] Ileri, K. (2025). A hybrid feature selection method for anomaly detection using shallow and deep ANN classifiers in smart farming. Journal of Ambient Intelligence and Smart Environments, 18761364251359885. doi:10.1177/18761364251359885.
[18] Zidi, K., Ben Abdellafou, K., Aljuhani, A., Taouali, O., & Harkat, M. F. (2024). Novel intrusion detection system based on a downsized kernel method for cybersecurity in smart agriculture. Engineering Applications of Artificial Intelligence, 133. doi:10.1016/j.engappai.2024.108579.
[19] Aburasain, R. Y. (2024). Enhanced Black Widow Optimization With Hybrid Deep Learning Enabled Intrusion Detection in Internet of Things-Based Smart Farming. IEEE Access, 12, 16621–16631. doi:10.1109/ACCESS.2024.3359043.
[20] Ling, J., Zhang, L., Liu, C., Xia, G., & Zhang, Z. (2025). Machine Learning-Based Multilevel Intrusion Detection Approach. Electronics (Switzerland), 14(2), 323. doi:10.3390/electronics14020323.
[21] Polat, O., Türkoğlu, M., Polat, H., Oyucu, S., Üzen, H., Yardımcı, F., & Aksöz, A. (2024). Multi-Stage Learning Framework Using Convolutional Neural Network and Decision Tree-Based Classification for Detection of DDoS Pandemic Attacks in SDN-Based SCADA Systems. Sensors, 24(3), 1040. doi:10.3390/s24031040.
[22] Alsagri, H. S. (2025). Hybrid Machine Learning-Based Multi-Stage Framework for Detection of Credit Card Anomalies and Fraud. IEEE Access, 13, 77039–77048. doi:10.1109/ACCESS.2025.3565612.
[23] Praharaj, L., Gupta, D., & Gupta, M. (2025). Efficient federated transfer learning-based network anomaly detection for cooperative smart farming infrastructure. Smart Agricultural Technology, 10. doi:10.1016/j.atech.2024.100727.
[24] Althunayyan, M., Javed, A., & Rana, O. (2024). A robust multi-stage intrusion detection system for in-vehicle network security using hierarchical federated learning. Vehicular Communications, 49. doi:10.1016/j.vehcom.2024.100837.
[25] Poongodi, M., & Hamdi, M. (2023). Intrusion detection system using distributed multilevel discriminator in GAN for IoT system. Transactions on Emerging Telecommunications Technologies, 34(11), e4815. doi:10.1002/ett.4815.
[26] Yang, Y., Liu, X., Wang, D., Sui, Q., Yang, C., Li, H., Li, Y., & Luan, T. (2025). A CE-GAN based approach to address data imbalance in network intrusion detection systems. Scientific Reports, 15(1), 7916. doi:10.1038/s41598-025-90815-5.
[27] Siddique, M. S., Khan, M. A. R., Ahammad, I., Nath, N., Das, J. R., & Rahman, F. (2025). An intelligent intrusion detection system for cyber-physical systems using GAN-LSTM networks. Franklin Open, 11. doi:10.1016/j.fraope.2025.100281.
[28] Aldossary, M., Alharbi, H. A., & Anwar Ul Hassan, C. (2024). Internet of Things (IoT)-Enabled Machine Learning Models for Efficient Monitoring of Smart Agriculture. IEEE Access, 12, 75718–75734. doi:10.1109/ACCESS.2024.3404651.
[29] Mohamed, D., & Ismael, O. (2023). Enhancement of an IoT hybrid intrusion detection system based on fog-to-cloud computing. Journal of Cloud Computing, 12(1), 41. doi:10.1186/s13677-023-00420-y.
[30] Tariq, N., Alsirhani, A., Humayun, M., Alserhani, F., & Shaheen, M. (2024). A fog-edge-enabled intrusion detection system for smart grids. Journal of Cloud Computing, 13(1), 43. doi:10.1186/s13677-024-00609-9.
[31] Tawfik, M. (2024). Optimized intrusion detection in IoT and fog computing using ensemble learning and advanced feature selection. PLoS ONE, 19(8 August), 304082. doi:10.1371/journal.pone.0304082.
[32] Aldhaheri, S., & Alhuzali, A. (2023). SGAN-IDS: Self-Attention-Based Generative Adversarial Network against Intrusion Detection Systems. Sensors, 23(18), 7796. doi:10.3390/s23187796.
[33] Sajid, M., Malik, K. R., Almogren, A., Malik, T. S., Khan, A. H., Tanveer, J., & Rehman, A. U. (2024). Enhancing intrusion detection: a hybrid machine and deep learning approach. Journal of Cloud Computing, 13(1), 685. doi:10.1186/s13677-024-00685-x.
[34] Alotaibi, S. D., Yadav, K., Aledaily, A. N., Alkwai, L. M., Yousef Dafhalla, A. K., Almansour, S., & Lingamuthu, V. (2022). Deep Neural Network-Based Intrusion Detection System through PCA. Mathematical Problems in Engineering, 2022(1), 6488571. doi:10.1155/2022/6488571.
[35] Elsaid, S. A., & Binbusayyis, A. (2024). An optimized isolation forest based intrusion detection system for heterogeneous and streaming data in the industrial Internet of Things (IIoT) networks. Discover Applied Sciences, 6(9), 6165. doi:10.1007/s42452-024-06165-w.
[36] De Araujo-Filho, P. F., Naili, M., Kaddoum, G., Fapi, E. T., & Zhu, Z. (2023). Unsupervised GAN-Based Intrusion Detection System Using Temporal Convolutional Networks and Self-Attention. IEEE Transactions on Network and Service Management, 20(4), 4951–4963. doi:10.1109/TNSM.2023.3260039.
[37] Liu, L., & Xu, M. (2025). A network intrusion detection method based on contrastive learning and Bayesian Gaussian Mixture Model. Cybersecurity, 8(1), 3647. doi:10.1186/s42400-025-00364-7.
[38] Wang, Q., Wang, W., Wang, Y., Ren, J., & Zhang, B. (2025). Multi-Stage Network Attack Detection Algorithm Based on Gaussian Mixture Hidden Markov Model and Transfer Learning. IEEE Transactions on Automation Science and Engineering, 22, 3470–3484. doi:10.1109/TASE.2024.3395355.
[39] Neto, E. C. P., Dadkhah, S., Ferreira, R., Zohourian, A., Lu, R., & Ghorbani, A. A. (2023). CICIoT2023: A Real-Time Dataset and Benchmark for Large-Scale Attacks in IoT Environment. Sensors, 23(13), 5941. doi:10.3390/s23135941.
[40] Rabbani, M., Gui, J., Nejati, F., Zhou, Z., Kaniyamattam, A., Mirani, M., Piya, G., Opushnyev, I., Lu, R., & Ghorbani, A. A. (2025). Device Identification and Anomaly Detection in IoT Environments. IEEE Internet of Things Journal, 12(10), 13625–13643. doi:10.1109/JIOT.2024.3522863.
- The authors retain all copyrights. It is noticeable that authors will not be forced to sign any copyright transfer agreements.
- This work (including HTML and PDF Files) is licensed under a Creative Commons Attribution 4.0 International License.















