Google’s open-source HEIR lets AI work with data it can’t see

Google’s researchers and engineers developed the Homomorphic Encryption Intermediate Representation (HEIR) compiler project, an open-source compiler toolchain and development platform for homomorphic encryption. It can convert pre-trained AI models designed to operate on unencrypted data into models that process encrypted inputs.

The platform helps application developers, compiler engineers, hardware designers, and cryptography researchers develop privacy-focused software systems.

Google HEIR

Source: Google

Jeremy Kun, a Staff Software Engineer at Google, wrote that cryptographers building on HEIR can focus on specific optimizations while using the project’s existing infrastructure for testing, benchmarking, and comparisons.

Homomorphic encryption allows data to be processed while it remains encrypted, protecting sensitive information during computation. The technology carries significant computational overhead, though Google says the cost of homomorphic encryption is decreasing, making it practical for privacy-preserving data processing in fields such as healthcare and finance.

FHE development and optimization

HEIR has grown into a platform for homomorphic encryption development and research since Google announced its plans for the project in 2023. It provides infrastructure for performance testing and benchmarking and has supported collaborations between Google and academic researchers. Google says four peer-reviewed publications have been built on HEIR, with more in preparation.

The project aims to simplify the development, optimization, and deployment of fully homomorphic encryption (FHE). It is designed to support multiple FHE schemes, libraries, and front-end programming languages. Its project goals also include code generation for hardware accelerators such as GPUs, TPUs, FPGAs, and custom ASICs. HEIR provides infrastructure for performance benchmarking and research into FHE optimizations.

Homomorphic encryption in practice

HEIR demonstrates the use of homomorphic encryption in private recommendations, credit card fraud detection, network intrusion detection, and hotword recognition. These applications allow systems to analyze sensitive data without exposing its contents during computation.

Developers can write programs in Python, identify sensitive data, and use HEIR to compile the programs into implementations that operate on encrypted data. Hardware designers can integrate accelerators at different stages of FHE computation. Cryptography researchers can use HEIR’s compiler infrastructure to build, test, benchmark, and compare cryptographic optimizations.

Don't miss