Skip to main content

A Unified Benchmark Suite for Byzantine Attacks and Defenses in Federated Learning

Project description

Static Badge GitHub last commit (branch) GitHub Workflow Status (with event) Static Badge Static Badge Documentation Status GitHub
https://github.com/lishenghui/blades/raw/master/docs/source/images/arch.png

Installation

git clone https://github.com/lishenghui/blades
cd blades
pip install -v -e .
# "-v" means verbose, or more output
# "-e" means installing a project in editable mode,
# thus any local modifications made to the code will take effect without reinstallation.
cd blades/blades
python train.py file ./tuned_examples/fedsgd_cnn_fashion_mnist.yaml

Blades internally calls ray.tune; therefore, the experimental results are output to its default directory: ~/ray_results.

Experiment Results

https://github.com/lishenghui/blades/raw/master/docs/source/images/fashion_mnist.png https://github.com/lishenghui/blades/raw/master/docs/source/images/cifar10.png

Cluster Deployment

To run blades on a cluster, you only need to deploy Ray cluster according to the official guide.

Built-in Implementations

In detail, the following strategies are currently implemented:

Data Partitioners:

Dirichlet Partitioner

https://github.com/lishenghui/blades/blob/master/docs/source/images/dirichlet_partition.png

Sharding Partitioner

https://github.com/lishenghui/blades/blob/master/docs/source/images/shard_partition.png

Citation

Please cite our paper (and the respective papers of the methods used) if you use this code in your own work:

@article{li2023blades,
  title={Blades: A Unified Benchmark Suite for Byzantine Attacks and Defenses in Federated Learning},
  author= {Li, Shenghui and Ju, Li and Zhang, Tianru and Ngai, Edith and Voigt, Thiemo},
  journal={arXiv preprint arXiv:2206.05359},
  year={2023}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

blades-0.1.1234.tar.gz (595.6 kB view hashes)

Uploaded Source

Built Distribution

blades-0.1.1234-py3-none-any.whl (45.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page