arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.00239cs.CR
收藏

OPAF:面向循环神经网络非线性激活函数的优化安全两方计算协议

OPAF: Optimized Secure Two-Party Computation Protocols for Nonlinear Activation Functions in Recurrent Neural Network

Qian Feng, Zhihua Xia, Zhifeng Xu, Jiasi Weng, Jian Weng

AI总结:

针对两方半诚实场景下 RNN 非线性激活函数的安全计算,本文利用分治、对称性和输入微调优化 SIRNN,在保持最先进精度的同时显著降低运行时间。

摘要:

深度神经网络(DNN)通常包含卷积、池化和激活函数。由于隐私担忧日益增长,隐私保护 DNN 成为热门研究课题。通常,卷积和池化操作可由加性同态加密和安全比较支持,但激活函数的安全实现因精度和效率要求而并不直接,尤其是指数函数、sigmoid 和 tanh 函数等非线性函数。本文特别关注在两方设置的半诚实模型中实现此类非线性函数,SIRNN 是当前该领域的最先进方法。与以往工作不同,我们利用这些函数的内在特征以及有价值的小技巧,提出了改进的实现。首先,我们采用分治策略,将大部分计算放在本地执行,提出了一种新颖且高效的指数函数协议。指数协议广泛用于 Poisson 回归等机器学习任务,同时也是 sigmoid 和 tanh 函数的关键组成部分。接着,我们利用 sigmoid 和 Tanh 的对称性,并对输入进行微调,以减少 2PC 基础构件,从而节省开销并提升性能。最终,我们以更少的基础构件实现了这些函数。综合评估表明,我们的协议在达到最先进精度的同时,对指数函数(仅负输入)、sigmoid 和 Tanh 函数分别将运行时间减少约 57%、44% 和 42%。

英文摘要:

Deep neural network (DNN) typically involves convolutions, pooling, and activation function. Due to the growing concern about privacy, privacy-preserving DNN becomes a hot research topic. Generally, the convolution and pooling operations can be supported by additive homomorphic and secure comparison, but the secure implementation of activation functions is not so straightforward for the requirements of accuracy and efficiency, especially for the non-linear ones such as exponential, sigmoid, and tanh functions. This paper pays a special attention to the implementation of such non-linear functions in semi-honest model with two-party settings, for which SIRNN is the current state-of-the-art. Different from previous works, we proposed improved implementations for these functions by using their intrinsic features as well as worthy tiny tricks. At first, we propose a novel and efficient protocol for exponential function by using a divide-and-conquer strategy with most of the computations executed locally. Exponential protocol is widely used in machine learning tasks such as Poisson regression, and is also a key component of sigmoid and tanh functions. Next, we take advantage of the symmetry of sigmoid and Tanh, and fine-tune the inputs to reduce the 2PC building blocks, which helps to save overhead and improve performance. As a result, we implement these functions with fewer fundamental building blocks. The comprehensive evaluations show that our protocols achieve state-of-the-art precision while reducing run-time by approximately 57%, 44%, and 42% for exponential (with only negative inputs), sigmoid, and Tanh functions, respectively.

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

↑