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