arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2310.10349cs.CRcs.AI
收藏

优化分层近似用于全同态加密的高效私有推理

Optimized Layerwise Approximation for Efficient Private Inference on Fully Homomorphic Encryption

Department of Electrical and Computer Engineering, INMC, Seoul National University(电子与计算机工程系,首尔国立大学);School of Computer Science and Engineering, Chung-Ang University(计算机科学与工程学院, Chung-Ang 大学);Department of Software, Sejong University(软件系,世宗大学);Department of Electrical Engineering and Computer Science, DGIST(电子与计算机科学系,DGIST);Department of Electrical and Electronic Engineering, Inha University(电子与电气工程系,Inha 大学);Department of Electrical Engineering, POSTECH(电子工程系,POSTECH)

Junghyun Lee, Eunsang Lee, Young-Sik Kim, Yongwoo Lee, Joon-Woo Lee, Yongjune Kim, Jong-Seon No

AI总结:

提出OLA框架,在训练后近似场景下为每层分配不同次数的多项式,利用动态规划优化精度与延迟,使ResNet-20和ResNet-32推理加速约3倍,并实现ConvNeXt的3次多项式近似分类。

摘要:

近期研究探索了利用同态加密(HE)部署隐私保护的深度神经网络,特别是用于私有推理(PI)。许多工作尝试在PI中采用近似感知训练(AAT)方法,通过允许模型重训练,将模型的激活函数改为低次多项式,这些多项式在HE上更易于计算。然而,由于训练环境的限制,通常需要考虑训练后近似(PTA),即使用现有明文模型的预训练参数而不进行重训练。现有的PTA研究在所有层中统一将激活函数近似为高次多项式,以减轻近似带来的精度损失,导致显著的时间消耗。本研究提出了一种优化的分层近似(OLA),这是一个系统化框架,通过在PTA场景中为每一层使用不同的近似多项式,同时优化精度损失和时间消耗。为了实现高效近似,我们在构建优化问题时,通过考虑每个激活函数的实际输入分布,反映各层对分类精度的影响。此外,我们提供了一种动态规划技术来求解优化问题,并在多项式时间内获得优化的分层次数。结果表明,与先前采用统一次数多项式的最先进实现相比,OLA方法将ResNet-20模型和ResNet-32模型的推理时间分别减少了3.02倍和2.82倍。此外,我们使用所提出的方法,在不修改骨干模型的情况下,仅用3次多项式替换ConvNeXt模型中的GELU函数,成功对CIFAR-10进行了分类。

英文摘要:

Recent studies have explored the deployment of privacy-preserving deep neural networks utilizing homomorphic encryption (HE), especially for private inference (PI). Many works have attempted the approximation-aware training (AAT) approach in PI, changing the activation functions of a model to low-degree polynomials that are easier to compute on HE by allowing model retraining. However, due to constraints in the training environment, it is often necessary to consider post-training approximation (PTA), using the pre-trained parameters of the existing plaintext model without retraining. Existing PTA studies have uniformly approximated the activation function in all layers to a high degree to mitigate accuracy loss from approximation, leading to significant time consumption. This study proposes an optimized layerwise approximation (OLA), a systematic framework that optimizes both accuracy loss and time consumption by using different approximation polynomials for each layer in the PTA scenario. For efficient approximation, we reflect the layerwise impact on the classification accuracy by considering the actual input distribution of each activation function while constructing the optimization problem. Additionally, we provide a dynamic programming technique to solve the optimization problem and achieve the optimized layerwise degrees in polynomial time. As a result, the OLA method reduces inference times for the ResNet-20 model and the ResNet-32 model by 3.02 times and 2.82 times, respectively, compared to prior state-of-the-art implementations employing uniform degree polynomials. Furthermore, we successfully classified CIFAR-10 by replacing the GELU function in the ConvNeXt model with only 3-degree polynomials using the proposed method, without modifying the backbone model.

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

↑