๐ค AI Summary
This paper addresses the low inference efficiency of convolutional neural networks (CNNs) under homomorphic encryption (HE). To this end, it proposes a novel matrix encoding scheme tailored for HE. Its core innovation is a transposed-matrix cooperative encoding mechanism: convolutional kernels are pre-expanded into the image space, generating multiple ciphertexts that enable parallel convolution and accumulation directly in the ciphertext domainโthereby supporting end-to-end encrypted inference without decryption. The approach significantly reduces both computational and communication overheads. On a 40-vCPU server, it classifies a batch of 32 encrypted 28ร28 MNIST images into 10 classes in just 287 seconds, with only 19.8 MB of ciphertext upload. Experimental results demonstrate that the method achieves efficient, scalable, and privacy-preserving CNN inference over encrypted data.
๐ Abstract
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 imes 28$ simultaneously. The data owner only needs to upload one ciphertext ($sim 19.8$ MB) encrypting these 32 images to the public cloud.