NN-EMD: Efficiently Training Neural Networks using Encrypted Multi-sourced Datasets

Runhua Xu, James Joshi, Chao Li

Abstract

Training machine learning models over encrypted datasets is a promising approach to privacy-preserving machine learning. However, training deep neural networks (DNNs) over encrypted data is notoriously challenging due to the massive computational overhead of traditional encryption methods like Homomorphic Encryption (HE) and the need for large-scale datasets from multiple, often untrusted, sources. We propose NN-EMD, a novel framework designed to train DNNs over multiple encrypted datasets using hybrid functional encryption schemes. Our framework supports both horizontally and vertically partitioned data. Experimental results on the MNIST dataset demonstrate that NN-EMD significantly reduces training time—achieving a 97.7% speedup over state-of-the-art HE-based methods—while maintaining comparable model accuracy and robust privacy guarantees.

Introduction

As deep learning becomes integral to sensitive fields like healthcare and finance, the demand for privacy-preserving training methods has surged. Regulations such as GDPR necessitate that data remains confidential, yet high-performing models require pooling data from diverse sources. Existing solutions often face a trade-off between utility and efficiency. Differential privacy can degrade accuracy, while Secure Multi-party Computation (SMC) and Homomorphic Encryption (HE) suffer from extreme latency, often taking nearly an hour to process a single mini-batch.

Furthermore, many existing systems are limited to horizontal data partitioning (where sources share features but different samples). Real-world scenarios often involve vertical partitioning, where different entities hold different features for the same individuals. NN-EMD addresses these bottlenecks by utilizing Functional Encryption (FE) to enable efficient, multi-source training.

Comparison of NN-EMD with existing privacy-preserving machine learning frameworks, highlighting its unique support for both horizontal and vertical partitioning.

The NN-EMD Framework

The core innovation of NN-EMD is the application of Functional Encryption for Inner Products (FEIP). Unlike HE, where results remain encrypted, FE allows a designated entity to compute a specific function on encrypted data and obtain the result in plaintext. By applying FE at the first layer of the neural network, NN-EMD shifts the heavy cryptographic burden to the input stage, allowing subsequent layers to be trained at near-plaintext speeds.

System Architecture

The framework consists of three primary entities:

  1. Client Pool: Multiple data sources that encrypt their local datasets (Ciphertexts or CTs) before transmission.
  2. Server: The cloud-based entity that performs the neural network training. It receives encrypted inputs and uses functional keys to compute the first layer's activations.
  3. Trusted Third Party Authority (TPA): Responsible for initializing the system and distributing public/private keys. Crucially, the TPA never gains access to the raw data or the final model weights.
The NN-EMD system architecture illustrating the interaction between Data Sources, the Server, and the Trusted Third Party Authority.

Secure Protocols

NN-EMD introduces two non-interactive protocols to handle diverse data structures:

  • S2PHC (Secure 2-party Horizontally Partitioned Computation): Designed for sources with identical feature sets but different data samples.
  • S2PVC (Secure 2-party Vertically Partitioned Computation): Utilizes Multi-Input Functional Encryption (MI-FE) to aggregate disparate features from multiple sources for the same set of samples.

Experimental Results

The researchers evaluated NN-EMD using the MNIST handwritten digit dataset (70,000 samples). The training was distributed across five data sources for both horizontal and vertical partitioning scenarios.

  • Efficiency: NN-EMD achieved a staggering 97.7% reduction in training time. A mini-batch of 60 samples was processed in approximately 50–55 seconds, compared to the ~40 minutes required by previous HE-based frameworks.
  • Complexity Independence: Unlike HE-based systems where computational cost grows exponentially with network depth, NN-EMD's training time remains stable regardless of the number of hidden layers. This allows for the training of deep architectures (tested up to 30 layers) without a significant "crypto-tax."
  • Accuracy: The model maintained an accuracy of 97-98%, matching the performance of a standard neural network trained on plaintext data.

Conclusion and Future Work

NN-EMD represents a significant step forward in making privacy-preserving deep learning practical for real-world applications. By leveraging hybrid functional encryption, it overcomes the scalability issues of Homomorphic Encryption while supporting complex, multi-sourced data environments.

Future research will focus on enhancing label privacy, as the current framework assumes labels are available in plaintext. Additionally, the team aims to reduce reliance on the Trusted Third Party (TPA) through decentralized key management and explore the framework's performance in resource-constrained edge computing environments.

Summary updated

Abstract

Training a machine learning model over an encrypted dataset is an existing promising approach to address the privacy-preserving machine learning task, however, it is extremely challenging to efficiently train a deep neural network (DNN) model over encrypted data for two reasons: first, it requires large-scale computation over huge datasets; second, the existing solutions for computation over encrypted data, such as homomorphic encryption, is inefficient. Further, for an enhanced performance of a DNN model, we also need to use huge training datasets composed of data from multiple data sources that may not have pre-established trust relationships among each other. We propose a novel framework, NN-EMD, to train DNN over multiple encrypted datasets collected from multiple sources. Toward this, we propose a set of secure computation protocols using hybrid functional encryption schemes. We evaluate our framework for performance with regards to the training time and model accuracy on the MNIST datasets. Compared to other existing frameworks, our proposed NN-EMD framework can significantly reduce the training time, while providing comparable model accuracy and privacy guarantees as well as supporting multiple data sources. Furthermore, the depth and complexity of neural networks do not affect the training time despite introducing a privacy-preserving NN-EMD setting.
BibTeX
@article{xu2022nn,
  author = {Runhua Xu and James Joshi and Chao Li},
  title = {{NN-EMD: Efficiently Training Neural Networks using Encrypted Multi-sourced Datasets}},
  journal = {IEEE Trans. Dependable Secur. Comput.},
  year = {2022},
  doi = {10.1109/tdsc.2021.3074439},
}
Figure