Skip to content

Poisoning Attacks on Deep Learning based Wireless Traffic Prediction

Notifications You must be signed in to change notification settings

iQua/poisoning-attacks-wireless-traffic-prediction

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Acknowledgment

The code is written based on the Zhang et al's code, and still under polishment.

Download the dataset

The dataset can be manually downloaded from Google Drive

After downloading the .h5 files, put those files into a directory named dataset and put the directory under the main directory before running the code.

Train centralized model

python centralized.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --epochs 10 --batch_size 50

Centrailized File: milano.h5 Type: sms MSE: 0.3171 MAE: 0.3223, NRMSE: 0.0908

Uniform noise for comparison

python centralized.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison --attack_epsilon 0.2 --attack_optimizer uniform

Data poisoning against centralized model training

python centralized.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison --attack_epsilon 0.2 --num_ensemble 2 --attack_rounds 30 --epochs 10 --batch_size 50 --attack_lr 10.0 --mask_prob 0.8 --surrogate_model lstm

Apply defense to data poisoning (Data Sanitization, Randomized Smoothing)

python centralized.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison --attack_epsilon 0.2 --num_ensemble 2 --attack_rounds 30 --epochs 10 --batch_size 50 --attack_lr 10.0 --mask_prob 0.8 --surrogate_model lstm --apply_defense sphere_sani
python centralized.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison --attack_epsilon 1.0 --num_ensemble 2 --attack_rounds 20 --epochs 10 --batch_size 50 --attack_lr 10.0 --mask_prob 0.8 --surrogate_model lstm --apply_defense adj_sani
python centralized.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison --attack_epsilon 1.0 --num_ensemble 2 --attack_rounds 20 --epochs 10 --batch_size 50 --attack_lr 10.0 --mask_prob 0.8 --surrogate_model lstm --apply_defense rand

Train FedAvg model

python fed_avg.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1

Type: sms MSE: 0.3744 MAE: 0.3386, NRMSE: 0.0955

Model poisoning against FedAvg

python fed_avg.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison

Apply defenses (Multi Krum, Trimmed Mean)

python fed_avg.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison --apply_defense multi_krum
python fed_avg.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison --apply_defense trimmed_mean
python fed_avg.py --file milano.h5 --type sms --lr 1e-2 --frac 0.1 --bs 100 --opt 'sgd' --out_dim 1 --poison --apply_defense median

About

Poisoning Attacks on Deep Learning based Wireless Traffic Prediction

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages