arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2306.08538cs.CRcs.LG
收藏

通过协同设计激活函数实现深度神经网络的快速且私密推理

Fast and Private Inference of Deep Neural Networks by Co-designing Activation Functions

University of Waterloo(滑铁卢大学);Royal Bank of Canada(加拿大皇家银行)
Abdulrahman Diaa, Lucas Fenaux, Thomas Humphries, Marian Dietz, Faezeh Ebrahimianghazani, Bailey Kacsmar, Xinda Li, Nils Lukas, Rasoul Akhavan Mahdavi, Simon Oy… 展开作者

Abdulrahman Diaa, Lucas Fenaux, Thomas Humphries, Marian Dietz, Faezeh Ebrahimianghazani, Bailey Kacsmar, Xinda Li, Nils Lukas, Rasoul Akhavan Mahdavi, Simon Oya, Ehsan Amjadian, Florian Kerschbaum

AI总结:

针对MPC加密DNN推理中ReLU非线性层导致的高延迟问题,本文协同设计多项式激活与单轮MPC协议,并提出配套训练算法,在最高2300万参数模型上实现3至110倍加速且保持精度。

摘要:

机器学习即服务(MLaaS)是一种日益流行的设计:拥有充足计算资源的公司训练深度神经网络,并为图像分类等任务提供查询访问。这种设计的挑战在于,MLaaS要求客户向托管模型的公司披露其可能敏感的查询。多方计算(MPC)通过允许加密推理来保护客户的数据。然而,现有方法面临难以接受的巨大推理时间。MPC中的推理时间瓶颈是对非线性层(如ReLU激活函数)的求值。受此前协同设计机器学习与MPC工作成功的启发,我们开发了一种激活函数协同设计。我们将所有ReLU替换为多项式近似,并使用单轮MPC协议对其求值,从而在广域网中给出最先进的推理时间。此外,为解决此前多项式激活遇到的精度问题,我们提出一种新颖的训练算法,可获得与明文模型相竞争的精度。我们的评估表明,在参数量高达2300万的大型模型上,推理时间加速3至110倍,同时保持具有竞争力的推理精度。

英文摘要:

Machine Learning as a Service (MLaaS) is an increasingly popular design where a company with abundant computing resources trains a deep neural network and offers query access for tasks like image classification. The challenge with this design is that MLaaS requires the client to reveal their potentially sensitive queries to the company hosting the model. Multi-party computation (MPC) protects the client's data by allowing encrypted inferences. However, current approaches suffer from prohibitively large inference times. The inference time bottleneck in MPC is the evaluation of non-linear layers such as ReLU activation functions. Motivated by the success of previous work co-designing machine learning and MPC, we develop an activation function co-design. We replace all ReLUs with a polynomial approximation and evaluate them with single-round MPC protocols, which give state-of-the-art inference times in wide-area networks. Furthermore, to address the accuracy issues previously encountered with polynomial activations, we propose a novel training algorithm that gives accuracy competitive with plaintext models. Our evaluation shows between $3$ and $110\times$ speedups in inference time on large models with up to $23$ million parameters while maintaining competitive inference accuracy.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