# Iot Nids Poisoning Eval

> This evaluation probes the robustness of supervised machine learning models for IoT intrusion detection when their training data is corrupted by adversarial poisoning attacks. It measures how different model architectures degrade in detection capability under label manipulation, outlier injection, and feature impersonation. Use when the user wants to benchmark on CICIoT2023, Edge-IIoTset, N-BaIoT, or asks about evaluating this task. Reports Accuracy.

- Skill: `qhjqhj00/iot-nids-poisoning-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/iot-nids-poisoning-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/iot-nids-poisoning-eval/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: qhjqhj00 (https://skillmd.com/u/qhjqhj00)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/qhjqhj00/iot-nids-poisoning-eval

---


# iot-nids-poisoning-eval

> Robustness Analysis of Machine Learning Models for IoT Intrusion Detection Under Data Poisoning Attacks — Wulnye et al. (2026) (arXiv:2604.14444, 2026)

## What this evaluates

This evaluation probes the robustness of supervised machine learning models for IoT intrusion detection when their training data is corrupted by adversarial poisoning attacks. It measures how different model architectures degrade in detection capability under label manipulation, outlier injection, and feature impersonation.

## Datasets

- **CICIoT2023** — total ?; splits: train (-1), test (-1)
- **Edge-IIoTset** — total ?; splits: train (-1), test (-1)
- **N-BaIoT** — total ?; splits: train (-1), test (-1)

## Metrics

- `Accuracy` **(primary)** — range: [0, 1]
  - The proportion of correctly classified samples out of the total number of samples. Calculated as (True Positives + True Negatives) / Total Samples.
- `Precision` — range: [0, 1]
  - The proportion of true positive predictions among all positive predictions. Calculated as True Positives / (True Positives + False Positives).
- `Recall` — range: [0, 1]
  - The proportion of true positive predictions among all actual positive samples. Calculated as True Positives / (True Positives + False Negatives).
- `F1-score` — range: [0, 1]
  - The harmonic mean of Precision and Recall, providing a single metric that balances both false positives and false negatives. Calculated as 2 * (Precision * Recall) / (Precision + Recall).

## Input / output format

**Input**: Normalized, categorical-encoded feature vectors representing IoT network traffic, labeled as benign or specific attack types.

**Output**: Predicted class labels indicating whether each traffic sample is benign or corresponds to a specific attack category.

## Scoring recipe

```python
def compute_metrics(y_true, y_pred):
    tp = sum(1 for t, p in zip(y_true, y_pred) if t == p == 1)
    fp = sum(1 for t, p in zip(y_true, y_pred) if t != 1 and p == 1)
    fn = sum(1 for t, p in zip(y_true, y_pred) if t == 1 and p != 1)
    accuracy = sum(1 for t, p in zip(y_true, y_pred) if t == p) / len(y_true)
    precision = tp / (tp + fp) if (tp + fp) > 0 else 0.0
    recall = tp / (tp + fn) if (tp + fn) > 0 else 0.0
    f1 = 2 * precision * recall / (precision + recall) if (precision + recall) > 0 else 0.0
    return {'accuracy': accuracy, 'precision': precision, 'recall': recall, 'f1': f1}
```

## Common pitfalls

- The exact poisoning rate (percentage of corrupted training samples) and the specific algorithm for generating synthetic outliers or feature impersonation are not detailed, hindering exact replication.
- Class balancing techniques are mentioned as part of preprocessing, but the specific method (e.g., SMOTE, undersampling) and its application timing relative to poisoning are unspecified.

## Evidence (verbatim from paper)

> In this work, model performance was evaluated using four widely adopted intrusion-detection metrics [[24], [17]]. Accuracy measured the overall correctness of predictions, precision assessed how reliably attacks were identified, recall quantified the model’s ability to detect true malicious events, and the F1-score balanced both factors—supporting consistent comparisons of all models across clean and poisoned IoT datasets.

## Citation

```bibtex
@misc{wulnye2026robustness,
  title={Robustness Analysis of Machine Learning Models for IoT Intrusion Detection Under Data Poisoning Attacks},
  author={Wulnye et al. (2026)},
  year={2026},
  note={arXiv:2604.14444}
}
```

- arXiv: 2604.14444

