How ianupk/idsgan works
IDSGAN’s main workflow turns NSL-KDD traffic into encoded records, trains black-box intrusion detectors, then trains a restricted-modification WGAN against their predictions to generate evasion examples. Evaluation measures detection and evasion rates across attack groups and IDS models; a separate baseline workflow compares other attacks. The graph also preserves dataset acquisition, feature policy, model persistence, and reporting. Relationships for unsampled modules are included only where the README or SOURCE INDEX supports them; the excerpts do not expose every runtime call or checkpoint detail.
Main entry points: data_preprocessing.py Preprocess and split · evaluate.py Evaluate evasion · idsgan.py IDSGAN trainer · train_idsgan.py Train IDSGAN
Components 17
Data preparation
- Dataset download
download_data.py - Preprocess and split
src/data_preprocessing.py - Feature policy
src/feature_utils.py - Configuration
src/config.py
IDS models
- Train IDS models
train_ids.py - IDS model factory
src/ids_models.py - IDS checkpoints
Adversarial generation
- Train IDSGAN
train_idsgan.py - IDSGAN trainer
src/idsgan.py - Restricted generator
src/generator.py - WGAN critic
src/discriminator.py - GAN checkpoints
Evaluation
- Evaluate evasion
evaluate.py - DR and EIR metrics
src/metrics.py - Result figures
- Baseline comparison
run_baselines.py
Other components
- NSL-KDD data
Connections 27
- Dataset download → NSL-KDD data: downloads
README.md - Dataset download → Configuration: uses paths
download_data.py - Preprocess and split → NSL-KDD data: loads records
README.md - Preprocess and split → Feature policy: uses definitions
src/data_preprocessing.py - Preprocess and split → Configuration: uses paths
src/data_preprocessing.py - Train IDS models → Preprocess and split: prepares data
train_ids.py - Train IDS models → IDS model factory: trains models
train_ids.py - Train IDS models → IDS checkpoints: saves checkpoints
README.md - Train IDSGAN → Preprocess and split: prepares data
train_idsgan.py - Train IDSGAN → IDS model factory: loads IDS
train_idsgan.py - Train IDSGAN → IDS checkpoints: loads checkpoints
README.md - Train IDSGAN → IDSGAN trainer: starts training
train_idsgan.py - Train IDSGAN → GAN checkpoints: saves checkpoints
README.md - IDSGAN trainer → Restricted generator: generates records
src/idsgan.py - IDSGAN trainer → WGAN critic: scores records
src/idsgan.py - IDSGAN trainer → Feature policy: gets masks
src/idsgan.py - IDSGAN trainer → IDS model factory: queries predictions
src/idsgan.py - Restricted generator → Feature policy: uses feature indices
src/generator.py - Evaluate evasion → Preprocess and split: prepares test data
evaluate.py - Evaluate evasion → IDSGAN trainer: loads generator
evaluate.py - Evaluate evasion → GAN checkpoints: loads checkpoints
README.md - Evaluate evasion → IDS model factory: evaluates IDS
evaluate.py - Evaluate evasion → DR and EIR metrics: computes metrics
evaluate.py - Evaluate evasion → Result figures: produces plots
README.md - Baseline comparison → Preprocess and split: prepares test data
run_baselines.py - Baseline comparison → IDS model factory: loads target IDS
run_baselines.py - Baseline comparison → DR and EIR metrics: compares detection
run_baselines.py