Skip to content

wanghangpsu/MMAC

Repository files navigation

Improved Activation Clipping for Universal Backdoor Mitigation and Test-Time Detection

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.

Requirements

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 pillow

Training

For clean model training, run command:

$ ./run_clean.sh

Which gives 10 clean models saved in ./clean0 to ./clean9 folders

For attack models (BadNet attack) run_command:

$ ./run_attack.sh

Which gives 10 attacked modes saved in ./model0 to ./model9 folders

MMAC Mitigation

Run_command:

$ ./run_mmac.sh

MMDF

Run:

$ ./run_mmdf.sh

About

The implementation of MMAC method

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors