TensorFlow Federated (TFF): Machine Learning on Decentralized Data (TF Dev Summit ‘19)
Intro
TensorFlow Federated (TFF) is an open-source framework for machine learning and other computations on decentralized data. TFF has been developed to facilitate open research and experimentation with Federated Learning (FL), an approach to machine learning where a shared global model is trained across many participating clients that keep their training data locally.
- server distribute initial model to clients;
- each client train model on local own data[不用convergence收敛,训练一些会儿]
- each client produce new model trained and send it to server
- In practice, we send updates but not models, implementation detail
- in server, combined model
- train with many many rounds
- many extensions to add
- TFF将代码编译成抽象表示 可运行在不同环境 伪代码,简介
- 优点:同一书写界面
- FL API训练模型,实现联合学习; FC API实现联合学习算法 ,本地环境模拟
- 分层,从各个方面参与TFF的学习
FL API 训练流程如上; FC API内容如下
FC API实现优点: 1.为分布式计算的语言 2. 类Python的API 3. 部署时的方便
在clients端的数据为一等公民,有类型{float32}@CLIENTS
- 在server端融合模型,数据类型是float32@SERVER
- 将联邦操作认为是协议
- FC API时,设置 数据类型; 定义联合学习算法内容
- 较为复杂的例子:两个输入,检测数据,门槛值;如何执行?以下
- 第一步: 分发threshold值给每一个客户端
使用类似于MapReduce的方式计算以上
使用 tff.federated_average聚合;此为一个完整的例子
- 代码方面展示,如何创建底层的联合学习的算法; 表达联合学习的算法
- 未来需要工作方向; 联合学习模型和数据集的增加;发展新的联合学习算法;改进FC API底层;部署环境增加