Encrypted Deep Learning in TensorFlow
What is TF Encrypted?
TF Encrypted is a framework for encrypted deep 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.
Under the hood, TF Encrypted integrates state-of-the-art cryptography like secure multi-party computation and homomorphic encryption. Take advantage of prebuilt highly optimized protocols or build and test your own using our pluggable architecture.
Easy to Use
TF Encrypted aims to make privacy-preserving deep learning simple and approachable, without requiring expertise in cryptography, distributed systems, or high-performance computing.
TF Encrypted is available as a package on PyPI supporting Python 3.5+ and Tensorflow 1.12.0+ which can be installed using
pip install tf-encrypted
Enjoy the familiar Keras, but encrypted.
import tensorflow as tf import tf_encrypted as tfe @tfe.local_computation('prediction-client') def provide_input(): # normal TensorFlow operations can be run locally # as part of defining a private input, in this # case on the machine of the input provider return tf.ones(shape=(5, 10)) x = provide_input() model = tfe.keras.Sequential([ tfe.keras.layers.Dense(512, batch_input_shape=x.shape), tfe.keras.layers.Activation('relu'), tfe.keras.layers.Dense(10), ]) # get prediction input from client logits = model(x) with tfe.Session() as sess: result = sess.run(logits.reveal())
Tutorials & Examples
Join our growing community
As blockchain technology continues to evolve, it has unleashed a wave of innovations that are…
Exploring the latest innovations in blockchain technology unveils a transformative landscape that promises to reshape…