Skip to main content

No project description provided

Project description

FLEX-block

FLEXblock is an implementation of blockchain functionality for simulating descentralized federated learning experiments. It is intended to extend the FLEXible framework.

Details

This repository includes both:

  • An interface for creating your own blockchain architectures and working with them in a FLEX experiment.
  • Some blockchain architectures to be used directly out of the box.

Folder structure

  • flexBlock/pool: contains the interface for creating blockchain architectures and some implementations of it.
  • flexBlock/blockchain: contains the interface for creating blockchains and block to be used with architectures and some implementations of it.
  • notebooks: some explanatory notebooks showing how to implement a custom blockchain architecture and working with the library.
  • tests: contains tests for the features present in this library.

Explanatory notebooks

  • cifar-10.ipynb: Shows how to train a model in the cifar 10 dataset with a blockchain architecture.
  • Proof of federated Learning MNIST.ipynb: Explains and shows how to use the Proof Of Federated Learning blockchain architecture for training a simple model in the popular MNIST dataset.
  • Custom blockchain.ipynb: Shows how to create your own blockchain architecture and how to later use it in any kind of FLEX experiment.

Features

The library implements an interface for creating your own blockchain architectures for FLEX experiments. Still, we offer some architectures out of the box.

Architecture Description Citation
Proof of Work (PoW) The most classical consensus mechanism used in blockchain where miners race into solving a hash puzzle. In this architecture the sets of miners(aggregators) and clients is disjoint. Federated Learning Meets Blockchain in Edge Computing: Opportunities and Challenges
Proof of Stake (PoS) This network uses a consensus mechanism where miners have some reputation/tokens called stake and they are picked randomly according to their stake. In this architecture the sets of clients and miners are the same. Robust Blockchained Federated Learning with Model Validation and Proof-of-Stake Inspired Consensus
Proof of Federated Learning (PoFL) A very popular consensus mechanism for blockchain enabled federated learning. Based on Proof of Useful Work miners race to get the model with the most accuracy on a given dataset. In this architecure the sets of clients and miners is disjoint. Proof of federated learning: A novel energy-recycling consensus algorithm

Installation

In order to install this repo locally:

pip install -e .

FLEX-block is available on the PyPi repository and can be easily installed using pip:

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

flexBlock-0.0.1.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

flexBlock-0.0.1-py3-none-any.whl (28.5 kB view details)

Uploaded Python 3

File details

Details for the file flexBlock-0.0.1.tar.gz.

File metadata

  • Download URL: flexBlock-0.0.1.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for flexBlock-0.0.1.tar.gz
Algorithm Hash digest
SHA256 955c1c6290711d23231eed6efbe252f4e0e37e037595e116efc68a7bbcc034f6
MD5 f1bb2b1820e672547df3220d8c57a332
BLAKE2b-256 9577ec8269d5cd4fe9ec6c093e7e054235909162d4dc1e83a96f1871bf6ad458

See more details on using hashes here.

File details

Details for the file flexBlock-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: flexBlock-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 28.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for flexBlock-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eae3eb15e512155e1a2b937367182314b8ec498b2ecdc7081f2f278ef55b6e91
MD5 60900b904c4aa0976d6e4fa66e3324f9
BLAKE2b-256 8d56a13617cd1522c0146eec2dc913c7e82b71005a8a8c83c16ed59dfaf31c15

See more details on using hashes here.

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