Google has released the Homomorphic Encryption Intermediate Representation (HEIR) compiler project, an open-source toolchain and development platform designed to enable artificial intelligence models to process encrypted data. This initiative, first announced in 2023, allows pre-trained AI models that typically operate on unencrypted information to be converted into versions capable of handling encrypted inputs.
The HEIR platform is intended to support various stakeholders, including application developers, compiler engineers, hardware designers, and cryptography researchers, in creating privacy-focused software systems. Its core function is to simplify the development, optimization, and deployment of fully homomorphic encryption (FHE), a technology that permits computations on data while it remains encrypted, thereby safeguarding sensitive information.
While homomorphic encryption traditionally incurs substantial computational overhead, Google states that these costs are diminishing, making the technology increasingly viable for privacy-preserving data processing in sectors like healthcare and finance. The HEIR project aims to further reduce these costs and improve efficiency.
According to a staff software engineer at Google, HEIR provides cryptographers with a robust infrastructure for testing, benchmarking, and comparing optimizations, allowing them to concentrate on specific performance enhancements. The platform supports multiple FHE schemes, libraries, and front-end programming languages. Future goals for the project include generating code for hardware accelerators such such as GPUs, TPUs, FPGAs, and custom ASICs.
HEIR has also fostered collaborations between Google and academic researchers, with four peer-reviewed publications already built upon the project's foundation and more in development.
Practical applications demonstrated by HEIR include private recommendation systems, credit card fraud detection, network intrusion detection, and hotword recognition. These examples illustrate how the technology can enable systems to analyze sensitive data without exposing its content during processing. Developers can write programs in Python, designate sensitive data, and use HEIR to compile these programs into implementations that operate on encrypted data. Hardware designers can integrate accelerators at various stages of FHE computation, and cryptography researchers can leverage HEIR's compiler infrastructure to build, test, benchmark, and compare cryptographic optimizations.






