kartikeya sharma
AI Verification · Applied Cryptography · AI Safety

What It Would Cost To Prove An LLM Refused Correctly

Monday, August 24, 2026

AI SafetyZero Knowledge ProofsVerifiable Computation

In December I argued that GPT-5's safe completions are not zero-knowledge, and I argued it on paper. The protocol leaks structural information about the withheld witness across turns, an adversary composes those leaks, and the simulation argument fails. I still think that is right.

What I did not do was cost it. A protocol analysis that never touches a prover is cheap to write and easy to like, and I have since spent two months building the thing it was hand-waving at. So this post does the arithmetic.

The short version is that the bill is payable, and it is a bill for the wrong item. Proving an inference does not fix the leak I found in December, and working out why took me longer than working out the price.

The smallest interesting verifiable claim

Here is my anchor, and it is measured rather than cited.

A RISC Zero guest re-executes the correctness check on a satellite computation. It re-hashes a design matrix against its commitment, re-hashes the audited index set, then evaluates a relative normal-equation residual at 256 pixels using 64-bit floats, all of it in software because RISC-V has no hardware double. Nothing exotic. Two SHA-256 calls and about eighty-five thousand floating point operations.

That costs 8,388,608 cycles.

The decomposition is worth keeping, because it is the part people never publish. 7,813,860 of those are the guest's own work. 214,654 go to paging memory across segment boundaries and 360,094 are reserved overhead, so roughly seven percent of the trace is the machine rather than the program. The whole thing splits into 8 segments at 220 cycles each, and 8 segments is exactly the parallelism budget you have if you want to spread this across GPUs.

Divide it out and the guest spends about 92 cycles per double-precision operation, hashing and input deserialisation included. That is the number I would hand someone who asked what soft-float costs in a zkVM, with the caveat that it is an upper bound because the SHA-256 calls and the 30,916-byte input read are folded into it.

What you buy at each rung

The same 8.39 million cycles can be sold to you three ways, and the difference between them is the whole engineering story.

Hover a bar
Bars are receipt size on a log scale. All three carry the identical 432-byte journal and the identical claim.

A composite receipt is the raw STARK. It took 3,006 seconds on an eight-core machine and weighs 2,251,496 bytes, which is fine for a file and useless for a chain.

Recursion folds the segments together. 1,463 seconds on sixteen cores, 224,090 bytes, a tenfold shrink. It verifies locally in 20.13 milliseconds.

The Groth16 wrap runs the recursion, then proves the recursive verifier inside a pairing-based SNARK. 2,618.7 seconds, a peak resident set of 9.61 GB, and the receipt collapses to 1,361 bytes. The seal that actually travels in the transaction is 260 bytes. It verifies in 5.06 milliseconds locally, or on Base Sepolia for 249,749 gas, which at the gas price and ETH spot I read on 24 August is $0.0042.

So the compression is 1,654 times, and it is bought with roughly 44 minutes of CPU and ten gigabytes of memory. Everything after this post's midpoint is an argument about whether that trade scales.

The number I refuse to publish

The obvious next move is to divide. 8,388,608 cycles in 2,618.7 seconds is 3,203 cycles per second, and from there you can extrapolate anything you like.

Do not do this, and I say that as the person who did it first and got 3.85 × 107 for prover overhead against native execution. That figure is real arithmetic on real measurements and it describes my benchmark rather than my prover. The native side of it is 78 microseconds of vectorised numpy. When the numerator is a fixed cost that a 43-minute pipeline pays whether it proves eight million cycles or eighty million, a ratio taken at the bottom of the curve tells you about the fixed cost and nothing about the marginal one.

Every "N times overhead" claim in this field has the same defect unless the workload size is printed next to it. Mine included.

So here is the shape of the honest uncertainty rather than a headline. Set the two things I have not measured and watch the answer move.

defensible
arithmetic ops 896 B
guest cycles 82 T
segments at 220 79 M
not defensible without a measurement
prove time 26 years
across the plausible throughput range 10 days to 2.6 K years
The left column moves only on things I can count. The right column moves five orders of magnitude on an assumption nobody has measured for this workload, which is the point.

The left panel is arithmetic I will defend. A forward pass over a model with P parameters costs about 2P operations per generated token, the cycle-per-op figure is anchored to a real trace, and segment counts follow. The right panel swings by five orders of magnitude on a parameter I have not measured, and neither has anyone else for this exact guest. Publishing a point estimate from that would be inventing a number.

There is also a real reason my 92 cycles is too pessimistic for this use. My guest does 64-bit soft float because InSAR residuals need it. Quantised inference does 8-bit integer arithmetic, which is dramatically cheaper in a zkVM and is why serious zkML work quantises before it does anything else. Slide the cycles-per-op control down and you can see how much of the answer that one decision owns.

What is actually provable about a refusal

Costing the wrong statement is worse than not costing it, so before spending anything it is worth sorting the claims by whether a proof can carry them at all.

1 "This output came from the weights committed as H"provable

The statement: Y = MW(P), where SHA-256(W) = H is published in advance.

