protocol / research

Research at Protocol Labs
220 stars 20 forks source link

IPFS-orchestrated federated learning services #28

Closed ChristodoulosPappas closed 2 years ago

ChristodoulosPappas commented 3 years ago

IPFS-orchestrated federated learning services

Description

Federated learning (FL) is a recently proposed ML paradigm that allows entities which store locally, potentially privacy-sensitive, data to train models collectively. The most prominent example is Google Keyboard that uses metadata from users’ typing to propose next words or to auto-correct typed words, while preserving users privacy.

In centralised FL, a server orchestrates the training process by storing, updating and broadcasting the model to the participating agents. It is easy to see that centralised FL has a single point of failure whose any unavailability will disrupt the training process. Moreover the server may become a bottleneck and deteriorate the trainning process. More importantly, depending on the network conditions and the resource availability centralized FL may have poor scalability performance. In contrast, in decentralised learning settings, single points of failure and resource bottleneck issues do not exist. Furthermore, decentralized FL scales well with the number of agents participating in the trainning process.

The goal of this project is to develop an InterPlanetary Learning System (IPLS), a fully decentralized federated learning framework that is partially based on the InterPlanetary File System (IPFS). By using IPLS and connecting into the corresponding private IPFS network, any party can initiate an ML training process of a model or join an ongoing training process that has already been started by another party.

Preliminary results demonstrate that (i) IPLS scales with the number of participants, (ii) is robust against intermittent connectivity and dynamic participant departures/arrivals, (iii) requires minimal resources, and (iv) guarantees that the accuracy of the trained model quickly converges to that of a centralized FL framework with an accuracy drop of less than 1‰.

State of the art

It is not hard to see that centralized federated learning has become a dominant research field in distributed machine learning. As a result, many existing frameworks for Federated learning are destined for centralized FL. Existing decentralized FL systems are mostly based on gossiping schemes while there exist approaches that are based on model aggregation using blockchain. We follow a different approach based on distributed shared memory. To be more specific, the model is partitioned and the partitions are distributed among the peers of the network. Each peer in the network is responsible for receiving updates (gradients) and sending the updates back (and as a result keep up to date), for some partition(s) that has been assigned. For more details read our relevant paper https://arxiv.org/pdf/2101.01901v1.pdf. This system model requires less communication bandwidth, but also by using a sychronous stochastic gradient decent (SGD) algorithm, the convergence and accuracy of the model is indentical as it would be in the centralized FL.

Solving this Open Problem

To this day, we have already developed a framework, and give an API with performing some basic task such as joinning and leaving to the system and also updating the model. The codebase is written in Java and we use the Java IPFS HTTP API. Though a lot of work must be done in order to provide a notable and robust tool for the ipfs users, developers, data scientists and applications.

Plans for the near future are:

Some future directions with interesting research and practical purposes are provided bellow:

What is the impact?

We envision a system for distributed machine learning, as IPFS (or Bittorrent) is for file sharing. We aim to create an environment powered by IPFS peer-to-peer system on which individuals can upload their project, the attributes of the data on which the model is going to be trainned, and also the model itself. Everyone interested on the project, can enter the IPFS private, download the most recent model, and cooperates with other peers in the way described in our paper. Note that projects can automatically be integrated in an application, (such as google board) , or can be also integrated in the IPFS itself for improving QoS and Security.

Other

Do you want to be part of this work?

This is part of an ongoing work. Feel free to contact Christodoulos Pappas (chrpappas@uth.gr) or Dimitris Chatzopoulos (dcab@cse.ust.hk) if you are interested.

silvianetobessa commented 2 years ago

Hi @ChristodoulosPappas, we are closing this issue because it seems to have led to a grants' approval already. 🚀 Please feel free to approach us with other ideas, they are appreciated!