Open Access iconOpen Access

ARTICLE

crossmark

A Two-Layer Network Intrusion Detection Method Incorporating LSTM and Stacking Ensemble Learning

Jun Wang1,2, Chaoren Ge1,2, Yihong Li1,2, Huimin Zhao1,2, Qiang Fu1,2,*, Kerang Cao1,2, Hoekyung Jung3,*

1 College of Computer Science and Technology, Shenyang University of Chemical Technology, Shenyang, 110142, China
2 Key Laboratory of Intelligent Technology for Chemical Process Industry of Liaoning Province, Shenyang, 110142, China
3 Computer Engineering Department, Paichai University, Daejeon, 35345, Republic of Korea

* Corresponding Authors: Hoekyung Jung. Email: email; Qiang Fu. Email: email

Computers, Materials & Continua 2025, 83(3), 5129-5153. https://doi.org/10.32604/cmc.2025.062094

Abstract

Network Intrusion Detection System (NIDS) detection of minority class attacks is always a difficult task when dealing with attacks in complex network environments. To improve the detection capability of minority-class attacks, this study proposes an intrusion detection method based on a two-layer structure. The first layer employs a CNN-BiLSTM model incorporating an attention mechanism to classify network traffic into normal traffic, majority class attacks, and merged minority class attacks. The second layer further segments the minority class attacks through Stacking ensemble learning. The datasets are selected from the generic network dataset CIC-IDS2017, NSL-KDD, and the industrial network dataset Mississippi Gas Pipeline dataset to enhance the generalization and practical applicability of the model. Experimental results show that the proposed model achieves an overall detection accuracy of 99%, 99%, and 95% on the CIC-IDS2017, NSL-KDD, and industrial network datasets, respectively. It also significantly outperforms traditional methods in terms of detection accuracy and recall rate for minority class attacks. Compared with the single-layer deep learning model, the two-layer structure effectively reduces the false alarm rate while improving the minority-class attack detection performance. The research in this paper not only improves the adaptability of NIDS to complex network environments but also provides a new solution for minority-class attack detection in industrial network security.

Keywords

Two-layer architecture; minority class attack; stacking ensemble learning; network intrusion detection

Cite This Article

APA Style
Wang, J., Ge, C., Li, Y., Zhao, H., Fu, Q. et al. (2025). A Two-Layer Network Intrusion Detection Method Incorporating LSTM and Stacking Ensemble Learning. Computers, Materials & Continua, 83(3), 5129–5153. https://doi.org/10.32604/cmc.2025.062094
Vancouver Style
Wang J, Ge C, Li Y, Zhao H, Fu Q, Cao K, et al. A Two-Layer Network Intrusion Detection Method Incorporating LSTM and Stacking Ensemble Learning. Comput Mater Contin. 2025;83(3):5129–5153. https://doi.org/10.32604/cmc.2025.062094
IEEE Style
J. Wang et al., “A Two-Layer Network Intrusion Detection Method Incorporating LSTM and Stacking Ensemble Learning,” Comput. Mater. Contin., vol. 83, no. 3, pp. 5129–5153, 2025. https://doi.org/10.32604/cmc.2025.062094



cc Copyright © 2025 The Author(s). Published by Tech Science Press.
This work is licensed under a Creative Commons Attribution 4.0 International License , which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.
  • 532

    View

  • 198

    Download

  • 0

    Like

Share Link