Giter Site home page Giter Site logo

backdoor_federated_learning's Introduction

Forked from: https://github.com/ebagdasa/backdoor_federated_learning

backdoor_federated_learning

Updates made via fork:

  1. Code now runs in Python 3.7 and Pytorch 1.7.1+cu110
  2. folder saved_models contains BASE, which is a model trained for Image Classification task for 10,000 epochs. This is in relation to the paper, which requires such a trained model on which backdoor attacks are conducted.
  3. utils/img_class_continue.yaml has been made to allow model poisoning from saved_models/BASE.

Steps to run code:

  1. Clone repository
git clone https://github.com/monopolize-all/backdoor_federated_learning.git
cd backdoor_federated_learning
  1. Make a new venv and activate it, also installing all required libraries
python3.7 -m venv venv
source venv/bin/activate
pip install -r requirements.txt -f https://download.pytorch.org/whl/torch_stable.html
  1. Start visdom server and specify port
visdom -port 8097
  1. Run poisoning on pretrained model (Requires new terminal window with venv activated as visdom needs to be kept running.)
python training.py --params utils/img_class_continue.yaml
  1. Open http://localhost:8097 in a web browser to see live accuracy results as model gets trained.

Credits

Credits go to [email protected] as code has been originally provided by him. All I did was make it compatible with newer pytorch versions and also provide a pretrained model for Backdoor attacks on Image Classification.

This code includes experiments for paper "How to Backdoor Federated Learning" (https://arxiv.org/abs/1807.00459)

backdoor_federated_learning's People

Contributors

ebagdasa avatar monopolize-all avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.