GithubHelp home page GithubHelp logo

tsutsuimasayoshi / spins-fl Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 87 KB

Source code of my bachelor thesis, "SPinS-FL: Communication-Efficient Federated Subnetwork Learning."

Python 99.63% Shell 0.37%

spins-fl's Introduction

SPinS-FL

Source code of my bachelor thesis research, "SPinS-FL: Communication-Efficient Federated Subnetwork Learning."

A communication-efficient federated learning algorithm utilizing the Lottery Ticket Hypothesis.

Accpeted as a conference paper in IEEE Consumer Communications & Networking Conference (CCNC) 2023.

Federated Learning

Federated learning (FL) is a distributed machine learning method in which edge devices collaboratively train a common ML model without disclosing their private training data.

Unlike data centers, edge devices often stand in low-bandwidth traffic environments, which can be a bottleneck in the training process.

To solve this problem, we utilized the Edge-Popup Algorithm: a deep learning algorithm based on the Lottery Ticket Hypothesis.

The Lottery Ticket Hypothesis

Pruning weights from neural networks have shown a lot of success in the past; the required weight is only a part of the whole in a large neural network.

Based on this idea, Frankle and Carbin proposed the lottery ticket hypothesis, wherein a randomly weighted neural network contains a subnetwork whose test accuracy is comparable to that of the entire network by updating the weights the same number of times.

The Edge-Popup Algorithm

Ramanujan et al. further strengthened the argument in the lottery ticket hypothesis and proposed that a deep neural network has a hidden subnetwork that performs as well as the original network already trained.

Based on this strengthened hypothesis, Ramanujan et al. proposed the Edge-Popup algorithm, a novel method for finding a well-performing subnetwork by assigning scores to each weight in the network.

These scores indicate the priority of the respective weight to join a focused subnetwork.

By training these scores instead of the weights, a supermask that represents the location of the vital weights can be acquired.

SPinS-FL

We first implement the Edge-Popup algorithm in FL naively. In the Edge-Popup algorithm, scores are trained instead of weights. Therefore, the score information should be communicated instead of weights.

In addition to this, we carefully selected the scores to communicate during the training and succeeded in reducing communication and calculation for the training.

The process is represented by the following images.

For the detail of this algorithm, please read the paper upcoming to be released.

Requirement

python==3.7.4

Installation

pip install requirements.txt

Usage

$ # at the top directory
$ mkdir data
$ mkdir commLog
$ ./runfl.sh

The accuracy is recorded in server.log for every round. The graph of Communication vs Rounds is created in commLog/FLCommunication.png after execution.

Author

Masayoshi Tsutsui The University of Tokyo

License

Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)

spins-fl's People

Contributors

masayoshitsutsui avatar

Stargazers

Mohammadamin avatar  avatar

Watchers

 avatar

spins-fl's Issues

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.