Skip to content

Notes ·

Homomorphic Encryption Is Getting Practical Enough for AI

Google is showing how homomorphic encryption can be used to run AI inference without exposing the underlying data to the server doing the computation.

That is a much more interesting privacy model than simply promising not to look.

With homomorphic encryption, a client encrypts its data, a remote service performs computation directly on that ciphertext, and the result remains encrypted until the client decrypts it. The server never needs the plaintext.

The problem has always been practicality. Homomorphic encryption is computationally expensive and traditionally requires specialized cryptographic expertise to implement correctly.

Google's HEIR project is trying to remove the second problem and reduce the first. HEIR is an open-source compiler that can take programs, including pre-trained AI models, and compile them to operate on encrypted inputs. Google describes the eventual goal as making encrypted inference essentially a one-click option for developers.

They are already demonstrating it with four useful examples:

  • private recommendation systems
  • credit-card fraud detection
  • network intrusion detection
  • hotword detection for voice systems

The network example is particularly interesting. A provider could look for anomalous traffic patterns without being able to read the network packets it is analyzing. Likewise, a recommendation service could generate recommendations without learning the private user features used to produce them.

This feels like an important direction for private AI.

Most current AI privacy discussions come down to where we trust the plaintext. Run the model locally, trust a cloud provider, or put computation inside a secure hardware enclave.

Homomorphic encryption changes the question.

What if the service never receives the plaintext at all?

There is still a performance cost, and Google is not claiming ordinary large-model inference can suddenly be encrypted with no consequences. But the important change is that the problem is increasingly becoming one of engineering cost and performance rather than whether this kind of computation is possible.

That is a much better problem to have.

Read Google's write-up on HEIR and private AI.

Explore the open-source HEIR project.

All notes