Abstract
Oblivious inference enables the cloud to provide neural network inference-as-a-service (NN-IaaS), whilst neither disclosing the client data nor revealing the server's model. However, the privacy guarantee under oblivious inference usually comes with a heavy cost of efficiency and accuracy. We propose Popcorn, a concise oblivious inference framework entirely built on the Paillier homomorphic encryption scheme. We design a suite of novel protocols to compute non-linear activation and max-pooling layers. We leverage neural network compression techniques (i.e., neural weights pruning and quantization) to accelerate the inference computation. To implement the Popcorn framework, we only need to replace algebraic operations of existing networks with their corresponding Paillier homomorphic operations, which is extremely friendly for engineering development. We first conduct the performance evaluation and comparison based on the MNIST and CIFAR-10 classification tasks. Compared with existing solutions, Popcorn brings a significant communication overhead deduction, with a moderate runtime increase. Then, we benchmark the performance of oblivious inference on ImageNet. To our best knowledge, this is the first report based on a commercial-level dataset, taking a step towards the deployment to production.
1. Introduction
The rise of Neural-Network-as-a-Service (NN-IaaS) has created a significant privacy challenge. Clients are often reluctant to share sensitive data (such as medical records) with cloud providers, while providers seek to protect their proprietary models. This "privacy deadlock" necessitates oblivious inference, where the server performs computations without accessing the client's raw data or exposing the model's weights.
Existing solutions generally face a trilemma:
- Homomorphic Encryption (HE): Allows computation on encrypted data but struggles with non-linear functions like ReLU, often requiring accuracy-reducing polynomial approximations.
- Garbled Circuits (GC) & Secret Sharing (SS): Handle non-linearities well but suffer from massive communication overhead, often requiring gigabytes of data transfer for a single prediction.
- Trusted Execution Environments (TEE): Offer high performance but require users to trust hardware vendors.
Popcorn aims to break this trilemma by creating a framework that is accurate, developer-friendly, and scalable to real-world datasets.
2. Methodology
Popcorn is built entirely on the Paillier cryptosystem, an additive homomorphic encryption scheme. The framework introduces several engineering and cryptographic innovations to ensure efficiency and scalability.
2.1 Multiplicative Obfuscation for Non-Linearity
A key innovation in Popcorn is the handling of non-linear activation functions like ReLU and Max-pooling without relying on inaccurate polynomial approximations. The framework employs a multiplicative obfuscation protocol where the server "blinds" the encrypted intermediate results with a random factor $\tau$ before sending them to the client. The client, possessing the secret key, decrypts the value, performs the non-linear operation (e.g., $y = \max(0, x)$), re-encrypts the result, and returns it to the server. The server then removes the blinding factor to continue the computation.
2.2 Leveraging Model Compression
Popcorn utilizes neural network compression—specifically pruning and quantization—to accelerate inference. By pruning unimportant weights to zero and quantizing others to lower bit-widths, the number of required homomorphic operations is significantly reduced. In this context, compression acts as a "cryptographic superpower" that directly minimizes the computational workload by reducing the number of non-zero weights the server must process.
2.3 ReLU-Maxpool Fusion and Optimization
To further optimize performance, Popcorn integrates ReLU-Maxpool fusion. In many architectures, a Max-pooling layer follows a ReLU; Popcorn mathematically "absorbs" the ReLU activation into the subsequent Max-pooling operation, effectively eliminating the overhead of one non-linear step. For Max-pooling specifically, a similar blinding protocol is used to compare encrypted values.
3. Experimental Evaluation
The authors evaluated Popcorn on three standard benchmarks: MNIST, CIFAR-10, and the ImageNet (ILSVRC2012) dataset. Notably, this is the first report in the literature to benchmark oblivious inference on the commercial-grade ImageNet dataset.
3.1 Key Results
- Bandwidth Efficiency: Popcorn achieves a massive reduction in communication overhead. On the CIFAR-10 dataset (VGG-c model), Popcorn required only 450 MB of communication. For comparison, the XONN framework would require approximately 41 GB for the same task—a nearly 100x difference.
- Accuracy Preservation: By avoiding polynomial approximations for ReLU, Popcorn maintains high accuracy, achieving 91.7% on CIFAR-10, outperforming many existing private inference methods.
- ImageNet Milestone: Popcorn successfully ran AlexNet and VGG on ImageNet. While the runtime is still high (AlexNet takes ~10–30 minutes per image), it proves that oblivious inference is moving toward production feasibility.
4. Conclusion and Future Work
Popcorn demonstrates that combining Paillier homomorphic encryption with model compression can make oblivious inference significantly more scalable. By prioritizing communication efficiency and maintaining accuracy through exact non-linear protocols, it paves the way for practical, privacy-preserving AI services. Future research will explore lattice-based additive HE schemes to further amortize costs through ciphertext packing.
Summary updated