Skip to content

Two Ends of AI Trust: What a Proof Costs and What a 137ms Screen Buys

#verifiable-inference #zero-knowledge-proofs #prompt-injection #ai-security #guardrails #hardware-acceleration

A zero-knowledge proof can establish that the model you called ran the weights you specified, on the inputs you sent, and that neither side revealed anything else. That is the entire pitch. The problem is the bill. Proving a forward pass through a 13-billion-parameter transformer is expensive, and until recently the expense got reported one cryptographic primitive at a time, which tells you almost nothing about what you'll actually pay.

A measurement paper (arXiv 2611.17042) finally breaks the cost down by layer and by input length. The finding that matters: the dominant cost moves around depending on the proof system and the number of tokens you feed it, so most "faster proving" hardware claims can't be compared to each other.

The other source sits at the far end of the same trust problem. Glean published results from running Jev, a decision-only model from TypeSafe, as a first-pass screen on every prompt, tool output, and response (dev.to writeup). It caught 99 of 100 prompt injections in about a tenth of a second at roughly half the previous monthly cost.

Put the two side by side and you get a map of AI trust in late 2026: cryptographic guarantees on one end, cheap statistical screening on the other, and a wide gap in the middle where the tool boundary lives.

Proof generation is the tax on verifiable inference ​

The paper sets up a four-layer stack, uses it to review published work, then adds original measurements across six provers and seven kernels. The layers matter because claims about acceleration get made at one layer and get charged at another.

The accounting is where this paper earns its keep. A hardware result will report a 4x speedup on multi-scalar multiplication, then the workload-level bill barely moves because MSM was a thin slice of that particular proof. Six provers and seven kernels is enough coverage that the ranking holds across implementations instead of reflecting one codebase on one machine.

Where the proof budget goes ​

The headline finding is that the dominant cost depends on two variables: which proof system you use, and how long your input is. In low-rank fine-tuning, the cost of opening commitments to the fixed model weights stays nearly flat as input length runs from 64 to 2048 tokens. The work tied to intermediate values grows.

Region of the proofWhat dominatesBehavior as input growsWhat it means for you
Commitment openings on frozen weightsHashing and commitment work on static tensorsNearly flat from 64 to 2048 tokensAmortizable across requests; cache and reuse
Intermediate activationsPer-token arithmetic and range checksScales with token countLong context is where the bill lives
Kernel executionInstruction issue, synchronizationDepends on kernel mix and hardwareBandwidth-only models mispredict here

Read that as a budgeting rule. A 32x jump in context length leaves the weight-commitment share almost untouched, because the weights don't change and the commitment to them doesn't either. What grows is per-token work on activations. Benchmark your prover at 64 tokens and you've measured the part that doesn't scale, then you extrapolate with the part that does. The error compounds in the wrong direction.

The 64-to-2048 range covers everything from a short chat turn to a decent-sized document. Most real workloads land in the middle, which is exactly where a two-point extrapolation is least trustworthy.

The research agenda follows from the measurements: proof-friendly numeric formats, reuse of fixed-weight commitments across many proofs, heterogeneous execution where each device handles the kernel it's best at, and shared benchmarks so numbers can be compared. Reuse has the clearest payoff. If one model serves thousands of proofs, the weight side of the bill gets paid once.

The wall you hit before the stopwatch ​

Capacity shows up before execution time does. A 13-billion-parameter fine-tuning configuration blows past a 40GB GPU and completes on an 80GB one. You don't get a slow run on smaller hardware. You get a failed allocation at load time, and a provisioning plan built on "40GB should be enough for a pilot" dies before it produces a number.

Kernel profiling points at a quieter problem. A bandwidth model predicts proof time from memory traffic. The measurements find instruction issue and synchronization limits that a bandwidth-only model doesn't see. If your capacity plan is a spreadsheet of GB/s figures, it will be optimistic on precisely the kernels that are latency-bound rather than throughput-bound.

On hardware, the paper evaluates GPUs, reconfigurable logic, custom chips, and existing AI accelerators against this cost profile. No single winner emerges. A device with fast memory and weak issue rates wins on one kernel mix and loses on another, which is why the paper argues for selecting hardware and prover optimizations around the target workload rather than the other way around.

Quick Take: Proof cost is a stack of at least four bottlenecks, and which one binds depends on your prover and your input length.

Stop generating when a decision will do ​

The Glean deployment attacks the same trust problem from the input side. Most AI steps inside a product aren't generation. What kind of request is this. Which model should take it. Is this prompt safe. Which follow-up do we show. Every one of those has an answer you can list before the request arrives.

A full LLM gets asked anyway, writes prose, and the system parses that prose back into a label. That's the essay-for-a-checkbox pattern, and it costs latency, money, and a parsing layer that breaks on polite refusals.

Jev takes state (a prompt, chat history, JSON) plus typed questions and returns typed answers with probabilities: yes or no, one pick from a list, or a score. Pricing is $0.042 per million input tokens with output free. For short screening prompts, that means millions of calls cost pennies.

22.5 million calls later ​

Key numbers from the deployment

  • 99 of 100 prompt injections hidden in retrieved documents caught
  • 97% of malicious code in responses caught
  • 90% of unsafe content caught on the first pass at about 91% precision
  • 137 ms median latency across 22.5 million calls
  • $4,000 to $2,100 monthly guardrail spend
  • 8.1x faster expert routing, with one route's precision going 47% to 87%
  • 4.67 s to 0.67 s median ranker latency, invalid answers 10 to 0
