Datasets:
Update README.md
Browse files# CICFlow Binary Intrusion Detection Dataset
## Overview
This dataset provides a **binary network intrusion detection (IDS) benchmark** derived from **CICFlowMeter flow-level features**.
The task is to determine whether a given network flow is **benign** or **malicious**, making this dataset suitable for:
* Practical IDS research
* Rule-based and hybrid ML systems
* High-imbalance classification experiments
* Explainable security modeling
---
## Task
**Binary classification**
> *Given a network flow represented by CICFlowMeter features, predict whether it corresponds to an attack.*
---
## Labels
| Label ID | Name | Description |
| -------: | ------ | ----------------------------------------------- |
| 0 | benign | Normal network traffic |
| 1 | attack | Any malicious traffic (all attack types merged) |
### Label construction
The binary label was derived by collapsing a multiclass IDS taxonomy:
* `benign` → `0`
* all attack categories → `1`
No other transformations were applied to the labels.
---
## Dataset Structure
```text
DatasetDict({
train,
validation,
test
})
```
Each split contains records with the following schema:
```text
flow_id: string
features: dict[str, float]
semantic_flags: dict[str, int]
label: ClassLabel (benign / attack)
```
---
## Feature Description
### 1. Raw Numeric Features (`features`)
The `features` field contains **flow-level statistics extracted by CICFlowMeter**.
These include:
#### Traffic volume & direction
* `total_fwd_packets`, `total_bwd_packets`
* `total_length_of_fwd_packets`
* `total_length_of_bwd_packets`
* `down_up_ratio`
#### Packet size statistics
* `packet_length_min`, `packet_length_max`
* `packet_length_mean`, `packet_length_std`, `packet_length_variance`
* Forward and backward packet length metrics
#### Timing & inter-arrival times
* `flow_duration`
* `flow_iat_mean`, `flow_iat_std`, `flow_iat_max`, `flow_iat_min`
* Forward and backward IAT statistics
* `active_*`, `idle_*` features
#### Rate-based features
* `flow_bytes_per_s`
* `flow_packets_per_s`
* `fwd_packets_per_s`, `bwd_packets_per_s`
#### TCP flag counters
* `syn_flag_count`, `ack_flag_count`, `rst_flag_count`
* `fin_flag_count`, `psh_flag_count`, `urg_flag_count`
* `cwr_flag_count`, `ece_flag_count`
#### Bulk and subflow statistics
* `*_bulk_*` features
* `subflow_fwd_*`, `subflow_bwd_*`
> **Note:** Some CICFlowMeter features are conditionally emitted.
> Missing or undefined numeric values were **filled with `0.0`**, which semantically indicates *absence of that behavior*.
---
### 2. Semantic Flags (`semantic_flags`)
Each flow includes deterministic, interpretable indicators derived from numeric features:
| Flag | Meaning |
| --------------------- | --------------------------------------------------------- |
| `high_packet_rate` | Extremely high packets per second |
| `one_way_traffic` | Forward-only traffic (no backward response) |
| `syn_ack_imbalance` | Large SYN/ACK imbalance |
| `uniform_packet_size` | Low packet size variance |
| `long_idle_c2` | Long idle periods (possible command-and-control behavior) |
These flags are:
* Deterministic
* Stable across dataset versions
* Suitable for rule-based IDS and hybrid systems
---
## Preprocessing Summary
The dataset was generated using a **fully deterministic preprocessing pipeline**:
* Column name normalization
* Conversion of `NaN` / `±Infinity` → `0.0`
* Explicit label normalization
* No row removal due to missing numeric values
* Stratified train/validation/test splits
* Explicit Hugging Face feature schemas
No rebalancing, oversampling, or augmentation was applied.
---
## Class Imbalance
The dataset is **highly imbalanced**, with benign traffic dominating.
This reflects **real-world network conditions** and is intentional.
Users are encouraged to:
* Use **precision, recall, F1, PR-AUC**
* Apply **class weighting** or cost-sensitive learning
* Avoid relying on accuracy alone
---
|
@@ -202,4 +202,12 @@ configs:
|
|
| 202 |
path: data/validation-*
|
| 203 |
- split: test
|
| 204 |
path: data/test-*
|
| 205 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 202 |
path: data/validation-*
|
| 203 |
- split: test
|
| 204 |
path: data/test-*
|
| 205 |
+
task_categories:
|
| 206 |
+
- tabular-classification
|
| 207 |
+
language:
|
| 208 |
+
- en
|
| 209 |
+
tags:
|
| 210 |
+
- cybersecurity
|
| 211 |
+
size_categories:
|
| 212 |
+
- 1M<n<10M
|
| 213 |
+
---
|