Skip to main content

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

Project description

https://github.com/lishenghui/blades/blob/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/blob/master/docs/source/images/fashion_mnist.png https://github.com/lishenghui/blades/blob/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.123.tar.gz (595.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

blades-0.1.123-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

Details for the file blades-0.1.123.tar.gz.

File metadata

  • Download URL: blades-0.1.123.tar.gz
  • Upload date:
  • Size: 595.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for blades-0.1.123.tar.gz
Algorithm Hash digest
SHA256 b5adf28380bd3b56a63c8cbd58faf9c17561110593140dca19cb6177a68f3733
MD5 65aa5e80a20f49b7b2d90f9068b6a34c
BLAKE2b-256 4f29db1a75716a7c2e0a8cb56de086bd39e6b2dfc9e357382d3d44899dc8250a

See more details on using hashes here.

File details

Details for the file blades-0.1.123-py3-none-any.whl.

File metadata

  • Download URL: blades-0.1.123-py3-none-any.whl
  • Upload date:
  • Size: 45.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for blades-0.1.123-py3-none-any.whl
Algorithm Hash digest
SHA256 918e72379aab4d4c1932ddd0733da5dac5658c37f310bda88dc32c325a88cabb
MD5 e3698b522240a6511f1811995c36fb47
BLAKE2b-256 950e0d4a6641d7ea431e442c6c4fce532ff82020b6f281fbfe6a8dd821a04bc9

See more details on using hashes here.

Supported by

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