Skip to content

Aryan-Satpathy/Backdoor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backdoor and Adversarial Robustness for SSL

This repository contains the official code implementation for our paper Towards Adversarial Robustness And Backdoor Mitigation in SSL. If you find this repo useful for your work, please cite our paper.

We implement backdoor-poisoning attacks and evaluate our defense against these attacks on Image Classification Task. Backdoor attacks supported:

Datasets supported:

  • CIFAR 10
  • CIFAR 100
  • IMAGENET 100 (100 class subset of IMAGENET)

Installation and Requirements

  • Download the repository from anonymous4openscience.
  • Make a virtual environment (optional) (recommended)
    virtualenv <env_name>
    source <env_name>/bin/activate
  • Install necessary libraries
    pip install -r requirements.txt

Running The Code

We provide a bash script to run our program with appropriate command-line arguments.

  • Give permission
chmod +x run.sh
  • Call main_train.py
bash run.sh <--args values>

Call bash run.sh --help if unsure about the arguments, available options or their meaning.

Results

Results of all experiments are saved in a folder named saves. Each experiment will create a folder named <job name> set by run.sh. Each experiment folder contains model state-dicts and optimizer states saved every 100 epoch, and a tfenvent file containing tensorboard log. To view training progress and compare training curves:

tensorboard --logdir=saves

When repeating the same experiment with different hyperparameters, use --suffix option in run.sh to prevent overwriting log of previous experiment.

To Do

SSL methods to add

New Datasets / Benchmarks

NOTE: This repository uses a lot of base code from CTRL's repository. We refactor their code and implement other models, defenses and attacks. We also completely rewrite the pipeline using lightly for cleaner and shorter code.

License

This code has a GPL-style license.

Cite our paper

@misc{satpathy2024adversarialrobustnessbackdoormitigation,
      title={Towards Adversarial Robustness And Backdoor Mitigation in SSL}, 
      author={Aryan Satpathy and Nilaksh Singh and Dhruva Rajwade and Somesh Kumar},
      year={2024},
      eprint={2403.15918},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2403.15918}, 
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •