Deep neural network (DNN) inference based on secure 2-party computation (2PC) can offer cryptographically-secure privacy protection but suffers from orders of magnitude latency overhead due to enormous communication. Previous works heavily rely on a proxy metric of ReLU counts to approximate the communication overhead and focus on reducing the ReLUs to improve the communication efficiency. However, we observe these works achieve limited communication reduction for state-of-the-art (SOTA) 2PC protocols due to the ignorance of other linear and non-linear operations, which now contribute to the majority of communication. In this work, we present CoPriv, a framework that jointly optimizes the 2PC inference protocol and the DNN architecture. CoPriv features a new 2PC protocol for convolution based on Winograd transformation and develops DNN-aware optimization to significantly reduce the inference communication. CoPriv further develops a 2PC-aware network optimization algorithm that is compatible with the proposed protocol and simultaneously reduces the communication for all the linear and non-linear operations. We compare CoPriv with the SOTA 2PC protocol, CrypTFlow2, and demonstrate 2.1x communication reduction for both ResNet-18 and ResNet-32 on CIFAR-100. We also compare CoPriv with SOTA network optimization methods, including SNL, MetaPruning, etc. CoPriv achieves 9.98x and 3.88x online and total communication reduction with a higher accuracy compare to SNL, respectively. CoPriv also achieves 3.87x online communication reduction with more than 3% higher accuracy compared to MetaPruning.
翻译:摘要:基于安全两方计算(2PC)的深度神经网络(DNN)推理能够提供密码学安全的隐私保护,但因巨大的通信开销而面临数量级的延迟负担。以往研究严重依赖ReLU数量的代理指标来近似通信开销,并聚焦于减少ReLU以提升通信效率。然而,我们发现这些方法对最先进(SOTA)的2PC协议实现的通信缩减有限,原因在于其忽略了其他线性和非线性操作(这些操作如今贡献了大部分通信量)。本文提出CoPriv框架,该框架联合优化2PC推理协议与DNN架构。CoPriv基于Winograd变换提出了新的卷积2PC协议,并开发了DNN感知优化以显著降低推理通信量。CoPriv进一步提出与所提协议兼容的2PC感知网络优化算法,可同时降低所有线性和非线性操作的通信量。我们将CoPriv与SOTA 2PC协议CrypTFlow2进行对比,在CIFAR-100数据集上对ResNet-18和ResNet-32实现了2.1倍的通信压缩。同时与包括SNL、MetaPruning等SOTA网络优化方法比较,CoPriv分别实现了9.98倍的在线通信压缩和3.88倍的总通信压缩,且准确率高于SNL。相比于MetaPruning,CoPriv在准确率提升超过3%的情况下实现了3.87倍的在线通信压缩。