Deep learning inference brings together the data and the Convolutional Neural Network (CNN). This is problematic in case the user wants to preserve the privacy of the data and the service provider does not want to reveal the weights of his CNN. Secure Inference allows the two parties to engage in a protocol that preserves their respective privacy concerns, while revealing only the inference result to the user. This is known as Multi-Party Computation (MPC). A major bottleneck of MPC algorithms is communication, as the parties must send data back and forth. The linear component of a CNN (i.e. convolutions) can be done efficiently with minimal communication, but the non-linear part (i.e., ReLU) requires the bulk of communication bandwidth. We propose two ways to accelerate Secure Inference. The first is based on the observation that the ReLU outcome of many convolutions is highly correlated. Therefore, we replace the per pixel ReLU operation by a ReLU operation per patch. Each layer in the network will benefit from a patch of a different size and we devise an algorithm to choose the optimal set of patch sizes through a novel reduction of the problem to a knapsack problem. The second way to accelerate Secure Inference is based on cutting the number of bit comparisons required for a secure ReLU operation. We demonstrate the cumulative effect of these tools in the semi-honest secure 3-party setting for four problems: Classifying ImageNet using ResNet50 backbone, classifying CIFAR100 using ResNet18 backbone, semantic segmentation of ADE20K using MobileNetV2 backbone and semantic segmentation of Pascal VOC 2012 using ResNet50 backbone. Our source code is publicly available: $\href{https://github.com/yg320/secure_inference}{\text{https://github.com/yg320/secure_inference}}$
翻译:深度学习推断将数据和卷积神经网络结合在一起。但如果用户想保护数据的隐私且服务提供商不想透露其 CNN 的权重,则这会带来问题。安全推断允许双方进行协议,以保留各自的隐私保护,同时仅向用户显示推断结果。这被称为多方计算 (MPC)。MPC 算法的一个主要瓶颈是通信,因为各方必须相互发送数据。CNN 的线性组成部分(即卷积操作)可以通过最小化通信来有效地执行,但是非线性部分(即 ReLU)需要占用大部分通信带宽。我们提出了两种加速安全推断的方法。第一种基于观察,即许多卷积的 ReLU 结果高度相关。因此,我们将每个像素的 ReLU 操作替换为每个像素块的 ReLU 操作。网络中的每个层将从不同大小的块中受益,我们通过将问题新颖地归约为一个 0/1 背包问题来设计算法以选择最优的块集。第二种加速安全推断的方式是减少安全 ReLU 操作所需的比特比较数量。我们在四个问题中展示了这些工具的累积效果:使用 ResNet50 网络对 ImageNet 进行分类,使用 ResNet18 网络对 CIFAR100 进行分类,使用 MobileNetV2 网络对 ADE20K 进行语义分割,以及使用 ResNet50 网络对 Pascal VOC 2012 进行语义分割。我们的源代码公开可用:$\href{https://github.com/yg320/secure_inference}{\text{https://github.com/yg320/secure_inference}}$