What does it mean to prove an AI model ran?
You ask an AI model a question and get an answer back. You can't see the model, or the computer it ran on. You're trusting whoever runs it that the answer came from the model they named, from your question, unchanged. This series is about replacing that trust with something you can check.
Why trust isn't always enough
Most of the time, trusting the provider is fine. But incentives don't always line up: a smaller model is cheaper to run than the one you paid for, and an answer can be edited after it's written. Some settings need more than a promise: a court weighing evidence, a contract that depends on an AI's output, or one AI agent paying another for work. There, you want to check what ran.
Three ways to check
- You need
- the weights and a GPU
- You trust
- your own copy
- To check
- a whole inference
- You need
- a signed report from a sealed chip
- You trust
- the chip and its maker
- To check
- a signature
- You need
- the proof and the program's key
- You trust
- the math, and the program you pinned
- To check
- about 20 ms
Running it again needs no one's word, but you need the same weights (often private) and a GPU to run them. Trusting hardware moves the trust to a chip: some processors run code in a sealed enclave, a TEE, and sign a report of what ran. Lucid Computing serves inference this way. Checking a proof needs neither weights nor a GPU, and anyone can do it. The cost moves to whoever makes the proof. That's the approach this series is about.
What a proof is
We use ZisK, a zero-knowledge virtual machine. You give ZisK a program and its inputs. It runs the program like a normal computer, records every step, and produces a proof: a few hundred kilobytes saying this program, run on some inputs, produced this output. Anyone with the proof and the program's key (a fingerprint of the program itself) can check it.
- Checking is fast. Ours take 18 to 21 milliseconds.
- The checker never sees the inputs. Only what the program chooses to publish.
- It can't be faked. Making a valid proof for an output the program didn't compute is infeasible.
So proving inference is two jobs: write the model as a program ZisK can run, and decide exactly what it publishes. This post is about the second; the next one is about the first.
What the proof publishes
"The model said this" is too vague to prove. The program publishes fingerprints instead. A fingerprint is a hash, here SHA-256: a 32-byte code computed from any amount of data. Change one bit of the data and the code changes completely, and nobody can find two different pieces of data with the same code.
The program gets the weights, the model's memory from last time, the story so far and your line. Inside ZisK it fingerprints the weights and the memory, runs the model until it finishes a sentence, then fingerprints the new story and memory. Only the fingerprints come out, 164 bytes in all:
- Model: pins every weight. A different model, or one changed weight, gives a different code.
- Story before and after: pins the text: every token so far, then every token including your line and the reply.
- Memory before and after: pins the model's internal state, so the next proof can't start from a doctored one.
- Position: where in the conversation this step starts.
Catching a forgery
We gave Andrej Karpathy's story model stories15M the line "Once upon a time, a little robot named Pip lived in a lighthouse by the sea." It wrote "Pip was a very happy robot, but one day he felt very lonely.", and ZisK proved it. Then we tried to cheat. To check any claim, you compute the fingerprint the claim would need and compare it with the one in the proof:
f401…f66ff401…f66f✓ matchesd122…9551f401…f66f✗ caught3387…5cb142c3…70a8✗ caughtChange one word and the story fingerprint no longer matches. Claim another model wrote it and the model fingerprint no longer matches. Nobody can produce a proof that does match, short of the model actually writing it.
How to check it yourself
- Decide what you trust, before you look. Get the program's key and the model's fingerprint from a source you trust, not from the service that sent the proof. Otherwise it could send a valid proof of a different program.
- Check the proof and read its 164 bytes. Confirm the model fingerprint. For a first turn, expect position 0, an all-zero story fingerprint, and the fingerprint of an empty memory. For later turns, expect "before" to equal the previous proof's "after".
- Check the words. Turn the text back into token IDs with the agreed tokenizer, compute the story fingerprint yourself, and compare it with "story after".
What a proof doesn't tell you
- Whose weights they are. It binds a weights file, not an author. Rebuild the file from the published checkpoint and compare fingerprints.
- That you were served this answer. A valid proof can be shown again later. It carries no timestamp and says nothing about which server answered.
- Anything outside the program. Turning text into tokens and back happens outside; the proof covers the tokens.
- That the answer is true. Only that the model produced it.