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.


翻译:基于安全两方计算(2PC)的私有卷积神经网络(CNN)推理存在高通信开销和高延迟问题,卷积层尤为突出。本文提出UFO,一个量化2PC推理框架,通过联合优化2PC协议与量化算法来解决此问题。UFO的核心是一种新颖的2PC协议,该协议系统性地将高效的Winograd卷积算法与量化技术相结合以提升推理效率。然而,我们发现简单地将量化与Winograd卷积结合面临以下挑战:1)从推理角度看,Winograd变换引入大量加法运算,并需要频繁的位宽转换以避免推理溢出,导致不可忽视的通信开销;2)从训练角度看,Winograd变换引发权重异常值,使得量化感知训练(QAT)难以进行,导致模型精度下降。为应对这些挑战,我们进行了协议与算法的协同优化。1)在协议层面,我们提出一系列面向2PC推理的图级优化以最小化通信开销;2)在算法层面,我们开发了一种基于层敏感度的混合精度QAT算法,在给定通信约束下优化模型精度。针对异常值问题,我们进一步引入了一种对2PC友好的比特重加权算法,可在不显式增加位宽的情况下扩大表示范围。大量实验表明,与最先进的框架SiRNN、COINN和CoPriv相比,UFO分别实现了11.7倍、3.6倍和6.3倍的通信量降低,同时精度分别高出1.29%、1.16%和1.29%。

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
通过集成 XNNPACK 实现推理速度飞跃
TensorFlow
26+阅读 · 2020年7月30日
深度学习中的五大正则化方法和七大优化策略
全球人工智能
11+阅读 · 2017年12月25日
综述——隐私保护集合交集计算技术研究
计算机研究与发展
22+阅读 · 2017年10月24日
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 3月1日
VIP会员
最新内容
人工智能在战场行动中的演进及伊朗案例
专知会员服务
4+阅读 · 4月18日
美AI公司Anthropic推出网络安全模型“Mythos”
专知会员服务
2+阅读 · 4月18日
【博士论文】面向城市环境的可解释计算机视觉
大语言模型的自改进机制:技术综述与未来展望
《第四代军事特种作战部队选拔与评估》
专知会员服务
1+阅读 · 4月18日
相关VIP内容
相关基金
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
0+阅读 · 2017年12月31日
国家自然科学基金
2+阅读 · 2017年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员