GithubHelp home page GithubHelp logo

fionnoif / paddlefl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from paddlepaddle/paddlefl

0.0 1.0 0.0 3.07 MB

Federated Deep Learning in PaddlePaddle

Python 45.78% Shell 1.13% CMake 5.64% C++ 47.45%

paddlefl's Introduction

DOC | Quick Start | 中文

PaddleFL is an open source federated learning framework based on PaddlePaddle. Researchers can easily replicate and compare different federated learning algorithms with PaddleFL. Developers can also benefit from PaddleFL in that it is easy to deploy a federated learning system in large scale distributed clusters. In PaddleFL, serveral federated learning strategies will be provided with application in computer vision, natural language processing, recommendation and so on. Application of traditional machine learning training strategies such as Multi-task learning, Transfer Learning in Federated Learning settings will be provided. Based on PaddlePaddle's large scale distributed training and elastic scheduling of training job on Kubernetes, PaddleFL can be easily deployed based on full-stack open sourced software.

Federated Learning

Data is becoming more and more expensive nowadays, and sharing of raw data is very hard across organizations. Federated Learning aims to solve the problem of data isolation and secure sharing of data knowledge among organizations. The concept of federated learning is proposed by researchers in Google [1, 2, 3].

Overview of PaddleFL

In PaddleFL, horizontal and vertical federated learning strategies will be implemented according to the categorization given in [4]. Application demonstrations in natural language processing, computer vision and recommendation will be provided in PaddleFL.

Federated Learning Strategy

  • Vertical Federated Learning: Logistic Regression with PrivC, Neural Network with third-party PrivC [5]

  • Horizontal Federated Learning: Federated Averaging [2], Differential Privacy [6], Secure Aggregation

Training Strategy

  • Multi Task Learning [7]

  • Transfer Learning [8]

  • Active Learning

Framework design of PaddleFL

In PaddleFL, components for defining a federated learning task and training a federated learning job are as follows:

Compile Time

  • FL-Strategy: a user can define federated learning strategies with FL-Strategy such as Fed-Avg[2]

  • User-Defined-Program: PaddlePaddle's program that defines the machine learning model structure and training strategies such as multi-task learning.

  • Distributed-Config: In federated learning, a system should be deployed in distributed settings. Distributed Training Config defines distributed training node information.

  • FL-Job-Generator: Given FL-Strategy, User-Defined Program and Distributed Training Config, FL-Job for federated server and worker will be generated through FL Job Generator. FL-Jobs will be sent to organizations and federated parameter server for run-time execution.

Run Time

  • FL-Server: federated parameter server that usually runs in cloud or third-party clusters.

  • FL-Worker: Each organization participates in federated learning will have one or more federated workers that will communicate with the federated parameter server.

  • FL-scheduler: Decide which set of trainers can join the training before each updating cycle.

Install Guide and Quick-Start

Please reference Quick Start for installation and quick-start example.

Easy deployment with kubernetes

kubectl apply -f ./paddle_fl/examples/k8s_deployment/master.yaml

Please refer K8S deployment example for details

You can also refer K8S cluster application and kubectl installation to deploy your K8S cluster

Benchmark task

Gru4Rec [9] introduces recurrent neural network model in session-based recommendation. PaddlePaddle's Gru4Rec implementation is in https://github.com/PaddlePaddle/models/tree/develop/PaddleRec/gru4rec. An example is given in Gru4Rec in Federated Learning

Release note

  • v0.2.0 released
    • Support Kubernetes easy deployment
    • Add api for LEAF dataset which is in federated settings, supporting benchmark experiments.
    • Add FL-scheduler, acting as a central controller during the training phase.
    • Add FL-Submitter to support cluster task submission
    • Add secure aggregation algorithm
    • Support more optimizers in PaddleFL such as Adam
    • More examples available

On Going and Future Work

  • Vertical Federated Learning Strategies and more horizontal federated learning strategies will be open sourced.

Reference

[1]. Jakub Konečný, H. Brendan McMahan, Daniel Ramage, Peter Richtárik. Federated Optimization: Distributed Machine Learning for On-Device Intelligence. 2016

[2]. H. Brendan McMahan, Eider Moore, Daniel Ramage, Blaise Agüera y Arcas. Federated Learning of Deep Networks using Model Averaging. 2017

[3]. Jakub Konečný, H. Brendan McMahan, Felix X. Yu, Peter Richtárik, Ananda Theertha Suresh, Dave Bacon. Federated Learning: Strategies for Improving Communication Efficiency. 2016

[4]. Qiang Yang, Yang Liu, Tianjian Chen, Yongxin Tong. Federated Machine Learning: Concept and Applications. 2019

[5]. Kai He, Liu Yang, Jue Hong, Jinghua Jiang, Jieming Wu, Xu Dong et al. PrivC - A framework for efficient Secure Two-Party Computation. In Proceedings of 15th EAI International Conference on Security and Privacy in Communication Networks. SecureComm 2019

[6]. Martín Abadi, Andy Chu, Ian Goodfellow, H. Brendan McMahan, Ilya Mironov, Kunal Talwar, Li Zhang. Deep Learning with Differential Privacy. 2016

[7]. Virginia Smith, Chao-Kai Chiang, Maziar Sanjabi, Ameet Talwalkar. Federated Multi-Task Learning 2016

[8]. Yang Liu, Tianjian Chen, Qiang Yang. Secure Federated Transfer Learning. 2018

[9]. Balázs Hidasi, Alexandros Karatzoglou, Linas Baltrunas, Domonkos Tikk. Session-based Recommendations with Recurrent Neural Networks. 2016

paddlefl's People

Contributors

frankwhzhang avatar giddenslee avatar guru4elephant avatar jhjiangcs avatar kaih70 avatar qjing666 avatar

Watchers

 avatar

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.