ids-detection-eval
Machine learning-based network intrusion detection for big and imbalanced data using oversampling, stacking feature embedding and feature extraction — Talukder et al. (2024) (arXiv:2401.12262, 2024)
What this evaluates
Evaluates machine learning classifiers for network intrusion detection on imbalanced, high-dimensional traffic data. Probes the model's ability to distinguish benign from malicious traffic across binary and multilabel settings using standard classification metrics.
Datasets
- UNSW-NB15 — total ?; splits: train (-1), test (-1)
- CIC-IDS2017 — total ?; splits: train (-1), test (-1)
- CIC-IDS2018 — total ?; splits: train (-1), test (-1)
Metrics
Accuracy (primary) — range: [0, 1]
- Proportion of correctly predicted observations to total observations. Formula: (TP + TN) / (TP + FP + FN + TN).
Precision — range: [0, 1]
- Ratio of correctly predicted positive values to total predicted positive values. Formula: TP / (TP + FP).
Recall — range: [0, 1]
- Ratio of correctly predicted positive values to all actual positive values. Formula: TP / (TP + FN).
F1-Score — range: [0, 1]
- Harmonic mean of precision and recall. Formula: 2 * (Precision * Recall) / (Precision + Recall).
AUC — range: [0, 1]
- Area Under the Receiver Operating Characteristic Curve. Measures the model's ability to distinguish between class labels by plotting True Positive Rate against False Positive Rate at various thresholds.
Input / output format
Input: Feature vectors extracted from network traffic records, preprocessed via Random Oversampling, Stacking Feature Embedding, and PCA.
Output: Predicted class label (binary or multilabel classification).
Scoring recipe
def compute_metrics(y_true, y_pred):
tp = sum((t==1) & (p==1) for t, p in zip(y_true, y_pred))
tn = sum((t==0) & (p==0) for t, p in zip(y_true, y_pred))
fp = sum((t==0) & (p==1) for t, p in zip(y_true, y_pred))
fn = sum((t==1) & (p==0) for t, p in zip(y_true, y_pred))
acc = (tp + tn) / (tp + fp + fn + tn)
prec = tp / (tp + fp) if (tp + fp) > 0 else 0
rec = tp / (tp + fn) if (tp + fn) > 0 else 0
f1 = 2 * (prec * rec) / (prec + rec) if (prec + rec) > 0 else 0
return acc, prec, rec, f1
Common pitfalls
- Data imbalance is handled via Random Oversampling on the training folds, so test metrics must be computed on the original, unbalanced test split to reflect real-world performance.
- The protocol evaluates both binary and multilabel classification; metric aggregation (e.g., macro vs micro averaging) is not explicitly specified and may vary across implementations.
- 10-fold cross-validation is used with a 90/10 train/test split per fold, meaning reported scores are averages across 10 runs rather than a single holdout evaluation.
Evidence (verbatim from paper)
Several measures, such as accuracy, precision, recall, F1-score, ROC curve, and confusion matrix, are used to evaluate the performance of our proposed model. ... Accuracy is a fundamental performance metric, representing the proportion of correctly predicted observations to the total observations. It is calculated as follows: $$ Accuracy = rac {T P + T N}{T P + F P + F N + T N} $$
Citation
@misc{talukder2024network,
title={Machine learning-based network intrusion detection for big and imbalanced data using oversampling, stacking feature embedding and feature extraction},
author={Talukder et al. (2024)},
year={2024},
note={arXiv:2401.12262}
}
1---2name: ids-detection-eval3description: Evaluates machine learning classifiers for network intrusion detection on imbalanced, high-dimensional traffic data. Probes the model's ability to distinguish benign from malicious traffic across binary and multilabel settings using standard classification metrics. Use when the user wants to benchmark on UNSW-NB15, CIC-IDS2017, CIC-IDS2018, or asks about evaluating this task. Reports Accuracy.4metadata:5 source: https://skillmd.com/skills/qhjqhj00/ids-detection-eval6 skill_kind: dataset_eval7 source_arxiv: 2401.122628 bibtex_key: talukder2024network9 confidence: high10---1112# ids-detection-eval1314> Machine learning-based network intrusion detection for big and imbalanced data using oversampling, stacking feature embedding and feature extraction — Talukder et al. (2024) (arXiv:2401.12262, 2024)1516## What this evaluates1718Evaluates machine learning classifiers for network intrusion detection on imbalanced, high-dimensional traffic data. Probes the model's ability to distinguish benign from malicious traffic across binary and multilabel settings using standard classification metrics.1920## Datasets2122- **UNSW-NB15** — total ?; splits: train (-1), test (-1)23- **CIC-IDS2017** — total ?; splits: train (-1), test (-1)24- **CIC-IDS2018** — total ?; splits: train (-1), test (-1)2526## Metrics2728- `Accuracy` **(primary)** — range: [0, 1]29 - Proportion of correctly predicted observations to total observations. Formula: (TP + TN) / (TP + FP + FN + TN).30- `Precision` — range: [0, 1]31 - Ratio of correctly predicted positive values to total predicted positive values. Formula: TP / (TP + FP).32- `Recall` — range: [0, 1]33 - Ratio of correctly predicted positive values to all actual positive values. Formula: TP / (TP + FN).34- `F1-Score` — range: [0, 1]35 - Harmonic mean of precision and recall. Formula: 2 * (Precision * Recall) / (Precision + Recall).36- `AUC` — range: [0, 1]37 - Area Under the Receiver Operating Characteristic Curve. Measures the model's ability to distinguish between class labels by plotting True Positive Rate against False Positive Rate at various thresholds.3839## Input / output format4041**Input**: Feature vectors extracted from network traffic records, preprocessed via Random Oversampling, Stacking Feature Embedding, and PCA.4243**Output**: Predicted class label (binary or multilabel classification).4445## Scoring recipe4647```python48def compute_metrics(y_true, y_pred):49 tp = sum((t==1) & (p==1) for t, p in zip(y_true, y_pred))50 tn = sum((t==0) & (p==0) for t, p in zip(y_true, y_pred))51 fp = sum((t==0) & (p==1) for t, p in zip(y_true, y_pred))52 fn = sum((t==1) & (p==0) for t, p in zip(y_true, y_pred))53 acc = (tp + tn) / (tp + fp + fn + tn)54 prec = tp / (tp + fp) if (tp + fp) > 0 else 055 rec = tp / (tp + fn) if (tp + fn) > 0 else 056 f1 = 2 * (prec * rec) / (prec + rec) if (prec + rec) > 0 else 057 return acc, prec, rec, f158```5960## Common pitfalls6162- Data imbalance is handled via Random Oversampling on the training folds, so test metrics must be computed on the original, unbalanced test split to reflect real-world performance.63- The protocol evaluates both binary and multilabel classification; metric aggregation (e.g., macro vs micro averaging) is not explicitly specified and may vary across implementations.64- 10-fold cross-validation is used with a 90/10 train/test split per fold, meaning reported scores are averages across 10 runs rather than a single holdout evaluation.6566## Evidence (verbatim from paper)6768> Several measures, such as accuracy, precision, recall, F1-score, ROC curve, and confusion matrix, are used to evaluate the performance of our proposed model. ... Accuracy is a fundamental performance metric, representing the proportion of correctly predicted observations to the total observations. It is calculated as follows: $$ Accuracy = rac {T P + T N}{T P + F P + F N + T N} $$6970## Citation7172```bibtex73@misc{talukder2024network,74 title={Machine learning-based network intrusion detection for big and imbalanced data using oversampling, stacking feature embedding and feature extraction},75 author={Talukder et al. (2024)},76 year={2024},77 note={arXiv:2401.12262}78}79```8081- arXiv: 2401.12262