Skip to main content

Inference verification

An inference job that the chain picks for a check is recomputed by another miner of the same task. This page covers what is recomputed for each kind of work, how the chain reaches a verdict, and what that verdict means for pay. How a check is selected and delivered is described in Shadow replay.

The artifact​

The executing miner sends submit_artifact from its own account. The artifact carries the job ID, hashes of the input and output, a fingerprint of the computation, and the miner's signature over all of them. The chain rejects an artifact without a valid signature, with a job ID it did not derive itself, or for a job that was already opened.

The chain derives the job ID from the job itself and the account of the executing miner. A retry on another miner therefore becomes a new job with its own ID.

The miner sends artifacts in batches. The artifact stays small: the data for the check itself stays with the miner until a verifier asks for it.

What each kind of work commits​

WorkWhat the executor commitsWhat the verifier does
Language modelA fingerprint of the model's computationRecomputes the parts the chain picked and compares them with the executor's results
Media chat (per_token_chat_v1)The same fingerprint, built from the full chat prompt and the mediaThe same comparison on the same prompt and media
Delivered text (served_path_v1)The answer the user actually received and the settings it was generated withReproduces that answer and checks it against its own computation
EmbeddingThe hash of the output vectorRecomputes the vector and compares the two vectors
Image diffusionThe intermediate states of the generationRecomputes the steps the chain picked and compares them with the executor's states

Media chat is used when the gateway has it on and both the executor and the verifier support it. Delivered-text binding is on by default in the gateway and in the miner, and applies when the executing miner serves it. In any other job the fingerprint and the delivered text are separate, so a check of the fingerprint does not prove the text the user received.

What is checked​

The chain picks which parts of the work are checked, not the gateway and not the verifier. It uses the drand randomness locked to the job, so nobody knows the choice when the work is committed. A vote must cover exactly what the chain picked.

The Fraud rule for language models​

For each checked position the verifier compares its own result with the executor's. A position fails when the two differ by more than the ordinary drift between honest machines.

The verifier sends two counters: k, the number of positions it compared, and above, the number of positions that failed. Other measurements in the vote are recorded for analysis and do not affect the verdict.

The chain treats the vote as Fraud when the failed share reaches the threshold: above × 1,000,000 ≥ k × threshold, where the threshold is set in parts per million (ppm). The threshold is taken from the first source that is set, in this order:

  1. The task's own threshold (TaskDensityThreshold).
  2. The model's calibrated value in the model registry.
  3. The network-wide override (DefaultDensityThresholdOverride).
  4. The runtime default, 300,000 ppm, that is 30%.

Only root can set the first three, and anyone can read them from the chain state. For example, at the 30% default, 30 failed positions out of 100 make the vote Fraud, and 29 do not.

Embeddings and diffusion​

For embeddings, the verifier checks the executor's vector against the committed hash, computes its own and compares the two within a tolerance for hardware drift. A model's entry in the registry can make these limits stricter, never looser. How the vector is built is fixed by the job; see Execution spec.

For diffusion, the verifier recomputes the steps the chain picked and compares them with the executor's states within a tolerance that allows for the small differences that build up during a generation. One failed step makes the whole vote Fraud. Video models are diffusion tasks as well and are checked the same way.

The verdict​

A job is decided by one or more verifiers. How many votes it needs and how many Fraud votes make it Fraud are set by chain parameters: KQuorumKOverride and KQuorumTOverride, or, when no override is set, the runtime's KQuorumK and KQuorumT. A single verifier votes directly. Several verifiers vote in two steps: each first records the hash of its vote and reveals the vote itself once the hashes from all of them are in, so nobody can copy another's vote.

OutcomeWhenPaid
HonestNo verifier voted FraudYes
FraudThe required number of verifiers voted Fraud; with one verifier, its Fraud voteNo, and a strike is recorded
SuspiciousFewer verifiers voted Fraud than required, or an independent recheck overruled a Fraud voteYes
No voteNobody voted within 14,400 blocks (about 2 days)No, no penalty
AbstainThe verifier could not produce a voteNo: the job waits for another vote and without one is closed after 43,200 blocks (about 6 days)
UnrevealedThe executor did not hand over the data the check neededNo

Fraud votes from one account do not ban anyone: a penalty needs Fraud votes from two different accounts (FraudConfirmationRequired). What happens next is described in Attack resistance.

A credited job counts toward the useful work of its miner's task and of that task's Neuronet, at its model's price in AWU, which the chain computes from the model registry. All requests to the same model are priced the same, whatever the length of a particular answer. A job the chain picked for a check while sampling is on is credited at its price divided by the sampling share, so on average every job is counted once. The credit comes out of the Neuronet's daily AWU budget; see Staking.

Verifier rewards​

A verifier whose vote matches the final verdict earns a reward point. At each settlement the share of the miner pool of every task with verified work, 5% by default, goes to a pool that is paid out at each epoch boundary in proportion to accumulated points. The share and the payout are set by chain parameters: VerifierWithholdEnforce, VerifierWithholdPctOverride and validator_reward_enforce in DefectionConfig.

Limits​

  • A check covers only the parts of the work the chain picked; the other operations of the run are not checked.
  • Two runs that agree prove only that they agree and say nothing about the quality of the answer.
  • Without delivered-text binding, the checked fingerprint is separate from the answer the user received.
  • Each miner in a task's pool has the same chance of being picked. The chain cannot tell whether two accounts belong to one operator, so an operator with more accounts in a task is picked more often.

For how the thresholds account for different hardware, see Heterogeneous mining; for what a task fixes, see Execution spec.