# bubble-nb/iot-incremental-nids-reproduction architecture

> Architecture diagram of the GitHub repository bubble-nb/iot-incremental-nids-reproduction, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bubble-nb/iot-incremental-nids-reproduction
- Repository: https://github.com/bubble-nb/iot-incremental-nids-reproduction

## Overview

This repository packages a bounded reproduction and analysis workflow for cross-domain incremental IoT intrusion detection—not the original paper’s full pipeline. The principal workflow loads fixed author-prepared source and target data, trains a source model and target-domain adaptations, evaluates both domains, and saves run artifacts. Label mapping and repeat-run summaries support interpretation; bootstrap scripts prepare the disclosed author-code copies. The sampled excerpts establish the main training and analysis relationships, but do not expose the downloaded framework’s internals.

Main entry points: [`run_research.py`](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py) (Experiment Runner), [`bootstrap_author_code.py`](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/bootstrap_author_code.py) (Bootstrap Code), [`save_label_mapping.py`](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/save_label_mapping.py) (Label Mapping), [`summarize_repeat_experiments.py`](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/summarize_repeat_experiments.py) (Repeat Summary)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experiment["Experiments"]
  node_run["Experiment Runner<br/>[run_research.py]"]
  node_domain_data[("Domain Data<br/>[run_research.py]")]
  node_source_training["Source Training<br/>[run_research.py]"]
  node_adaptation["Target Adaptations<br/>[run_research.py]"]
  node_evaluation["Domain Evaluation<br/>[run_research.py]"]
  node_run_artifacts["Run Artifacts<br/>[run_research.py]"]
end

subgraph group_preparation["Code Preparation"]
  node_bootstrap["Bootstrap Code"]
  node_compatibility["Compatibility Copy<br/>[prepare_smoke.py]"]
  node_research_copy["Research Copy<br/>[setup_research.py]"]
end

subgraph group_analysis["Result Analysis"]
  node_mapping["Label Mapping"]
  node_summarizer["Repeat Summary"]
  node_audit["Validation Audit"]
  node_published_results["Reported Results<br/>[README.md]"]
end

node_researcher(("Researcher"))
node_author_framework["Author Framework"]

node_researcher -->|"prepares code"| node_bootstrap
node_bootstrap -->|"runs preparation"| node_compatibility
node_bootstrap -->|"runs preparation"| node_research_copy
node_compatibility -->|"copies and patches"| node_research_copy
node_researcher -->|"starts experiment"| node_run
node_run -->|"imports and reuses"| node_author_framework
node_run -->|"loads domains"| node_domain_data
node_run -->|"trains source model"| node_source_training
node_run -->|"trains methods"| node_adaptation
node_run -->|"measures domains"| node_evaluation
node_run -->|"writes outputs"| node_run_artifacts
node_researcher -->|"saves mapping"| node_mapping
node_mapping -->|"loads domains"| node_domain_data
node_mapping -->|"runs summary"| node_summarizer
node_summarizer -->|"reads predictions"| node_run_artifacts
node_summarizer -->|"writes summary"| node_published_results
node_audit -->|"checks splits"| node_domain_data

click node_bootstrap "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/bootstrap_author_code.py"
click node_compatibility "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/prepare_smoke.py"
click node_research_copy "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/setup_research.py"
click node_run "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py"
click node_domain_data "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py"
click node_source_training "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py"
click node_adaptation "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py"
click node_evaluation "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py"
click node_run_artifacts "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py"
click node_mapping "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/save_label_mapping.py"
click node_summarizer "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/summarize_repeat_experiments.py"
click node_audit "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/audit_repeat_validation.py"
click node_published_results "https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/results/README.md"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_run,node_domain_data,node_source_training,node_adaptation,node_evaluation,node_run_artifacts toneBlue
class node_bootstrap,node_compatibility,node_research_copy toneAmber
class node_mapping,node_summarizer,node_audit,node_published_results toneMint
class node_researcher,node_author_framework toneIndigo
```

## Components

### Experiments

- [Experiment Runner](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py): `run_research.py`
- [Domain Data](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py): `run_research.py`
- [Source Training](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py): `run_research.py`
- [Target Adaptations](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py): `run_research.py`
- [Domain Evaluation](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py): `run_research.py`
- [Run Artifacts](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/run_research.py): `run_research.py`

### Code Preparation

- [Bootstrap Code](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/bootstrap_author_code.py): `bootstrap_author_code.py`
- [Compatibility Copy](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/prepare_smoke.py): `prepare_smoke.py`
- [Research Copy](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/setup_research.py): `setup_research.py`

### Result Analysis

- [Label Mapping](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/save_label_mapping.py): `save_label_mapping.py`
- [Repeat Summary](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/summarize_repeat_experiments.py): `summarize_repeat_experiments.py`
- [Validation Audit](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/audit_repeat_validation.py): `audit_repeat_validation.py`
- [Reported Results](https://github.com/bubble-nb/iot-incremental-nids-reproduction/blob/main/results/README.md): `results/README.md`

### Other components

- **Researcher**
- **Author Framework**

## Connections

- Researcher → Bootstrap Code: prepares code (evidence: `README.md`)
- Bootstrap Code → Compatibility Copy: runs preparation (evidence: `bootstrap_author_code.py`)
- Bootstrap Code → Research Copy: runs preparation (evidence: `bootstrap_author_code.py`)
- Compatibility Copy → Research Copy: copies and patches (evidence: `setup_research.py`)
- Researcher → Experiment Runner: starts experiment (evidence: `README.md`)
- Experiment Runner → Author Framework: imports and reuses (evidence: `run_research.py`)
- Experiment Runner → Domain Data: loads domains (evidence: `run_research.py`)
- Experiment Runner → Source Training: trains source model (evidence: `run_research.py`)
- Experiment Runner → Target Adaptations: trains methods (evidence: `run_research.py`)
- Experiment Runner → Domain Evaluation: measures domains (evidence: `run_research.py`)
- Experiment Runner → Run Artifacts: writes outputs (evidence: `run_research.py`)
- Researcher → Label Mapping: saves mapping (evidence: `README.md`)
- Label Mapping → Domain Data: loads domains (evidence: `save_label_mapping.py`)
- Label Mapping → Repeat Summary: runs summary (evidence: `save_label_mapping.py`)
- Repeat Summary → Run Artifacts: reads predictions (evidence: `summarize_repeat_experiments.py`)
- Repeat Summary → Reported Results: writes summary (evidence: `summarize_repeat_experiments.py`)
- Validation Audit → Domain Data: checks splits (evidence: `audit_repeat_validation.py`)
