Intrusion Detection In Computer Networks Using A Hybrid CNN-BiLSTM Network

Document Type : Research Article

Authors

Department of Computer Engineering, Faculty of Engineering and Technology, Shahid Ashrafi Esfahani University, Isfahan, Iran.

Abstract

Intrusion Detection Systems (IDS) are critical for securing computer networks by identifying and analyzing unauthorized or abnormal activities, thereby preventing cyberattacks. Due to the increasing complexity and volume of network data, there is a growing demand for advanced and efficient data analysis methods. This study proposes a hybrid deep learning model combining Convolutional Neural Networks (CNN) and Bidirectional Long Short-Term Memory (BiLSTM) networks to enhance the accuracy and robustness of intrusion detection. Initially, CNNs are employed to extract spatial features from raw network traffic data. These features are then processed by a BiLSTM network to capture temporal dependencies and contextual relationships. To further improve classification performance, three machine learning classifiers-k-Nearest Neighbors (k-NN), Decision Tree, and Support Vector Machine (SVM) are trained on the extracted features, and their outputs are integrated using a weighted voting ensemble method. The proposed model is evaluated using the NSL-KDD dataset, achieving an accuracy of 99% in binary classification and 99.12\% in multi-class classification. The results demonstrate the effectiveness of the CNN–BiLSTM hybrid approach in accurately detecting both known and complex attack patterns in network traffic.

Keywords

Main Subjects


