DollarSign commited on
Commit
dd1340c
·
verified ·
1 Parent(s): 7a93e0b

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +401 -0
README.md ADDED
@@ -0,0 +1,401 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ features:
4
+ - name: flow_id
5
+ dtype: string
6
+ - name: features
7
+ struct:
8
+ - name: src_port
9
+ dtype: float32
10
+ - name: dst_port
11
+ dtype: float32
12
+ - name: protocol
13
+ dtype: float32
14
+ - name: flow_duration
15
+ dtype: float32
16
+ - name: total_fwd_packet
17
+ dtype: float32
18
+ - name: total_bwd_packets
19
+ dtype: float32
20
+ - name: total_length_of_fwd_packet
21
+ dtype: float32
22
+ - name: total_length_of_bwd_packet
23
+ dtype: float32
24
+ - name: fwd_packet_length_max
25
+ dtype: float32
26
+ - name: fwd_packet_length_min
27
+ dtype: float32
28
+ - name: fwd_packet_length_mean
29
+ dtype: float32
30
+ - name: fwd_packet_length_std
31
+ dtype: float32
32
+ - name: bwd_packet_length_max
33
+ dtype: float32
34
+ - name: bwd_packet_length_min
35
+ dtype: float32
36
+ - name: bwd_packet_length_mean
37
+ dtype: float32
38
+ - name: bwd_packet_length_std
39
+ dtype: float32
40
+ - name: flow_bytes_per_s
41
+ dtype: float32
42
+ - name: flow_packets_per_s
43
+ dtype: float32
44
+ - name: flow_iat_mean
45
+ dtype: float32
46
+ - name: flow_iat_std
47
+ dtype: float32
48
+ - name: flow_iat_max
49
+ dtype: float32
50
+ - name: flow_iat_min
51
+ dtype: float32
52
+ - name: fwd_iat_total
53
+ dtype: float32
54
+ - name: fwd_iat_mean
55
+ dtype: float32
56
+ - name: fwd_iat_std
57
+ dtype: float32
58
+ - name: fwd_iat_max
59
+ dtype: float32
60
+ - name: fwd_iat_min
61
+ dtype: float32
62
+ - name: bwd_iat_total
63
+ dtype: float32
64
+ - name: bwd_iat_mean
65
+ dtype: float32
66
+ - name: bwd_iat_std
67
+ dtype: float32
68
+ - name: bwd_iat_max
69
+ dtype: float32
70
+ - name: bwd_iat_min
71
+ dtype: float32
72
+ - name: fwd_psh_flags
73
+ dtype: float32
74
+ - name: bwd_psh_flags
75
+ dtype: float32
76
+ - name: fwd_urg_flags
77
+ dtype: float32
78
+ - name: bwd_urg_flags
79
+ dtype: float32
80
+ - name: fwd_header_length
81
+ dtype: float32
82
+ - name: bwd_header_length
83
+ dtype: float32
84
+ - name: fwd_packets_per_s
85
+ dtype: float32
86
+ - name: bwd_packets_per_s
87
+ dtype: float32
88
+ - name: packet_length_min
89
+ dtype: float32
90
+ - name: packet_length_max
91
+ dtype: float32
92
+ - name: packet_length_mean
93
+ dtype: float32
94
+ - name: packet_length_std
95
+ dtype: float32
96
+ - name: packet_length_variance
97
+ dtype: float32
98
+ - name: fin_flag_count
99
+ dtype: float32
100
+ - name: syn_flag_count
101
+ dtype: float32
102
+ - name: rst_flag_count
103
+ dtype: float32
104
+ - name: psh_flag_count
105
+ dtype: float32
106
+ - name: ack_flag_count
107
+ dtype: float32
108
+ - name: urg_flag_count
109
+ dtype: float32
110
+ - name: cwr_flag_count
111
+ dtype: float32
112
+ - name: ece_flag_count
113
+ dtype: float32
114
+ - name: down_per_up_ratio
115
+ dtype: float32
116
+ - name: average_packet_size
117
+ dtype: float32
118
+ - name: fwd_segment_size_avg
119
+ dtype: float32
120
+ - name: bwd_segment_size_avg
121
+ dtype: float32
122
+ - name: fwd_bytes_per_bulk_avg
123
+ dtype: float32
124
+ - name: fwd_packet_per_bulk_avg
125
+ dtype: float32
126
+ - name: fwd_bulk_rate_avg
127
+ dtype: float32
128
+ - name: bwd_bytes_per_bulk_avg
129
+ dtype: float32
130
+ - name: bwd_packet_per_bulk_avg
131
+ dtype: float32
132
+ - name: bwd_bulk_rate_avg
133
+ dtype: float32
134
+ - name: subflow_fwd_packets
135
+ dtype: float32
136
+ - name: subflow_fwd_bytes
137
+ dtype: float32
138
+ - name: subflow_bwd_packets
139
+ dtype: float32
140
+ - name: subflow_bwd_bytes
141
+ dtype: float32
142
+ - name: fwd_init_win_bytes
143
+ dtype: float32
144
+ - name: bwd_init_win_bytes
145
+ dtype: float32
146
+ - name: fwd_act_data_pkts
147
+ dtype: float32
148
+ - name: fwd_seg_size_min
149
+ dtype: float32
150
+ - name: active_mean
151
+ dtype: float32
152
+ - name: active_std
153
+ dtype: float32
154
+ - name: active_max
155
+ dtype: float32
156
+ - name: active_min
157
+ dtype: float32
158
+ - name: idle_mean
159
+ dtype: float32
160
+ - name: idle_std
161
+ dtype: float32
162
+ - name: idle_max
163
+ dtype: float32
164
+ - name: idle_min
165
+ dtype: float32
166
+ - name: semantic_flags
167
+ struct:
168
+ - name: high_packet_rate
169
+ dtype: int8
170
+ - name: one_way_traffic
171
+ dtype: int8
172
+ - name: syn_ack_imbalance
173
+ dtype: int8
174
+ - name: uniform_packet_size
175
+ dtype: int8
176
+ - name: long_idle_c2
177
+ dtype: int8
178
+ - name: label
179
+ dtype:
180
+ class_label:
181
+ names:
182
+ '0': benign
183
+ '1': analysis
184
+ '2': backdoor
185
+ '3': dos
186
+ '4': exploits
187
+ '5': fuzzers
188
+ '6': generic
189
+ '7': reconnaissance
190
+ '8': shellcode
191
+ '9': worms
192
+ - name: is_attack
193
+ dtype: int8
194
+ splits:
195
+ - name: train
196
+ num_bytes: 248798843
197
+ num_examples: 671088
198
+ - name: validation
199
+ num_bytes: 62199963
200
+ num_examples: 167772
201
+ - name: test
202
+ num_bytes: 77749889
203
+ num_examples: 209715
204
+ download_size: 119275343
205
+ dataset_size: 388748695
206
+ configs:
207
+ - config_name: default
208
+ data_files:
209
+ - split: train
210
+ path: data/train-*
211
+ - split: validation
212
+ path: data/validation-*
213
+ - split: test
214
+ path: data/test-*
215
+ task_categories:
216
+ - tabular-classification
217
+ language:
218
+ - en
219
+ tags:
220
+ - cybersecurity
221
+ size_categories:
222
+ - 1M<n<10M
223
+ ---
224
+
225
+ # CICFlow Multiclass Intrusion Detection Dataset
226
+
227
+ ## Overview
228
+
229
+ This dataset provides a **multiclass network intrusion detection (IDS) benchmark** derived from **CICFlowMeter flow-level features**.
230
+ It is designed for **attack-type classification**, **robust IDS research**, and **interpretable security modeling**.
231
+
232
+ Each network flow is labeled as either **benign** or one of **nine attack categories**, following a standard IDS taxonomy.
233
+
234
+ The dataset is published in **Hugging Face `datasets` format** with explicit schemas, clean preprocessing, and reproducible splits.
235
+
236
+ ---
237
+
238
+ ## Task
239
+
240
+ **Multiclass classification**
241
+
242
+ > *Given a network flow represented by CICFlowMeter features, predict the attack category.*
243
+
244
+ ---
245
+
246
+ ## Label Taxonomy
247
+
248
+ The dataset uses the following **10-class label space**:
249
+
250
+ | Label ID | Name | Description |
251
+ | -------: | -------------- | ------------------------------------------ |
252
+ | 0 | benign | Normal network traffic |
253
+ | 1 | analysis | Port scans, probing, and analysis activity |
254
+ | 2 | backdoor | Backdoor and remote access behavior |
255
+ | 3 | dos | Denial-of-Service attacks |
256
+ | 4 | exploits | Exploitation of vulnerabilities |
257
+ | 5 | fuzzers | Fuzzing and malformed input attacks |
258
+ | 6 | generic | Generic attack traffic |
259
+ | 7 | reconnaissance | Reconnaissance and information gathering |
260
+ | 8 | shellcode | Shellcode execution attempts |
261
+ | 9 | worms | Worm propagation traffic |
262
+
263
+ ### Additional label fields
264
+
265
+ * `label` → multiclass label (0–9)
266
+ * `is_attack` → binary indicator (`1` if label ≠ 0, else `0`)
267
+
268
+ This allows both **multiclass IDS** and **binary detection** experiments without reprocessing.
269
+
270
+ ---
271
+
272
+ ## Dataset Structure
273
+
274
+ ```json
275
+ DatasetDict({
276
+ train,
277
+ validation,
278
+ test
279
+ })
280
+ ```
281
+
282
+ Each split contains records with the following schema:
283
+
284
+ ```json
285
+ flow_id: string
286
+ features: dict[str, float]
287
+ semantic_flags: dict[str, int]
288
+ label: ClassLabel (0–9)
289
+ is_attack: int (0/1)
290
+ ```
291
+
292
+ ---
293
+
294
+ ## Feature Description
295
+
296
+ ### 1. Raw Numeric Features (`features`)
297
+
298
+ The `features` field contains **CICFlowMeter-derived flow statistics**, including:
299
+
300
+ #### Traffic volume & direction
301
+
302
+ * `total_fwd_packets`, `total_bwd_packets`
303
+ * `total_length_of_fwd_packets`
304
+ * `total_length_of_bwd_packets`
305
+ * `down_up_ratio`
306
+
307
+ #### Packet size statistics
308
+
309
+ * `packet_length_min`, `packet_length_max`
310
+ * `packet_length_mean`, `packet_length_std`, `packet_length_variance`
311
+ * Forward and backward packet length statistics
312
+
313
+ #### Timing & inter-arrival times
314
+
315
+ * `flow_duration`
316
+ * `flow_iat_mean`, `flow_iat_std`, `flow_iat_max`, `flow_iat_min`
317
+ * Forward and backward IAT statistics
318
+ * `active_*`, `idle_*` metrics
319
+
320
+ #### Rate-based features
321
+
322
+ * `flow_bytes_per_s`
323
+ * `flow_packets_per_s`
324
+ * `fwd_packets_per_s`, `bwd_packets_per_s`
325
+
326
+ #### TCP flag counters
327
+
328
+ * `syn_flag_count`, `ack_flag_count`, `rst_flag_count`
329
+ * `fin_flag_count`, `psh_flag_count`, `urg_flag_count`
330
+ * `cwr_flag_count`, `ece_flag_count`
331
+
332
+ #### Bulk and subflow statistics
333
+
334
+ * `*_bulk_*` features (conditionally emitted by CICFlowMeter)
335
+ * `subflow_fwd_*`, `subflow_bwd_*`
336
+
337
+ > **Note:** Some CICFlowMeter features are conditionally emitted.
338
+ > Missing or undefined numeric values were **filled with `0.0`**, which semantically indicates *absence of that behavior*.
339
+
340
+ ---
341
+
342
+ ### 2. Semantic Flags (`semantic_flags`)
343
+
344
+ To support **interpretable and rule-based IDS**, each flow includes deterministic semantic indicators:
345
+
346
+ | Flag | Meaning |
347
+ | --------------------- | ---------------------------------------- |
348
+ | `high_packet_rate` | Very high packets per second |
349
+ | `one_way_traffic` | Forward-only traffic (no response) |
350
+ | `syn_ack_imbalance` | Large SYN/ACK imbalance |
351
+ | `uniform_packet_size` | Low packet size variance |
352
+ | `long_idle_c2` | Long idle periods (possible C2 behavior) |
353
+
354
+ These flags are:
355
+
356
+ * Derived deterministically from numeric features
357
+ * Stable across dataset versions
358
+ * Suitable for rule-based or hybrid ML systems
359
+
360
+ ---
361
+
362
+ ## Preprocessing Summary
363
+
364
+ The dataset was produced using a **fully deterministic pipeline**:
365
+
366
+ * Column name normalization
367
+ * Conversion of `NaN` / `±Infinity` → `0.0`
368
+ * Explicit label normalization (string → numeric)
369
+ * No row drops based on missing numeric values
370
+ * Stratified train/validation/test splits
371
+ * Explicit Hugging Face feature schemas
372
+
373
+ No synthetic balancing, oversampling, or augmentation was applied.
374
+
375
+ ---
376
+
377
+ ## Class Distribution & Imbalance
378
+
379
+ The dataset is **highly imbalanced**, reflecting real-world network traffic:
380
+
381
+ * Benign traffic dominates
382
+ * Some attack classes are rare
383
+
384
+ This is **intentional and realistic**.
385
+
386
+ Users are strongly encouraged to:
387
+
388
+ * Use **macro / weighted F1**
389
+ * Inspect **per-class recall**
390
+ * Apply **class weighting** where appropriate
391
+
392
+ Accuracy alone is not a meaningful metric for this dataset.
393
+
394
+ ---
395
+
396
+ ## Related Datasets
397
+
398
+ * A **binary IDS version** of this dataset is published separately for attack detection use cases.
399
+ * Both datasets share identical features and preprocessing logic.
400
+
401
+ ---