JobBeforeAfterWhat actually moved
Expert routing (751 labeled requests)LLM picks from prosetyped decision, 8.1x faster at medianprecision on one route 47% to 87%
Follow-up suggestionLLM ranker, 4.67 s medianone question with N options plus "none," 0.67 sinvalid answers 10 to 0, turns with a suggestion 83% to 91%
Guardrail first passLLM on every callscreen on everything, LLM only on flags90% caught at ~91% precision, cost roughly halved
Query classificationno training66.8% agreement with production labelsloses to a fine-tuned open model at 74.5%

The follow-up ranker is the cleanest before-and-after. A 4.67-second median sits outside any interactive budget, so a large share of turns showed nothing at all: 17% of turns had no suggestion, and 58% of those empty turns came from a timeout or an unparseable answer. At 0.67 seconds, the call fits inside the budget, invalid answers vanished, and suggested turns rose to 91%. Timeouts fell from 10.2% to 0.8%.

Query classification is where the cheap model lost. Zero training got 66.8% agreement with production labels. A fine-tuned open model hit 74.5%. That gap says fine-tuning wins once labels are stable and you can afford to collect them. It also says an untrained decision model is a reasonable starting point while your taxonomy is still moving, which is a different strategic claim than "cheaper models are good enough."

Guardrail economics: $4,000 a month to $2,100, at 137ms median, running alongside the model rather than blocking it.

Wiring the two together ​

The two halves have completely different latency profiles. A screen at 137ms median sits on the request path and nobody notices. A zero-knowledge proof of a forward pass runs seconds to minutes depending on model and prover, so it belongs in batch, in an audit trail, or behind an attestation endpoint a counterparty polls. Putting a proof in a chat request is a reliable way to make a fast product slow.

That's why both sources can be right about "trust" while describing different products. The proof answers whether the computation happened as declared. The screen answers whether this input should have reached the model at all. The second question has a deadline measured in milliseconds. The first doesn't.

Where both approaches quietly fail ​

Benchmarking a prover on short inputs and extrapolating. A 64-token run finishes fast and fits in memory, so it's the run everyone posts. In low-rank fine-tuning the weight-commitment work barely moves between 64 and 2048 tokens while the intermediate-value work scales with token count. A short benchmark measures the flat part and hides the growing part.

Sizing hardware from a bandwidth number. Memory throughput is the figure on the spec sheet. Kernel profiling in the paper finds instruction issue and synchronization limits that a bandwidth model can't predict, so a plan built on GB/s alone lands short on exactly the kernels that are latency-bound.

Treating capacity as a performance problem. The 13B fine-tuning configuration that overflows a 40GB card doesn't run slowly. It fails to allocate. Pilot plans get written as if smaller hardware means a longer wall clock, and then the job never starts.

Reading 91% precision as a security boundary. At 99 of 100 injections caught, one gets through. A first-pass screen reduces volume; it can't cap damage. Any tool call that writes needs an approval gate or a scope limit that a hijacked prompt can't cross, because the miss path terminates at a model with tool access.

Skipping the confidence cutoff. Every typed answer comes with a probability, and the cutoff is what makes the whole design safe to ship. A top pick at 0.49 shown as a suggestion is worse than showing nothing, and a generative model never hands you that threshold cleanly because you're parsing prose back into a decision.

What the community is saying ​

After the Glean writeup circulated, I re-ran the routing piece on our own stack, and the complaint in the comments matched what I saw in traces. We were spending a full model call to answer "which of these eight handlers takes this request," a question with a closed answer set. Moving it to a typed model pulled the routing step out of the latency budget entirely.

The skepticism was sharper on the miss path, and it's earned. One hundred injections with 99 caught leaves one reaching a model that can call tools. My position matches the thread's consensus: the screen lowers volume, the tool boundary caps damage, and a screen that runs beside the model only protects you if something downstream holds the line. The open question nobody could answer from the post is what the miss looks like. My guess, and it stays a guess, is long PDFs and dense tables where the injected instruction sits far from the retrieved chunk the screen actually scores.

On label drift, the framing that stuck with me was lifecycle rather than rivalry. Run the decision model while the taxonomy is in flux, fine-tune once it freezes, and escalate ambiguous cases to the expensive path. I'd add the operational rule the deployment uses: a time budget per call plus a fallback that preserves today's behavior. A timeout that falls back is invisible. A timeout that blocks is an incident.

The line between a proof and a policy ​

One thing to remember: a proof tells you what computation happened, and a guardrail tells you whether the input deserved a computation at all. Neither is a policy. If a hijacked prompt can still reach a tool that writes to production, the cryptography is irrelevant and the 137ms screen is decoration. The enforcement point has to exist somewhere you control, and it usually costs less to build than either of the other two layers.

The Bottom Line ​

If you're proving inference or LoRA fine-tuning on a single GPU, budget by capacity first and kernel second. A 13B configuration needs the 80GB card, not because it's faster but because the 40GB one fails to allocate. Then reuse fixed-weight commitments across requests so the flat part of the bill stays flat, and benchmark at the longest context you'll allow rather than at 64 tokens.

If you're shipping a guardrail in front of an LLM, put a typed decision model on every call and keep a hard rule at the tool layer. Roughly 137ms and half your monthly spend buys a 90% first pass at 91% precision, and the remaining 10% is the reason write actions still need explicit approval.

If your label taxonomy is still changing every few weeks, skip fine-tuning for now. An untrained decision model at 66.8% agreement beats a fine-tuned 74.5% that goes stale in a month, and the gap is likely to narrow as typed-output models get cheaper over the next two quarters. When it does, the fine-tuning decision turns into a question about data ownership rather than accuracy.