Skip to main content
QUICK REVIEW

[Paper Review] nGraph-HE2: A High-Throughput Framework for Neural Network Inference on Encrypted Data

Fabian Boemer, Anamaria Costache|arXiv (Cornell University)|Aug 12, 2019
Advanced Neural Network ApplicationsComputer Science37 references31 citations
TL;DR

nGraph-HE2 is a high-throughput framework that enables privacy-preserving inference on encrypted data using homomorphic encryption, leveraging the CKKS scheme and client-aided two-party computation to support standard pre-trained models with non-polynomial activations. It achieves state-of-the-art throughput of 1998 images per second on CryptoNets and enables the first homomorphic evaluation of MobileNetV2 on ImageNet with 60.4% top-1 accuracy and 381 ms per image amortized runtime.

ABSTRACT

In previous work, Boemer et al. introduced nGraph-HE, an extension to the Intel nGraph deep learning (DL) compiler, that enables data scientists to deploy models with popular frameworks such as TensorFlow and PyTorch with minimal code changes. However, the class of supported models was limited to relatively shallow networks with polynomial activations. Here, we introduce nGraph-HE2, which extends nGraph-HE to enable privacy-preserving inference on standard, pre-trained models using their native activation functions and number fields (typically real numbers). The proposed framework leverages the CKKS scheme, whose support for real numbers is friendly to data science, and a client-aided model using a two-party approach to compute activation functions. We first present CKKS-specific optimizations, enabling a 3x-88x runtime speedup for scalar encoding, and doubling the throughput through a novel use of CKKS plaintext packing into complex numbers. Second, we optimize ciphertext-plaintext addition and multiplication, yielding 2.6x-4.2x runtime speedup. Third, we exploit two graph-level optimizations: lazy rescaling and depth-aware encoding, which allow us to significantly improve performance. Together, these optimizations enable state-of-the-art throughput of 1,998 images/s on the CryptoNets network. Using the client-aided model, we also present homomorphic evaluation of (to our knowledge) the largest network to date, namely, pre-trained MobileNetV2 models on the ImageNet dataset, with 60.4\percent/82.7\percent\ top-1/top-5 accuracy and an amortized runtime of 381 ms/image.

Motivation & Objective

  • To enable efficient, high-throughput inference on encrypted data using homomorphic encryption for standard pre-trained deep neural networks.
  • To overcome the limitation of prior frameworks that only supported polynomial activations by introducing client-aided computation for non-polynomial functions like ReLU and MaxPool.
  • To optimize the CKKS homomorphic encryption scheme for deep learning workloads through novel encoding, packing, and graph-level techniques.
  • To integrate seamlessly with popular deep learning frameworks like TensorFlow and PyTorch without requiring model retraining or cryptographic expertise.
  • To achieve low latency and high throughput for real-world models such as MobileNetV2 on ImageNet while preserving accuracy.

Proposed method

  • Leverages the CKKS homomorphic encryption scheme, which natively supports real numbers and plaintext packing, to enable efficient computation on encrypted data.
  • Introduces client-aided two-party computation, where the client performs non-polynomial activation functions (e.g., ReLU, MaxPool) on plaintext data and sends encrypted results back to the server.
  • Optimizes scalar encoding in CKKS by using complex number packing, achieving up to 88x speedup and doubling throughput.
  • Applies graph-level optimizations including lazy rescaling and depth-aware encoding to reduce rescaling overhead and improve performance on the CryptoNets network.
  • Employs batch-axis plaintext packing to enable efficient Reshape operations and increase throughput across multiple images in a single batch.
  • Uses a hybrid approach combining HE for linear layers and client-side computation for non-linearities, minimizing cryptographic overhead while preserving privacy.

Experimental results

Research questions

  • RQ1Can homomorphic encryption be efficiently applied to standard pre-trained deep neural networks with non-polynomial activations such as ReLU and MaxPool?
  • RQ2How can plaintext packing in CKKS be optimized to maximize throughput for deep learning inference on encrypted data?
  • RQ3What graph-level optimizations can significantly reduce runtime overhead in homomorphic inference, especially for small networks like CryptoNets?
  • RQ4Can large, modern models like MobileNetV2 be evaluated homomorphically on encrypted ImageNet data with acceptable accuracy and latency?
  • RQ5To what extent can client-aided computation reduce the computational burden on the server while maintaining end-to-end privacy?

Key findings

  • nGraph-HE2 achieves a state-of-the-art throughput of 1998 images per second on the CryptoNets network using CKKS homomorphic encryption with optimized scalar encoding and packing.
  • The framework reduces scalar encoding latency by 3x to 88x through optimized complex number packing and CKKS-specific optimizations.
  • Ciphertext-plaintext addition and multiplication are accelerated by 2.6x to 4.2x through algorithmic and implementation-level improvements in the SEAL library.
  • Lazy rescaling reduces latency by up to 8x on the CryptoNets network by deferring rescaling operations until necessary.
  • The first homomorphic evaluation of MobileNetV2 on ImageNet is achieved with 60.4% top-1 accuracy and 82.7% top-5 accuracy, with an amortized runtime of 381 ms per image on a LAN setting.
  • Accuracy degradation due to homomorphic encryption is minimal, averaging only 0.0136 top-1 accuracy drop (≈7 images in 50,000) across all tested image sizes.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.