Abstract
Private convolutional neural network (CNN) inference based on secure two-party computation (2PC) suffers from high communication and latency overhead, especially from convolution layers. In this paper, we propose UFO, a quantized 2PC inference framework that jointly optimizes the 2PC protocols and quantization algorithm. UFO features a novel 2PC protocol that systematically combines the efficient Winograd convolution algorithm with quantization to improve inference efficiency. However, we observe that naively combining quantization and Winograd convolution faces the following challenges: 1) From the inference perspective, Winograd transformations introduce extensive additions and require frequent bit width conversions to avoid inference overflow, leading to non-negligible communication overhead; 2) From the training perspective, Winograd transformations introduce weight outliers that make quantization-aware training (QAT) difficult, resulting in inferior model accuracy. To address these challenges, we co-optimize both protocol and algorithm. 1) At the protocol level, we propose a series of graph-level optimizations for 2PC inference to minimize the communication. 2) At the algorithm level, we develop a mixed-precision QAT algorithm based on layer sensitivity to optimize model accuracy given communication constraints. To accommodate the outliers, we further introduce a 2PC-friendly bit re-weighting algorithm to increase the representation range without explicitly increasing bit widths. With extensive experiments, UFO demonstrates 11.7x, 3.6x, and 6.3x communication reduction with 1.29%, 1.16%, and 1.29% higher accuracy compared to state-of-the-art frameworks SiRNN, COINN, and CoPriv, respectively.
Abstract (translated)
基于安全的两方计算(2PC)的私有卷积神经网络(CNN)推理在通信和延迟开销方面面临挑战,尤其是在卷积层。本文提出了UFO框架,这是一个量化后的2PC推理框架,它同时优化了2PC协议和量化算法。UFO的特点是一种新型的2PC协议,该协议系统地将高效的Winograd卷积算法与量化相结合,以提高推断效率。然而,我们观察到直接结合量化和Winograd卷积会面临以下挑战:1)从推理角度来看,Winograd变换引入了大量加法运算,并需要频繁进行位宽转换以避免超出推断范围,导致不可忽视的通信开销;2)从训练角度看,Winograd变换引入了权重异常值,使得量化感知训练(QAT)变得困难,从而降低了模型精度。为了解决这些挑战,我们对协议和算法进行了协同优化:1)在协议层面,我们提出了一系列针对2PC推理的图级优化措施以最小化通信开销;2)在算法层面上,我们开发了一种基于层次敏感性的混合精度QAT算法,在给定通信约束的情况下提高模型精度。为了适应异常值,我们进一步引入了一个友好的位重新加权算法,以增加表示范围而无需显式增加位宽。 通过广泛的实验,UFO分别比现有的SiRNN、COINN和CoPriv框架减少了11.7倍、3.6倍和6.3倍的通信开销,并且在精度上分别提高了1.29%、1.16%和1.29%,展示了其卓越性能。
URL
https://arxiv.org/abs/2602.18758