nGraph-HE2:一种基于加密数据的高吞吐量神经网络推理框架

Fabian Boemer, Anamaria Costache, Rosario Cammarota, Casimir Wierzynski
{"title":"nGraph-HE2:一种基于加密数据的高吞吐量神经网络推理框架","authors":"Fabian Boemer, Anamaria Costache, Rosario Cammarota, Casimir Wierzynski","doi":"10.1145/3338469.3358944","DOIUrl":null,"url":null,"abstract":"In previous work, Boemer et al. introduced nGraph-HE, an extension to the Intel nGraph deep learning (DL) compiler, that enables data scientists to deploy models with popular frameworks such as TensorFlow and PyTorch with minimal code changes. However, the class of supported models was limited to relatively shallow networks with polynomial activations. Here, we introduce nGraph-HE2, which extends nGraph-HE to enable privacy-preserving inference on standard, pre-trained models using their native activation functions and number fields (typically real numbers). The proposed framework leverages the CKKS scheme, whose support for real numbers is friendly to data science, and a client-aided model using a two-party approach to compute activation functions. We first present CKKS-specific optimizations, enabling a 3x-88x runtime speedup for scalar encoding, and doubling the throughput through a novel use of CKKS plaintext packing into complex numbers. Second, we optimize ciphertext-plaintext addition and multiplication, yielding 2.6x-4.2x runtime speedup. Third, we exploit two graph-level optimizations: lazy-rescaling and depth-aware encoding, which allow us to significantly improve performance. Together, these optimizations enable state-of-the-art throughput of 1,998 images/s on the CryptoNets network. Using the client-aided model, we also present homomorphic evaluation of (to our knowledge) the largest network to date, namely, pre-trained MobileNetV2 models on the ImageNet dataset, with 60.4%/82.7% top-1/top-5 accuracy and an amortized runtime of 381 ms/image.","PeriodicalId":332171,"journal":{"name":"Proceedings of the 7th ACM Workshop on Encrypted Computing & Applied Homomorphic Cryptography","volume":"40 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2019-08-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"128","resultStr":"{\"title\":\"nGraph-HE2: A High-Throughput Framework for Neural Network Inference on Encrypted Data\",\"authors\":\"Fabian Boemer, Anamaria Costache, Rosario Cammarota, Casimir Wierzynski\",\"doi\":\"10.1145/3338469.3358944\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"In previous work, Boemer et al. introduced nGraph-HE, an extension to the Intel nGraph deep learning (DL) compiler, that enables data scientists to deploy models with popular frameworks such as TensorFlow and PyTorch with minimal code changes. However, the class of supported models was limited to relatively shallow networks with polynomial activations. Here, we introduce nGraph-HE2, which extends nGraph-HE to enable privacy-preserving inference on standard, pre-trained models using their native activation functions and number fields (typically real numbers). The proposed framework leverages the CKKS scheme, whose support for real numbers is friendly to data science, and a client-aided model using a two-party approach to compute activation functions. We first present CKKS-specific optimizations, enabling a 3x-88x runtime speedup for scalar encoding, and doubling the throughput through a novel use of CKKS plaintext packing into complex numbers. Second, we optimize ciphertext-plaintext addition and multiplication, yielding 2.6x-4.2x runtime speedup. Third, we exploit two graph-level optimizations: lazy-rescaling and depth-aware encoding, which allow us to significantly improve performance. Together, these optimizations enable state-of-the-art throughput of 1,998 images/s on the CryptoNets network. Using the client-aided model, we also present homomorphic evaluation of (to our knowledge) the largest network to date, namely, pre-trained MobileNetV2 models on the ImageNet dataset, with 60.4%/82.7% top-1/top-5 accuracy and an amortized runtime of 381 ms/image.\",\"PeriodicalId\":332171,\"journal\":{\"name\":\"Proceedings of the 7th ACM Workshop on Encrypted Computing & Applied Homomorphic Cryptography\",\"volume\":\"40 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2019-08-12\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"128\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"Proceedings of the 7th ACM Workshop on Encrypted Computing & Applied Homomorphic Cryptography\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1145/3338469.3358944\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"Proceedings of the 7th ACM Workshop on Encrypted Computing & Applied Homomorphic Cryptography","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1145/3338469.3358944","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 128

摘要

在之前的工作中,Boemer等人介绍了nGraph-他,这是英特尔nGraph深度学习(DL)编译器的扩展,它使数据科学家能够使用流行的框架(如TensorFlow和PyTorch)部署模型,只需进行最小的代码更改。然而,支持的模型类别仅限于具有多项式激活的相对较浅的网络。在这里,我们介绍nGraph-HE2,它扩展了nGraph-HE,使用标准的预训练模型的原生激活函数和数字字段(通常是实数)来支持隐私保护推理。提出的框架利用CKKS方案,其对实数的支持对数据科学友好,以及使用两方方法计算激活函数的客户端辅助模型。我们首先介绍了CKKS特定的优化,为标量编码提供了3 -88倍的运行时加速,并通过新颖地使用CKKS明文打包成复数将吞吐量提高了一倍。其次,我们优化了密文-明文的加法和乘法,产生了2.6 -4.2倍的运行时加速。第三,我们利用了两个图级优化:延迟重新缩放和深度感知编码,这使我们能够显著提高性能。总之,这些优化在CryptoNets网络上实现了最先进的1998张图像/秒的吞吐量。使用客户端辅助模型,我们还对(据我们所知)迄今为止最大的网络进行了同态评估,即在ImageNet数据集上预训练的MobileNetV2模型,具有60.4%/82.7%的top-1/top-5精度和381 ms/image的平摊运行时间。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
nGraph-HE2: A High-Throughput Framework for Neural Network Inference on Encrypted Data
In previous work, Boemer et al. introduced nGraph-HE, an extension to the Intel nGraph deep learning (DL) compiler, that enables data scientists to deploy models with popular frameworks such as TensorFlow and PyTorch with minimal code changes. However, the class of supported models was limited to relatively shallow networks with polynomial activations. Here, we introduce nGraph-HE2, which extends nGraph-HE to enable privacy-preserving inference on standard, pre-trained models using their native activation functions and number fields (typically real numbers). The proposed framework leverages the CKKS scheme, whose support for real numbers is friendly to data science, and a client-aided model using a two-party approach to compute activation functions. We first present CKKS-specific optimizations, enabling a 3x-88x runtime speedup for scalar encoding, and doubling the throughput through a novel use of CKKS plaintext packing into complex numbers. Second, we optimize ciphertext-plaintext addition and multiplication, yielding 2.6x-4.2x runtime speedup. Third, we exploit two graph-level optimizations: lazy-rescaling and depth-aware encoding, which allow us to significantly improve performance. Together, these optimizations enable state-of-the-art throughput of 1,998 images/s on the CryptoNets network. Using the client-aided model, we also present homomorphic evaluation of (to our knowledge) the largest network to date, namely, pre-trained MobileNetV2 models on the ImageNet dataset, with 60.4%/82.7% top-1/top-5 accuracy and an amortized runtime of 381 ms/image.
求助全文
通过发布文献求助,成功后即可免费获取论文全文。 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Zaphod: Efficiently Combining LSSS and Garbled Circuits in SCALE Revisiting the Hybrid Attack on Sparse Secret LWE and Application to HE Parameters Linear-Regression on Packed Encrypted Data in the Two-Server Model On the Feasibility and Impact of Standardising Sparse-secret LWE Parameter Sets for Homomorphic Encryption RAMPARTS: A Programmer-Friendly System for Building Homomorphic Encryption Applications
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1