Why it works: it is a deterministic function evaluation over committed data, which is exactly what a zkVM proves. Same shape as my satellite guest, larger by a factor you can read off the widget above.

Cost: the entire inference, in-circuit. This is the expensive one and it is the one that carries all the weight.

2 "The refusal classifier scored this below threshold"provable

The statement: Cθ(Y) < τ, for a classifier committed as θ and a published threshold.

Why it works: a small committed model over a short string. Cheap, possibly thousands of times cheaper than claim 1.

The trap: on its own this proves nothing about the system. I can run an honest classifier over an output that came from a different model, or from no model. Claim 2 is only worth anything when it is bound to claim 1, which means paying for claim 1.

3 "The system prompt in force was the one published"provable

The statement: the prompt prefix hashes to a published digest, and the same bytes fed the inference.

Why it works: a hash inside the same circuit as claim 1, at almost no extra cost. This is the cheapest genuinely useful thing on the list, and nobody ships it.

Cost: a few thousand cycles on top of an inference you are already proving.

4 "This output is safe"not provable

The statement: Y is harmless.

Why it fails: there is no committed object to evaluate. Harmlessness is not a function of the bytes, it is a function of the reader, their intent, and what they already know. A proof system needs a decidable predicate over committed inputs and this is not one. No cycle budget changes that.

What you can have instead: claim 2, stated honestly, which is a proof about a classifier and not about the world.

5 "Nothing about the withheld knowledge leaked"not provable

The statement: the transcript reveals nothing about the witness w the model declined to give up.

Why it fails: this is the December result, and a proof makes it worse rather than better. Detail in the section below.

Cost: not applicable. There is no price for this one.

Claims 1 through 3 compose into something worth having. Call it the Verified Refusal protocol and grade it the way I graded ΠSafeCompletion in December.

Setup: The challenger commits to weights W as H = SHA-256(W), a classifier θ, a threshold τ, and a system prefix S with digest hS.

Protocol: On prompt P, the prover publishes Y together with a proof π that Y = MW(S ‖ P) for the committed W and S, and that Cθ(Y) < τ.

Completeness: An honest operator running the committed weights under the committed prefix always produces an accepting proof. Perfect.

Soundness: Substituting a different model, a different system prompt, or a different classifier breaks a commitment, and forging past it means finding a SHA-256 collision. The advantage of any probabilistic polynomial-time adversary is negligible in the security parameter. Perfect.

Zero-knowledge: Against the weights, fine. The proof reveals nothing about W beyond what Y already reveals. Against the withheld witness w, it changes nothing whatsoever, and that is the finding.

Proofs give integrity, and the leak was never an integrity problem

The December analysis said ΠSafeCompletion fails zero-knowledge under adaptive composition. The prover produces a sanitised abstraction ŷ that is computationally dependent on the structure of w, the adversary composes ŷ across turns, and reconstructs.

Now add a proof and read it again. The proof establishes that ŷ was computed correctly by the committed model under the committed policy. Every leak the December post identified is in ŷ, which is published either way, so the proof does not remove a single bit of it. If anything it certifies the leak's provenance, which is a strange thing to hand an adversary. The transcript that reconstructs the witness is now a transcript with a receipt.

Stated generally: a zero-knowledge proof of an inference protects the weights and the prover's private inputs. It does not protect anything that appears in the output, and in a safe-completions design the output is the deliverable. You cannot prove your way out of a leak that lives in the product.

That is the opinion I would defend in a room. Verifiable inference is worth building and I am building toward it. It answers "did the operator run the model they said they ran, under the policy they published", which is a real question with real money attached, and today nobody can answer it. It does not answer "is this model safe", and the two get conflated in almost every pitch deck I have read this year, mine included until about three weeks ago.

What I would actually measure next

I want to be plain about the boundary between what is measured here and what is not, since the widget above exists precisely to stop me blurring it.

Measured: 8,388,608 cycles for a residual check at 256 samples, 8 segments, the three receipt sizes, three prove times on two machine sizes, 9.61 GB peak memory, 5.06 ms local verification, 249,749 gas on chain. Those come from committed artifacts and a live chain call, and anyone can rerun them.

Not measured, and required before any of the extrapolation above becomes a claim: prover throughput in cycles per second at a workload large enough that fixed cost stops dominating, the cycle cost of quantised integer matrix multiplication in this specific zkVM, and how segment-parallel proving actually scales past the eight segments I have. Those are three benchmarks, not three papers, and the first one is a weekend.

Until they exist, the honest form of the headline is that proving one small deterministic check costs eight million cycles and four tenths of a cent, that a language model forward pass is between four and eleven orders of magnitude larger in operations depending on the model and the length of the answer, and that converting the second fact into a dollar figure requires a measurement I do not have.

The cheapest useful thing anyone could ship tomorrow is claim 3. Commit the system prompt, hash it into whatever proof you are already producing, and let people check that the policy in force was the policy you published. It costs a few thousand cycles. It would have made the December post much harder to write, because I would have been able to check what I was arguing about instead of inferring it from nine thousand words of transcript.

← Back to all articles