Privacy-Preserving Machine Learning With Fully Homomorphic Encryption for Deep Neural Network

Joon-Woo Lee, HyungChul Kang, Yongwoo Lee, Woosuk Choi, Jieun Eom, Maxim Deryabin, Eunsang Lee, Junghyun Lee, Donghoon Yoo, Young-Sik Kim, Jong-Seon No

TL;DR

Researchers have successfully implemented a standard ResNet-20 deep learning model on fully encrypted data, achieving a breakthrough 90.67% accuracy on the CIFAR-10 dataset. By leveraging advanced "bootstrapping" techniques and precise polynomial approximations for non-linear functions like ReLU, this work proves that deep, industry-standard neural networks can finally run in the domain of Fully Homomorphic Encryption (FHE).

What Problem Does This Paper Address?

Privacy-Preserving Machine Learning (PPML) aims to let a server process sensitive data (like medical records or private photos) without ever actually "seeing" it. Fully Homomorphic Encryption (FHE) is the "holy grail" here because it allows mathematical operations to be performed directly on encrypted ciphertexts.

However, FHE has two massive hurdles:

  1. The Noise Ceiling: Every multiplication in FHE adds "noise" to the ciphertext. If the noise gets too high, the data becomes unreadable. This usually limits models to very shallow depths.
  2. The Non-Arithmetic Gap: FHE naturally handles addition and multiplication, but neural networks rely on non-arithmetic functions like ReLU (activation) and Softmax (classification). Previous attempts "cheated" by replacing these with simple squares ($x^2$), which led to poor accuracy (only ~77% on CIFAR-10) and prevented the use of standard pre-trained models.

Methods

The authors utilized the RNS-CKKS encryption scheme, a variant of FHE designed for fixed-point arithmetic, implemented via the Microsoft SEAL library. Their approach features three key innovations:

  • Bootstrapping as a "Refresh": They implemented a high-precision bootstrapping technique. Think of this as a "noise-clearing" operation that resets the ciphertext's noise level, allowing the model to go much deeper (20 layers) than previously possible.
  • Minimax Polynomial Approximation: Instead of replacing ReLU with a simple square, they used a composition of minimax approximate polynomials. This allows the encrypted model to mimic the behavior of a real ReLU function with high precision.
  • Encrypted Softmax: To prevent "model extraction attacks" (where a user figures out the model's logic by looking at raw output scores), they performed the Softmax function entirely within the encrypted domain.
  • Striding Optimization: They optimized the way convolutions with a "stride of 2" are handled to reduce the number of expensive "rotation" operations in FHE, significantly boosting efficiency.

Datasets

The model was evaluated using the CIFAR-10 dataset, a standard benchmark consisting of 60,000 32x32 color images across 10 classes (e.g., planes, cars, birds). While previous FHE research often stuck to the simpler MNIST (handwritten digits), CIFAR-10 represents a much more realistic challenge for encrypted inference.

Key Insights and Ideas

  • Standardization is Possible: This paper moves away from "HE-friendly" toy models. By using ResNet-20, the authors show that we don't need to reinvent neural network architectures for FHE; we just need better tools to approximate their components.
  • Precision Matters: The "aha moment" is that 16-bit average precision in polynomial approximations is the sweet spot. It provides enough accuracy to match plaintext performance while remaining computationally feasible.
  • The Bootstrapping Trade-off: Bootstrapping is the most time-consuming part of the process, but it is the only way to enable "continuous" homomorphic evaluation. Without it, deep learning in FHE is effectively capped at a few layers.

Key Results

  • High Accuracy: The PPML ResNet-20 achieved 90.67% accuracy, which is remarkably close to the original plaintext model's 91.89%.
  • High Fidelity: The results from the encrypted model were 98.67% identical to the results of the non-encrypted model, proving that the encryption process introduces negligible logic errors.
  • Computational Cost: This is the "catch." Inference for a single image takes approximately 4 hours on a high-end dual Intel Xeon Platinum 8280 CPU (112 cores) with 512 GB of RAM. While slow, this is a massive leap forward in capability.

Limitations and Future Work

The most obvious limitation is latency. A 4-hour wait for one image classification is currently impractical for real-time applications. The authors suggest that future work should focus on hardware acceleration (using GPUs, FPGAs, or ASICs) and further optimizing the packing methods for ciphertexts to process multiple images more efficiently.

Additionally, the current implementation provides 98-bit security. While robust, many industry standards require 128-bit security. The authors note that increasing the security level is possible but would further increase the computational runtime, highlighting the ongoing tug-of-war between privacy, speed, and accuracy in the FHE landscape.

Summary updated

BibTeX
@article{lee2022privacy,
  author = {Joon-Woo Lee and HyungChul Kang and Yongwoo Lee and Woosuk Choi and Jieun Eom and Maxim Deryabin and Eunsang Lee and Junghyun Lee and Donghoon Yoo and Young-Sik Kim and Jong-Seon No},
  title = {{Privacy-Preserving Machine Learning With Fully Homomorphic Encryption for Deep Neural Network}},
  journal = {IEEE Access},
  year = {2022},
  doi = {10.1109/access.2022.3159694},
}
Figure