MeeDet: Efficient Malicious Traffic Detection Method via Mamba-Based Early-Exit Mechanism in IIoT Scenarios
Abstract
1. Introduction
- Our proposed MeeDet achieves detection performance comparable to the state-of-the-art methods with a Mamba-based backbone network structure.
- MeeDet substantially improves detection efficiency and reduces computational overhead while maintaining detection accuracy with an early-exit mechanism.
- MeeDet provides comprehensibility for detection outcomes with a LLM, thereby assisting network administrators in incident analysis and decision-making.
2. Related Works
2.1. Mamba Structure
2.2. Early-Exit Mechanisms
3. MeeDet
3.1. Overview
3.2. Data Pre-Processing
3.3. Pretraining
3.4. Fine-Tuning with Early Exits
3.5. LLM-Driven Analysis
4. Experiments
4.1. Experiment Setup
4.1.1. Datasets and Downstream Tasks
4.1.2. Evaluation Metrics
4.1.3. Implementation Details
4.2. Comparison with State-of-the-Art Methods
4.2.1. General Malicious Traffic Detection in IIoT
4.2.2. APT Traffic Detection in IIoT
4.2.3. Detection Efficiency Evaluation
4.3. Ablation Study
4.4. Layer-Wise Analyses
4.5. Comprehensibility
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Conflicts of Interest
References
- Ghiasvand, E.; Ray, S.; Iqbal, S.; Dadkhah, S.; Ghorbani, A.A. CICAPT-IIOT: A provenance-based APT attack dataset for IIoT environment. arXiv 2024, arXiv:2407.11278. [Google Scholar] [CrossRef]
- Ferrag, M.A.; Friha, O.; Hamouda, D.; Maglaras, L.; Janicke, H. Edge-IIoTset: A New Comprehensive Realistic Cyber Security Dataset of IoT and IIoT Applications for Centralized and Federated Learning. IEEE Access 2022, 10, 40281–40306. [Google Scholar] [CrossRef]
- Al-Hawawreh, M.; Sitnikova, E.; Aboutorab, N. X-IIoTID: A Connectivity-Agnostic and Device-Agnostic Intrusion Data Set for Industrial Internet of Things. IEEE Internet Things J. 2022, 9, 3962–3977. [Google Scholar] [CrossRef]
- Barracuda Networks. The State of Industrial Security in 2022; Technical Report; Barracuda Networks: Campbell, CA, USA, 2022; Available online: https://www.barracuda.com/products/network-protection/industrial-security (accessed on 12 January 2026).
- Zhang, Z.; Zong, X.; He, K.; Lian, L. Research on Abnormal Traffic Detection in Industrial Control Network Based on CVAE-CatBoost. Comput. Eng. 2023, 49, 173–180. [Google Scholar] [CrossRef]
- Chen, L.; Cao, X.; He, T.; Xu, Y.; Liu, X.; Hu, B. A lightweight All-MLP time-frequency anomaly detection for IIoT time series. Neural Netw. 2025, 187, 107400. [Google Scholar] [CrossRef] [PubMed]
- Poorazad, S.K.; Benzaïd, C.; Taleb, T. A Novel Buffered Federated Learning Framework for Privacy-Driven Anomaly Detection in IIoT. In Proceedings of the 2024 IEEE Global Communications Conference, GLOBECOM 2024, Cape Town, South Africa, 8–12 December 2024; IEEE: New York, NY, USA, 2024; pp. 1725–1730. [Google Scholar] [CrossRef]
- Feng, Y.; Chen, J.; Liu, Z.; Lv, H.; Wang, J. Full Graph Autoencoder for One-Class Group Anomaly Detection of IIoT System. IEEE Internet Things J. 2022, 9, 21886–21898. [Google Scholar] [CrossRef]
- Han, G.; Tu, J.; Liu, L.; Martínez-García, M.; Peng, Y. Anomaly Detection Based on Multidimensional Data Processing for Protecting Vital Devices in 6G-Enabled Massive IIoT. IEEE Internet Things J. 2021, 8, 5219–5229. [Google Scholar] [CrossRef]
- Sangodoyin, A.; Akinsolu, M.O.; Pillai, P.; Grout, V. Detection and Classification of DDoS Flooding Attacks on Software-Defined Networks: A Case Study for the Application of Machine Learning. IEEE Access 2021, 9, 122495–122508. [Google Scholar] [CrossRef]
- Kasongo, S.M. An Advanced Intrusion Detection System for IIoT Based on GA and Tree Based Algorithms. IEEE Access 2021, 9, 113199–113212. [Google Scholar] [CrossRef]
- Gao, C.; Zhao, X.; Wang, X.; Wang, L.; Fan, Z.; Yao, Y.; Jiang, Z. A Variant and Flow-Level AutoML Method for IoT Malicious Traffic Detection. In Proceedings of the 28th International Conference on Computer Supported Cooperative Work in Design, CSCWD 2025, Compiegne, France, 5–7 May 2025; Shen, W., Abel, M., Matta, N., Barthès, J.A., Luo, J., Zhang, J., Zhu, H., Peng, K., Eds.; IEEE: New York, NY, USA, 2025; pp. 177–182. [Google Scholar] [CrossRef]
- Wang, C.; Gao, C.; He, F.; He, S.; Liu, R.; Li, Q.; Chen, W.; Wang, X. Exploring the Effectiveness of Traditional Machine Learning Models in IoT Malicious Traffic Detection. In Proceedings of the 28th International Conference on Computer Supported Cooperative Work in Design, CSCWD 2025, Compiegne, France, 5–7 May 2025; Shen, W., Abel, M., Matta, N., Barthès, J.A., Luo, J., Zhang, J., Zhu, H., Peng, K., Eds.; IEEE: New York, NY, USA, 2025; pp. 740–745. [Google Scholar] [CrossRef]
- Zainudin, A.; Ahakonye, L.A.C.; Akter, R.; Kim, D.; Lee, J. An Efficient Hybrid-DNN for DDoS Detection and Classification in Software-Defined IIoT Networks. IEEE Internet Things J. 2023, 10, 8491–8504. [Google Scholar] [CrossRef]
- Lin, X.; Xiong, G.; Gou, G.; Li, Z.; Shi, J.; Yu, J. ET-BERT: A Contextualized Datagram Representation with Pre-training Transformers for Encrypted Traffic Classification. In Proceedings of the WWW ’22: The ACM Web Conference 2022, Virtual Event, Lyon, France, 25–29 April 2022; Laforest, F., Troncy, R., Simperl, E., Agarwal, D., Gionis, A., Herman, I., Médini, L., Eds.; ACM: New York, NY, USA, 2022; pp. 633–642. [Google Scholar] [CrossRef]
- Dai, J.; Xu, X.; Gao, H.; Xiao, F. CMFTC: Cross Modality Fusion Efficient Multitask Encrypt Traffic Classification in IIoT Environment. IEEE Trans. Netw. Sci. Eng. 2023, 10, 3989–4009. [Google Scholar] [CrossRef]
- Ge, Y.; Gao, Y.; Li, X.; Cai, B.; Xi, J.; Yu, S. EMTD-SSC: An Enhanced Malicious Traffic Detection Model Using Transfer Learning Under Small Sample Conditions in IoT. IEEE Internet Things J. 2024, 11, 30725–30741. [Google Scholar] [CrossRef]
- Luo, Y.; Chen, X.; Sun, H.; Li, X.; Ge, N.; Feng, W.; Lu, J. Securing 5G/6G IoT Using Transformer and Personalized Federated Learning: An Access-Side Distributed Malicious Traffic Detection Framework. IEEE Open J. Commun. Soc. 2024, 5, 1325–1339. [Google Scholar] [CrossRef]
- Gu, A.; Goel, K.; Ré, C. Efficiently Modeling Long Sequences with Structured State Spaces. In Proceedings of the Tenth International Conference on Learning Representations, ICLR 2022, Virtual Event, 25–29 April 2022. [Google Scholar]
- Guarino, I.; Wang, C.; Finamore, A.; Pescapè, A.; Rossi, D. Many or Few Samples?: Comparing Transfer, Contrastive and Meta-Learning in Encrypted Traffic Classification. In Proceedings of the 7th Network Traffic Measurement and Analysis Conference, TMA 2023, Naples, Italy, 26–29 June 2023; IEEE: New York, NY, USA, 2023; pp. 1–10. [Google Scholar] [CrossRef]
- Dao, T.; Gu, A. Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality. In Proceedings of the Forty-First International Conference on Machine Learning, ICML 2024, Vienna, Austria, 21–27 July 2024. [Google Scholar]
- Zhang, P.; Chen, F.; Yue, H. Detection and utilization of new-type encrypted network traffic in distributed scenarios. Eng. Appl. Artif. Intell. 2024, 127, 107196. [Google Scholar] [CrossRef]
- Wang, T.; Xie, X.; Wang, W.; Wang, C.; Zhao, Y.; Cui, Y. Netmamba: Efficient Network Traffic Classification Via Pre-Training Unidirectional Mamba. In Proceedings of the 32nd IEEE International Conference on Network Protocols, ICNP 2024, Charleroi, Belgium, 28–31 October 2024; IEEE: New York, NY, USA, 2024; pp. 1–11. [Google Scholar] [CrossRef]
- Wang, Z.; Thing, V.L.L. Feature mining for encrypted malicious traffic detection with deep learning and other machine learning algorithms. Comput. Secur. 2023, 128, 103143. [Google Scholar] [CrossRef]
- Ucci, D.; Sobrero, F.; Bisio, F.; Zorzino, M. Near-real-time Anomaly Detection in Encrypted Traffic using Machine Learning Techniques. In Proceedings of the 2021 IEEE Symposium Series on Computational Intelligence (SSCI), Orlando, FL, USA, 5–7 December 2021; pp. 1–8. [Google Scholar] [CrossRef]
- Teerapittayanon, S.; McDanel, B.; Kung, H.T. Branchynet: Fast inference via early exiting from deep neural networks. In Proceedings of the 2016 23rd International Conference on Pattern Recognition (ICPR), Cancun, Mexico, 4–8 December 2016; IEEE: New York, NY, USA, 2016; pp. 2464–2469. [Google Scholar]
- Bachman, P.; Hjelm, R.D.; Buchwalter, W. Learning representations by maximizing mutual information across views. Adv. Neural Inf. Process. Syst. 2019, 32, 15535–15545. [Google Scholar]
- He, K.; Fan, H.; Wu, Y.; Xie, S.; Girshick, R. Momentum contrast for unsupervised visual representation learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Seattle, WA, USA, 13–19 June 2020; pp. 9729–9738. [Google Scholar]
- Huang, G.; Chen, D.; Li, T.; Wu, F.; Van Der Maaten, L.; Weinberger, K.Q. Multi-scale dense convolutional networks for efficient prediction. arXiv 2017, arXiv:1703.09844. [Google Scholar]
- Neto, E.C.P.; Dadkhah, S.; Ferreira, R.; Zohourian, A.; Lu, R.; Ghorbani, A.A. CICIoT2023: A Real-Time Dataset and Benchmark for Large-Scale Attacks in IoT Environment. Sensors 2023, 23, 5941. [Google Scholar] [CrossRef]
- Alsaedi, A.; Moustafa, N.; Tari, Z.; Mahmood, A.N.; Anwar, A. TON_IoT Telemetry Dataset: A New Generation Dataset of IoT and IIoT for Data-Driven Intrusion Detection Systems. IEEE Access 2020, 8, 165130–165150. [Google Scholar] [CrossRef]
- Mao, J.; Wei, Z.; Li, B.; Zhang, R.; Song, L. Toward Ever-Evolution Network Threats: A Hierarchical Federated Class-Incremental Learning Approach for Network Intrusion Detection in IIoT. IEEE Internet Things J. 2024, 11, 29864–29877. [Google Scholar] [CrossRef]
- Chang, Y.; Chen, J.; Su, R.; Xie, J.; Li, A. Two-Phase Dual-Adversarial Agents with Multivariate Information for Unsupervised Anomaly Detection of IIoT-Edge Devices. IEEE Internet Things J. 2024, 11, 23577–23591. [Google Scholar] [CrossRef]
- Zhao, M.; Fink, O. DyEdgeGAT: Dynamic Edge via Graph Attention for Early Fault Detection in IIoT Systems. IEEE Internet Things J. 2024, 11, 22950–22965. [Google Scholar] [CrossRef]
- Zhang, X.; Lu, J.; Sun, J.; Xiao, R.; Jin, S. MEMTD: Encrypted Malware Traffic Detection Using Multimodal Deep Learning. In Web Engineering; Di Noia, T., Ko, I.Y., Schedl, M., Ardito, C., Eds.; Lecture Notes in Computer Science; Springer: Cham, Switzerland, 2022; pp. 357–372. [Google Scholar] [CrossRef]






