README.md 4.44 KB
Newer Older
1
# TensorFlow Federated
Michael Reneer's avatar
Michael Reneer committed
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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)](https://ai.googleblog.com/2017/04/federated-learning-collaborative.html),
an approach to machine learning where a shared global model is trained across
many participating clients that keep their training data locally. For example,
FL has been used to train
[prediction models for mobile keyboards](https://arxiv.org/abs/1811.03604)
without uploading sensitive typing data to servers.

TFF enables developers to use the included federated learning algorithms with
their models and data, as well as to experiment with novel algorithms. The
building blocks provided by TFF can also be used to implement non-learning
computations, such as aggregated analytics over decentralized data.

TFF's interfaces are organized in two layers:

20
21
*   [Federated Learning (FL) API](https://github.com/tensorflow/federated/blob/main/docs/federated_learning.md)
    The `tff.learning` layer offers a set of high-level interfaces that allow
Zachary Garrett's avatar
Zachary Garrett committed
22
23
24
    developers to apply the included implementations of federated training and
    evaluation to their existing TensorFlow models.

25
26
27
28
29
30
*   [Federated Core (FC) API](https://github.com/tensorflow/federated/blob/main/docs/federated_core.md)
    At the core of the system is a set of lower-level interfaces for concisely
    expressing novel federated algorithms by combining TensorFlow with
    distributed communication operators within a strongly-typed functional
    programming environment. This layer also serves as the foundation upon which
    we've built `tff.learning`.
31
32
33

TFF enables developers to declaratively express federated computations, so they
could be deployed to diverse runtime environments. Included with TFF is a
Zachary Garrett's avatar
Zachary Garrett committed
34
35
single-machine simulation runtime for experiments. Please visit the tutorials
and try it out yourself!
Michael Reneer's avatar
Michael Reneer committed
36
37
38

## Installation

39
40
41
42
See the
[install](https://github.com/tensorflow/federated/blob/main/docs/install.md)
documentation for instructions on how to install TensorFlow Federated as a
package or build TensorFlow Federated from source.
Michael Reneer's avatar
Michael Reneer committed
43

44
## Getting Started
Michael Reneer's avatar
Michael Reneer committed
45

46
47
48
See the
[get started](https://github.com/tensorflow/federated/blob/main/docs/get_started.md)
documentation for instructions on how to use TensorFlow Federated.
Michael Reneer's avatar
Michael Reneer committed
49

50
51
## Contributing

52
53
There are a number of ways to contribute depending on what you're interested in:

Zachary Garrett's avatar
Zachary Garrett committed
54
55
56
*   If you are interested in developing new federated learning algorithms, the
    best way to start would be to study the implementations of federated
    averaging and evaluation in `tff.learning`, and to think of extensions to
Sergii Khomenko's avatar
Sergii Khomenko committed
57
58
    the existing implementation (or alternative approaches). If you have a
    proposal for a new algorithm, we recommend starting by staging your project
Zachary Garrett's avatar
Zachary Garrett committed
59
60
61
62
63
    in the `research` directory and including a colab notebook to showcase the
    new features.

    You may want to also develop new algorithms in your own repository. We are
    happy to feature pointers to academic publications and/or repos using TFF on
Marco's avatar
Marco committed
64
    [tensorflow.org/federated](http://www.tensorflow.org/federated).
Zachary Garrett's avatar
Zachary Garrett committed
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

*   If you are interested in applying federated learning, consider contributing
    a tutorial, a new federated dataset, or an example model that others could
    use for experiments and testing, or writing helper classes that others can
    use in setting up simulations.

*   If you are interested in helping us improve the developer experience, the
    best way to start would be to study the implementations behind the
    `tff.learning` API, and to reflect on how we could make the code more
    streamlined. You could contribute helper classes that build upon the FC API
    or suggest extensions to the FC API itself.

*   If you are interested in helping us develop runtime infrastructure for
    simulations and beyond, please wait for a future release in which we will
    introduce interfaces and guidelines for contributing to a simulation
    infrastructure.
81
82
83

Please be sure to review the
[contribution guidelines](CONTRIBUTING.md#code-style-guidelines-and-best-practices)
84
for guidelines on how to contribute.
85
86

## Issues
Michael Reneer's avatar
Michael Reneer committed
87

88
89
Use [GitHub issues](https://github.com/tensorflow/federated/issues) for tracking
requests and bugs.
Michael Reneer's avatar
Michael Reneer committed
90
91
92

## Questions

93
Please direct questions to [Stack Overflow](https://stackoverflow.com) using the
Michael Reneer's avatar
Michael Reneer committed
94
95
[tensorflow-federated](https://stackoverflow.com/questions/tagged/tensorflow-federated)
tag.