Volume 2025, Issue 1 5729035
Research Article
Open Access

From Flow to Packet: A Unified Machine Learning Approach for Advanced Intrusion Detection

Didik Sudyana

Didik Sudyana

Computer and Network Center , National Cheng Kung University , Tainan , 701 , Taiwan , ncku.edu.tw

Search for more papers by this author
Fietyata Yudha

Fietyata Yudha

Department of Computer Science , National Yang Ming Chiao Tung University , Hsinchu , 300 , Taiwan , nctu.edu.tw

Search for more papers by this author
Ying-Dar Lin

Corresponding Author

Ying-Dar Lin

Department of Computer Science , National Yang Ming Chiao Tung University , Hsinchu , 300 , Taiwan , nctu.edu.tw

Search for more papers by this author
Chia-Hung Lai

Chia-Hung Lai

Industrial Technology Research Institute , Hsinchu , 310 , Taiwan , itri.org.tw

Search for more papers by this author
Po-Ching Lin

Po-Ching Lin

Department of Computer Science and Information Engineering , National Chung Cheng University , Chiayi , 600 , Taiwan , ccu.edu.tw

Search for more papers by this author
Ren-Hung Hwang

Ren-Hung Hwang

College of Artificial Intelligence , National Yang Ming Chiao Tung University , Tainan , 710 , Taiwan , nctu.edu.tw

Search for more papers by this author
First published: 13 July 2025
Academic Editor: Zhiyuan Tan

Abstract

In the era of advanced networking with 5G integration, the need for efficient and scalable intrusion detection systems has become critical to securing large-scale digital infrastructures. Traditional intrusion detection approaches either analyze individual packets yielding high computational costs or rely solely on flow-based data, which can miss important sequence-level information critical to identifying interservice communications and attack behaviors. To address this, we propose a unified machine learning approach that integrates flow-based and packet-based detection using convolutional neural networks (CNNs) for advanced intrusion detection. Our method prioritizes flow-based detection for short flows as the first defense layer and selectively invokes packet-based detection for longer flows or cases deemed uncertain. Uncertain predictions from the flow-based stage are identified using a confidence threshold and re-evaluated by the packet-based system. We validate our method using a systematically generated dataset from a microservices environment alongside benchmark datasets, including CIC-IDS-2017, CIC-IDS-2018, and CREMEv2. This hybrid detection strategy yields strong performance in both accuracy and efficiency. Specifically, our approach reduces the computational cost by up to 24 × (approximately 1.38 orders of magnitude) compared to relying solely on packet-based analysis. Additionally, the model demonstrates strong generalization with detection rates of 95% and 100% for flow- and packet-based detection, respectively, even against previously unseen attacks generated through behavioral variations and command-level perturbations.

Conflicts of Interest

The authors declare no conflicts of interest.

Data Availability Statement

The data that support the findings of this study are available on request from the first author. The data are not publicly available due to privacy or ethical restrictions.

The full text of this article hosted at iucr.org is unavailable due to technical difficulties.