Encrypt it and you can't check it

What privacy-preserving machine learning actually proves

Federated learning has one promise: train a model on data you never see. Hospitals keep their patient records, banks keep their transactions, and a shared model still gets better because the updates travel instead of the data.

The promise is real. What gets glossed over is that it creates two trust problems, not one, and that the standard fix for the first one makes the second one worse.

Two problems, pointing in opposite directions

The participants have to trust the server. They send model updates — gradients, or weight deltas. Those updates are not anonymous noise. Work on gradient inversion has shown that training images and text can be reconstructed from shared gradients, pixel for pixel and token for token.1 “We never send your data, only the model update” is a weaker statement than it sounds.

The server has to trust the participants. It receives updates from parties it cannot inspect and averages them into a shared model. One participant sending a deliberately crafted update can drag that model wherever it likes: a single attacker, selected in a single round, has been shown to bring the shared model to 100% accuracy on a backdoor task of its own choosing.2 This is model poisoning, and it is cheap.

So: the server must not see the update, and the server must check the update. Those pull in opposite directions, and almost every privacy-preserving ML system is an attempt to have both.

The standard construction

Solve the first problem with encryption. Homomorphic encryption lets the server add ciphertexts without decrypting them, so it can aggregate updates it cannot read. Secure aggregation gets you a similar result by masking. Either way the server now holds ciphertexts and computes on them blind.

Which makes the second problem worse. Before encryption, a server could at least look at an update and reject one with an obviously absurd magnitude. Now it can’t look at anything. It is averaging sealed envelopes.

So bolt on a zero-knowledge proof. Have each client prove — without revealing the update — that the update is well-formed: bounded norm, correct shape, values in range. The server verifies the proof, aggregates the ciphertext, and now has both properties.

Confidentiality: checked. Integrity: checked.

It looks obviously correct. I built it myself, and I believed it.

The question that breaks it

Here is the question I wish someone had asked me five years ago:

What is the proof a statement about?

Not what does it prove — everyone can answer that. About what object.

In the common construction, the client hands a vector to a proving routine and gets back a proof that that vector is bounded. Separately, the client encrypts a vector and uploads the ciphertext. The server verifies the proof and aggregates the ciphertext.

Nothing in that flow ties the two together.

The proof is a statement about a vector the client chose to show the prover. The aggregation is over a ciphertext the client chose to upload. There is no constraint anywhere that these are the same vector.

So a malicious client does this:

  1. Take an honest, well-behaved update. Prove it. Get a valid proof.
  2. Take a poisoned update. Encrypt it.
  3. Upload the poisoned ciphertext together with the honest proof.

The proof verifies — it is a perfectly valid proof of a true statement. The ciphertext aggregates — it is a well-formed ciphertext. Both checks pass. The poisoned update lands in the global model.

No primitive was broken. The encryption did exactly what encryption promises. The proof system did exactly what a proof system promises. Both components are correct, and the system built from them guarantees nothing about integrity at all.

Unbound compositionThe client proves a bound on an honest update u and separately encrypts a poisoned update v. The server verifies the proof and aggregates the ciphertext; nothing ties u to v, so both checks pass.clientserverhonest uprove ‖u‖ ≤ Bproof πverify π ✓poisoned vencryptEnc(v)aggregate ✓nothing says u = vBoth checks pass.The poisoned update lands in the model.
The usual construction. The proof is about u; the server aggregates v; nothing says they are the same vector.

Why this survives review

Because the guarantee gets stated at the wrong altitude.

“We use homomorphic encryption and zero-knowledge proofs” is a list of ingredients. It is not a claim, and you cannot check it. It passes a slide review, a blog post, and often a paper, because every individual word in it is true.

A claim you can actually check sounds like this: an update that the server aggregates satisfies this bound. Try to write that sentence about the construction above and you can’t — you get as far as “an update that the client showed the prover satisfies this bound,” and the gap becomes obvious the moment it is on the page.

That is the whole trick. Most security theatre in composed systems is not a broken primitive. It is a claim written vaguely enough that the missing link never has to be named.

What binding actually requires

