Privacy-Preserving Machine Learning in TensorFlow With TF Encrypted Presentation PDF
Privacy-Preserving Machine Learning in TensorFlow With TF Encrypted Presentation PDF
Morten Dahl
leakage
(model and training data)
risk management
(store and process)
Sanitization
(Differential Privacy)
data access incentive
(liability and controlled use) (accuracy and exposure)
leakage
(model and training data)
risk management
(store and process)
Encryption
(Secure Computation)
data access incentive
(liability and controlled use) (accuracy and exposure)
leakage
(model and training data)
risk management
(store and process)
Hybrid
data access incentive
(liability and controlled use) (accuracy and exposure)
privacy mitigates bottlenecks
leakage
(model and training data)
risk management
(store and process)
How?
Computing on encrypted data
Prediction with Linear Model
w x x
dot(x, w)
w1
w3
… using Homomorphic Encryption
w Enc(x) x
Enc(dot(x, w))
homomorphic
encryption scheme
public multiplication
private addition
w1
Enc(x, r) * Enc(y, s)
= Enc(x+y, r*s)
Enc(5, 2) * Enc(5, 4)
= 718 * 674
= 57
= 36^10 * 8^35
= Enc(10, 8)
Public Multiplication in Paillier
Enc(x, r) ^ w
= Enc(x*w, r^w)
Enc(5, 2) ^ 2
= 718 * 718
= 1024
= 36^10 * 4^35
= Enc(10, 4)
… using Secret Sharing
w Share1(x)
Share1(dot(x, w))
w
Share2(x)
Share2(dot(x, w))
Secret Sharing
Share1(x, r) = r mod m
Share2(x, r) = x - r mod m
Share1(5, 7) = 7 mod 10 = 7
m = 10
Share2(5, 7) = 5 - 7 mod 10 = 8
7 + 8 = 15 = 5 mod 10
Private Addition with Secret Sharing
x1 y1 z1 = x1 + y1
x2 y2 z2 = x2 + y2
x+y
= (x1 + x2) + (y1 + y2)
x = x1 + x2 y = y1 + y2
= (x1 + y1) + (x2 + y2)
= z1 + z2
Public Multiplication with Secret Sharing
x1 w z1 = x1 * w
x2 w z2 = x2 * w
x*w
= (x1 + x2) * w
x = x1 + x2
= (x1 * w) + (x2 * w)
= z1 + z2
… using Secret Sharing, with Private Model
Share1(w) Share1(x)
Share1(dot(x, w))
Share2(w) Share2(x)
Share2(dot(x, w))
… using Secret Sharing, with Private Model
Share1(w) Share1(x)
Share1(dot(x, w))
private multiplication
Share(w0)
Share2(w) Share2(x)
dot( Share1(x0) Share1(x1) Share1(x2) , Share(w1) ) = Share1(x0)*Share(w0) + …
z2 = alpha*b2
( a2 , b2 , c2 ) x2 y2 alpha beta + beta*a2
+ c2
a = a1 + a2 x * y
alpha = x - a
b = b1 + b2 x = x1 + x2 y = y1 + y2 =…
beta = y - b = z1 + z2
c = a*b = c1 + c2
Multidisciplinary Challenge
Data science
(use-cases, workflow, monitoring)
Engineering
(distributed, multi-core, readability)
MPC ML
secure computation
directly using TensorFlow
TF Encrypted
ordinary TensorFlow
Dist Tensor ML
HE MPC
TensorFlow
third party libraries for
secure computation
Prediction
Encouraging use
Participants
Share1(x)
Share1(w0, b0, …)
Share1(logits)
w0, b0, … x
Share2(x)
Share2(w0, b0, …)
Share2(logits)
Private Prediction with TF Encrypted
Overall Computation
compute servers
prediction client
model owner
Local Processing
TF Data pipeline
Joint Prediction
Combining knowledge for nuance
Participants
Share1(x_age) x_age
Share1(x_gender)
Share1(w0, b0, …) Share1(x_income)
Share1(res)
w0, b0, …
x_gender
Share2(x_age)
Share2(x_gender)
Share2(w0, b0, …) x_income
Share2(x_income)
Share2(res)
Private Joint Prediction with TF Encrypted
Training
Learning without seeing
Participants
Share1(x, y) Share1(w)
x, y
Share2(x, y) Share2(w)
Participants
Share1(x, y) Share1(w)
x, y
Share2(x, y) Share2(w)
Participants
Share1(x, y) Share1(w)
x, y
Share2(x, y) Share2(w)
Private Training with TF Encrypted
Overall Computation
data owner
model owner
Joint Training
Combining insights for better models
Participants
x_0, y_0
Share1(x_0, y_0)
Share1(x_1, y_1) Share1(w)
x_0, y_0
Share1(update_0)
Share1(update_1)
Share1(update_2) Share1(aggregated-update)
x_1, y_1 weights
Share2(update_0) Share2(aggregated-update)
x_2, y_2 Share2(update_1)
Share2(update_2)
Secure Federated Learning in TF Encrypted
Overall Computation
compute servers
data owners
model owner
Local Optimization
TF optimization
Roadmap
Improved performance
Wrap-Up
You can compute on encrypted data,
without the ability to decrypt