DollarSign's picture
Upload README.md with huggingface_hub
dd1340c verified
metadata
dataset_info:
  features:
    - name: flow_id
      dtype: string
    - name: features
      struct:
        - name: src_port
          dtype: float32
        - name: dst_port
          dtype: float32
        - name: protocol
          dtype: float32
        - name: flow_duration
          dtype: float32
        - name: total_fwd_packet
          dtype: float32
        - name: total_bwd_packets
          dtype: float32
        - name: total_length_of_fwd_packet
          dtype: float32
        - name: total_length_of_bwd_packet
          dtype: float32
        - name: fwd_packet_length_max
          dtype: float32
        - name: fwd_packet_length_min
          dtype: float32
        - name: fwd_packet_length_mean
          dtype: float32
        - name: fwd_packet_length_std
          dtype: float32
        - name: bwd_packet_length_max
          dtype: float32
        - name: bwd_packet_length_min
          dtype: float32
        - name: bwd_packet_length_mean
          dtype: float32
        - name: bwd_packet_length_std
          dtype: float32
        - name: flow_bytes_per_s
          dtype: float32
        - name: flow_packets_per_s
          dtype: float32
        - name: flow_iat_mean
          dtype: float32
        - name: flow_iat_std
          dtype: float32
        - name: flow_iat_max
          dtype: float32
        - name: flow_iat_min
          dtype: float32
        - name: fwd_iat_total
          dtype: float32
        - name: fwd_iat_mean
          dtype: float32
        - name: fwd_iat_std
          dtype: float32
        - name: fwd_iat_max
          dtype: float32
        - name: fwd_iat_min
          dtype: float32
        - name: bwd_iat_total
          dtype: float32
        - name: bwd_iat_mean
          dtype: float32
        - name: bwd_iat_std
          dtype: float32
        - name: bwd_iat_max
          dtype: float32
        - name: bwd_iat_min
          dtype: float32
        - name: fwd_psh_flags
          dtype: float32
        - name: bwd_psh_flags
          dtype: float32
        - name: fwd_urg_flags
          dtype: float32
        - name: bwd_urg_flags
          dtype: float32
        - name: fwd_header_length
          dtype: float32
        - name: bwd_header_length
          dtype: float32
        - name: fwd_packets_per_s
          dtype: float32
        - name: bwd_packets_per_s
          dtype: float32
        - name: packet_length_min
          dtype: float32
        - name: packet_length_max
          dtype: float32
        - name: packet_length_mean
          dtype: float32
        - name: packet_length_std
          dtype: float32
        - name: packet_length_variance
          dtype: float32
        - name: fin_flag_count
          dtype: float32
        - name: syn_flag_count
          dtype: float32
        - name: rst_flag_count
          dtype: float32
        - name: psh_flag_count
          dtype: float32
        - name: ack_flag_count
          dtype: float32
        - name: urg_flag_count
          dtype: float32
        - name: cwr_flag_count
          dtype: float32
        - name: ece_flag_count
          dtype: float32
        - name: down_per_up_ratio
          dtype: float32
        - name: average_packet_size
          dtype: float32
        - name: fwd_segment_size_avg
          dtype: float32
        - name: bwd_segment_size_avg
          dtype: float32
        - name: fwd_bytes_per_bulk_avg
          dtype: float32
        - name: fwd_packet_per_bulk_avg
          dtype: float32
        - name: fwd_bulk_rate_avg
          dtype: float32
        - name: bwd_bytes_per_bulk_avg
          dtype: float32
        - name: bwd_packet_per_bulk_avg
          dtype: float32
        - name: bwd_bulk_rate_avg
          dtype: float32
        - name: subflow_fwd_packets
          dtype: float32
        - name: subflow_fwd_bytes
          dtype: float32
        - name: subflow_bwd_packets
          dtype: float32
        - name: subflow_bwd_bytes
          dtype: float32
        - name: fwd_init_win_bytes
          dtype: float32
        - name: bwd_init_win_bytes
          dtype: float32
        - name: fwd_act_data_pkts
          dtype: float32
        - name: fwd_seg_size_min
          dtype: float32
        - name: active_mean
          dtype: float32
        - name: active_std
          dtype: float32
        - name: active_max
          dtype: float32
        - name: active_min
          dtype: float32
        - name: idle_mean
          dtype: float32
        - name: idle_std
          dtype: float32
        - name: idle_max
          dtype: float32
        - name: idle_min
          dtype: float32
    - name: semantic_flags
      struct:
        - name: high_packet_rate
          dtype: int8
        - name: one_way_traffic
          dtype: int8
        - name: syn_ack_imbalance
          dtype: int8
        - name: uniform_packet_size
          dtype: int8
        - name: long_idle_c2
          dtype: int8
    - name: label
      dtype:
        class_label:
          names:
            '0': benign
            '1': analysis
            '2': backdoor
            '3': dos
            '4': exploits
            '5': fuzzers
            '6': generic
            '7': reconnaissance
            '8': shellcode
            '9': worms
    - name: is_attack
      dtype: int8
  splits:
    - name: train
      num_bytes: 248798843
      num_examples: 671088
    - name: validation
      num_bytes: 62199963
      num_examples: 167772
    - name: test
      num_bytes: 77749889
      num_examples: 209715
  download_size: 119275343
  dataset_size: 388748695
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: validation
        path: data/validation-*
      - split: test
        path: data/test-*
