This is the implementation of the paper: Improved Activation Clipping for Universal Backdoor Mitigation and Test-Time Detection
This repository includes:
- Training code for the clean model and attacked model.
- MMAC backdoor mitigation code.
- MMDF backdoor defense framework.
Ubuntu 20.04 Python 3.7
- Install required python packages:
$ pip install numpy
$ pip install torch
$ pip install torchvision
$ pip install matplotlib
$ pip install scipy
$ pip install pillowFor clean model training, run command:
$ ./run_clean.shWhich gives 10 clean models saved in ./clean0 to ./clean9 folders
For attack models (BadNet attack) run_command:
$ ./run_attack.shWhich gives 10 attacked modes saved in ./model0 to ./model9 folders
Run_command:
$ ./run_mmac.shRun:
$ ./run_mmdf.sh