SAH-IDA : An explainable, cryptographically secure stacking-ensemble framework for network intrusion detection in cloud environments — measured performance and honest evaluation
*Pushpendra SharmaCorresponding authorpushpendra0285@yahoo.co.inDepartment of Computer Science & Information TechnologyJanardan Rai Nagar Rajasthan Vidyapeeth (Deemed-to-be University)Udaipur, Rajasthan, 313001, IndiaView full profile → , S. S. Sarangdevotprof.sarangdevot@gmail.comDepartment of Computer Science & Information TechnologyJanardan Rai Nagar Rajasthan Vidyapeeth (Deemed-to-be University)Udaipur, Rajasthan, 313001, IndiaView full profile →
* Corresponding author · click or hover a name for details
- Received:
- 01 May 2026
- Published Online:
- 30 Jun 2026
- Article type:
- Research Article
- Language:
- EN
- Article no.:
- JCMISS-2026-06002
- Pages:
- 11–31
Abstract
This paper describes an independent re-executed, artefact-verified assessment of SAHIDA – the unified intrusion-detection approach that incorporates a stacking ensemble of four learners (Naive Bayes, K-Nearest Neighbours, Logistic Regression, and Linear Discriminant Analysis with a Logistic Regression meta-learner), model-agnostic explainability, and three layers of cryptographic security (TPM-inspired neural key synchronisation, AES-128-CBC encryption, and SHA-256 integrity check) assessed on the NSL-KDD dataset. Every result described herein was obtained directly through re-executing the corresponding code without any assumptions from previous research works. On the officially recommended KDDTrain+/ KDDTest+ data splits, the proposed stacking ensemble demonstrates 77.11% accuracy and 0.568 macro F1-score, outperforming three out of four base learners in the ensemble statistically significantly (McNemar’s test, p<0.001) but not outperforming KNN statistically significantly (χ²=2.78, p=0.095). We demonstrate that reported accuracy is very sensitive to the particular evaluation protocol used: an easier and same-distribution data split of the training dataset results in 99.56% accuracy, while on the officially recommended adversarial data split that includes subtypes of attacks unseen in the training dataset, the accuracy is 77.11%, mostly due to R2L class misclassifications. The six-classifier comparison across the entire secure pipeline does not reveal one classifier superior in terms of accuracy, F1, and AUC, whereas the previously discussed collapse from R2L to Normal is seen in all six classifiers independently, thus pointing to the specific nature of the split itself. The key-synchronisation layer built on top of TPMs converged 100% of the times tested with an average key sync time of 7.27 ms, while the AES/SHA-256 encryption overhead is virtually non-existent (≈0.009–0.035 ms, less than 0.1% of the total pipeline latency). Testing the exact same ensemble trained using the NSL-KDD dataset without retraining it on new data against three additional benchmarks (CICIDS-2017, CIC-DDoS-2019, UNSW-NB15) demonstrates poor generalisation to modern traffic types (accuracy of 61.10%, 26.43%, and 25.07%; macro-AUC on CICIDS-2017 (0.364) falls below random chance, driven by a ranking inversion on the DoS/Normal classes specifically, and only 8 of 44 features could be reconstructed from each external dataset’s native columns, so these numbers reflect a severe feature-availability constraint as much as a generalisation failure).
Keywords
Subject Classifications
References
[1] P. Mell and T. Grance, “The NIST definition of cloud computing,” Natl. Inst. Standards Technol., Gaithersburg, MD, USA, Spec. Publ. 800-145 (Sep. 2011).
[2] A. Khraisat, I. Gondal, P. Vamplew, and J. Kamruzzaman, “Survey of intrusion detection systems: Techniques, datasets and challenges,” Cybersecurity, vol. 2, no. 1, Art. no. 20 (2019).
[3] A. Sperotto, G. Schaffrath, R. Sadre, C. Morariu, A. Pras, and B. Stiller, “An overview of IP flow-based intrusion detection,” IEEE Commun. Surveys Tuts., vol. 12, no. 3, pp. 343–356 (2010).
[4] M. Tavallaee, N. Stakhanova, and A. A. Ghorbani, “Toward credible evaluation of anomaly-based intrusion-detection methods,” IEEE Trans. Syst., Man, Cybern. C, Appl. Rev., vol. 40, no. 5, pp. 516–524 (2010).
[5] P. Garcia-Teodoro, J. Diaz-Verdejo, G. Macia-Fernandez, and E. Vazquez, “Anomaly-based network intrusion detection: Techniques, systems and challenges,” Comput. Secur., vol. 28, nos. 1–2, pp. 18–28 (2009).
[6] M. H. Bhuyan, D. K. Bhattacharyya, and J. K. Kalita, “Network anomaly detection: Methods, systems and tools,” IEEE Commun. Surveys Tuts., vol. 16, no. 1, pp. 303–336 (2014).
[7] R. Sommer and V. Paxson, “Outside the closed world: On using machine learning for network intrusion detection,” in Proc. IEEE Symp. Secur. Privacy, Oakland, CA, USA, pp. 305–316 (May 2010).
[8] J. Gama, I. Žliobaitė, A. Bifet, M. Pechenizkiy, and A. Bouchachia, “A survey on concept drift adaptation,” ACM Comput. Surv., vol. 46, no. 4, Art. no. 44 (2014).
[9] A. Adadi and M. Berrada, “Peeking inside the black-box: A survey on explainable artificial intelligence (XAI),” IEEE Access, vol. 6, pp. 52138–52160 (2018).
[10] Z. C. Lipton, “The mythos of model interpretability,” Queue, vol. 16, no. 3, pp. 31–57 (2018).
[11] M. Gebler, F. Ritter, and S. Müller, “Comparative evaluation of projection-based dimensionality reduction for classification: LDA and QDA on clinical and network security datasets,” Pattern Recognit. Lett., vol. 172, pp. 101–110 (2023).
[12] Z. Liu, W. Zhang, and H. Wang, “Hybrid classifier fusion consistently outperforms single-paradigm models: A large-scale benchmark study on heterogeneous ensembles,” Expert Syst. Appl., vol. 213, Art. no. 118721 (2023).
[13] A. Yulianto, P. Sukarno, and N. A. Suwastika, “Improving AdaBoost-based intrusion detection system (IDS) performance on CIC IDS 2017 dataset,” J. Phys., Conf. Ser., vol. 1192, no. 1, Art. no. 012018 (2019).
[14] L. Breiman, “Bagging predictors,” Mach. Learn., vol. 24, no. 2, pp. 123–140 (1996).
[15] L. Breiman, “Random forests,” Mach. Learn., vol. 45, no. 1, pp. 5–32 (2001).
[16] M. Sharma and S. Sharma, “KNN-DBSCAN: A hybrid density-based nearest-neighbour classification algorithm for high-dimensional structured datasets,” Neural Comput. Appl., vol. 35, no. 15, pp. 11021–11036 (2023).
[17] A. Dadhich and S. Sharma, “Online k-means clustering combined with KNN for real-time network traffic classification and intrusion detection on KDD Cup 1999 dataset,” Comput. Secur., vol. 122, Art. no. 102885 (2022).
[18] S. Revathi and A. Malathi, “A detailed analysis on NSL-KDD dataset using various machine learning techniques for intrusion detection,” Int. J. Eng. Res. Technol., vol. 2, no. 12, pp. 1848–1853 (2013).
[19] V. Arora, S. Tiwari, and R. K. Gupta, “Probabilistic ensemble diversity for text classification: Naive Bayes as an effective baseline in multi-model stacking frameworks,” Expert Syst. Appl., vol. 241, Art. no. 122012 (2025).
[20] M. A. Ferrag, L. Maglaras, A. Ahmim, M. Derdour, and H. Janicke, “RDTIDS: Rules and decision tree-based intrusion detection system for internet-of-things networks,” Future Internet, vol. 12, no. 3, Art. no. 44 (2020).
[21] C. Ting and Y. Li, “Multi-layer secure cloud storage model (MLSCSM): Integration of ChaCha20 encryption, dual-stage data partitioning, k-anonymization, SHA-512 hashing, and Cauchy matrix-based dispersion on MIMIC-III,” J. Cloud Comput., vol. 12, no. 1, pp. 1–18 (2023).
[22] B. Aboshosha, M. El-Morsy, and A. Khalifa, “Blockchain-integrated lightweight hashing for resource-constrained IoT healthcare devices: SHA-256-based collision-resistant integrity verification at scale,” IEEE Internet Things J., vol. 10, no. 14, pp. 12341–12355 (2023).
[23] S. Ramakrishna and A. Shaik, “Comprehensive survey and analysis of cryptographic algorithms for cloud security applications: AES, SHA-256, key management, and integration frameworks,” Int. J. Inf. Secur., vol. 22, no. 5, pp. 1231–1260 (2023).
[24] T. Gnanaprakasam, R. Venkatesan, and M. Arumugam, “Critical unresolved challenges in cloud forensics: Secure logging, key exchange, and threat intelligence sharing across distributed infrastructures,” Digit. Investig., vol. 47, Art. no. 301511 (2023).
[25] C. Anitha, A. Sapatnekar, A. S. Banait, J. L. Amalraj, R. A. Mulla, and M. Pawar, “Network-based anomaly detection in encrypted data streams: A cryptanalysis perspective,” J. Discrete Math. Sci. Cryptogr., vol. 28, no. 5-B, pp. 2115–2124 (2025), doi: 10.47974/JDMSC-2428.
[26] J. Qadir, A. Anwar, and M. Imran, “SHAP-based explanation methods in hybrid AI models for adaptive feedback and cloud-hosted intelligent systems,” IEEE Trans. Learn. Technol., vol. 16, no. 2, pp. 156–170 (2023).
[27] A. Kumar, S. Lim, and M. Park, “SHAP-driven explainability for machine learning-based network intrusion detection in IoT-based industrial systems,” IEEE Internet Things J., vol. 11, no. 8, pp. 13021–13034 (2024).
[28] H. He and E. A. Garcia, “Learning from imbalanced data,” IEEE Trans. Knowl. Data Eng., vol. 21, no. 9, pp. 1263–1284 (2009).
[29] N. V. Chawla, K. W. Bowyer, L. O. Hall, and W. P. Kegelmeyer, “SMOTE: Synthetic minority over-sampling technique,” J. Artif. Intell. Res., vol. 16, pp. 321–357 (2002).
[30] V. Dankan Gowda, K. D. V. Prasad, P. Gite, S. Premkumar, N. Hussain, and V. S. Chinamuttevi, “A novel RF-SMOTE model to enhance the definite apprehensions for IoT security attacks,” J. Discrete Math. Sci. Cryptogr., vol. 26, no. 3, pp. 861–873 (2023), doi: 10.47974/JDMSC-1766.
[31] S. Mishra, H. K. Tripathy, P. K. Mallick, A. K. Bhoi, and P. Barsocchi, “EAGA-MLP—An enhanced and adaptive hybrid classification model for diabetes diagnosis,” Sensors, vol. 20, no. 14, Art. no. 4036 (2020), doi: 10.3390/s20144036.
[32] N. A. M. Alhammadi and M. Mabrouk, “A multi-agent-based deep learning model for protecting cloud computing environment against distributed denial of service flooding attacks,” J. Soft Comput. Data Mining, vol. 6, no. 1, pp. 406–422 (2025).
[33] R. Islam, R. Bose, S. Roy, A. A. Khan, S. Sutradhar, S. Das, F. Ali, and A. A. AlZubi, “Decentralized trust framework for smart cities: A blockchain-enabled cybersecurity and data integrity model,” Sci. Rep., vol. 15, Art. no. 23454 (2025), doi: 10.1038/s41598-025-06405-y.
[34] M. Tavallaee, E. Bagheri, W. Lu, and A. A. Ghorbani, “A detailed analysis of the KDD CUP 99 data set,” in Proc. IEEE Symp. Comput. Intell. Secur. Defense Appl. (CISDA), Ottawa, ON, Canada, pp. 1–6 (Jul. 2009).
[35] D. H. Wolpert, “Stacked generalization,” Neural Netw., vol. 5, no. 2, pp. 241–259 (1992).
[36] C. M. Bishop, Pattern Recognition and Machine Learning. New York, USA: (Springer 2006).
[37] I. Goodfellow, Y. Bengio, and A. Courville, Deep Learning. Cambridge, MA, USA: MIT Press (2016).
[38] F. A. Gers, J. Schmidhuber, and F. Cummins, “Learning to forget: Continual prediction with LSTM,” Neural Comput., vol. 12, no. 10, pp. 2451–2471 (2000).
[39] A. Géron, Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow, 3rd ed. Sebastopol, CA, USA: O’Reilly Media (2022).
[40] S. M. Lundberg and S.-I. Lee, “A unified approach to interpreting model predictions,” in Proc. Adv. Neural Inf. Process. Syst. (NeurIPS), vol. 30, pp. 4765–4774, Long Beach, CA, USA (Dec. 2017).
[41] S. M. Lundberg, G. Erion, H. Chen, A. DeGrave, J. M. Prutkin, B. Nair, R. Katz, J. Himmelfarb, N. Bansal, and S.-I. Lee, “From local explanations to global understanding with explainable AI for trees,” Nat. Mach. Intell., vol. 2, no. 1, pp. 56–67 (2020).
[42] European Commission, “Proposal for a regulation of the European Parliament and of the Council laying down harmonised rules on artificial intelligence (Artificial Intelligence Act),” Brussels, Belgium, Rep. COM(2021) 206 final, (Apr. 2021).
[43] European Parliament and Council, “Regulation (EU) 2024/1689 of the European Parliament and of the Council of 13 June 2024 on artificial intelligence (AI Act),” Off. J. Eur. Union, no. L 1689 (Jul. 2024).
[44] European Parliament and Council, “Regulation (EU) 2016/679 of the European Parliament and of the Council of 27 April 2016 on the protection of natural persons with regard to the processing of personal data (GDPR),” Off. J. Eur. Union, no. L 119, pp. 1–88 (May 2016).
[45] W. Kinzel and I. Kanter, “Interacting neural networks and cryptography,” Adv. Solid State Phys., vol. 42, pp. 383–391 (2002).
[46] M. Ramesh and B. Rama, “Tree parity machine based neural cryptography for secure key generation and exchange in cloud environments,” in Proc. Int. Conf. Adv. Comput., Commun. Informat. (ICACCI), Bangalore, India, pp. 2114–2120 (Sep. 2018).
[47] National Institute of Standards and Technology, “Advanced encryption standard (AES),” Gaithersburg, MD, USA, FIPS 197 (Nov. 2001).
[48] National Institute of Standards and Technology, “Secure hash standard (SHS),” Gaithersburg, MD, USA, FIPS 180-4 (Aug. 2015).
[49] M. Bellare and P. Rogaway, “Introduction to modern cryptography: Symmetric encryption and provable security,” lecture notes, Dept. Comput. Sci. Eng., Univ. California San Diego, San Diego, CA, USA (2005).
[50] T. G. Dietterich, “Approximate statistical tests for comparing supervised classification learning algorithms,” Neural Comput., vol. 10, no. 7, pp. 1895–1923 (1998).
[51] R. Kohavi, “A study of cross-validation and bootstrap for accuracy estimation and model selection,” in Proc. 14th Int. Joint Conf. Artif. Intell. (IJCAI), vol. 2, Montreal, QC, Canada, pp. 1137–1145 (Aug. 1995).
[52] C. Cortes and V. Vapnik, “Support-vector networks,” Mach. Learn., vol. 20, no. 3, pp. 273–297 (1995).
[53] Y. Freund and R. E. Schapire, “A decision-theoretic generalization of on-line learning and an application to boosting,” J. Comput. Syst. Sci., vol. 55, no. 1, pp. 119–139 (1997).
[54] T. Chen and C. Guestrin, “XGBoost: A scalable tree boosting system,” in Proc. 22nd ACM SIGKDD Int. Conf. Knowl. Discovery Data Mining (KDD), San Francisco, CA, USA, pp. 785–794 (Aug. 2016).
[55] T. Fawcett, “An introduction to ROC analysis,” Pattern Recognit. Lett., vol. 27, no. 8, pp. 861–874 (2006).
[56] J. Davis and M. Goadrich, “The relationship between precision-recall and ROC curves,” in Proc. 23rd Int. Conf. Mach. Learn. (ICML), Pittsburgh, PA, USA, pp. 233–240 (Jun. 2006).
[57] I. Sharafaldin, A. H. Lashkari, S. Hakak, and A. A. Ghorbani, “Developing realistic distributed denial of service (DDoS) attack dataset and taxonomy,” in Proc. Int. Carnahan Conf. Secur. Technol. (ICCST), Chennai, India, pp. 1–8 (Oct. 2019).
[58] N. Moustafa and J. Slay, “UNSW-NB15: A comprehensive data set for network intrusion detection systems,” in Proc. Mil. Commun. Inf. Syst. Conf. (MilCIS), Canberra, ACT, Australia, pp. 1–6 (Nov. 2015).
[59] M. Alhammadi and N. Mabrouk, “Adversarial robustness of tree parity machine neural synchronization against geometric, majority, and genetic algorithm attacks in DDoS-protected cloud environments,” J. Netw. Comput. Appl., vol. 221, Art. no. 103781 (2024).
[60] National Institute of Standards and Technology, “Module-lattice-based key-encapsulation mechanism standard (ML-KEM),” Gaithersburg, MD, USA, FIPS 203 (Aug. 2024).


