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
play

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()


  1. 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

  2. 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 Why is CrypTen the way it is? 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!

  3. Expose the Machine Learning Community to Secure Computing Techniques

  4. ML Centric Interface

  5. ML Centric Interface Explainable Performance

  6. ML Centric Interface Explainable Performance Debuggability

  7. ML Centric Interface Explainable Performance Debuggability Interoperability

  8. Honest but curious ML Centric Interface Explainable Performance Debuggability Interoperability

  9. What makes an ML framework?

  10. Tensor What makes an ML framework?

  11. Tensor Operators What makes an ML framework?

  12. Tensor Operators What makes an ML framework? Computation graph

  13. Tensor Operators What makes an ML framework? Computation graph Gradients

  14. Mul

  15. Mul

  16. Mul

  17. Mul BMul

  18. AccumGrad AccumGrad Mul BMul

  19. AccumGrad AccumGrad Mul BMul

  20. CrypTensor

  21. CrypTensor MPCTensor

  22. CrypTensor MPCTensor ArithmeticShared Tensor

  23. CrypTensor MPCTensor ArithmeticShared BinaryShared Tensor Tensor

  24. CrypTensor MPCTensor ArithmeticShared BinaryShared Tensor Tensor LongTensor

  25. CrypTensor MPCTensor ArithmeticShared BinaryShared Tensor Tensor LongTensor

  26. CrypTensor MPCTensor ArithmeticShared BinaryShared Tensor Tensor LongTensor PyTorch

  27. CrypTensor Interface filters up MPCTensor ArithmeticShared BinaryShared Tensor Tensor LongTensor PyTorch

  28. CrypTensor Interface filters up MPCTensor Performance is linked ArithmeticShared BinaryShared Tensor Tensor LongTensor PyTorch

  29. CrypTensor Interface filters up MPCTensor Performance is linked ArithmeticShared BinaryShared Communication libraries Tensor Tensor LongTensor PyTorch

  30. What operations do we need for Machine Learning training?

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

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

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

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

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

  36. CrypTensor MPCTensor ArithmeticShared BinaryShared Tensor Tensor LongTensor PyTorch

  37. CrypTensor

  38. CrypTensor

  39. AutogradCrypTensor CrypTensor

  40. Module AutogradCrypTensor CrypTensor

  41. Module Compatibility AutogradCrypTensor CrypTensor

  42. Module Compatibility AutogradCrypTensor Use pre-trained models CrypTensor

  43. Module Compatibility AutogradCrypTensor Use pre-trained models Train models from scratch CrypTensor

  44. AllReduce

  45. Open to all AllReduce

  46. Open to all AllReduce Reduce

  47. Open to all AllReduce Open to one Reduce

  48. Open to all AllReduce Open to one Reduce Broadcast

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

  50. PyTorch CrypTen

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

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

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

  54. How do we work with real model and datasets?

  55. import crypten import torchvision.datasets as datasets import torchvision.models as models crypten.init() How do we work with real model and datasets?

  56. 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), How do we work with transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=[0.48, 0.45, 0.41], std=[0.23, 0.22, 0.23]), real model and datasets? ]) dataset = datasets.ImageNet(imagenet_folder, transform=transform)

  57. 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), How do we work with transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=[0.48, 0.45, 0.41], std=[0.23, 0.22, 0.23]), real model and datasets? ]) 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])

  58. 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), How do we work with transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=[0.48, 0.45, 0.41], std=[0.23, 0.22, 0.23]), real model and datasets? ]) 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)

  59. 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), How do we work with transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean=[0.48, 0.45, 0.41], std=[0.23, 0.22, 0.23]), real model and datasets? ]) 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) output = encrypted_output.get_plain_text() # this works!

  60. Improving Performance

  61. Improving Performance More Secure TTP

  62. Support for other Improving Performance techniques? More Secure TTP

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

  64. ILSVRC Challenge

  65. ILSVRC Challenge Train on a million images

  66. ILSVRC Challenge Train on a million images Classify with high accuracy

  67. ILSVRC Challenge Train on a million images Classify with high accuracy Done in minutes

  68. ILSVRC Challenge Question? Train on a million images Classify with high accuracy Done in minutes

  69. ILSVRC Challenge Question? Train on a million images Train on a million encrypted images Classify with high accuracy Done in minutes

  70. ILSVRC Challenge Question? Train on a million images Train on a million encrypted images Classify with high accuracy Classify with high accuracy Done in minutes

  71. ILSVRC Challenge Question? Train on a million images Train on a million encrypted images Classify with high accuracy Classify with high accuracy Done in minutes Done in a week

  72. CrypTen Team at Facebook

  73. Awni CrypTen Team at Facebook

  74. Awni Brian CrypTen Team at Facebook

  75. Awni Brian Laurens CrypTen Team at Facebook

  76. Awni Brian Laurens CrypTen Team at Mark Facebook

  77. Awni Brian Laurens CrypTen Team at Mark Facebook Shobha

  78. Awni Brian Laurens CrypTen Team at Mark Facebook Shobha Shubho

  79. Awni Brian Laurens CrypTen Team at Mark Facebook Shobha Shubho Vini

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend