Machine Learning for Heterogeneous Network Traffic Classification: A Comparative Study Across Four Datasets

Authors

  • Qeis Khaled Qeis NMBU
  • Guang Yang Western Norway University of Applied Sciences

DOI:

https://doi.org/10.5324/nwy9hn30

Keywords:

network traffic classification, Machine learning, intrusion detection, encrypted traffic, cross-dataset analysis

Abstract

Machine learning is widely used for network traffic classification, application identification, and intrusion detection. However, existing studies commonly evaluate classifiers on a single dataset or traffic domain, limiting the extent to which their conclusions generalize across heterogeneous classification tasks. This study compares commonly used machine-learning classifiers across four network traffic datasets: CIC-UNSW-NB15 for attack-category classification, CIC-Darknet2020 for application-type and security-label classification, ISCXVPN2016 for VPN and non-VPN application classification, and CESNET-QUIC22 for encrypted QUIC application classification. The evaluated classifiers include Logistic Regression, Linear Support Vector Machine, K-Nearest Neighbors, Random Forest, gradient-boosted trees, and Multi-Layer Perceptron. To improve comparability and reduce evaluation bias, the experimental procedure uses stratified data partitioning, training-only preprocessing and oversampling, fixed random seeds, and class-sensitive evaluation metrics. Performance is assessed primarily using macro-averaged F1 score, supplemented by Matthews correlation coefficient, accuracy, and per-class results. Among the classifiers evaluated consistently across all datasets, Random Forest achieved the highest macro F1 in every case, with scores ranging from 0.60 on CIC-UNSW-NB15 to 0.86 on ISCXVPN2016. On CESNET-QUIC22, extending the flow representation with packet-size and histogram features increased Random Forest macro F1 from 0.7216 to 0.8641, while a bidirectional LSTM operating on raw packet sequences achieved 0.7062. These findings indicate that tree-based ensembles provide reliable baselines across heterogeneous traffic-classification tasks and that feature representation can have a greater effect on performance than increasing model complexity.

Downloads

Download data is not yet available.

Downloads

Published

2026-11-25

How to Cite

[1]
Qeis, Q.K. and Yang, G. 2026. Machine Learning for Heterogeneous Network Traffic Classification: A Comparative Study Across Four Datasets. NIKT Journal. 38, 3 (Nov. 2026). DOI:https://doi.org/10.5324/nwy9hn30.