| Dataset | #Flow | #Label |
|---|---|---|
| CICIIoT2023 [30] | 5,214,625 | 7 |
| Edge-IIoTset [2] | 2,287,781 | 5 |
| X-IIoTID [3] | 973,213 | 10 |
| TON-IoT [31] | 896,097 | 9 |
| CICAPT-IIoT2024 [1] | 1,463,863 | 9 |
| Method | CVAE-CatBoost | CART | CNN-LSTM | ET-BERT | MeeDet | |
|---|---|---|---|---|---|---|
| Edge-IIoTset | AC | 0.8520 | 0.8840 | 0.9010 | 0.9890 | 0.9870 |
| PR | 0.8230 | 0.8510 | 0.8750 | 0.9030 | 0.9760 | |
| RC | 0.8810 | 0.9020 | 0.9230 | 0.9350 | 0.9910 | |
| F1 | 0.8512 | 0.8761 | 0.8986 | 0.9188 | 0.9834 | |
| CICIoT2023 | AC | 0.8310 | 0.8630 | 0.8920 | 0.9150 | 0.9780 |
| PR | 0.8020 | 0.8340 | 0.8610 | 0.9720 | 0.9680 | |
| RC | 0.8630 | 0.8850 | 0.9040 | 0.9210 | 0.9820 | |
| F1 | 0.8315 | 0.8589 | 0.8821 | 0.9365 | 0.9312 | |
| X-IIoTID | AC | 0.8430 | 0.8720 | 0.9030 | 0.9340 | 0.9850 |
| PR | 0.8140 | 0.8420 | 0.8730 | 0.9790 | 0.9750 | |
| RC | 0.8720 | 0.8930 | 0.9120 | 0.9930 | 0.9920 | |
| F1 | 0.8423 | 0.8671 | 0.8922 | 0.9859 | 0.9834 | |
| TON-IoT | AC | 0.8240 | 0.8520 | 0.8830 | 0.9810 | 0.9760 |
| PR | 0.7930 | 0.8210 | 0.8520 | 0.8830 | 0.9670 | |
| RC | 0.8520 | 0.8730 | 0.8940 | 0.9850 | 0.9830 | |
| F1 | 0.8218 | 0.8464 | 0.8727 | 0.9326 | 0.9285 | |
| Method | Mal. Ratio | FLOPs (M) | Time-Cost (ms) | F1 |
|---|---|---|---|---|
| CVAE-CatBoost | 1% | - | 0.75 | 0.8572 |
| 5% | 0.8625 | |||
| 10% | 0.8650 | |||
| 20% | 0.8703 | |||
| CART | 1% | - | 3.17 | 0.8975 |
| 5% | 0.9030 | |||
| 10% | 0.9058 | |||
| 20% | 0.9112 | |||
| CNN-LSTM | 1% | 2.72 | 0.96 | 0.9175 |
| 5% | 0.9220 | |||
| 10% | 0.9250 | |||
| 20% | 0.9315 | |||
| ET-BERT | 1% | 6.26 | 10.16 | 0.9766 |
| 5% | 0.9720 | |||
| 10% | 0.9850 | |||
| 20% | 0.9815 | |||
| MeeDet | 1% | 1.75 | 1.58 | 0.9775 |
| 5% | 2.12 | 2.82 | 0.9830 | |
| 10% | 3.99 | 3.91 | 0.9750 | |
| 20% | 5.63 | 6.81 | 0.9825 |
| Model Variant | Backbone | Pre-Train | Early Exit | F1 (%) | FLOPs (M) | Time (ms) |
|---|---|---|---|---|---|---|
| MeeDet (Ours) | Mamba | Yes | Yes | 98.34 | 1.75 | 1.58 |
| Variant A | Mamba | No | Yes | 94.12 | 2.15 | 1.92 |
| Variant B | Mamba | Yes | No | 98.45 | 12.40 | 11.20 |
| Variant C | Transformer | Yes | Yes | 96.88 | 4.25 | 3.85 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Sun, J.; Jin, P.; Wang, Y.; Jin, S. MeeDet: Efficient Malicious Traffic Detection Method via Mamba-Based Early-Exit Mechanism in IIoT Scenarios. Electronics 2026, 15, 1017. https://doi.org/10.3390/electronics15051017
Sun J, Jin P, Wang Y, Jin S. MeeDet: Efficient Malicious Traffic Detection Method via Mamba-Based Early-Exit Mechanism in IIoT Scenarios. Electronics. 2026; 15(5):1017. https://doi.org/10.3390/electronics15051017
Chicago/Turabian StyleSun, Jiakun, Pengfei Jin, Yabo Wang, and Shuyuan Jin. 2026. "MeeDet: Efficient Malicious Traffic Detection Method via Mamba-Based Early-Exit Mechanism in IIoT Scenarios" Electronics 15, no. 5: 1017. https://doi.org/10.3390/electronics15051017
APA StyleSun, J., Jin, P., Wang, Y., & Jin, S. (2026). MeeDet: Efficient Malicious Traffic Detection Method via Mamba-Based Early-Exit Mechanism in IIoT Scenarios. Electronics, 15(5), 1017. https://doi.org/10.3390/electronics15051017

