{
"info": {
"author": "The TF Encrypted Authors",
"author_email": "contact@tf-encrypted.io",
"bugtrack_url": null,
"classifiers": [
"Development Status :: 2 - Pre-Alpha",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Security :: Cryptography"
],
"description": "\n\nTF Encrypted is a framework for encrypted machine learning in TensorFlow. It looks and feels like TensorFlow, taking advantage of the ease-of-use of the Keras API while enabling training and prediction over encrypted data via secure multi-party computation and homomorphic encryption. TF Encrypted aims to make privacy-preserving machine learning readily available, without requiring expertise in cryptography, distributed systems, or high performance computing.\n\nSee below for more [background material](#background--further-reading), explore the [examples](./examples/), or visit the [documentation](./docs/) to learn more about how to use the library. You are also more than welcome to join our [Slack channel](https://join.slack.com/t/tf-encrypted/shared_invite/enQtNjI5NjY5NTc0NjczLWM4MTVjOGVmNGFkMWU2MGEzM2Q5ZWFjMTdmZjdmMTM2ZTU4YjJmNTVjYmE1NDAwMDIzMjllZjJjMWNiMTlmZTQ) for all questions around use and development.\n\n[](https://tf-encrypted.io) [](https://tf-encrypted.readthedocs.io/en/latest/) [](https://pypi.org/project/tf-encrypted/) [](https://circleci.com/gh/tf-encrypted/tf-encrypted/tree/master)\n\n# Installation\n\nTF Encrypted is available as a package on [PyPI](https://pypi.org/project/tf-encrypted/) supporting Python 3.5+ and TensorFlow 1.12.0+:\n\n```bash\npip install tf-encrypted\n```\nCreating a conda environment to run TF Encrypted code can be done using:\n```\nconda create -n tfe python=3.6\nconda activate tfe\nconda install tensorflow notebook\npip install tf-encrypted\n```\n\nAlternatively, installing from source can be done using:\n\n```bash\ngit clone https://github.com/tf-encrypted/tf-encrypted.git\ncd tf-encrypted\npip install -e .\nmake build\n```\n\nThis latter is useful on platforms for which the pip package has not yet been compiled but is also needed for [development](./docs/CONTRIBUTING.md). Note that this will get you a working basic installation, yet a few more steps are required to match the performance and security of the version shipped in the pip package, see the [installation instructions](./docs/INSTALL.md).\n\n# Usage\n\nThe following is an example of simple matmul on encrypted data using TF Encrypted:\n\n```python\nimport tensorflow as tf\nimport tf_encrypted as tfe\n\n@tfe.local_computation('input-provider')\ndef provide_input():\n # normal TensorFlow operations can be run locally\n # as part of defining a private input, in this\n # case on the machine of the input provider\n return tf.ones(shape=(5, 10))\n\n# define inputs\nw = tfe.define_private_variable(tf.ones(shape=(10,10)))\nx = provide_input()\n\n# define computation\ny = tfe.matmul(x, w)\n\nwith tfe.Session() as sess:\n # initialize variables\n sess.run(tfe.global_variables_initializer())\n # reveal result\n result = sess.run(y.reveal())\n```\n\nFor more information, check out the [documentation](./docs/) or the [examples](./examples/).\n\n# Roadmap\n\n- High-level APIs for combining privacy and machine learning. So far TF Encrypted is focused on its low-level interface but it's time to figure out what it means for interfaces such as Keras when privacy enters the picture.\n\n- Tighter integration with TensorFlow. This includes aligning with the upcoming TensorFlow 2.0 as well as figuring out how TF Encrypted can work closely together with related projects such as [TF Privacy](https://github.com/tensorflow/privacy) and [TF Federated](https://github.com/tensorflow/federated).\n\n- Support for third party libraries. While TF Encrypted has its own implementations of secure computation, there are other [excellent libraries](https://github.com/rdragos/awesome-mpc/) out there for both secure computation and homomorphic encryption. We want to bring these on board and provide a bridge from TensorFlow.\n\n
\n\n# Background & Further Reading\n\nBlog posts:\n\n- [Introducing TF Encrypted](https://alibaba-gemini-lab.github.io/docs/blog/tfe/) walks through a simple example showing two data owners jointly training a logistic regression model using TF Encrypted on a vertically split dataset (*by Alibaba Gemini Lab*)\n\n- [Federated Learning with Secure Aggregation in TensorFlow](https://medium.com/dropoutlabs/federated-learning-with-secure-aggregation-in-tensorflow-95f2f96ebecd) demonstrates using TF Encrypted for secure aggregation of federated learning in pure TensorFlow (*by Justin Patriquin at Cape Privacy*)\n\n- [Encrypted Deep Learning Training and Predictions with TF Encrypted Keras](https://medium.com/dropoutlabs/encrypted-deep-learning-training-and-predictions-with-tf-encrypted-keras-557193284f44) introduces and illustrates first parts of our encrypted Keras interface (*by Yann Dupis at Cape Privacy*)\n\n- [Growing TF Encrypted](https://medium.com/dropoutlabs/growing-tf-encrypted-a1cb7b109ab5) outlines the roadmap and motivates TF Encrypted as a community project (*by Morten Dahl*)\n\n- [Experimenting with TF Encrypted](https://medium.com/dropoutlabs/experimenting-with-tf-encrypted-fe37977ff03c) walks through a simple example of turning an existing TensorFlow prediction model private (*by Morten Dahl and Jason Mancuso at Cape Privacy*)\n\n- [Secure Computations as Dataflow Programs](https://mortendahl.github.io/2018/03/01/secure-computation-as-dataflow-programs/) describes the initial motivation and implementation (*by Morten Dahl*)\n\nPapers:\n\n- [Privacy-Preserving Collaborative Machine Learning on Genomic Data using TensorFlow](https://arxiv.org/abs/2002.04344) outlines the [iDASH'19](http://www.humangenomeprivacy.org/2019/) winning solution built on TF Encrypted (*by Cheng Hong, et al.*)\n\n- [Crypto-Oriented Neural Architecture Design](https://arxiv.org/abs/1911.12322) uses TF Encrypted to benchmark ML optimizations made to better support the encrypted domain (*by Avital Shafran, Gil Segev, Shmuel Peleg, and Yedid Hoshen*)\n\n- [Private Machine Learning in TensorFlow using Secure Computation](https://arxiv.org/abs/1810.08130) further elaborates on the benefits of the approach, outlines the adaptation of a secure computation protocol, and reports on concrete performance numbers (*by Morten Dahl, Jason Mancuso, Yann Dupis, et al.*)\n\nPresentations:\n\n- [Privacy-Preserving Machine Learning with TensorFlow](https://github.com/capeprivacy/tf-world-tutorial), TF World 2019 (*by Jason Mancuso and Yann Dupis at Cape Privacy*); see also the [slides](https://github.com/capeprivacy/tf-world-tutorial/blob/master/TensorFlow-World-Tutorial-2019-final.pdf)\n\n- [Privacy-Preserving Machine Learning in TensorFlow with TF Encrypted](https://conferences.oreilly.com/artificial-intelligence/ai-ny-2019/public/schedule/detail/76542), O'Reilly AI 2019 (*by Morten Dahl at Cape Privacy*); see also the [slides](https://github.com/mortendahl/talks/blob/master/OReillyAI19-slides.pdf)\n\nOther:\n\n- [Privacy Preserving Deep Learning \u2013 PySyft Versus TF Encrypted](https://blog.exxactcorp.com/privacy-preserving-deep-learning-pysyft-tfencrypted/) makes a quick comparison between PySyft and TF Encrypted, correctly hitting on our goal of being the encryption backend in PySyft for TensorFlow (*by Exxact*)\n\n- [Bridging Microsoft SEAL into TensorFlow](https://medium.com/dropoutlabs/bridging-microsoft-seal-into-tensorflow-b04cc2761ad4) takes a first step towards integrating the Microsoft SEAL homomorphic encryption library and some of the technical challenges involved (*by Justin Patriquin at Cape Privacy*)\n\n# Development and Contribution\n\nTF Encrypted is open source community project developed under the Apache 2 license and maintained by a set of core developers. We welcome contributions from all individuals and organizations, with further information available in our [contribution guide](./docs/CONTRIBUTING.md). We invite any organizations interested in [partnering](#organizational-contributions) with us to reach out via [email](mailto:contact@tf-encrypted.io) or [Slack](https://join.slack.com/t/tf-encrypted/shared_invite/enQtNjI5NjY5NTc0NjczLWM4MTVjOGVmNGFkMWU2MGEzM2Q5ZWFjMTdmZjdmMTM2ZTU4YjJmNTVjYmE1NDAwMDIzMjllZjJjMWNiMTlmZTQ).\n\nDon't hesitate to send a pull request, open an issue, or ask for help! You can do so either via [GitHub](https://github.com/tf-encrypted/tf-encrypted) or in our [Slack channel](https://join.slack.com/t/tf-encrypted/shared_invite/enQtNjI5NjY5NTc0NjczLWM4MTVjOGVmNGFkMWU2MGEzM2Q5ZWFjMTdmZjdmMTM2ZTU4YjJmNTVjYmE1NDAwMDIzMjllZjJjMWNiMTlmZTQ). We use [ZenHub](https://www.zenhub.com/extension) to plan and track GitHub issues and pull requests.\n\n## Individual contributions\n\nWe appreciate the efforts of [all contributors](https://github.com/tf-encrypted/tf-encrypted/graphs/contributors) that have helped make TF Encrypted what it is! Below is a small selection of these, generated by [sourcerer.io](https://sourcerer.io/) from most recent stats:\n\n[](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/0)[](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/1)[](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/2)[](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/3)[](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/4)[](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/5)[](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/6)[](https://sourcerer.io/fame/mortendahl/tf-encrypted/tf-encrypted/links/7)\n\n## Organizational contributions\n\nWe are very grateful for the significant contributions made by the following organizations!\n\n
![]() | \n ![]() | \n ![]() | \n