[论文解读] SHE: A Fast and Accurate Deep Neural Network for Encrypted Data
SHE 提出了一种基于移位-累加的分级同态加密深度网络,使用 TFHE 实现 ReLU 和最大池化,采用对数量化与混合比特宽累加器,达到最先进的加密推理准确性,并显著低于先前 LHECNN 的延迟。它使在加密数据上的更深网络成为可能,甚至包括 LSTM。
Homomorphic Encryption (HE) is one of the most promising security solutions to emerging Machine Learning as a Service (MLaaS). Leveled-HE (LHE)-enabled Convolutional Neural Networks (LHECNNs) are proposed to implement MLaaS to avoid large bootstrapping overhead. However, prior LHECNNs have to pay significant computing overhead but achieve only low inference accuracy, due to their polynomial approximation activations and poolings. Stacking many polynomial approximation activation layers in a network greatly reduces inference accuracy, since the polynomial approximation activation errors lead to a low distortion of the output distribution of the next batch normalization layer. So the polynomial approximation activations and poolings have become the obstacle to a fast and accurate LHECNN model. In this paper, we propose a Shift-accumulation-based LHE-enabled deep neural network (SHE) for fast and accurate inferences on encrypted data. We use the binary-operation-friendly Leveled Fast Homomorphic Encryption over Torus (LTFHE) encryption scheme to implement ReLU activations and max poolings. We also adopt the logarithmic quantization to accelerate inferences by replacing expensive LTFHE multiplications with cheap LTFHE shifts. We propose a mixed bitwidth accumulator to accelerate accumulations. Since the LTFHE ReLU activations, max poolings, shifts and accumulations have small multiplicative depth overhead, SHE can implement much deeper network architectures with more convolutional and activation layers. Our experimental results show SHE achieves the state-of-the-art inference accuracy and reduces the inference latency by 76.21% ~ 94.23% over prior LHECNNs on MNIST and CIFAR-10. The source code of SHE is available at https://github.com/qianlou/SHE.
研究动机与目标
- 通过在分级同态加密下使对加密数据的 CNN 推断更准确,来推动安全 MLaaS。
- 克服由多项式激活近似引起的先前 LHECNN 在准确性和延迟方面的瓶颈。
- 提出一个快速、准确的加密推断框架,利用对二进制友好的 TFHE 操作。
- 展示在加密数据上向更深网络结构和非 CNN 模型(LSTM)的可扩展性。
提出的方法
- 使用 TFHE 通过布尔门实现 ReLU 激活和最大池化。
- 对权重量化采用对数量化,将乘法转换为移位和累加。
- 引入混合比特宽累加器,最小化同态加法时的 MD 开销。
- 使用移位-累加运算进行计算,以降低乘法深度并实现更深的网络。
- 将输入和权重量化为 5 位表示,以在准确性和效率之间取得平衡。
- 在 MNIST、CIFAR-10、ImageNet 以及一个医学数据集上进行评估,展示延迟和准确性提升。
实验结果
研究问题
- RQ1是否可以在 TFHE 中高效实现 ReLU 和最大池化,以在加密 CNN 中保持高准确性?
- RQ2对数量化结合移位累加是否能够在不牺牲准确性的前提下减少乘法深度和延迟?
- RQ3在固定的 LTFHE MD 预算下,网络可以多深进行安全训练和推断?
- RQ4是否可以用 SHE 可行地执行加密 LSTM,在 Penn Treebank 上达到具有竞争力的困惑度?
主要发现
- SHE 在 MNIST 和 CIFAR-10 的加密推理准确性方面在 LHE 范畴内达到最先进水平。
- 在 MNIST 和 CIFAR-10 上,相较于先前的 LHECNN,推理延迟下降了 76.21% 到 94.23%。
- 在 MNIST 上,深度为 30 层的 DSHE 在较小 MD 预算下达到 99.77% 的准确率。
- 在 ImageNet + ShuffleNet 的场景中,SHE 在一个实际的加密流水线中达到 69.4% 的 top-1 准确率。
- SHE 使在 Penn Treebank 上的 LSTM 推断达到每词 89.8 的困惑度,使用 30K MD,在核心乘法运算的 MD 仅 0.5K 预算内。
- SHE 将一个 MNIST 图像加密后约为 122.5 MB,远小于其他基于 TFHE 的加密推断流水线。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。