AINovice2005 commited on
Commit
3f275a4
·
verified ·
1 Parent(s): b2b10b4
Files changed (1) hide show
  1. README.md +160 -0
README.md CHANGED
@@ -210,4 +210,164 @@ tags:
210
  - cybersecurity
211
  size_categories:
212
  - 1M<n<10M
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
  ---
 
210
  - cybersecurity
211
  size_categories:
212
  - 1M<n<10M
213
+ ---
214
+ # CICFlow Binary Intrusion Detection Dataset
215
+
216
+ ## Overview
217
+
218
+ This dataset provides a **binary network intrusion detection (IDS) benchmark** derived from **CICFlowMeter flow-level features**.
219
+
220
+ The task is to determine whether a given network flow is **benign** or **malicious**, making this dataset suitable for:
221
+
222
+ * Practical IDS research
223
+ * Rule-based and hybrid ML systems
224
+ * High-imbalance classification experiments
225
+ * Explainable security modeling
226
+
227
+ ---
228
+
229
+ ## Task
230
+
231
+ **Binary classification**
232
+
233
+ > *Given a network flow represented by CICFlowMeter features, predict whether it corresponds to an attack.*
234
+
235
+ ---
236
+
237
+ ## Labels
238
+
239
+ | Label ID | Name | Description |
240
+ | -------: | ------ | ----------------------------------------------- |
241
+ | 0 | benign | Normal network traffic |
242
+ | 1 | attack | Any malicious traffic (all attack types merged) |
243
+
244
+ ### Label construction
245
+
246
+ The binary label was derived by collapsing a multiclass IDS taxonomy:
247
+
248
+ * `benign` → `0`
249
+ * all attack categories → `1`
250
+
251
+ No other transformations were applied to the labels.
252
+
253
+ ---
254
+
255
+ ## Dataset Structure
256
+
257
+ ```text
258
+ DatasetDict({
259
+ train,
260
+ validation,
261
+ test
262
+ })
263
+ ```
264
+
265
+ Each split contains records with the following schema:
266
+
267
+ ```text
268
+ flow_id: string
269
+ features: dict[str, float]
270
+ semantic_flags: dict[str, int]
271
+ label: ClassLabel (benign / attack)
272
+ ```
273
+
274
+ ---
275
+
276
+ ## Feature Description
277
+
278
+ ### 1. Raw Numeric Features (`features`)
279
+
280
+ The `features` field contains **flow-level statistics extracted by CICFlowMeter**.
281
+
282
+ These include:
283
+
284
+ #### Traffic volume & direction
285
+
286
+ * `total_fwd_packets`, `total_bwd_packets`
287
+ * `total_length_of_fwd_packets`
288
+ * `total_length_of_bwd_packets`
289
+ * `down_up_ratio`
290
+
291
+ #### Packet size statistics
292
+
293
+ * `packet_length_min`, `packet_length_max`
294
+ * `packet_length_mean`, `packet_length_std`, `packet_length_variance`
295
+ * Forward and backward packet length metrics
296
+
297
+ #### Timing & inter-arrival times
298
+
299
+ * `flow_duration`
300
+ * `flow_iat_mean`, `flow_iat_std`, `flow_iat_max`, `flow_iat_min`
301
+ * Forward and backward IAT statistics
302
+ * `active_*`, `idle_*` features
303
+
304
+ #### Rate-based features
305
+
306
+ * `flow_bytes_per_s`
307
+ * `flow_packets_per_s`
308
+ * `fwd_packets_per_s`, `bwd_packets_per_s`
309
+
310
+ #### TCP flag counters
311
+
312
+ * `syn_flag_count`, `ack_flag_count`, `rst_flag_count`
313
+ * `fin_flag_count`, `psh_flag_count`, `urg_flag_count`
314
+ * `cwr_flag_count`, `ece_flag_count`
315
+
316
+ #### Bulk and subflow statistics
317
+
318
+ * `*_bulk_*` features
319
+ * `subflow_fwd_*`, `subflow_bwd_*`
320
+
321
+ > **Note:** Some CICFlowMeter features are conditionally emitted.
322
+ > Missing or undefined numeric values were **filled with `0.0`**, which semantically indicates *absence of that behavior*.
323
+
324
+ ---
325
+
326
+ ### 2. Semantic Flags (`semantic_flags`)
327
+
328
+ Each flow includes deterministic, interpretable indicators derived from numeric features:
329
+
330
+ | Flag | Meaning |
331
+ | --------------------- | --------------------------------------------------------- |
332
+ | `high_packet_rate` | Extremely high packets per second |
333
+ | `one_way_traffic` | Forward-only traffic (no backward response) |
334
+ | `syn_ack_imbalance` | Large SYN/ACK imbalance |
335
+ | `uniform_packet_size` | Low packet size variance |
336
+ | `long_idle_c2` | Long idle periods (possible command-and-control behavior) |
337
+
338
+ These flags are:
339
+
340
+ * Deterministic
341
+ * Stable across dataset versions
342
+ * Suitable for rule-based IDS and hybrid systems
343
+
344
+ ---
345
+
346
+ ## Preprocessing Summary
347
+
348
+ The dataset was generated using a **fully deterministic preprocessing pipeline**:
349
+
350
+ * Column name normalization
351
+ * Conversion of `NaN` / `±Infinity` → `0.0`
352
+ * Explicit label normalization
353
+ * No row removal due to missing numeric values
354
+ * Stratified train/validation/test splits
355
+ * Explicit Hugging Face feature schemas
356
+
357
+ No rebalancing, oversampling, or augmentation was applied.
358
+
359
+ ---
360
+
361
+ ## Class Imbalance
362
+
363
+ The dataset is **highly imbalanced**, with benign traffic dominating.
364
+
365
+ This reflects **real-world network conditions** and is intentional.
366
+
367
+ Users are encouraged to:
368
+
369
+ * Use **precision, recall, F1, PR-AUC**
370
+ * Apply **class weighting** or cost-sensitive learning
371
+ * Avoid relying on accuracy alone
372
+
373
  ---