Abstract
In this work, we propose ENSEI, a secure inference (SI) framework based on the frequency-domain secure convolution (FDSC) protocol for the efficient execution of image inference in the encrypted domain. Our observation is that, under the combination of homomorphic encryption and secret sharing, homomorphic convolution can be obliviously carried out in the frequency domain, significantly simplifying the related computations. We provide protocol designs and parameter derivations for number-theoretic transform (NTT) based FDSC. In the experiment, we thoroughly study the accuracy-efficiency trade-offs between time- and frequency-domain homomorphic convolution. With ENSEI, compared to the best known works, we achieve 5--11x online time reduction, up to 33x setup time reduction, and up to 10x reduction in the overall inference time. A further 33% of bandwidth reductions can be obtained on binary neural networks with only 3% of accuracy degradation on the CIFAR-10 dataset.
Introduction
As Machine Learning as a Service (MLaaS) grows, so do privacy concerns. In scenarios like medical image analysis, clients require privacy for their sensitive data, while providers must protect their proprietary models. Cryptographic techniques like Homomorphic Encryption (HE) allow computation on encrypted data but are traditionally slow. In visual recognition, the primary bottleneck is the convolutional layer. Standard "time domain" encrypted convolutions require complex "rotate-and-accumulate" processes that are computationally expensive and bandwidth-intensive. ENSEI addresses this by moving heavy cryptographic convolutions into the frequency domain.
Methodology: Frequency-Domain Secure Convolution (FDSC)
The core innovation of ENSEI is the Frequency-Domain Secure Convolution (FDSC) protocol. By the Convolution Theorem, a convolution in the time domain is equivalent to element-wise multiplication in the frequency domain. ENSEI transforms both images and model weights using the Number-Theoretic Transform (NTT), a version of the Fourier Transform designed for the integer-based math of encryption.
The framework combines Packed Additive Homomorphic Encryption (PAHE) with Homomorphic Secret Sharing (HSS), allowing the client and server to share the computational load while maintaining data secrecy. By embedding frequency-domain data directly into ciphertexts, ENSEI eliminates redundant transforms, significantly reducing the number of expensive NTT operations.
Evaluation and Results
ENSEI was evaluated primarily on the CIFAR-10 dataset (60,000 32x32 color images). It demonstrates substantial performance gains over previous state-of-the-art frameworks like Gazelle:
- Speed: Achieves a 5–11x reduction in online time and up to a 10x reduction in overall inference time.
- Setup Efficiency: Setup time is reduced by up to 33x.
- Accuracy vs. Efficiency: ENSEI supports various precision levels. For instance, a Binary Neural Network (BNN) can be executed with only a small drop in accuracy (81% vs 82%) while further reducing bandwidth by 33%.
Discussion
A key insight of this work is that while multiplication is relatively "cheap" in HE, vector rotation is "expensive." Moving to the frequency domain swaps thousands of rotations for simple multiplications. Furthermore, NTT is a mathematically natural fit for lattice-based encryption schemes like BFV.
As convolutions become faster, non-linear layers (like ReLU) handled via Garbled Circuits become the new bottleneck. This suggests a shift toward performance-aware architecture design, using Neural Architecture Search (NAS) to find network structures that are inherently "friendly" to frequency-domain encryption. Future work will focus on scaling these techniques to larger datasets like ImageNet.
Summary updated