Google is making private AI practical with homomorphic encryption
Google is making private AI practical with homomorphic encryption
By Jeremy Kun, Staff Software Engineer
Published: August 14, 2026

We are thrilled to introduce HEIR, a significant new addition to our Private Computing Toolkit. At its core, HEIR is an open-source compiler designed to enable AI inference that is cryptographically secure and private.
The Challenge: Privacy vs. Utility
As Artificial Intelligence continues to evolve, the industry faces a persistent struggle: how to maximize the benefits of AI without sacrificing user security.
Traditionally, we have relied on methods like end-to-end encryption. However, this creates a binary choice:
Option A: Protect data completely, but lose the ability to perform server-side analysis (like detecting viruses or spam).- Option B: Allow the service provider to see the data to provide advanced features, but risk data exposure.
In highly regulated fields—specifically finance and healthcare—this risk is often unacceptable, and legal frameworks strictly forbid the sharing of sensitive data between entities. While some attempt to solve this via local on-device processing, this is often hindered by limited hardware power and the need to protect the provider's proprietary intellectual property (IP).
Enter Homomorphic Encryption (HE)
Homomorphic encryption changes the game. Instead of choosing between privacy and functionality, HE allows us to perform mathematical operations directly on ciphertexts.
How it Works
In a standard environment, data must be decrypted to be processed. With HE, the server can compute results and return them to the user while the data remains encrypted throughout the entire lifecycle.
Mathematically, this can be represented as:
This means a cloud provider could, for instance, suggest content to a user without ever actually "seeing" the user's personal attributes.
"While homomorphic encryption introduces a computational overhead, it transforms the privacy-capability trade-off into a manageable question of cost—and that cost is dropping rapidly."
Google has a long history of privacy-centric innovation, including:
- Differential Privacy
- Private Set Membership
- Private Information Retrieval
- Secure Enclaves (via Google Cloud)
Unlike hardware-dependent solutions, HE provides guarantees that are purely cryptographic.
Introducing the HEIR Compiler
Despite its potential, implementing HE is incredibly difficult. Historically, converting a standard program to run on encrypted data required a specialized team of cryptographers. To bridge this gap, Google developed HEIR (Homomorphic Encryption Intermediate Representation).
HEIR is an open-source development platform and compiler toolchain. Its primary function is to take pre-trained AI models (which normally require unencrypted data) and convert them to operate on encrypted inputs.
Project Goals
- Create an open-source toolchain for HE.
- Enable the conversion of existing AI models.
- Achieve a "one-click" solution for non-experts to deploy encrypted inference.
The Ecosystem and Collaboration
Since its initial announcement in 2023, HEIR has gained significant traction. Google has collaborated with several hardware accelerator firms to reduce latency:
- Belfort
- Niobium
- Cornami
- Optalysys
Furthermore, HEIR has become a foundation for academic research, partnering with institutions such as Carnegie Mellon, Georgia Tech, Purdue, Tsinghua University, UC Santa Barbara, the University of Edinburgh, and the Illinois Institute of Technology. This has already led to four peer-reviewed publications.
Practical Applications of HEIR
To showcase the viability of this technology, we have developed four distinct applications. All were compiled using HEIR, and the following metrics reflect performance on a single-threaded CPU.
| Application | Partners | Primary Function |
|---|---|---|
| Recommendation Model | Belfort Labs, LG, NYU | Serving personalized content privately. |
| Fraud Detection | Niobium, hardshell.ai | Identifying credit card fraud on encrypted data. |
| Threat Intrusion | Niobium | Using the Kitsune system to find anomalies in encrypted network traffic. |
| Hotword Detector | Belfort Labs | Recognizing "wake words" without accessing raw audio recordings. |
Technical Implementation Example
While the full source code is available on GitHub, the general logic flow for an HEIR-compiled model looks like this:
# Conceptual HEIR Workflow
import heir_compiler as heir
# 1. Load a standard pre-trained model
model = load_model("ai_model.pb")
# 2. Compile the model for Homomorphic Encryption
encrypted_model = heir.compile(model, target="HE_Backend")
# 3. Perform inference on encrypted data
# The server never sees the raw 'user_input'
result = encrypted_model.predict(encrypted_user_input)

As the AI landscape shifts, Google remains committed to ensuring that homomorphic encryption becomes an industry standard: easy to develop, performant, and ubiquitous.
Related Reading:
- The Evolving Role of the Red Team in Agentic Security
- Influence Operations Bulletin Q2 2026
- Making Chrome Safer in the AI Era
- Reducing Maintainer Burden with OSS-Fuzz