Proof of Inference

How it works

Key terms

A few terms come back throughout this chapter.

Inference
Running a trained model to get an answer out of it.
Logits
The scores the model gives every possible next word, just before it picks one. They are turned into probabilities.
A block
A batch of transactions added to the chain, about every ten minutes on average. Each block refers back to the one before it [4].
A token
A word or part of a word. Models read and write text in tokens rather than whole words. For readability, this page refers to words where the distinction is not relevant.
Hashing
Running a piece of data through a fixed formula that turns it into a short fingerprint, called a hash. The same input always gives the same hash. Change one character and the hash comes out completely different, and it cannot be guessed beforehand.
A window
A run of 256 tokens of generated text. Blocks are won per window.

How inference works

A language model does not have a database of ready-made answers to pick from when it is asked a question. It has been trained on large amounts of text and has learned which words are most likely to come next.

Inference is the process of producing an answer one word at a time. At each step, the model looks at the question and the text so far, gives every possible next word a score, and picks one at random. That word is added to the text, and the process repeats until the answer is complete.

The model does not necessarily take the word with the highest score. Words with a higher score have a higher chance of being picked, but it is never certain which word it will be. That is why an answer on its own can never be traced back to the model that produced it. The same question asked ten times, will likely get different answers.

From question to answer

Imosuke types a question into an app that runs on TensorCash. What do you think my favourite animal is, based on what I have told you, and why? An inference provider, the miner on TensorCash, runs an open-source model to answer it.

  1. The model starts with the first word of the answer and gives a score to every word that could go there. There are many options, a few with a high score and most with a very low one. At the point where it names the animal, the top of the list might be cat 40%, dog 35% and monkey 25%.

  2. A number between 0 and 1 decides which word it becomes. Normally the provider draws that number privately. On TensorCash it is taken from a hash of the latest block together with the question and the text written so far [1][2]. Say the number is 0.55. Cat covers 0 to 0.40 and dog covers 0.40 to 0.75, so the word is dog.

  3. Dog is added to the text. The text is now different, so the next hash gives a different number, and the next word is picked the same way.

  4. For every word, the provider keeps the number that was drawn and the scores of the most likely options. That record can travel with the answer as its proof [3].

From answer to block

After every 256 tokens, the window is complete. It is hashed together with the block being built, and the result is compared with the difficulty target. Just like on Bitcoin, the result has to fall below the target. If it does, the provider has found a block and sends it to the network. If it does not, that window has missed, and it does not get a second try [1][2]. Each full window is one chance at a block. An answer of 256 tokens has one chance, an answer of 512 tokens has two, and an answer of 800 tokens has three. This all happens inside the provider's software while the answer is being written, so Imosuke does not wait for it [5].

AnswerFull windows of 256 tokensChances at a block
256 tokens1
512 tokens2
800 tokens3
Short answers, targets per model and predictable text

An answer shorter than 256 tokens never fills a window. It can still carry a proof of which model produced it, but it cannot win a block, because the hash that competes for a block only exists once a full window has been written [2].

The target is set per model. Smaller, cheaper models get a harder target, so switching to a lighter model does not make blocks easier to find [1]. A window in which the model was almost sure of every word, like counting from 1 to 256, is rejected, since text that predictable says little about which model wrote it [2].

Most attempts never win a block. The work behind them has still produced an answer the miner can be paid for, which is not the case on other proof of work chains. Without customer traffic, the mining software keeps the GPU busy with prompts it generates itself, so the chain keeps running [5].

The importance of the latest block

Because the number comes from the latest block, no work can be done in advance. The number only exists once that block does [1]. The source is also public, so anyone can redo the draw and see whether the provider followed it. When the next block arrives, every window still tied to the old one can no longer win, so work cannot be stockpiled.

References

  1. [1]TensorCash whitepaper, Proof-of-Inference and Proof-of-Work.tensorcash.org/whitepapers/TensorCash_Whitepaper-modern.pdf
  2. [2]Inference Verification: Mathematical Specification, The Sampling Contract and Attack Surface.tensorcash.org/whitepapers/Verification_Whitepaper-modern.pdf
  3. [3]Verifiable Inference: Making Model Execution Checkable, Tradeable, and Mineable.tensorcash.org/whitepapers/Verifiable_Inference.pdf
  4. [4]TensorCash mainnet announcement on Bitcointalk, 17 July 2026.bitcointalk.org/index.php?topic=5588724.0
  5. [5]Mining API whitepaper, Operational Picture.tensorcash.org/whitepapers/MiningAPI_Whitepaper-modern.pdf