1*14675a02SAndroid Build Coastguard Worker# Federated Compute Platform 2*14675a02SAndroid Build Coastguard Worker 3*14675a02SAndroid Build Coastguard WorkerThis repository hosts code for executing federated programs and computations. 4*14675a02SAndroid Build Coastguard Worker 5*14675a02SAndroid Build Coastguard Worker## Definitions 6*14675a02SAndroid Build Coastguard Worker 7*14675a02SAndroid Build Coastguard WorkerA *federated computation* is a set of processing steps that run on a server and 8*14675a02SAndroid Build Coastguard Workerset of clients, where each step is either 9*14675a02SAndroid Build Coastguard Worker 10*14675a02SAndroid Build Coastguard Worker* local processing of values on the client or server or 11*14675a02SAndroid Build Coastguard Worker* transport which moves values via 12*14675a02SAndroid Build Coastguard Worker * broadcast (server-to-clients) 13*14675a02SAndroid Build Coastguard Worker * select (client-server response) 14*14675a02SAndroid Build Coastguard Worker * aggregate (clients-to-server). A federated computation invoked by a 15*14675a02SAndroid Build Coastguard Worker central coordinator returns one or more aggregates. 16*14675a02SAndroid Build Coastguard Worker 17*14675a02SAndroid Build Coastguard WorkerA *federated program* is a set of processing steps run by a central coordinator 18*14675a02SAndroid Build Coastguard Workerthat include one or more invocations of federated computation, transformations 19*14675a02SAndroid Build Coastguard Workerof computation results, and releases of aggregate values to the engineer/analyst 20*14675a02SAndroid Build Coastguard Workerwho invoked the program. 21*14675a02SAndroid Build Coastguard Worker 22*14675a02SAndroid Build Coastguard WorkerTo learn more about these concepts, check out: 23*14675a02SAndroid Build Coastguard Worker 24*14675a02SAndroid Build Coastguard Worker- [Federated learning comic book from Google AI](http://g.co/federated) 25*14675a02SAndroid Build Coastguard Worker- [Federated Learning: Collaborative Machine Learning without Centralized 26*14675a02SAndroid Build Coastguard Worker Training 27*14675a02SAndroid Build Coastguard Worker Data](https://ai.googleblog.com/2017/04/federated-learning-collaborative.html) 28*14675a02SAndroid Build Coastguard Worker- [Federated Analytics: Collaborative Data Science without Data Collection](https://ai.googleblog.com/2020/05/federated-analytics-collaborative-data.html) 29*14675a02SAndroid Build Coastguard Worker- [Towards Federated Learning at Scale: System Design](https://arxiv.org/abs/1902.01046) 30*14675a02SAndroid Build Coastguard Worker (SysML 2019) 31*14675a02SAndroid Build Coastguard Worker- [Federated Program API in TFF](https://github.com/tensorflow/federated/blob/main/tensorflow_federated/python/program/README.md) 32*14675a02SAndroid Build Coastguard Worker 33*14675a02SAndroid Build Coastguard Worker## Infrastructure 34*14675a02SAndroid Build Coastguard Worker 35*14675a02SAndroid Build Coastguard WorkerAt Google, federated programs and computations are authored in 36*14675a02SAndroid Build Coastguard Worker[TensorFlow Federated](http://tensorflow.org/federated), compiled to deployable 37*14675a02SAndroid Build Coastguard Workerartifacts, and run in a distributed system consisting of a central coordinator, 38*14675a02SAndroid Build Coastguard Workerand a set of devices such as phones. The TFF repository contains infrastructure 39*14675a02SAndroid Build Coastguard Workerfor authoring and simulating federated programs and computations. 40*14675a02SAndroid Build Coastguard Worker 41*14675a02SAndroid Build Coastguard WorkerThis repository hosts infrastructure for compiling and running federated 42*14675a02SAndroid Build Coastguard Workerprograms and computations in the cross-device setting. We are actively working 43*14675a02SAndroid Build Coastguard Workeron open sourcing the core components of our production infrastructure, with a 44*14675a02SAndroid Build Coastguard Workerfocus on privacy-sensitive code-paths such as the pipeline for compiling 45*14675a02SAndroid Build Coastguard Workerdeployable artifacts from TFF computations, client-side processing, and 46*14675a02SAndroid Build Coastguard Workerserver-side aggregation logic. 47*14675a02SAndroid Build Coastguard Worker 48*14675a02SAndroid Build Coastguard WorkerAs of 12/7/2022, parts of the repository - in particular, code in the `client/` 49*14675a02SAndroid Build Coastguard Workerdirectory, and the service & data format definitions in `proto/` - are used in 50*14675a02SAndroid Build Coastguard Workerproduction in Google's federated learning infrastructure. Other parts - notably, 51*14675a02SAndroid Build Coastguard Workerproduction server side infrastructure - have not yet been open sourced due to 52*14675a02SAndroid Build Coastguard Workerits dependencies on proprietary infrastructure, and we instead provide a 53*14675a02SAndroid Build Coastguard Workerreference / example server implementation in `demo/` for demonstration purposes. 54*14675a02SAndroid Build Coastguard Worker 55*14675a02SAndroid Build Coastguard WorkerThe best way to get started is to run the end-to-end demo 56*14675a02SAndroid Build Coastguard Worker`//fcp/demo:federated_program_test`, which will spin up example services, 57*14675a02SAndroid Build Coastguard Workerclients, and run a federated program; this test will cover the majority of the 58*14675a02SAndroid Build Coastguard Workercode in this repository. 59*14675a02SAndroid Build Coastguard Worker 60*14675a02SAndroid Build Coastguard WorkerThis is not an officially supported Google product. 61*14675a02SAndroid Build Coastguard Worker 62*14675a02SAndroid Build Coastguard Worker## Getting Started 63*14675a02SAndroid Build Coastguard Worker 64*14675a02SAndroid Build Coastguard WorkerPlease refer to the instructions in GETTING_STARTED.md. 65