Homomorphic encryption (HE) enables calculating on encrypted data, which makes it possible to perform privacypreserving neural network inference. One disadvantage of this technique is that it is several orders of magnitudes slower than calculation on unencrypted data. Neural networks are commonly trained using floating-point, while most homomorphic encryption libraries calculate on integers, thus requiring a quantisation of the neural network. A straightforward approach would be to quantise to large integer sizes (e.g. 32 bit) to avoid large quantisation errors. In this work, we reduce the integer sizes of the networks, using quantisation-aware training, to allow more efficient computations. For the targeted MNIST architecture proposed by Badawi et al., we reduce the integer sizes by 33% without significant loss of accuracy, while for the CIFAR architecture, we can reduce the integer sizes by 43%. Implementing the resulting networks under the BFV homomorphic encryption scheme using SEAL, we could reduce the execution time of an MNIST neural network by 80% and by 40% for a CIFAR neural network.
翻译:同态加密(HE)支持对加密数据进行计算,从而能够实现隐私保护的神经网络推理。该技术的一个缺点是比未加密数据的计算慢数个数量级。神经网络通常使用浮点数进行训练,而大多数同态加密库基于整数计算,因此需要对神经网络进行量化。一种直接的方法是使用大整数位数(例如32位)进行量化,以避免较大的量化误差。在本工作中,我们通过量化感知训练来降低网络的整数位数,从而支持更高效的计算。针对Badawi等人提出的MNIST目标架构,我们在不显著损失精度的情况下将整数位数减少了33%;而对于CIFAR架构,我们能够将整数位数减少43%。使用SEAL库基于BFV同态加密方案实现所得网络后,我们将MNIST神经网络的执行时间减少了80%,CIFAR神经网络的执行时间减少了40%。