Datasets:
license: mit
language:
- en
tags:
- intrusion-detection
- network-logs
- cybersecurity
pretty_name: Network Traffic Dataset
Network Traffic Detection Dataset
A curated dataset for network traffic anomaly detection, derived from the BCCC-CSE-CIC-IDS2018 intrusion detection dataset, which itself is an enhanced version of CSE-CIC-IDS2018
This dataset is restructured for modern machine learning and deep learning research on network security and intrusion detection.
The raw dataset (~90GB) was fragmented across 34
.csvfiles. To optimize for ML workflows, the data was merged and compressed into.parquetchunks using thepolarsPython library.
During the merge, 18 columns exhibited data-type mismatches (e.g., containing bothfloat64values and strings like "not a complete handshake"). To resolve this, these specific columns were type-cast toUtf8.
Usage
This dataset is large (~90GB uncompressed).
Attempting to load the entire dataset into memory at once (e.g., viapd.read_parquet()ordataset.to_pandas()) will cause Out-of-Memory (OOM) crashes on some machines.
To safely use this dataset, separate the download step from the ingestion step, and process the data using lazy evaluation or batching.
Accessing & Downloading the Data
Choose the method that best fits your system's constraints:
Hugging Face docs on downloading datasets
datasets
downloads the dataset using Apache Arrow
from datasets import load_dataset
dataset = load_dataset("init5iv3/network-traffic-detection", split="train")
streaming with datasets
Iterate through the data over the network without downloading the entire dataset to disk
from datasets import load_dataset
dataset = load_dataset("init5iv3/network-traffic-detection", split="train", streaming=True)
local download via CLI
download .parquet files to a local directory
hf download --quiet init5iv3/network-traffic-detection --repo-type dataset --local-dir /path/to/dir
local download via snapshot_download
download .parquet files to a local directory
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="init5iv3/network-traffic-detection",
repo_type="dataset",
local_dir="/path/to/dir",
allow_patterns="*.parquet",
resume_download=True
)
virtual mounting with hf-mount
hf-mount start repo init5iv3/network-traffic-detection /path/to/local/mount
Ingesting/Processing
polars
if the dataset was downloaded locally, polars can lazily scan the fragmented .parquet files in chunks
import polars as pl
df_lazy = pl.scan_parquet("/path/to/dir/**/*.parquet")
label_counts = df_lazy.select("label").value_counts().collect()
batch-processing with datasets library
from datasets import load_dataset
dataset = load_dataset("init5iv3/network-traffic-detection", split="train")
for batch in dataset.iter(batch_size=10000):
# process features here.
pass
Overview
Raw intrusion detection datasets like BCCC-CSE-CIC-IDS2018 are large, fragmented across multiple files, and often difficult to use directly for ML experiments.
This dataset was created to provide an ML-ready format to the raw data, containing over 300 network flow features extracted via NTLFlowLyzer.
It is suitable for binary and multi-class classification.
Labels
Binary Classification
- Benign
- Non-benign: Aggregated from all specific attack classes below
Multi‑Class Classification
- Benign
- DoS-Hulk
- DoS-Slowhttptest
- DoS-GoldenEye
- DoS-Slowloris
- DDoS-LOIC
- DDoS-HOIC
- Brute-Force-XSS
- Brute-Force-Web
- Brute-Force-FTP
- Brute-Force-SSH
- SQL-Injection
- Botnet
- Infiltration
Citation
If you use this dataset, please cite both this repository and the original source:
This dataset
@misc{init5iv32026networktraffic,
title={Network Traffic Dataset},
author={init5iv3},
year={2026},
publisher={Hugging Face},
url={https://huggingface.co/datasets/init5iv3/network-traffic-detection}
}
Original dataset (BCCC-CSE-CIC-IDS2018) and paper
@misc{bccc_cse_cic_ids2018_dataset,
title={BCCC-CSE-CIC-IDS2018: Large-Scale Intrusion Detection Dataset},
author={Shafi, MohammadMoein and Lashkari, Arash Habibi and Roudsari, Arousha Haghighian},
year={2025},
publisher={Behaviour-Centric Cybersecurity Center - York University},
url={https://www.yorku.ca/research/bccc/ucs-technical/cybersecurity-datasets-cds/large-scale-intrusion-detection-dataset-bccc-cse-cic-ids2018/}
}
@article{shafi2025toward,
title={Toward Generating a Large Scale Intrusion Detection Dataset and Intruders Behavioral Profiling Using Network and Transportation Layers Traffic Flow Analyzer (NTLFlowLyzer)},
author={Shafi, MohammadMoein and Lashkari, Arash Habibi and Roudsari, Arousha Haghighian},
journal={Journal of Network and Systems Management},
volume={33},
number={44},
year={2025},
publisher={Springer}
}
License
This dataset is released under the MIT License.
The original BCCC-CSE-CIC-IDS2018 dataset is subject to its own licensing terms.
Contributions
Feedback is welcome via the community page