Comparative Study of Transformer-based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset
Abstract
Network intrusion detection systems (NIDS) are critical for protecting modern network infrastructures from sophisticated cyber threats. This study presents a comprehensive comparative analysis of two advanced deep learning architectures: a pure Transformer-based model and a hybrid Convolutional Neural Network-Long Short-Term Memory (CNN-LSTM) model for multi-class intrusion detection. Using the preprocessed and balanced CSE-CIC-IDS 2018 dataset (Version 1, 2024), we evaluate both models across multiple performance metrics. The dataset underwent rigorous preprocessing including duplicate removal, feature engineering, and two-stage resampling (Random Undersampling and SMOTE) to address class imbalance. Our experimental results demonstrate that the Transformer model achieves 99.42% accuracy with a ROC-AUC of 99.58%, while the CNN-LSTM hybrid model achieves 99.18% accuracy with a ROC-AUC of 99.35%. The Transformer architecture excels in capturing long-range dependencies and parallel processing, while CNN-LSTM effectively combines spatial feature extraction with temporal sequence learning. Both models demonstrate superior performance in detecting minority attack classes compared to traditional approaches. This study provides insights into architectural trade-offs between self-attention mechanisms and recurrent-convolutional hybrids, offering practical guidance for implementing robust intrusion detection systems.
Keywords
References
- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., & Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems (Vol. 30).
- Yang, K., Wang, J., & Li, M. (2024). An enhanced IIoT intrusion detection method using BiGRU, attention, and Inception-CNN with hybrid sampling and feature selection. Scientific Reports, 14, 19339. https://doi.org/10.1038/s41598-024-70493-z
- Song, Y., Luktarhan, N., Shi, Z., & Wu, H. (2023). TGA: A novel network intrusion detection method based on TCN, BiGRU and attention mechanism. Electronics, 12(13), 2881. https://doi.org/10.3390/electronics12132881
- Wang, Y. C., Houng, Y. C., Chen, H. X., & Tseng, S. M. (2023). Network anomaly intrusion detection based on deep learning approach. Sensors, 23(4), 2171. https://doi.org/10.3390/s23042171
- Guo, D., & Xie, Y. (2025). Research on network intrusion detection model based on hybrid sampling and deep learning. Sensors, 25(5), 1578. https://doi.org/10.3390/s25051578
- Aljabri, J. (2025). Attack-resilient IoT security framework using multi-head attention-based representation learning with improved white shark optimization algorithm. Scientific Reports, 15(1), 14255. https://doi.org/10.1038/s41598-025-86024-4
- Imrana, Y., Xiang, Y., Ali, L., Noor, A., Sarpong, K., & Abdullah, M. A. (2024). CNN-GRU-FF: A double-layer feature fusion-based network intrusion detection system using convolutional neural network and gated recurrent units. Complex & Intelligent Systems, 10(3), 3353–3370. https://doi.org/10.1007/s40747-023-01316-6
- Han, J., & Pak, W. (2023). Hierarchical LSTM-based network intrusion detection system using hybrid classification. Applied Sciences, 13(5), 3089. https://doi.org/10.3390/app13053089
Details
Primary Language
English
Subjects
Computer System Software
Journal Section
Research Article
Authors
Publication Date
July 6, 2026
Submission Date
December 30, 2025
Acceptance Date
June 2, 2026
Published in Issue
Year 2026 Volume: 10 Number: 3
APA
Palani, S., S, P., Durairaj, P., Praveen S, L., & Victor, S. (2026). Comparative Study of Transformer-based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset. Turkish Journal of Engineering, 10(3), 1203-1219. https://doi.org/10.31127/tuje.1843251
AMA
1.Palani S, S P, Durairaj P, Praveen S L, Victor S. Comparative Study of Transformer-based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset. TUJE. 2026;10(3):1203-1219. doi:10.31127/tuje.1843251
Chicago
Palani, Sarangapani, Praveenkumar S, Prakash Durairaj, Louies Praveen S, and Sharun Victor. 2026. “Comparative Study of Transformer-Based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset”. Turkish Journal of Engineering 10 (3): 1203-19. https://doi.org/10.31127/tuje.1843251.
EndNote
Palani S, S P, Durairaj P, Praveen S L, Victor S (July 1, 2026) Comparative Study of Transformer-based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset. Turkish Journal of Engineering 10 3 1203–1219.
IEEE
[1]S. Palani, P. S, P. Durairaj, L. Praveen S, and S. Victor, “Comparative Study of Transformer-based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset”, TUJE, vol. 10, no. 3, pp. 1203–1219, July 2026, doi: 10.31127/tuje.1843251.
ISNAD
Palani, Sarangapani - S, Praveenkumar - Durairaj, Prakash - Praveen S, Louies - Victor, Sharun. “Comparative Study of Transformer-Based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset”. Turkish Journal of Engineering 10/3 (July 1, 2026): 1203-1219. https://doi.org/10.31127/tuje.1843251.
JAMA
1.Palani S, S P, Durairaj P, Praveen S L, Victor S. Comparative Study of Transformer-based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset. TUJE. 2026;10:1203–1219.
MLA
Palani, Sarangapani, et al. “Comparative Study of Transformer-Based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset”. Turkish Journal of Engineering, vol. 10, no. 3, July 2026, pp. 1203-19, doi:10.31127/tuje.1843251.
Vancouver
1.Sarangapani Palani, Praveenkumar S, Prakash Durairaj, Louies Praveen S, Sharun Victor. Comparative Study of Transformer-based Architecture and CNN-LSTM Hybrid Model for Network Intrusion Detection Using CSE-CIC-IDS 2018 Dataset. TUJE. 2026 Jul. 1;10(3):1203-19. doi:10.31127/tuje.1843251