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

PrivCirNet:基于块循环变换的高效隐私推理

PrivCirNet: Efficient Private Inference via Block Circulant Transformation

Peking University(北京大学);Meta, Inc.(元公司)

Tianshi Xu, Lemeng Wu, Runsheng Wang, Meng Li

AI总结:

针对同态加密下深度神经网络推理计算开销大的问题,提出基于块循环变换的协议-网络协同优化框架PrivCirNet,在多个模型和数据集上实现了延迟降低与精度提升的双重收益。

摘要:

基于同态加密(HE)的深度神经网络(DNN)推理可保护数据与模型隐私,但存在显著的计算开销问题。我们观察到,将DNN权重转换为循环矩阵可将通用矩阵-向量乘法转化为适配HE的一维卷积,大幅降低HE计算成本。因此,本文提出PrivCirNet,一种基于块循环变换的协议-网络协同优化框架。在协议层面,PrivCirNet定制了与块循环变换完全兼容的HE编码算法,可按块大小比例降低计算延迟。在网络层面,我们提出一种延迟感知公式,基于二阶信息搜索逐层的块大小分配方案。PrivCirNet还利用层融合进一步降低推理成本。我们将PrivCirNet与当前最先进的基于HE的框架Bolt(IEEE S&P 2024)以及HE友好的剪枝方法SpENCNN(ICML 2023)进行对比。在Tiny ImageNet数据集上的ResNet-18和Vision Transformer(ViT)实验中,在精度相同的条件下,PrivCirNet的延迟分别比Bolt降低5.0倍和1.3倍,精度分别比SpENCNN提升4.1%和12%。在ImageNet数据集上的MobileNetV2实验中,PrivCirNet的延迟比Bolt降低1.7倍,精度比SpENCNN提升4.2%。我们的代码和模型检查点已在GitHub上公开。

英文摘要:

Homomorphic encryption (HE)-based deep neural network (DNN) inference protects data and model privacy but suffers from significant computation overhead. We observe transforming the DNN weights into circulant matrices converts general matrix-vector multiplications into HE-friendly 1-dimensional convolutions, drastically reducing the HE computation cost. Hence, in this paper, we propose \method, a protocol/network co-optimization framework based on block circulant transformation. At the protocol level, PrivCirNet customizes the HE encoding algorithm that is fully compatible with the block circulant transformation and reduces the computation latency in proportion to the block size. At the network level, we propose a latency-aware formulation to search for the layer-wise block size assignment based on second-order information. PrivCirNet also leverages layer fusion to further reduce the inference cost. We compare PrivCirNet with the state-of-the-art HE-based framework Bolt (IEEE S\&P 2024) and the HE-friendly pruning method SpENCNN (ICML 2023). For ResNet-18 and Vision Transformer (ViT) on Tiny ImageNet, PrivCirNet reduces latency by $5.0\times$ and $1.3\times$ with iso-accuracy over Bolt, respectively, and improves accuracy by $4.1\%$ and $12\%$ over SpENCNN, respectively. For MobileNetV2 on ImageNet, PrivCirNet achieves $1.7\times$ lower latency and $4.2\%$ better accuracy over Bolt and SpENCNN, respectively. Our code and checkpoints are available on Git Hub.

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

↑