Secure two-party computation with homomorphic encryption (HE) protects data privacy with a formal security guarantee but suffers from high communication overhead. While previous works, e.g., Cheetah, Iron, etc, have proposed efficient HE-based protocols for different neural network (NN) operations, they still assume high precision, e.g., fixed point 37 bit, for the NN operations and ignore NNs' native robustness against quantization error. In this paper, we propose HEQuant, which features low-precision-quantization-aware optimization for the HE-based protocols. We observe the benefit of a naive combination of quantization and HE quickly saturates as bit precision goes down. Hence, to further improve communication efficiency, we propose a series of optimizations, including an intra-coefficient packing algorithm and a quantization-aware tiling algorithm, to simultaneously reduce the number and precision of the transferred data. Compared with prior-art HE-based protocols, e.g., CrypTFlow2, Cheetah, Iron, etc, HEQuant achieves $3.5\sim 23.4\times$ communication reduction and $3.0\sim 9.3\times$ latency reduction. Meanwhile, when compared with prior-art network optimization frameworks, e.g., SENet, SNL, etc, HEQuant also achieves $3.1\sim 3.6\times$ communication reduction.
翻译:基于同态加密(HE)的安全两方计算虽能提供形式化安全保证保护数据隐私,却面临高昂通信开销的挑战。尽管Cheetah、Iron等前期工作已针对不同神经网络操作提出高效的HE协议,但这些方法仍假定神经网络操作采用高精度(如37位定点数),忽视了神经网络对量化误差的天然鲁棒性。本文提出HEQuant方法,其核心在于针对HE协议进行低精度量化感知优化。我们发现,简单组合量化与HE带来的收益会随比特精度降低而快速饱和。为此,我们进一步提出系列优化策略以提升通信效率:包括系数内打包算法与量化感知分块算法,可同时降低传输数据的数量与精度。相较于CrypTFlow2、Cheetah、Iron等现有HE协议,HEQuant实现3.5~23.4倍通信量降低与3.0~9.3倍延迟降低;同时相较于SENet、SNL等网络优化框架,HEQuant亦实现3.1~3.6倍通信量降低。