This code provides a PyTorch implementation of the paper titled ENERGY BACKDOOR ATTACK TO DEEP NEURAL NETWORKS.
The figure above provides an overview of the backdoored model. Neurons circled in orange refer to unnecessary neurons that fire when the trigger is present in the input.
All dependencies can be found in file
We run our code in a singularity container that can be obtained using the following command
singularity build --fakeroot ./test_image.sif ./test_image.def
The content of the test_image.sif should be:
Bootstrap: docker
From: pytorch/pytorch:latest
%files
dependencies.txt dependencies.txt
%post
apt-get -y update && apt-get install -y python
pip install efficientnet-pytorch==0.7.1
pip install dill timm tensorboard
apt-get install -y < dependencies.txt
%runscript
python -c 'print("Image successfully loaded!")'
But the provided files can also be run in any other environment with the required packages installed.
We use in our project: