The deep learning (DL) has been penetrating daily life in many domains, how to keep the DL model inference secure and sample privacy in an encrypted environment has become an urgent and increasingly important issue for various security-critical applications. To date, several approaches have been proposed based on the Residue Number System variant of the Cheon-Kim-Kim-Song (RNS-CKKS) scheme. However, they all suffer from high latency, which severely limits the applications in real-world tasks. Currently, the research on encrypted inference in deep CNNs confronts three main bottlenecks: i) the time and storage costs of convolution calculation; ii) the time overhead of huge bootstrapping operations; and iii) the consumption of circuit multiplication depth. Towards these three challenges, we in this paper propose an efficient and effective mechanism FastFHE to accelerate the model inference while simultaneously retaining high inference accuracy over fully homomorphic encryption. Concretely, our work elaborates four unique novelties. First, we propose a new scalable ciphertext data-packing scheme to save the time and storage consumptions. Second, we work out a depthwise-separable convolution fashion to degrade the computation load of convolution calculation. Third, we figure out a BN dot-product fusion matrix to merge the ciphertext convolutional layer with the batch-normalization layer without incurring extra multiplicative depth. Last but not least, we adopt the low-degree Legendre polynomial to approximate the nonlinear smooth activation function SiLU under the guarantee of tiny accuracy error before and after encrypted inference. Finally, we execute multi-facet experiments to verify the efficiency and effectiveness of our proposed approach.
翻译:深度学习(DL)已渗透至日常生活的诸多领域,如何在加密环境中保障DL模型推理的安全性与样本隐私,已成为各类安全关键应用中日益紧迫且重要的问题。迄今为止,已有多种基于Cheon-Kim-Kim-Song(RNS-CKKS)方案余数系统变体的方法被提出,但它们均存在高延迟问题,严重限制了在实际任务中的应用。当前,深度CNN中的加密推理研究面临三大瓶颈:i)卷积计算的时间与存储成本;ii)大规模自举操作的时间开销;iii)电路乘法深度的消耗。针对这三项挑战,本文提出一种高效且有效的机制FastFHE,在完全同态加密环境下加速模型推理的同时保持高推理精度。具体而言,我们的工作阐述了四项独特创新:首先,提出一种新的可扩展密文数据打包方案以节省时间与存储消耗;其次,设计了一种深度可分离卷积范式以降低卷积计算负载;第三,构建了BN点积融合矩阵,将密文卷积层与批归一化层合并而不引入额外乘法深度;最后但同样重要的是,采用低阶勒让德多项式逼近非线性平滑激活函数SiLU,并保证加密推理前后的微小精度误差。最终,我们通过多维度实验验证了所提方法的效率与有效性。