task_categories:
  - tabular-classification
language:
  - en
tags:
  - cybersecurity
size_categories:
  - 1M<n<10M

CICFlow Multiclass Intrusion Detection Dataset

Overview

This dataset provides a multiclass network intrusion detection (IDS) benchmark derived from CICFlowMeter flow-level features. It is designed for attack-type classification, robust IDS research, and interpretable security modeling.

Each network flow is labeled as either benign or one of nine attack categories, following a standard IDS taxonomy.

The dataset is published in Hugging Face datasets format with explicit schemas, clean preprocessing, and reproducible splits.


Task

Multiclass classification

Given a network flow represented by CICFlowMeter features, predict the attack category.


Label Taxonomy

The dataset uses the following 10-class label space:

Label ID Name Description
0 benign Normal network traffic
1 analysis Port scans, probing, and analysis activity
2 backdoor Backdoor and remote access behavior
3 dos Denial-of-Service attacks
4 exploits Exploitation of vulnerabilities
5 fuzzers Fuzzing and malformed input attacks
6 generic Generic attack traffic
7 reconnaissance Reconnaissance and information gathering
8 shellcode Shellcode execution attempts
9 worms Worm propagation traffic

Additional label fields

  • label → multiclass label (0–9)
  • is_attack → binary indicator (1 if label ≠ 0, else 0)

This allows both multiclass IDS and binary detection experiments without reprocessing.


Dataset Structure

DatasetDict({
  train,
  validation,
  test
})

Each split contains records with the following schema:

flow_id: string
features: dict[str, float]
semantic_flags: dict[str, int]
label: ClassLabel (09)
is_attack: int (0/1)

Feature Description

1. Raw Numeric Features (features)

The features field contains CICFlowMeter-derived flow statistics, including:

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 statistics

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_* metrics

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 (conditionally emitted by CICFlowMeter)
  • 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)

To support interpretable and rule-based IDS, each flow includes deterministic semantic indicators:

Flag Meaning
high_packet_rate Very high packets per second
one_way_traffic Forward-only traffic (no response)
syn_ack_imbalance Large SYN/ACK imbalance
uniform_packet_size Low packet size variance
long_idle_c2 Long idle periods (possible C2 behavior)

These flags are:

  • Derived deterministically from numeric features
  • Stable across dataset versions
  • Suitable for rule-based or hybrid ML systems

Preprocessing Summary

The dataset was produced using a fully deterministic pipeline:

  • Column name normalization
  • Conversion of NaN / ±Infinity0.0
  • Explicit label normalization (string → numeric)
  • No row drops based on missing numeric values
  • Stratified train/validation/test splits
  • Explicit Hugging Face feature schemas

No synthetic balancing, oversampling, or augmentation was applied.


Class Distribution & Imbalance

The dataset is highly imbalanced, reflecting real-world network traffic:

  • Benign traffic dominates
  • Some attack classes are rare

This is intentional and realistic.

Users are strongly encouraged to:

  • Use macro / weighted F1
  • Inspect per-class recall
  • Apply class weighting where appropriate

Accuracy alone is not a meaningful metric for this dataset.


Related Datasets

  • A binary IDS version of this dataset is published separately for attack detection use cases.
  • Both datasets share identical features and preprocessing logic.