If the proof is going to say something about what the server aggregates, then what the server aggregates has to be inside the statement. Concretely: the ciphertext itself becomes a public input to the circuit, and the circuit proves that those exact ciphertext bytes encrypt values satisfying the bound — under a key relationship it also checks, at a position and round it also checks.

Then the server is not verifying a claim about some vector. It is verifying a claim about the ciphertext it is holding in its hand. Swap the ciphertext and the proof stops verifying. That is what binding means, and it is the difference between a guarantee and a checkbox.

Bound compositionThe client encrypts v to a ciphertext C and proves that C itself encrypts a value within the bound. The server verifies the proof against C and aggregates that same C.clientserverupdate vencrypt v to C,then prove:C encryptsa value with‖·‖ ≤ Bπ and Cverify πagainst C ✓same Caggregate CSwap the ciphertext andthe proof stops verifying.
Bound. The ciphertext is a public input to the proof, so the object the server verifies is the object it aggregates.

It is not free. In my own implementation — Groth16 over BN254, measured on an Apple M3 Pro with 18 GB of RAM, one proof at a time — the two versions compare like this:

Bound onlyCiphertext-bound
Coordinates per proof256128
Constraints103,3651,274,949
Prove (median)0.65 s3.13 s
Proving per coordinate≈ 2.5 ms≈ 24 ms

The ciphertext-bound circuit proves encryption correctness, key consistency and the bound together. The last column is arithmetic from the two before it: binding costs about ten times the proving time per coordinate. For a small model of 2,914 parameters, with three clients proving at once on that same laptop, binding came to 227 s of proving per client per round.

I suspect that cost is why the unbound composition is so easy to reach for. Not ignorance — it is just much cheaper, and it looks the same from outside.

What binding still doesn’t buy

Suppose all of this is built: the proof is bound to the ciphertext, and every update the server aggregates is provably within a bound BB. The system has bought exactly one thing — no single client can move the model further than BB in one round. It has not bought:

  • Sybil resistance. Ten clients each submitting a perfectly bounded update pointed the same direction add up to one update ten times the bound. The bound is per client, and client identity is the unsolved part.
  • Cross-round accumulation. BB per round, over TT rounds, is TBTB of influence for a patient adversary. Bounding that needs state the server cannot keep without linking rounds to clients, which is exactly what the privacy design forbids.
  • Direction. A bounded update can point anywhere within the bound. Nothing in a norm proof says the update came from data at all, and proving that means proving the training step itself — over the data, not just its output — a far larger statement than a norm.

This is the pattern I keep running into, and it is why I find proofs of this shape interesting rather than exciting. The verifiable version of a system makes one assumption explicit and, in doing so, shows exactly how many other assumptions were leaning on it. A bound proof converts “we hope updates are small” into “updates are small, and identity, rounds and direction remain unaccounted for” — which is worse-sounding and much more useful.

The test

If you build, buy, or review these systems, this is the version of the question that takes ten seconds:

Can you name the exact object the proof is a statement about, and is it the same object the server aggregates?

If the answer is “the client’s update,” ask which representation. If nobody can point at one concrete artifact — these bytes, this ciphertext, this commitment — and say the proof is about this, then the proof is about something else, and the integrity property you think you have is decorative.

Once that has a good answer, ask the second question: what does the statement leave out? A bound that holds says nothing about who sent it, how often, or in which direction. Write those down next to the guarantee, not under it.

It is a fair question to ask of my own work too, which is roughly how I ended up writing this. That story is for another post.

Footnotes

  1. Ligeng Zhu, Zhijian Liu and Song Han, “Deep Leakage from Gradients”, NeurIPS 2019. arXiv:1906.08935. ↩

  2. Eugene Bagdasaryan, Andreas Veit, Yiqing Hua, Deborah Estrin and Vitaly Shmatikov, “How To Backdoor Federated Learning”, AISTATS 2020, PMLR 108:2938–2948. An attacker selected in a single round brings the global model to 100% accuracy on the backdoor task. proceedings.mlr.press/v108/bagdasaryan20a. ↩