How mcagatayc/synthetic-data-gen-for-nw-sec-testing works
This repository is research code for generating synthetic network-traffic data for cybersecurity testing. Its principal workflow prepares and scales traffic records, trains a VAE, encodes records into latent vectors, trains latent diffusion, then generates synthetic records and benchmarks them against real data. A later phase adds CICIDS2017 and UNSW-NB15 generation and comparisons. The graph also retains the separate GAN/Transformer experiments and shared preprocessing utilities. Phase-two scripts are indexed but not excerpted, so their internal links are shown only as unverified.
Main entry points: prepare_data.py Traffic Preprocessing · 04_generate_and_benchmark.py Generate and Benchmark · 02_create_latent_dataset.py Latent Dataset · 03_train_latent_diffusion.py Latent Diffusion Training
Components 20
Data Preparation
- Traffic Preprocessing
prepare_data.py - Numeric Preprocessing
prepare_libs.py - Phase Two Preparation
phase2/01_prepare_phase2.py
Generative Models
- VAE Model
vae.py - Diffusion Model
diffusion.py - GAN Model
gan.py - Transformer Autoencoder
transformer.py - Improved Transformer
improved_transformer.py
VAE Diffusion Workflow
- VAE Training
01_train_vae.py - Latent Dataset
02_create_latent_dataset.py - Latent Diffusion Training
03_train_latent_diffusion.py - Generate and Benchmark
04_generate_and_benchmark.py - Phase Two Models
phase2 - Phase Two Generation
phase2/06_generate_with_diffusion_phase2.py
Research Evaluation
- Phase Two Evaluation
phase2/07_evaluate_comparisons_phase2.py - Quality Metrics
calculate_dcr.py - Utility Evaluation
calculate_utility.py - Synthetic Traffic
github_repo/synthetic_data/synthetic_traffic_VAE-LDM.csv
Other components
- Network Traffic Data
data/Midterm_53_group.csv - Researcher
Connections 20
- Network Traffic Data → Traffic Preprocessing: loads
prepare_data.py - VAE Training → Traffic Preprocessing: uses
01_train_vae.py - Latent Dataset → Traffic Preprocessing: uses
02_create_latent_dataset.py - Latent Diffusion Training → Traffic Preprocessing: uses
03_train_latent_diffusion.py - Generate and Benchmark → Traffic Preprocessing: loads and scales
04_generate_and_benchmark.py - VAE Training → Latent Dataset: encodes data
- Latent Dataset → Latent Diffusion Training: provides latents
- Latent Diffusion Training → Generate and Benchmark: provides model
- Generate and Benchmark → Synthetic Traffic: writes
04_generate_and_benchmark.py - Generate and Benchmark → Researcher: produces results
- VAE Model → Numeric Preprocessing: uses
vae.py - Transformer Autoencoder → Numeric Preprocessing: uses
transformer.py - Improved Transformer → Numeric Preprocessing: uses
improved_transformer.py - Phase Two Preparation → Phase Two Models: prepares inputs
- Phase Two Models → Phase Two Generation: supplies models
- Phase Two Generation → Phase Two Evaluation: supplies samples
- Phase Two Evaluation → Quality Metrics: compares quality
- Phase Two Evaluation → Utility Evaluation: evaluates utility
- Researcher → VAE Training: runs training
- Researcher → Phase Two Preparation: runs experiments