In this work, we present a novel matrix-encoding method that is particularly convenient for neural networks to make predictions in a privacy-preserving manner using homomorphic encryption. Based on this encoding method, we implement a convolutional neural network for handwritten image classification over encryption. For two matrices $A$ and $B$ to perform homomorphic multiplication, the main idea behind it, in a simple version, is to encrypt matrix $A$ and the transpose of matrix $B$ into two ciphertexts respectively. With additional operations, the homomorphic matrix multiplication can be calculated over encrypted matrices efficiently. For the convolution operation, we in advance span each convolution kernel to a matrix space of the same size as the input image so as to generate several ciphertexts, each of which is later used together with the ciphertext encrypting input images for calculating some of the final convolution results. We accumulate all these intermediate results and thus complete the convolution operation. In a public cloud with 40 vCPUs, our convolutional neural network implementation on the MNIST testing dataset takes $\sim$ 287 seconds to compute ten likelihoods of 32 encrypted images of size $28 \times 28$ simultaneously. The data owner only needs to upload one ciphertext ($\sim 19.8$ MB) encrypting these 32 images to the public cloud.
翻译:在这项工作中,我们提出了一个新的矩阵编码方法,它对于神经网络使用同质加密进行隐私保存的预测特别方便。基于这个编码方法,我们实施了一个用于对加密进行手写图像分类的进化神经网络。对于两个矩阵来说,用美元和美元B$来进行同质乘法,它背后的主要想法是分别加密矩阵$A和将矩阵$B$转换成两个密码文本。随着额外的操作,同质矩阵的乘法可以对加密的基质进行高效的计算。对于演化操作,我们先将每个卷心室的进动神经网络延伸到一个与输入图像大小相同的矩阵空间。对于两个矩阵来说,每个总价美元和$B$B$B$来进行同质乘法乘法的乘法变数图象,在计算某些最后的演算结果时,我们积累所有这些中间结果,从而完成演化操作。在有40 vCPU的公开云中,我们可以将同质变式矩阵的倍增倍增倍增乘数乘数乘数乘以32的图像,在28MIS所有者的上,只需要28MISGML的几号上的数据测试一秒。