1 4 : 3 5 P M 1 5 : 1 0 P M C r y p Te n : A M L f r a m e w o - - PowerPoint PPT Presentation

1 4 3 5 p m 1 5 1 0 p m c r y p te n a m l f r a m e w o
SMART_READER_LITE
LIVE PREVIEW

1 4 : 3 5 P M 1 5 : 1 0 P M C r y p Te n : A M L f r a m e w o - - PowerPoint PPT Presentation

1 4 : 3 5 P M 1 5 : 1 0 P M C r y p Te n : A M L f r a m e w o r k b a s e d o n s e c u r e c o m p u t i n g t e c h n i q u e s Shubho Sengupta Facebook import crypten import torch crypten.init()


slide-1
SLIDE 1

C r y p Te n : A M L f r a m e w o r k b a s e d o n s e c u r e c o m p u t i n g t e c h n i q u e s 1 4 : 3 5 P M — 1 5 : 1 0 P M

Shubho Sengupta Facebook

slide-2
SLIDE 2

Why is CrypTen the way it is?

import crypten import torch crypten.init() # sets up # communication x = torch.tensor([1.0, 2.0, 3.0]) x_enc = crypten.cryptensor(x) # encrypts tensor x_dec = x_enc.get_plain_text() # decrypts tensor assert torch.all_close(x_dec, x) # this passes! y_enc = crypten.cryptensor([2.0, 3.0, 4.0]) xy_enc = x_enc + y_enc # adds encrypted # tensors xy_dec = xy_enc.get_plain_text() assert torch.all_close(xy_dec, x + y) # this passes!

slide-3
SLIDE 3

Expose the Machine Learning Community to Secure Computing Techniques

slide-4
SLIDE 4
slide-5
SLIDE 5

ML Centric Interface

slide-6
SLIDE 6

ML Centric Interface Explainable Performance

slide-7
SLIDE 7

ML Centric Interface Explainable Performance Debuggability

slide-8
SLIDE 8

ML Centric Interface Explainable Performance Debuggability Interoperability

slide-9
SLIDE 9

ML Centric Interface Explainable Performance Debuggability Interoperability Honest but curious

slide-10
SLIDE 10
slide-11
SLIDE 11

What makes an ML framework?

slide-12
SLIDE 12

What makes an ML framework? Tensor

slide-13
SLIDE 13

What makes an ML framework? Tensor Operators

slide-14
SLIDE 14

What makes an ML framework? Tensor Operators Computation graph

slide-15
SLIDE 15

What makes an ML framework? Tensor Operators Computation graph Gradients

slide-16
SLIDE 16
slide-17
SLIDE 17
slide-18
SLIDE 18

Mul

slide-19
SLIDE 19

Mul

slide-20
SLIDE 20

Mul

slide-21
SLIDE 21

Mul BMul

slide-22
SLIDE 22

Mul BMul AccumGrad AccumGrad

slide-23
SLIDE 23

Mul BMul AccumGrad AccumGrad

slide-24
SLIDE 24
slide-25
SLIDE 25

CrypTensor

slide-26
SLIDE 26

CrypTensor MPCTensor

slide-27
SLIDE 27

CrypTensor MPCTensor ArithmeticShared Tensor

slide-28
SLIDE 28

CrypTensor MPCTensor ArithmeticShared Tensor BinaryShared Tensor

slide-29
SLIDE 29

CrypTensor MPCTensor ArithmeticShared Tensor BinaryShared Tensor LongTensor

slide-30
SLIDE 30

CrypTensor MPCTensor ArithmeticShared Tensor BinaryShared Tensor LongTensor

slide-31
SLIDE 31

CrypTensor MPCTensor ArithmeticShared Tensor BinaryShared Tensor LongTensor

PyTorch

slide-32
SLIDE 32

CrypTensor MPCTensor ArithmeticShared Tensor BinaryShared Tensor LongTensor

PyTorch

Interface filters up

slide-33
SLIDE 33

CrypTensor MPCTensor ArithmeticShared Tensor BinaryShared Tensor LongTensor

PyTorch

Interface filters up Performance is linked

