Skip to main content
QUICK REVIEW

[Paper Review] nGraph-HE: A Graph Compiler for Deep Learning on Homomorphically Encrypted Data

Fabian Boemer, Yixing Lao|arXiv (Cornell University)|Oct 23, 2018
Cryptography and Data SecurityComputer Science23 citations
TL;DR

nGraph-HE is a graph compiler extension for Intel's nGraph that enables deep learning models to run on homomorphically encrypted data with minimal code changes. By treating homomorphic encryption as a first-class hardware target, it applies HE-aware optimizations at compile-time and run-time, achieving end-to-end privacy-preserving inference with up to 1.2x speedup via reduced multiplicative depth and HE-SIMD packing.

ABSTRACT

Homomorphic encryption (HE)---the ability to perform computation on encrypted data---is an attractive remedy to increasing concerns about data privacy in deep learning (DL). However, building DL models that operate on ciphertext is currently labor-intensive and requires simultaneous expertise in DL, cryptography, and software engineering. DL frameworks and recent advances in graph compilers have greatly accelerated the training and deployment of DL models to various computing platforms. We introduce nGraph-HE, an extension of nGraph, Intel's DL graph compiler, which enables deployment of trained models with popular frameworks such as TensorFlow while simply treating HE as another hardware target. Our graph-compiler approach enables HE-aware optimizations-- implemented at compile-time, such as constant folding and HE-SIMD packing, and at run-time, such as special value plaintext bypass. Furthermore, nGraph-HE integrates with DL frameworks such as TensorFlow, enabling data scientists to benchmark DL models with minimal overhead.

Motivation & Objective

  • To address the growing need for privacy-preserving machine learning in response to regulations like GDPR.
  • To reduce the complexity of deploying deep learning models on homomorphically encrypted data, which currently requires deep expertise in DL, cryptography, and systems programming.
  • To enable data scientists to deploy trained models on encrypted data using familiar frameworks like TensorFlow with minimal modifications.
  • To integrate homomorphic encryption as a first-class hardware target within a graph compiler stack, abstracting low-level cryptographic complexity.
  • To accelerate privacy-preserving inference through HE-aware optimizations at compile-time and run-time.

Proposed method

  • nGraph-HE extends Intel's nGraph graph compiler to treat homomorphic encryption (HE) as a first-class hardware target, enabling model deployment on encrypted data.
  • It uses an intermediate representation (IR) to represent deep learning computations and applies HE-aware optimizations at compile-time, such as batch normalization folding and HE-SIMD packing.
  • The framework supports multiple HE schemes, including BFV and CKKS, via integration with the SEAL library, enabling flexible deployment.
  • It enables special plaintext value bypass at run-time to avoid unnecessary encryption for known values, improving performance.
  • The system supports end-to-end integration with frameworks like TensorFlow, allowing model conversion with minimal code changes—e.g., a single line of code to enable HE inference.
  • It enables automatic parameter selection for HE security based on computational depth analysis, with potential for future automation at compile time.

Experimental results

Research questions

  • RQ1Can a graph compiler be extended to support homomorphic encryption as a first-class hardware target in deep learning?
  • RQ2How can HE-aware optimizations be effectively applied at compile-time and run-time to improve performance on encrypted data?
  • RQ3To what extent can existing deep learning frameworks like TensorFlow be extended to support privacy-preserving inference with minimal code changes?
  • RQ4What performance and accuracy trade-offs arise when applying HE optimizations such as batch normalization folding and HE-SIMD packing?
  • RQ5Can the computational depth of a model be automatically analyzed and used to guide HE security parameter selection?

Key findings

  • nGraph-HE enables deployment of trained deep learning models on homomorphically encrypted data with minimal code changes, such as adding a single line of code to enable HE inference.
  • The framework achieves up to 1.2x speedup by reducing multiplicative depth through batch normalization folding, which allows fewer ciphertext moduli and improved performance.
  • HE-SIMD packing enables batch inference with up to 8192 images per batch, significantly improving throughput and slot utilization.
  • With BN folding enabled, the multiplicative depth of the CIFAR-10 network is reduced from 10 to 8, allowing a lower security level (128 < λ < 192) while maintaining accuracy.
  • The framework maintains high accuracy—62.2% on CIFAR-10—across multiple configurations, even with polynomial activations and gradient clipping to prevent overflow.
  • Runtimes for CIFAR-10 inference range from 1321s to 1651s per 10 trials, with amortized runtimes of 0.161–0.202s per image, demonstrating practical feasibility.

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.