casscloud/CIC-IoT-2023
CIC-IoT-2023 IoT Intrusion Detection Dataset The CICIoT2023 dataset from the Canadian Institute for Cybersecurity, subsampled and preprocessed for machine learning evaluation. Configurations random_3way (default) — 80/10/10 Three-Way Split Stratified random split with fully separated train/test/validation sets: Train (80%): Model training and architecture search Test (10%): Threshold calibration (held out from training) Validation (10%): Final… See the full description on the dataset page: https://huggingface.co/datasets/casscloud/CIC-IoT-2023.
CIC-IoT-2023 IoT Intrusion Detection Dataset
The CICIoT2023 dataset from the Canadian Institute for Cybersecurity, subsampled and preprocessed for machine learning evaluation.
Configurations
random_3way (default) — 80/10/10 Three-Way Split
Stratified random split with fully separated train/test/validation sets:
- Train (80%): Model training and architecture search
- Test (10%): Threshold calibration (held out from training)
- Validation (10%): Final reported metrics (never touched during training or calibration)
from datasets import load_dataset
ds = load_dataset("lacg030175/CIC-IoT-2023", "random_3way")
# ds["train"]: 1,073,851 rows
# ds["test"]: 134,231 rows
# ds["validation"]: 134,232 rowsrandom (legacy) — 80/20 Split
Original 80/20 split for backward compatibility with existing runs.
ds = load_dataset("lacg030175/CIC-IoT-2023", "random")
# ds["train"]: 1,073,851 rows
# ds["test"]: 268,463 rowsSubsampling Strategy
The original dataset has 46.7M rows (97.6% attack traffic). To create a manageable benchmark:
- Benign: up to 200,000 rows
- Each attack type: up to 50,000 rows
- Total: 1,342,314 rows (199,988 benign, 1,142,326 attack)
This preserves all 33 attack types while balancing the dataset for binary classification.
Top-20 RF Features
- HTTPS
- Number
- TimeToLive
- Max
- ackflagnumber
- Rate
- IAT
- ack_count
- Header_Length
- Min
- Variance
- pshflagnumber
- Tot sum
- Std
- Tot size
- syn_count
- AVG
- rstflagnumber
- DNS
- rst_count
Attack Types (7 classes, 33 sub-types)
Labels
- Binary (
label): 0 = Benign, 1 = Attack - Multi-class (
Label): 34 categories (fine-grained attack types) - Grouped (
attack_class): 8 classes (7 attack groups + Benign)
Features
39 numeric flow-level features.
Note on Temporal Split
Unlike UNSW-NB15 and CICIDS2017, CIC-IoT-2023 does not have a natural temporal ordering (data is organized by attack type, not capture time). Only a random split is provided.
Citation
@article{neto2023ciciot,
title={CICIoT2023: A Real-Time Dataset and Benchmark for Large-Scale Attacks in IoT Environment},
author={Neto, Euclides Carlos Pinto and others},
journal={Sensors},
volume={23},
number={13},
year={2023},
publisher={MDPI}
}License
CC BY 4.0 — original dataset by the Canadian Institute for Cybersecurity, University of New Brunswick.