slide-34
SLIDE 34

CrypTensor MPCTensor ArithmeticShared Tensor BinaryShared Tensor LongTensor

PyTorch

Interface filters up Performance is linked Communication libraries

slide-35
SLIDE 35
slide-36
SLIDE 36

What operations do we need for Machine Learning training?

slide-37
SLIDE 37

matmul(), conv2d() What operations do we need for Machine Learning training?

slide-38
SLIDE 38

matmul(), conv2d() log(), exp() What operations do we need for Machine Learning training?

slide-39
SLIDE 39

matmul(), conv2d() log(), exp() div() What operations do we need for Machine Learning training?

slide-40
SLIDE 40

matmul(), conv2d() log(), exp() div() pow(), sqrt() What operations do we need for Machine Learning training?

slide-41
SLIDE 41

matmul(), conv2d() log(), exp() div() pow(), sqrt() relu(), max(), argmax() What operations do we need for Machine Learning training?

slide-42
SLIDE 42

CrypTensor MPCTensor ArithmeticShared Tensor BinaryShared Tensor LongTensor

PyTorch

slide-43
SLIDE 43

CrypTensor

slide-44
SLIDE 44

CrypTensor

slide-45
SLIDE 45

CrypTensor AutogradCrypTensor

slide-46
SLIDE 46

CrypTensor AutogradCrypTensor

Module

slide-47
SLIDE 47

CrypTensor AutogradCrypTensor

Module

Compatibility

slide-48
SLIDE 48

CrypTensor AutogradCrypTensor

Module

Compatibility Use pre-trained models

slide-49
SLIDE 49

CrypTensor AutogradCrypTensor

Module

Compatibility Use pre-trained models Train models from scratch

slide-50
SLIDE 50
slide-51
SLIDE 51

AllReduce

slide-52
SLIDE 52

AllReduce Open to all

slide-53
SLIDE 53

AllReduce Reduce Open to all

slide-54
SLIDE 54

AllReduce Reduce Open to all Open to one

slide-55
SLIDE 55

AllReduce Reduce Broadcast Open to all Open to one

slide-56
SLIDE 56

AllReduce Reduce Broadcast Open to all Open to one Trusted dealer to parties

slide-57
SLIDE 57

PyTorch CrypTen

slide-58
SLIDE 58

import torch x = torch.tensor([1.0, 2.0, 3.0]) y = torch.tensor([2.0, 3.0, 4.0]) xy = x + y

PyTorch CrypTen

slide-59
SLIDE 59

import crypten crypten.init() # sets up # communication x_enc = crypten.cryptensor([1.0, 2.0, 3.0]) y_enc = crypten.cryptensor([2.0, 3.0, 4.0]) xy_enc = x_enc + y_enc import torch x = torch.tensor([1.0, 2.0, 3.0]) y = torch.tensor([2.0, 3.0, 4.0]) xy = x + y

PyTorch CrypTen

slide-60
SLIDE 60

PyTorch CrypTen

pt = torch.tensor([1.0, 2.0, 3.0]) ct = AutogradCrypTensor(crypten.cryptensor(pt)) ct_loss = ct.cross_entropy() ct_loss.backward() pt = torch.tensor([1.0, 2.0, 3.0]) pt_loss = pt.cross_entropy() pt_loss.backward()

slide-61
SLIDE 61
slide-62
SLIDE 62

How do we work with real model and datasets?

slide-63
SLIDE 63

import crypten import torchvision.datasets as datasets import torchvision.models as models crypten.init()

How do we work with real model and datasets?

slide-64
SLIDE 64

import crypten import torchvision.datasets as datasets import torchvision.models as models crypten.init() # download and set up ImageNet dataset: transform = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=[0.48, 0.45, 0.41], std=[0.23, 0.22, 0.23]), ]) dataset = datasets.ImageNet(imagenet_folder, transform=transform)

How do we work with real model and datasets?

slide-65
SLIDE 65

