Abstract
Classifying network traffic is the basis for important network applications. Prior research in this area has faced challenges on the availability of representative datasets, and many of the results cannot be readily reproduced. Such a problem is exacerbated by emerging data-driven machine learning based approaches. To address this issue, we provide three open datasets containing almost 1.3M labeled flows in total, with flow features and anonymized raw packets, for the research community. We focus on broad aspects in network traffic analysis, including both malware detection and application classification. We release the datasets in the form of an open challenge called NetML and implement several machine learning methods including random-forest, SVM and MLP. As we continue to grow NetML, we expect the datasets to serve as a common platform for AI driven, reproducible research on network flow analytics.
Introduction
Network Traffic Analysis (NTA) is essential for modern network management, encompassing tasks from Quality-of-Service (QoS) optimization to cybersecurity threat detection. However, traditional methods like port-based identification and Deep Packet Inspection (DPI) are increasingly ineffective. Port numbers are easily spoofed or randomized, and the widespread adoption of encryption renders DPI blind as payloads remain opaque.
While Machine Learning (ML) offers a promising alternative by identifying patterns in traffic behavior, the field has historically lacked a standardized benchmarking platform. Unlike Computer Vision or Natural Language Processing, which benefit from datasets like ImageNet or GLUE, NTA research often relies on fragmented, private, or outdated data. NetML introduces a massive, open-source benchmarking platform featuring 1.3 million labeled flows across three datasets to solve this reproducibility crisis and establish a common ground for the community.
Methodology
The core of the NetML framework is a standardized pipeline designed to transform raw packet captures (pcaps) into ML-ready features while preserving privacy and maintaining utility.
The pipeline consists of several critical stages:
- Feature Extraction: Utilizing a proprietary tool, the authors extract four feature categories: Metadata (flow statistics), TLS (handshake data), DNS (query information), and HTTP (request details).
- Anonymization: IP addresses are masked to ensure privacy without compromising the structural utility of the flow data.
- Feature Engineering: Derived features like "time_length" are added, while sensitive timestamps are removed to prevent temporal overfitting.
- Granular Labeling: Traffic is labeled at three hierarchical levels: top-level (binary benign/malware), mid-level (general categories), and fine-grained (specific malware families or application types).
- Baseline Modeling: To establish performance benchmarks, standard algorithms including Random Forest (RF), Support Vector Machines (SVM), and Multi-layer Perceptrons (MLP) were implemented.
Dataset Overview
NetML consolidates three primary datasets to provide a comprehensive view of network traffic:
- NetML Dataset: Sourced from Stratosphere IPS, containing ~500k samples covering 20 malware types and benign traffic.
- CICIDS2017 (Curated): A re-processed version of the popular CICIDS2017 dataset, offering ~550k samples for 7 malware categories.
- non-vpn2016 (Curated): Focused on application classification (e.g., Video, Chat, P2P) with ~163k samples.
Analysis and Results
Initial experiments focused on metadata features—such as packet counts and inter-arrival times—to determine the baseline effectiveness of "traffic shape" analysis without payload inspection.
Performance Benchmarks
In malware detection tasks, Random Forest emerged as the superior model. On the NetML dataset, it achieved a True Positive Rate (TPR) of 99.37% with a negligible False Alarm Rate of 0.92%. However, performance significantly degraded as classification became more granular. For fine-grained malware identification, the best F1 score dropped to 0.7442.
The Challenge of Class Imbalance
A significant finding was the impact of real-world class imbalance on model performance. Application identification proved far more difficult than malware detection, largely due to the uneven distribution of traffic types.
As shown in the distribution of the non-vpn2016 dataset, certain classes like "skype" and "hangouts" dominate the sample count, while others like "google" or "twitter" have minimal representation. This imbalance led to a heavy bias in the models, resulting in a low F1 score of 0.2486 for fine-grained application classification. This highlights a critical hurdle for NTA: models often struggle to identify the "long tail" of rarer network activities.
Conclusion and Future Directions
NetML provides a robust foundation for reproducible NTA research, yet several avenues for improvement remain. The initial baselines primarily utilized metadata; future iterations will integrate richer protocol-specific features from TLS, DNS, and HTTP headers. Addressing class imbalance through techniques like synthetic over-sampling will be vital for improving application classification. Finally, the authors anticipate that more advanced deep learning architectures, such as CNNs or LSTMs, will further push the boundaries of what is possible with the raw packet sequences provided in the NetML challenge.
Summary updated