HEFactory: A symbolic execution compiler for privacy-preserving Deep Learning with Homomorphic Encryption Articles uri icon

publication date

  • May 2023


  • 22

International Standard Serial Number (ISSN)

  • 2352-7110


  • Homomorphic Encryption (HE) allows computing operations on encrypted data, and it is a potential solution to enable Deep Learning (DL) in privacy-enforcing scenarios (e.g., sending private data to cloud services). However, HE remains a complex technology with multiple challenges that prevent successful application by non-experts. In this work, we present HEFactory, a program compiler that effectively assists in building HE applications in Python for both general-purpose and Deep Learning applications, focusing on non-expert data scientists. HEFactory relies on a layered architecture that deals with challenges such as automatic parameter selection and specific data representation of HE applications. Our benchmarks show that HEFactory substantially lowers the programming complexity (i.e., a reduction of 80% in the number of lines of code) with negligible performance overhead over programs written by experts using native HE frameworks.


  • deep learning; homomorphic encryption; privacy-preserving computation; symbolic execution