import crypten import torchvision.datasets as datasets import torchvision.models as models crypten.init() # download and set up ImageNet dataset: transform = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=[0.48, 0.45, 0.41], std=[0.23, 0.22, 0.23]), ]) dataset = datasets.ImageNet(imagenet_folder, transform=transform) # download pre-trained ResNet-18 model and encrypt it: model = models.resnet18(pretrained=True) encrypted_model = crypten.nn.from_pytorch(model, dataset[0])

How do we work with real model and datasets?

slide-66
SLIDE 66

import crypten import torchvision.datasets as datasets import torchvision.models as models crypten.init() # download and set up ImageNet dataset: transform = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=[0.48, 0.45, 0.41], std=[0.23, 0.22, 0.23]), ]) dataset = datasets.ImageNet(imagenet_folder, transform=transform) # download pre-trained ResNet-18 model and encrypt it: model = models.resnet18(pretrained=True) encrypted_model = crypten.nn.from_pytorch(model, dataset[0]) # do inference on encrypted images with encrypted model: encrypted_image = crypten.cryptensor(dataset[1]) encrypted_output = encrypted_model(encrypted_image)

How do we work with real model and datasets?

slide-67
SLIDE 67

import crypten import torchvision.datasets as datasets import torchvision.models as models crypten.init() # download and set up ImageNet dataset: transform = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=[0.48, 0.45, 0.41], std=[0.23, 0.22, 0.23]), ]) dataset = datasets.ImageNet(imagenet_folder, transform=transform) # download pre-trained ResNet-18 model and encrypt it: model = models.resnet18(pretrained=True) encrypted_model = crypten.nn.from_pytorch(model, dataset[0]) # do inference on encrypted images with encrypted model: encrypted_image = crypten.cryptensor(dataset[1]) encrypted_output = encrypted_model(encrypted_image)

  • utput = encrypted_output.get_plain_text() # this works!

How do we work with real model and datasets?

slide-68
SLIDE 68
slide-69
SLIDE 69

Improving Performance

slide-70
SLIDE 70

Improving Performance More Secure TTP

slide-71
SLIDE 71

Improving Performance More Secure TTP Support for other techniques?

slide-72
SLIDE 72

Improving Performance More Secure TTP Support for other techniques? Quantifying information leakage?

slide-73
SLIDE 73
slide-74
SLIDE 74

ILSVRC Challenge

slide-75
SLIDE 75

ILSVRC Challenge

Train on a million images

slide-76
SLIDE 76

ILSVRC Challenge

Train on a million images Classify with high accuracy

slide-77
SLIDE 77

ILSVRC Challenge

Train on a million images Classify with high accuracy Done in minutes

slide-78
SLIDE 78

ILSVRC Challenge

Train on a million images Classify with high accuracy Done in minutes

Question?

slide-79
SLIDE 79

ILSVRC Challenge

Train on a million images Classify with high accuracy Done in minutes

Question?

Train on a million encrypted images

slide-80
SLIDE 80

ILSVRC Challenge

Train on a million images Classify with high accuracy Done in minutes

Question?

Train on a million encrypted images Classify with high accuracy

slide-81
SLIDE 81

ILSVRC Challenge

Train on a million images Classify with high accuracy Done in minutes

Question?

Train on a million encrypted images Classify with high accuracy Done in a week

slide-82
SLIDE 82
slide-83
SLIDE 83

CrypTen Team at Facebook

slide-84
SLIDE 84

CrypTen Team at Facebook

Awni

slide-85
SLIDE 85

CrypTen Team at Facebook

Awni Brian

slide-86
SLIDE 86

CrypTen Team at Facebook

Awni Brian Laurens

slide-87
SLIDE 87

CrypTen Team at Facebook

Awni Brian Laurens Mark

slide-88
SLIDE 88

CrypTen Team at Facebook

Awni Brian Laurens Mark Shobha

slide-89
SLIDE 89

CrypTen Team at Facebook

Awni Brian Laurens Mark Shobha Shubho

slide-90
SLIDE 90

CrypTen Team at Facebook

Awni Brian Laurens Mark Shobha Shubho Vini

slide-91
SLIDE 91

CrypTen Team at Facebook

Awni Brian Laurens Mark Shobha Shubho Vini Xing

slide-92
SLIDE 92

T H A N K S