Zero-knowledge proofs of inference let a developer show that a model it committed to in advance computed an output from a given input, without disclosing the weights.
For each output, the developer produces a proof that a verifier checks without the weights or re-running the model. The peer-reviewed system zkLLM took about 13 minutes on one A100 GPU to prove one 2,048-token forward pass of a 13-billion-parameter model, and about four seconds to check the proof. Its zero-knowledge guarantee assumes a verifier that follows the protocol, and its public research code is unaudited.
Proving cost is the main obstacle. A proof covers only the computation proven, which is a fixed-point approximation of the model.
Proofs also do not show how much computation produced an output, so a much smaller model can pass as the declared one. An independent audit of the proving library EZKL found high-severity proof-forgery bugs, since fixed.
On this page
How it works
A zero-knowledge proof of inference lets a prover convince a verifier that an output came from a specific model on a specific input, without revealing the model's weights 7. A survey describes ZKPs as letting one party certify that a training, testing or inference result "was produced by the claimed computation without revealing sensitive data or proprietary model parameters" 7.
The protocol has two steps:
- The prover publishes a cryptographic commitment to the weights once. For LLaMa-2-13B, zkLLM's commitment took 986 seconds 1.
- For each query, the prover proves that the output equals the committed model applied to the input 1 3. The verifier checks the proof without the weights and without rerunning the model 1.
The weights are hidden, and the input and output are known to the verifier. In zkLLM's setting the verifier submits the prompt and receives the output with its proof 1. South et al. likewise keep weights private and inputs and outputs public 5.
Systems turn the network's operations into arithmetic over a finite field, with tensors as fixed-point numbers 1 3. Softmax, GELU and normalisation need special handling:
- zkLLM uses a parallel lookup argument (tlookup) and an attention-specific protocol (zkAttn) 1.
- NanoZK uses 16-bit lookup tables 4.
Proof systems differ:
- ZKML compiles models to halo2 circuits with either KZG commitments, which need a trusted setup, or transparent IPA commitments 3.
- zkLLM uses sumcheck-based protocols with Hyrax commitments 1.
- zkGPT uses the GKR protocol with Lasso lookups and Hyrax commitments, made non-interactive with Fiat–Shamir 13.
- NanoZK proves each transformer layer separately and links the layers with a chain of SHA-256 commitments 4.
- Attestable reports a prover whose security rests "only on the security of cryptographic hash functions" 8.
Proofs over many inputs can be packaged into attestations that a model with fixed private weights reaches a stated benchmark score 5.
What it establishes
What it can establish.
- A valid proof shows that the output follows from the committed weights, the public architecture and the input 1 3. This bears directly on whether the declared model is served.
- The weights stay confidential against a verifier that follows the protocol. zkLLM's zero-knowledge theorem shows that such a verifier's view reveals nothing about the weights beyond the output 1.
- Attestable proposes proofs that an accounted workload "used an approved, unchanged model rather than a newly trained replacement", which bears on whether compute runs inference, not training 9.
What it cannot establish.
- Which model the commitment is. The proof does not tie the committed weights to an outside identity such as "the declared model". Proven benchmark results over the committed weights are one way to link them 5. Committed weights can also be hollow. Weights with the declared architecture and parameter count can route the work through a much smaller model and still yield valid proofs 12.
- Work that was not proven. Attestable notes that "a proof of some computation is not a proof of all computation", and that a proof cannot find an undeclared datacenter 9.
- Every output, when only some are proven. Assurance from sampling is probabilistic. Attestable proposes selecting outputs at random for proof after they have been committed 10. NanoZK bounds the chance of detecting tampering when auditors check a subset of layers 4.
- The floating-point model. What is proven is a fixed-point approximation of the model 1. Attestable reports 8-bit integer matrix multiplications 8.
- A hidden architecture. ZKML requires the architecture to be revealed 3, and zkLLM assumes it is publicly known 1.
Threat model
Soundness rests on computational assumptions against a cheating prover:
- zkLLM proves its lookup argument sound: a cheating probabilistic polynomial-time prover succeeds only with negligible probability. The rest of its protocol applies sumcheck and proofs of opening for commitments whose binding rests on discrete-log hardness 1.
- NanoZK assumes a polynomial-time adversary that controls the inference infrastructure and may substitute models or fabricate outputs. It relies on discrete-log hardness over the Pallas curve and SHA-256 collision resistance 4.
- Attestable reports 100-bit security, and post-quantum security because it avoids public-key cryptography 8.
Confidentiality rests on further assumptions:
- zkLLM assumes a semi-honest verifier, which "accurately reports the outcome of the proof verification" but tries to learn the weights. Its zero-knowledge theorem also assumes zero-knowledge variants of the sumcheck protocols 1.
- NanoZK leaves side channels, denial of service and hiding the input from the provider out of scope 4.
- Attestable treats physical-access and metadata channels as separate threats 10.
Implementations
Attestable zero-knowledge inference prover
Attestable's zero-knowledge prover, which the company reports proves large language model outputs came from committed weights at tens of tokens per second.
Proposed for proving an output came from committed weights
EZKL
EZKL is a library from Zkonduit that turns neural networks into zero-knowledge circuits, so a prover can show an output came from a committed model.
Research demonstration for proving a language model's output follows from committed weights, against a cheating prover
Low-trust AI compute verification system overview
A reference design that existing data centres could add: network taps hash all traffic, and air-gapped, independently sourced checkers later re-run randomly chosen records.
Proposed for screening challenged records to show declared inference compute is not training
zkLLM
zkLLM is a GPU-accelerated zero-knowledge proof system that proves a large language model's output came from committed weights without revealing those weights.
Research demonstration for proving an output came from committed weights, against a prover who cheats