arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2203.02833cs.CRcs.AI
收藏

Tabula:高效计算非线性激活函数以实现安全神经网络推理

Tabula: Efficiently Computing Nonlinear Activation Functions for Secure Neural Network Inference

Harvard University(哈佛大学)

Maximilian Lam, Michael Mitzenmacher, Vijay Janapa Reddi, Gu-Yeon Wei, David Brooks

AI总结:

本文提出基于安全查找表与量化的Tabula算法,以替代混淆电路执行安全神经网络推理中的非线性激活函数,显著降低在线通信、存储和运行时开销。

摘要:

面向安全神经网络推理的多方计算方法通常依赖混淆电路来安全执行非线性激活函数。然而,混淆电路需要服务器与客户端之间大量通信,带来显著存储开销,并造成严重运行时损失。为降低这些成本,我们提出一种混淆电路的替代方案:Tabula,一种基于安全查找表的算法。我们的方法在离线阶段预计算查找表,其中包含所有可能的非线性函数调用结果。由于这些表在操作数数量和输入值精度方面会产生指数级存储成本,我们使用量化来降低这些存储成本,从而使该方法具备实用性。这使得在线阶段安全计算非线性函数结果只需单轮通信,通信成本等于非线性函数输入位数的两倍。在实践中,我们的方法在在线阶段每次非线性函数调用仅消耗2字节通信。实验表明,与采用8位量化输入的混淆电路相比,在在线阶段计算单个非线性函数时,具有8位激活值的Tabula通信量减少280至560倍,速度提升超过100倍,并使用相当(相差不超过2倍)的存储量;与其他最先进协议相比,Tabula实现超过40倍的通信减少。这使其在神经网络安全推理的在线阶段相对采用量化输入的混淆电路获得显著性能提升:Tabula将端到端推理通信减少最高9倍,并实现最高50倍的端到端推理加速,同时带来相当的存储和离线预处理成本。

英文摘要:

Multiparty computation approaches to secure neural network inference commonly rely on garbled circuits for securely executing nonlinear activation functions. However, garbled circuits require excessive communication between server and client, impose significant storage overheads, and incur large runtime penalties. To reduce these costs, we propose an alternative to garbled circuits: Tabula, an algorithm based on secure lookup tables. Our approach precomputes lookup tables during an offline phase that contains the result of all possible nonlinear function calls. Because these tables incur exponential storage costs in the number of operands and the precision of the input values, we use quantization to reduce these storage costs to make this approach practical. This enables an online phase where securely computing the result of a nonlinear function requires just a single round of communication, with communication cost equal to twice the number of bits of the input to the nonlinear function. In practice our approach costs 2 bytes of communication per nonlinear function call in the online phase. Compared to garbled circuits with 8-bit quantized inputs, when computing individual nonlinear functions during the online phase, experiments show Tabula with 8-bit activations uses between $280$-$560 \times$ less communication, is over $100\times$ faster, and uses a comparable (within a factor of 2) amount of storage; compared against other state-of-the-art protocols Tabula achieves greater than $40\times$ communication reduction. This leads to significant performance gains over garbled circuits with quantized inputs during the online phase of secure inference of neural networks: Tabula reduces end-to-end inference communication by up to $9 \times$ and achieves an end-to-end inference speedup of up to $50 \times$, while imposing comparable storage and offline preprocessing costs.

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

↑