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.
State-of-the-Art Cryptography
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.
Private Machine Learning in TensorFlow using Secure Computation
Installation
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
Usage
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
Latest Post
Oil Profit – A Portfolio Approach to Investing in the Oil Sector: How to Diversify Risks
1. Introduction: Oil Is More Than Black Gold Investing in oil might seem like a…
Zenx: NFT and Asset Tokenization — New Opportunities for Traders in 2024
The financial landscape is transforming, with NFTs (Non-Fungible Tokens) and asset tokenization standing out as…