Towards Deep Neural Network Training on Encrypted Data

Karthik Nandakumar, Nalini K. Ratha, Sharath Pankanti, Shai Halevi

This research explores a "holy grail" of privacy-preserving machine learning: training deep neural networks (DNNs) on data that remains fully encrypted throughout the entire process. By leveraging Fully Homomorphic Encryption (FHE) and novel data packing optimizations, the authors demonstrate a non-interactive framework capable of achieving high accuracy on standard benchmarks like MNIST.

The Challenge of Encrypted Training

Deep learning's reliance on massive datasets often conflicts with privacy regulations (e.g., GDPR) and the sensitive nature of data in fields like healthcare and finance. While FHE allows for computation on encrypted data, training is notoriously difficult due to the accumulation of "noise" during the thousands of iterations required for backpropagation. Previous successes have largely been limited to inference using pre-trained models; training from scratch requires managing high-depth multiplications that can eventually make ciphertexts unreadable.

Methodology

The proposed framework utilizes the HElib library to implement Stochastic Gradient Descent (SGD) in the encrypted domain. A key feature is its non-interactive nature: the data owner provides encrypted data, and the server returns encrypted model weights without further communication during the training process.

Non-interactive training workflow on encrypted data

Technical innovations include:

  • Bit-wise Encryption & Table Lookups: Numbers are represented in binary, with non-linear functions like Sigmoid handled via 8-bit encrypted lookup tables.
  • Bootstrapping: This process "refreshes" ciphertexts to manage noise accumulation during deep circuit computations.
  • Optimized Ciphertext Packing: By packing multiple mini-batch samples into FHE ciphertext "slots," the system enables SIMD (Single Instruction, Multiple Data) operations, significantly parallelizing matrix multiplications and minimizing expensive re-ordering operations between layers.

Experimental Setup

The framework was evaluated on the MNIST dataset using two architectures:

  • NN1: A full-scale network (784-128-32-10) using original 28x28 images.
  • NN2: A reduced network (64-32-16-10) using downsampled 8x8 images to manage computational overhead.

Results

The optimized packing strategy and multi-threading (30 cores) yielded a 50x speedup over naive implementations. For the NN2 architecture, training a single mini-batch of 60 samples took approximately 40 minutes.

Test accuracy over epochs for various network configurations

Crucially, the encrypted training achieved 96% accuracy on NN2, matching the performance of plaintext training under identical quantization (8-bit integers for inputs, 16-bit for weights). This confirms that fixed-point arithmetic is sufficient for convergence in the encrypted domain, avoiding the prohibitive cost of high-precision floating-point math in FHE.

Discussion and Future Work

While this work establishes a significant baseline, latency remains a major hurdle; encrypted training is still four to five orders of magnitude slower than traditional methods. Future research will focus on exploring fine-tuning of pre-trained models (transfer learning), handling convolutional layers, and further optimizing the bootstrapping process, which remains the most computationally expensive part of the pipeline.

Summary updated

BibTeX
@inproceedings{nandakumar2019towards,
  author = {Karthik Nandakumar and Nalini K. Ratha and Sharath Pankanti and Shai Halevi},
  title = {{Towards Deep Neural Network Training on Encrypted Data}},
  booktitle = {Workshops @ CVPR},
  year = {2019},
  doi = {10.1109/cvprw.2019.00011},
}
Figure