Skip to main content

Layer on top of TensorFlow for doing machine learning on encrypted data.

Project description

tf-encrypted

Status License PyPI CircleCI Badge Documentation

tf-encrypted is a Python library built on top of TensorFlow focused on making it easy for researchers and practitioners to experiment with privacy-preserving machine learning without needing to be an expert in machine learning, cryptography, distributed systems, or high performance computing. For more information on performance and security please read the Private Machine Learning in TensorFlow using Secure Computation paper.

To achieve its vision, this library has several goals:

  • Simple: It should be easy to get started, experiment with, use, benchmark, and deeply integrate with pre-existing data science workflows.
  • Extensible: Extending tf-encrypted to experiment with new protocols, tensor implementations, and machine learning algorithms should be a first class citizen.
  • Performant: All of the fastest known implementations of protocols, tensor implementations, and machine learning algorithms in a private setting should exist within this library.
  • Secure: A user should have to go out of their way to use the library in a non-secure, non-private fashion. New protocols are marked as experimental until they've met our high bar of security.
  • Community-Driven: Community-first as a decision making framework. We can only achieve these goals by building a community of researchers, contributors, and users around the project.

Learn more about how to use the project by visiting the documentation.

Several contributors have put resources into the development of this library, most notably Dropout Labs and members of the OpenMined community (see below for details). The approached used by this library was first described by Morten Dahl in his Secure Computations as Dataflow Programs blog post.

Installation & Usage

tf-encrypted is available as a package on PyPI supporting Python 3.5+ which can be installed using pip:

$ pip install tf-encrypted

The following is an example of simple matmul on encrypted data using tf-encrypted:

import numpy as np
import tf_encrypted as tfe

a = np.ones((10,10))
x = tfe.define_private_variable(a)
y = x.matmul(x)

with tfe.Session() as sess:
    sess.run(tfe.global_variables_initializer(), tag='init')
    actual = sess.run(y.reveal(), tag='reveal')

For more information, checkout our full getting started guide in our documentation!

Project Status

tf-encrypted is experimental software that is not ready for use in any production environment for security reasons. We're currently focused on building the underlying primitives that enabled cryptographist, machine learning researchers, and data scientists to experiment with private machine learning.

Don't hesitate to send a pull request, open an issue, or ask for help! We'd love to work with anyone interested in using or developing private machine learning.

License

Licensed under Apache License, Version 2.0 (see LICENSE or http://www.apache.org/licenses/LICENSE-2.0). Copyright as specified in NOTICE.

Contributions

Several people have had an impact on the development of this library (in alphabetical order):

and several companies have invested significant resources (in alphabetical order):

  • Dropout Labs continues to sponsor a large amount of both research and engineering
  • OpenMined was the breeding ground for the initial idea and continues to support discussions and guidance

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tf-encrypted-0.2.0.tar.gz (55.1 kB view hashes)

Uploaded Source

Built Distribution

tf_encrypted-0.2.0-py3-none-any.whl (87.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page