FLoBC

所属分类:区块链开发
开发工具:Rust
文件大小:4351KB
下载次数:0
上传日期:2023-03-20 14:19:00
上 传 者sh-1993
说明:  FLoBC,一个基于去中心化区块链的联合学习框架
(FLoBC,A Decentralized Blockchain-Based Federated Learning Framework)

文件列表:
backend (0, 2022-11-14)
backend\Cargo.toml (1498, 2022-11-14)
backend\build.rs (189, 2022-11-14)
backend\build_finalize.sh (1550, 2022-11-14)
backend\patches (0, 2022-11-14)
backend\patches\exonum-api (0, 2022-11-14)
backend\patches\exonum-api\.cargo-ok (2, 2022-11-14)
backend\patches\exonum-api\.cargo_vcs_info.json (74, 2022-11-14)
backend\patches\exonum-api\Cargo.toml (1617, 2022-11-14)
backend\patches\exonum-api\Cargo.toml.orig (862, 2022-11-14)
backend\patches\exonum-api\LICENSE (10847, 2022-11-14)
backend\patches\exonum-api\src (0, 2022-11-14)
backend\patches\exonum-api\src\backends (0, 2022-11-14)
backend\patches\exonum-api\src\backends\actix.rs (13137, 2022-11-14)
backend\patches\exonum-api\src\backends\mod.rs (845, 2022-11-14)
backend\patches\exonum-api\src\cors.rs (4710, 2022-11-14)
backend\patches\exonum-api\src\error.rs (5854, 2022-11-14)
backend\patches\exonum-api\src\lib.rs (9323, 2022-11-14)
backend\patches\exonum-api\src\manager.rs (12852, 2022-11-14)
backend\patches\exonum-api\src\with.rs (6338, 2022-11-14)
backend\patches\exonum-cli (0, 2022-11-14)
backend\patches\exonum-cli\.cargo-ok (2, 2022-11-14)
backend\patches\exonum-cli\.cargo_vcs_info.json (74, 2022-11-14)
backend\patches\exonum-cli\Cargo.toml (2079, 2022-11-14)
backend\patches\exonum-cli\Cargo.toml.orig (1409, 2022-11-14)
backend\patches\exonum-cli\LICENSE (10847, 2022-11-14)
backend\patches\exonum-cli\src (0, 2022-11-14)
backend\patches\exonum-cli\src\command (0, 2022-11-14)
backend\patches\exonum-cli\src\command\finalize.rs (7614, 2022-11-14)
backend\patches\exonum-cli\src\command\generate_config.rs (7417, 2022-11-14)
backend\patches\exonum-cli\src\command\generate_template.rs (2129, 2022-11-14)
backend\patches\exonum-cli\src\command\maintenance.rs (3759, 2022-11-14)
backend\patches\exonum-cli\src\command\mod.rs (4102, 2022-11-14)
backend\patches\exonum-cli\src\command\run.rs (4963, 2022-11-14)
backend\patches\exonum-cli\src\command\run_dev.rs (5057, 2022-11-14)
... ...

# FLoBC: A Decentralized Blockchain-Based Federated Learning Framework This repository is an implementation of [FLoBC: A Decentralized Blockchain-Based Federated Learning Framework](https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=9922258&casa_token=RrTQKm66HhoAAAAA:9O3iH1H4_qiB4W7fgNK38G_lU7cn4bOfm-oiYVuHtrApo2QZ_YdtWFLJ4RqMUaNRIyPO_jy-_a1aAQ&tag=1). ``` @inproceedings{ghanem2022flobc, title={FLoBC: A Decentralized Blockchain-Based Federated Learning Framework}, author={Ghanem, Mohamed and Dawoud, Fadi and Gamal, Habiba and Soliman, Eslam and El-Batt, Tamer}, booktitle={2022 Fourth International Conference on Blockchain Computing and Applications (BCCA)}, pages={85--92}, year={2022}, organization={IEEE} } ``` This project supports the training of stochastic gradient descent models over blockchain. Training and validation is performed on the user's local data. Nodes share insights or gradients rather than data. The system utilizes a reward/punishment policy to incentivize legitimate training, and to punish and hinder malicious trainers.

![System View](./pictures/systemView.png "System View")

As shown in the figure, trainers nodes perform local training, then share their updates with the validators that evaluate their updates and carry out the consensus process to update the global model on the blockchain. Subsequently, trainers are given a trust reward or pentaly, and a new model is added to the blockchain.

For more details about the system, check [the slides](https://docs.google.com/presentation/d/1koIePQY4zOhS8jltEeFZ27Q99Ua_KlZIDUb6Zcn_VCI/edit?usp=sharing) and [this video](https://drive.google.com/file/d/1e6TVJ5_nI7mPKt9JTVXy2bMrMx7xXkqG/view?usp=sharing). ## Prerequisites - git clone https://github.com/Oschart/FLoBC.git - npm - node https://nodejs.org/en/download/ - babel ``` shell $ npm install -g babel-cli ``` ## To Run the Tool ### Using GUI ##### Install the prerequisites ``` shell $ npm install express $ npm install ```` ##### To run the web service ``` shell $ cd frontend/src/components $ node service.js $ cd ../.. ```` ``` shell $ cd frontend $ npm start ```` ###### Initialization Form To configure the system ![Initialization Page](./pictures/form.png "System Configuration Page") ###### Progress Monitoring ![Progress Monitoring](./pictures/monitor.png "Progress Monitoring") ###### Demo Video demo video ### Using Scripts Using the [spawn script](./scripts/spawn/spawn.sh), you can run the system with certain number of trainers, validators, synchronization scheme and training period. For instructions on how to run the spawn script, [check](./scripts/spawn/README.md) ### Manually ##### To build the rust code and/or the validating node ``` shell $ cd backend $ sh build_finalize.sh -n -b -c -j $ cd .. ```` - -b is used to build rust - -c is used to clear the blockchain - -j is used to build the node.js validator ##### To run the validating node ``` shell $ cd backend $ sh run_node $ cd .. ```` ##### To build the lightclient ``` shell $ cd lightclient $ npm install $ npm start -- ``` ## To use the provided models, you need: - python >= 3 - tensorflow - keras - numpy - pandas ## To use the provided MNIST 28x28 models, download MNIST data https://www.kaggle.com/oddrationale/mnist-in-csv ## To use the provided MNIST 20x20 models: resize the downloaded data using [this script](./dataset utils/MNIST_resize.py), or download it from [here](https://drive.google.com/drive/folders/1tOyb5J4kDwkOA8ML0Ub-gmj-b44LvMzU?usp=sharing) - N.B. Place training data in ./lightclient/models/MODEL_NAME/ - N.B. Place test data in ./backend/tx_validator/src/models/MODEL_NAME/data.csv ## Authors * **Mohamed Ghanem** [Oschart](https://github.com/Oschart) * **Fadi Adel** [theRadFad](https://github.com/theRadFad) * **Habiba Gamal** [habibagamal](https://github.com/habibagamal) * **Eslam Soliman** [Eslam-Soliman](https://github.com/Eslam-Soliman) * Dr. Hossam Sharara * Dr. Tamer ElBatt

近期下载者

相关文件


收藏者