引用本文
  • 杨涛,董建锋.基于BFV同态加密神经网络参数设置实证研究[J].信息安全学报,2023,8(3):38-48    [点击复制]
  • YANG Tao,DONG Jianfeng.Empirical Study on the effects of BFV Scheme Configuration on Secure Neural Networks Inference[J].Journal of Cyber Security,2023,8(3):38-48   [点击复制]
【打印本页】 【下载PDF全文】 查看/发表评论下载PDF阅读器关闭

←前一篇|后一篇→

过刊浏览    高级检索

本文已被:浏览 5421次   下载 3616 本文二维码信息
码上扫一扫!
基于BFV同态加密神经网络参数设置实证研究
杨涛1, 董建锋1,2
0
(1.浙江工商大学, 计算机科学与技术学院, 杭州 中国 310012;2.中国科学院信息工程研究所, 信息安全国家重点实验室, 北京 100093)
摘要:
基于BFV同态加密方案的隐私安全神经网络已经越来越被人们熟知。然而在将其应用到不同场景时,用户对其众多参数设置的策略,以及这些参数设置对网络模型预测速度和预测准确率的影响还比较模糊,影响同态加密神经网络进一步推广和应用。本论文将以微软提出的Cryptonets为研究对象,以实证研究的方式对BFV密码方案中各个参数进行设置与调试,研究参数对加密解密速度、密文增长、网络预测速度、以及网络最终预测结果的影响,并给出指导建议。从实验结果中发现,1)多项式模数N的设定对网络模型预测的准确性影响最大。较大的多项式模数将带来更高的预测精度,过小的多项式模数将使预测完全失真。BFV中其余参数的设置只对运算效率产生影响,对模型的准确性的影响不大;2)时间复杂度、空间复杂度都随着多项式模数的增加而增加。密文与明文所占空间之比为10:1。随着多项式模数的增加,神经网络计算的时间复杂度的增加要快于多项式模数的增长。3)在神经网络不同层级中,池化层和卷积层是同态加密神经网络中计算耗时最长的层级,增大卷积核的尺寸可以有助于提高效率。总之,研究同态加密神经网络中的参数配置对于其在不同应用领域中的性能至关重要。本文对不同参数对计算效率和预测准确性的影响的研究,使我们能够更明智地选择参数和设计网络。随着同态加密在隐私安全机器学习中的更广泛应用,未来还需要进一步研究其他密码方案的参数配置及其对性能的影响。
关键词:  同态加密|神经网络|参数配置
DOI:10.19363/J.cnki.cn10-1380/tn.2023.05.04
投稿时间:2022-09-11修订日期:2022-12-24
基金项目:本课题得到浙江省自然科学基金(No. LQ20F020008)与中科院信工所开放课题(No. 2021-MS-03)提供资助。
Empirical Study on the effects of BFV Scheme Configuration on Secure Neural Networks Inference
YANG Tao1, DONG Jianfeng1,2
(1.School of Computer Science and Technology, Zhejiang Gongshang University, Hangzhou, 310012, China;2.State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences, Beijing 100093, China)
Abstract:
Homomorphic encryption has emerged as an effective solution for preserving privacy in neural network applications. However, the parameter configuration of the BFV homomorphic encryption scheme has not yet been thoroughly investigated for various application domains. This has resulted in difficulties in applying homomorphic encrypted neural networks to other scenarios, as a lack of understanding of how parameter configuration affects inference speed and accuracy can result in suboptimal performance. To address this issue, this paper conducted an investigation of parameter configuration not only in the BFV scheme but also in the homomorphic encrypted neural network model itself. The aim was to reveal the relationships between parameter settings and computation efficiency and inference accuracy. The results of the experiments showed that the polynomial modulus was the most important parameter influencing computation efficiency and accuracy. Larger polynomial moduli resulted in greater accuracy, while smaller polynomial moduli resulted in a significant loss of accuracy. Other parameters in the BFV scheme had no effect on inference accuracy and only affected computation efficiency. Additionally, the polynomial modulus was found to be strongly related to both space and time complexities. As the polynomial modulus increased, both time and space complexity increased, with time complexity increasing much faster than the polynomial modulus. The ciphertext was nearly ten times larger than the plaintext, indicating a significant increase in storage requirements when using homomorphic encryption. The experiments also revealed that pooling and convolutional layers were the most time-consuming layers in homomorphic encrypted neural networks due to the large volume of ciphertext computation. To mitigate this issue, the paper advised reducing the use of pooling layers or replacing them with other network structures. Moreover, increasing the size of the convolution kernel was found to reduce the time-complexity of inference computation. In summary, the investigation of parameter configuration in homomorphic encrypted neural networks is critical for achieving optimal performance in various application domains. The findings of this paper provide valuable insights into the impact of different parameters on computation efficiency and inference accuracy, allowing for more informed decisions regarding parameter selection and network design. As homomorphic encryption continues to widely applied in privacy-preserving machine learning, further research is needed to explore additional aspects of parameter configuration and their impact on performance.
Key words:  homomorphic encryption|neural networks|parameter settings