{"slug": "google-s-heir-aims-to-make-homomorphic-encrypted-inference-a-one-click", "title": "Google's HEIR Aims to Make Homomorphic-Encrypted Inference a One-Click Capability", "summary": "Google has introduced HEIR (Homomorphic Encryption Intermediate Representation), an open-source compiler toolchain that enables pre-trained AI models to operate on encrypted data, aiming to make homomorphic-encrypted inference a one-click capability. The toolchain has been used by Google for private content recommendations, credit card fraud detection, network intrusion detection, and hotword recognition without exposing sensitive data. However, performance concerns remain, with Hacker News users noting high overheads (e.g., a 64-bit equality operation takes 80ms, division up to 8 seconds), though some argue that for certain applications like image classification, a 1000x overhead may still be viable.", "body_md": "Google is [introducing HEIR (Homomorphic Encryption Intermediate Representation)](https://blog.google/security/how-google-is-making-private-ai-practical-with-homomorphic-encryption/), an open-source compiler and development toolchain designed to make encrypted computation easier to deploy. In particular, HEIR can compile pre-trained AI models built for conventional, unencrypted inputs so they can instead operate on encrypted data.\n\nAccording to Google [homomorphic encryption](https://github.com/google/fully-homomorphic-encryption) (HE) addresses several challenges with end-to-end encryption, including enabling services such as spam and virus detection to operate on encrypted user data, mitigating the risk of exposing proprietary AI models when they are deployed on users' devices, and more.\n\nA solution to these issues is homomorphic encryption, a rapidly maturing technology that fundamentally alters this trade-off by allowing computations to be performed directly on encrypted data. Servers can process ciphertexts and return encrypted results without exposing any underlying information.\n\nIn this context, [HEIR](https://github.com/google/heir) is an open-source compiler toolchain and development platform for HE that can adapt pre-trained AI models designed to operate on unencrypted data to instead process encrypted inputs. Google has used HEIR to enable private content recommendations without exposing user data, detect credit card fraud while protecting sensitive financial information, identify network intrusions without revealing packet contents to the service provider, and recognize hotwords in audio streams without disclosing the underlying recordings.\n\nHEIR uses an intermediate representation as an abstraction layer to \"represent and scale complex models across diverse dialects\". According to Google, application developers can write a program in Python, annotate which data types should be encrypted, and then use HEIR to compile the code for homomorphic execution.\n\nGoogle provides a set of [demos showcasing how pre-trained PyTorch models can be compiled to FHE](https://github.com/google/fully-homomorphic-encryption/tree/main/demos#readme). Currently the process is not yet automated, and [involves a few steps, beginning with using torch_mlir](https://github.com/google/fully-homomorphic-encryption/tree/main/demos#exporting-torch-to-mlir) to export the PyTorch model to MLIR.\n\nOne concern raised by several Hacker News readers is performance. `Sabretooth1405`\n\n[noted](https://news.ycombinator.com/item?id=49301386) that \"from my understanding HE and other techniques have very high overheads(~10^3) on inference tasks and thus aren't very commercially viable\". `dhx`\n\n[provided some concrete figures](https://news.ycombinator.com/item?id=49302507), noting that a 64 bit equality operation takes 80ms, addition and subtraction 100ms, division as much as 8 seconds. However, `odo1242`\n\npointed out that [the outlook for LLMs may be more favorable](https://news.ycombinator.com/item?id=49305109), since their computations rely heavily on addition and multiplication, while branching, among the operations that FHE handles most poorly, is not entirely relevant.\n\nUser `patters`\n\noffered [another perspective](https://news.ycombinator.com/item?id=49308478) on the performance question, noting that \"1000x overhead would make some image classification tasks go from 1ms to 1s. That’s viable for some applications\". Bringing the discussion back to the broader privacy trade-off, `meindnoch`\n\n[argued](https://news.ycombinator.com/item?id=49303443) that \"the most private AI is the one running on my own hardware, not in some giant data center\" while `Chris2048`\n\n[similarly suggested](https://news.ycombinator.com/item?id=49309858) that \"when you want to keep a query/data private it's maybe worth the extra $ KW\" required for a local deployment.\n\nWhile Google includes [benchmarking code in HEIR's repo](https://github.com/google/heir/tree/main/benchmark), it has not provided any figures about its relative speed when applied to LLMs.", "url": "https://wpnews.pro/news/google-s-heir-aims-to-make-homomorphic-encrypted-inference-a-one-click", "canonical_source": "https://www.infoq.com/news/2026/08/google-heir-homomorphic-llm/?utm_campaign=infoq_content&utm_source=infoq&utm_medium=feed&utm_term=global", "published_at": "2026-08-23 18:00:00+00:00", "updated_at": "2026-08-23 18:14:15.734152+00:00", "lang": "en", "topics": ["artificial-intelligence", "ai-research", "ai-tools", "ai-infrastructure"], "entities": ["Google", "HEIR", "Hacker News", "PyTorch", "torch_mlir", "MLIR"], "alternates": {"html": "https://wpnews.pro/news/google-s-heir-aims-to-make-homomorphic-encrypted-inference-a-one-click", "markdown": "https://wpnews.pro/news/google-s-heir-aims-to-make-homomorphic-encrypted-inference-a-one-click.md", "text": "https://wpnews.pro/news/google-s-heir-aims-to-make-homomorphic-encrypted-inference-a-one-click.txt", "jsonld": "https://wpnews.pro/news/google-s-heir-aims-to-make-homomorphic-encrypted-inference-a-one-click.jsonld"}}