[1] Zeeshan Ahmad and Adnan Shahid Khan and Cheah Wai Shiang and Johari Abdullah and Farhan Ahmad. Network intrusion detection system: {A} systematic study of machine learning and deep learning approaches. Transactions on Emerging Telecommunications Technologies. 32(1): e4150, 2021. [DOI ]
[2] Abdul Razaque Khan and Muhammad Kashif and Rizwan Haider Jhaveri and Radhakrishnan Raut and Taufiq Saba and Saad Ahmed Bahaj. Deep learning for intrusion detection and security of {Internet of things (IoT)}: current analysis, challenges, and possible solutions. Security and Communication Networks. 2022: 4016073, 2022. [DOI ]
[3] Zina Chkirbene and Afif Erbad and Ridha Hamila and Ala Mohamed and Mohsen Guizani and Mounir Hamdi. {TIDCS}: {A} dynamic intrusion detection and classification system based feature selection. {IEEE} Access. 8: 95864--95877, 2020. [DOI ]
[4] Ke Jiang and Wen Wang and Aili Wang and Haibin Wu. Network intrusion detection combined hybrid sampling with deep hierarchical network. {IEEE} Access. 8: 32464--32476, 2020. [DOI ]
[5] T. Saranya and S. Sridevi and C. Deisy and T. D. Chung and M. A. Khan. Performance analysis of machine learning algorithms in intrusion detection system: {A} review. Procedia Computer Science. 171: 1251--1260, 2020. [DOI ]
[6] R. B. Said and Z. Sabir and I. Askerzade. {CNN-BiLSTM}: a hybrid deep learning approach for network intrusion detection system in software-defined networking with hybrid feature selection. {IEEE} Access. 11: 138732--138747, 2023. [DOI ]
[7] Ayesha S. Dina and D. Manivannan. Intrusion detection based on machine learning techniques in computer networks. Internet of Things. 16: 100462, 2021. [DOI ]
[8] Fadi Salo and Mohammad Injadat and Ali Bou Nassif and Aleksander Essex. Data mining with big data in intrusion detection systems: {A} systematic literature review. 2020.
[9] Jiyeon Kim and Jiwon Kim and Hyunjung Kim and Minsu Shim and Euiseok Choi. {CNN}-based network intrusion detection against denial-of-service attacks. Electronics. 9(6): 916, 2020. [DOI ]
[10] Sima Siami-Namini and Neda Tavakoli and Akbar Siami Namin. The performance of {LSTM} and {BiLSTM} in forecasting time series. {IEEE} International Conference on Big Data (Big Data). 3285--3292, 2019. [DOI ]
[11] Ankit Thakkar and Ritika Lohiya. Fusion of statistical importance for feature selection in Deep Neural Network-based Intrusion Detection System. Information Fusion. 90: 353--363, 2023. [DOI ]
[12] Sydney M. Kasongo. A deep learning technique for intrusion detection system using a Recurrent Neural Networks based framework. Computer Communications. 199: 113--125, 2023. [DOI ]
[13] Jian-Cheng Huang and Guo-Qiang Zeng and Geng-Geng Geng and Jian Weng and Ke-Di Lu and Yi Zhang. Differential evolution-based convolutional neural networks: An automatic architecture design method for intrusion detection in industrial control systems. Computers \& Security. 132: 103310, 2023. [DOI ]
[14] M. Meena and R. K. Tiwari. Optimum Analysis of Imbalanced Network for Intrusion Detection using {LSTM} Convolution Technique. 2nd International Conference on Applied Artificial Intelligence and Computing ({ICAAIC}). 1275--1279, {IEEE}. 2023.
[15] R. V. Mendon{\c{c}}a and J. C. Silva and R. L. Rosa and M. Saadi and D. Z. Rodriguez and A. Farouk. A lightweight intelligent intrusion detection system for industrial internet of things using deep learning algorithms. Expert Systems. 39(5): e12917, 2022. [DOI ]
[16] A. Imanbayev and others. Research of machine learning algorithms for the development of intrusion detection systems in 5{G} mobile networks and beyond. Sensors. 22(24): 9957, 2022. [DOI ]
[17] Ahmad Halbouni and Ts. Gunawan and M. H. Habaebi and M. Halbouni and M. Kartiwi and R. Ahmad. {CNN-LSTM}: hybrid deep neural network for network intrusion detection system. {IEEE} Access. 10: 99837--99849, 2022. [DOI ]
[18] Muhammad Azmi Umer and Khurum Nazir Junejo and Muhammad Taha Jilani and Aditya P. Mathur. Machine learning for intrusion detection in industrial control systems: Applications, challenges, and recommendations. International Journal of Critical Infrastructure Protection. 38: 100516, 2022. [DOI ]
[19] Mohammed A. Almaiah and others. Performance investigation of principal component analysis for intrusion detection system using different support vector machine kernels. Electronics. 11(21): 3571, 2022. [DOI ]
[20] Zahid Halim and others. An effective genetic algorithm-based feature selection method for intrusion detection systems. Computers \& Security. 110: 102448, 2021. [DOI ]
[21] Ankit Thakkar and Ritika Lohiya. Role of swarm and evolutionary algorithms for intrusion detection system: {A} survey. Swarm and Evolutionary Computation. 53: 100631, 2020. [DOI ]
[22] R. Vinayakumar and Mamoun Alazab and K. P. Soman and Prabaharan Poornachandran and Ameer Al-Nemrat and S. Venkatraman. Deep learning approach for intelligent intrusion detection system. {IEEE} Access. 7: 41525--41550, 2019. [DOI ]
[23] Mohammad Mehedi Hassan and Abdu Gumaei and Ahmed Alsanad and Mohammad Alrubaian and Giancarlo Fortino. A hybrid deep learning model for efficient intrusion detection in big data environment. Information Sciences. 513: 386--396, 2020. [DOI ]
[24] Chunhui Zhang and Jing Li and Ning Wang and Dong Zhang. Research on Intrusion Detection Method Based on Transformer and {CNN-BiLSTM} in Internet of Things. Sensors. 25(9): 2725, 2025.
[25] Sukhvinder Singh Bamber and A. V. R. Katkuri and S. Sharma and M. Angurala. A hybrid {CNN-LSTM} approach for intelligent cyber intrusion detection system. Computers \& Security. 148: 104146, 2025. [DOI ]