Google has introduced HEIR, an open-source compiler and development toolchain designed to make homomorphic encryption easier to use with existing AI models. Homomorphic encryption allows a computer to perform operations on ciphertext—the encrypted form of data—and return an encrypted result without exposing the original information.

HEIR, short for Homomorphic Encryption Intermediate Representation, can adapt pretrained models that normally expect readable inputs so they can work with encrypted ones. The aim is to reduce the specialized engineering required to translate an application or model into the mathematical operations supported by homomorphic-encryption libraries.

Google says the toolchain has been used in prototypes for private content recommendations, credit-card fraud detection that protects financial information, network-intrusion detection without revealing packet contents to the service provider, and hotword recognition on encrypted audio. The same approach could also reduce exposure of proprietary model logic when computation happens on a user’s device.

Encrypted computation still carries practical costs. It is typically slower and more resource-intensive than ordinary inference, and not every model operation maps efficiently to an encrypted form. HEIR does not make those trade-offs disappear. Its value is in giving developers a compiler-based path to test privacy-preserving workloads without rebuilding every layer by hand, making it easier to identify which real applications are technically and economically viable.