# Ton Iot Tpu Eval

> Evaluates deep learning-based network intrusion detection on IoT traffic, comparing hardware accelerators (Edge TPU vs ARM CPU) for classification accuracy, inference speed, and energy efficiency. Use when the user wants to benchmark on ToN-IoT, or asks about evaluating this task. Reports classification accuracy.

- Skill: `qhjqhj00/ton-iot-tpu-eval` (Agent Skill)
- Install (CLI): `npx skillmds add qhjqhj00/ton-iot-tpu-eval`
- Raw SKILL.md: https://api.skillmd.com/api/skills/qhjqhj00/ton-iot-tpu-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/ton-iot-tpu-eval

---


# ton-iot-tpu-eval

> Exploring Edge TPU for Network Intrusion Detection in IoT — Hosseininoorbin et al. (2021) (arXiv:2103.16295, 2021)

## What this evaluates

Evaluates deep learning-based network intrusion detection on IoT traffic, comparing hardware accelerators (Edge TPU vs ARM CPU) for classification accuracy, inference speed, and energy efficiency.

## Datasets

- **ToN-IoT** — total 22339021; splits: train (-1), val (-1), test (-1)

## Metrics

- `classification accuracy` **(primary)** — range: [0, 1]
  - Standard top-1 accuracy: fraction of correctly classified traffic flows out of total samples. Exact formula not specified in provided text.
- `inference speed` — range: other
  - Latency per inference or throughput (samples/sec). Measured on Edge TPU and ARM Cortex-A53.
- `energy consumption` — range: other
  - Total energy used per inference or per dataset run, measured in Joules.

## Input / output format

**Input**: 44 numerical/categorical features extracted from IoT network traffic flows (flow identifiers like IPs/ports removed).

**Output**: Multi-class label indicating benign traffic or one of nine attack types (backdoor, DoS, DDoS, injection, MitM, password, ransomware, scanning, XSS).

## Scoring recipe

```python
def compute_accuracy(predictions, labels):
    correct = sum(1 for p, l in zip(predictions, labels) if p == l)
    return correct / len(labels)
# Latency and energy measured via hardware profiling tools per inference.
```

## Common pitfalls

- Dataset is highly imbalanced (96.44% attack vs 3.56% benign), requiring stratified splits or weighted loss.
- Flow identifiers are explicitly removed to prevent bias, so models cannot rely on IP/port patterns.
- Edge TPU performance heavily depends on model size due to on-chip memory limits; small models may run slower on TPU than CPU.

## Evidence (verbatim from paper)

> A heterogeneous IoT dataset has been utilised to evaluate the proposed TPU-based NIDS. The ToN-IoT dataset... It consists of nine attack scenarios including backdoor, DoS, Distributed DoS (DDoS), injection, Man In The Middle, password, ransomware, scanning and Cross-Site Scripting. The dataset is made up of mainly attack samples; 21,542,641 (96.44%) and a low amount of benign samples; 796,380 (3.56%).

## Citation

```bibtex
@misc{hosseininoorbin2021edge,
  title={Exploring Edge TPU for Network Intrusion Detection in IoT},
  author={Hosseininoorbin et al. (2021)},
  year={2021},
  note={arXiv:2103.16295}
}
```

- arXiv: 2103.16295

