Google is making private AI practical with homomorphic encryption
TL;DR Highlight
Google's HEIR compiler turns AI models into ones that run on encrypted inputs
Who Should Read
Backend or ML service developers designing privacy for AI inference that sends sensitive user data to servers
Core Mechanics
- HEIR compiles AI to run on encrypted data
- HEIR (Homomorphic Encryption Intermediate Representation) is an open-source compiler toolchain for homomorphic encryption.
- It can convert models trained on plaintext to work on encrypted inputs.
- Homomorphic encryption computes on ciphertext
- Servers process ciphertexts and return encrypted results without seeing the underlying data.
- For example, a cloud can recommend content without seeing the user's features.
- Privacy trade-off becomes a cost question
- The post admits homomorphic encryption has nontrivial cost overhead.
- It claims this turns the capability/privacy trade-off into a cost question, and that cost is falling rapidly.
- Existing alternatives have limits
- End-to-end encryption blocks features that need the data, such as spam or virus detection.
- Local processing is limited by device capability, and shipping proprietary models to devices risks leaking them.
- Four demos on a single-threaded CPU
- They are a recommendation model, credit card fraud detection, Kitsune network anomaly detection, and a hotword detector.
- All were compiled with HEIR and the source is in Google's GitHub repository.
- Goal is one-click for non-experts
- Today, converting by hand requires a team of cryptographers, per the post.
- Google's vision is a one-click way for non-experts to put encrypted inference into production.
Community Reactions
- Commenters cite overhead of about 10^3 or more
- A commenter researching privacy-preserving ML said inference overhead is about 10^3, limiting commercial viability.
- Another commenter cited 10^3 to 10^6 compute cost and asked for compelling use cases.
- Criticism that the post gives no overhead numbers
- Several commenters noted the post only says "nontrivial" without specifics.
- A commenter who researched this 20 years ago recalled a single addition producing roughly 1MB ciphertext and asked whether a breakthrough happened.
- Opinion that local open-weight models are more practical
- Many commenters said running models on your own hardware is far more practical private AI.
- Another said at 1000x cost, an AWS Outpost-style setup would be cheaper.
- Pushback that computation correctness isn't guaranteed
- A commenter noted FHE only ensures you need the key to see inputs or outputs.
- The computation could be adversarial, or an attacker could insert their own computation.
- Opinion that agent workflows are a poor fit
- One commenter said agentic work with dependent intermediate steps is impractical even ignoring encryption cost, so it stays niche.
How to Apply
- List your sensitive data flows
- Spend 30 minutes today picking user inputs the server doesn't need to see in plaintext.
- Mark small-model candidates like recommendation, anomaly detection, or hotword detection, similar to the demos.
- Read the HEIR GitHub examples and compare model size
- Open the four demo sources the post says are public and check model structure.
- Compare whether your model is as small as the demos.
- Build a cost table: encrypted inference vs local
- Write latency and cost per item for local execution, trusted hardware, and homomorphic encryption.
- Comments raised 10^3+ overhead, so measure it yourself.
Try It
# Paste into Claude or ChatGPT (simplified version of the post's idea: feasibility check for homomorphic encryption)
I run the AI feature below. I want to compare ways to keep the server from seeing user data in plaintext.
Feature description: {{feature description}}
Model type and size: {{model type/size}}
Sensitive data passed: {{sensitive data types}}
Target latency: {{target latency}}
Compare these three approaches in a table.
1) Local (on-device) execution
2) Hardware-based protection (secure enclave)
3) Homomorphic encryption (using a compiler like HEIR)
Columns: privacy guarantee type, latency/cost burden, model leak risk, fit for our feature.
If you don't know a number, don't invent it; write "needs measurement".
Next step: run the HEIR GitHub examples at a scale similar to your model and measure latency yourself.Terminology
Related Papers
A Beginner's Guide to Local AI with Inkling, Qwen, and Unsloth
Install Unsloth Desktop, load a quantized Qwen model, and share a private ChatGPT-like AI on your home LAN.
Muru – AI-assisted Rust server for Python apps by mod_WSGI's creator
mod_wsgi's creator is building Muru, an AI-assisted Rust ASGI/WSGI server, documenting it in public
87% of the Anthropic power will come from gas and 11% from coal in 2028
Analysis of Anthropic's contracted data centers: 87% gas, 11% coal power in 2028
Anthropic’s Nasdaq debut
Anthropic listed on Nasdaq and closed its first day below its opening price.
OpenAI still has a WebRTC Problem
WebRTC drops late audio, hurting voice AI; MoQ retransmits and buffers instead
Gemini 4 Neon
Gemini 4 Neon cuts cost per task 32% versus Carbon, at $3 input and $15 output per million tokens
AI is killing All About Berlin
After Google AI Overviews, a Berlin guide site lost 70-75% of its traffic.
Not Everything Needs an LLM
PostHog used small decision models to skip 98.7% of expensive LLM calls