Skip to content

AryCra07/BadNets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Badnets

A simple implementation of Badnets: Identifying vulnerabilities in the machine learning model supply chain .

The CNN I built consists of three convolutional layers and two fully connected layers. Taking into account the need to support both MNIST and CIFAR10 datasets, this model incorporates an extra convolutional layer when compared to the model presented in the original paper.

The implementation strategy is as follows:

  • First, train the model using a partially randomly poisoned training set.
  • Then, test the model using a clean test set and a test set fully containing triggers, obtaining metrics such as BA( Benign accuracy) and ASR(Attack Success Rate).

INSTALLATION

To install the required packages, you can run the following command:

pip install -r requirements.txt

USAGE

To run the code, you can use the following command:

python main.py

You can customize various parameters on the command line:

python main.py --help

LICENSE

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple implementation of Badnets.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages