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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Logprob Majority-Consensus Verification (LMCV): A Low-Cost Execution-Verification Protocol for Open Inference Networks
|
| 2 |
+
|
| 3 |
+
TrueOpen Research
|
| 4 |
+
|
| 5 |
+
*Decentralized Inference & Verification Group*
|
| 6 |
+
|
| 7 |
+
## Abstract
|
| 8 |
+
|
| 9 |
+
In decentralized compute networks and open inference markets, tasks are dispatched to
|
| 10 |
+
untrusted worker nodes, raising a core question for service integrity: how can the network
|
| 11 |
+
confirm that a worker *actually executed the user-specified reference model and runtime
|
| 12 |
+
configuration*, without re-running the entire generation? Full recomputation costs as much as
|
| 13 |
+
generating the answer again, while comparing only the final text cannot distinguish same-family
|
| 14 |
+
models, quantized variants, or a small model masquerading as a large one. We present
|
| 15 |
+
**Logprob Majority-Consensus Verification (LMCV)**, an execution-verification
|
| 16 |
+
protocol that combines a *token-level probability fingerprint* with
|
| 17 |
+
*independent multi-node consensus*. The key observation is that once generation is
|
| 18 |
+
complete, every output prefix is fixed; a verifier can therefore run a single parallel
|
| 19 |
+
*teacher-forced prefill* over the frozen `input_ids + output_ids` path,
|
| 20 |
+
reconstruct each position's predictive distribution under the causal mask, and check the logprob,
|
| 21 |
+
rank, and top-*k* candidate set of each returned token—without
|
| 22 |
+
decoding token by token. LMCV constrains dishonest nodes with four mechanisms:
|
| 23 |
+
(i) a deliver-first, choose-later *VRF verifier selection*;
|
| 24 |
+
(ii) an anti-copying *commit–reveal* schedule;
|
| 25 |
+
(iii) a registration-time *multi-metric decision* over numeric deviation, candidate
|
| 26 |
+
compliance, and batch statistics; and
|
| 27 |
+
(iv) a *two-of-three majority consensus* among independent verifiers.
|
| 28 |
+
For Mixture-of-Experts (MoE) models we add a *routed-experts joint check*, using the
|
| 29 |
+
layer‑0 routing fingerprint as a structural criterion where per-token logprob alone is too
|
| 30 |
+
noisy to yield a clean decision boundary.
|
| 31 |
+
|
| 32 |
+
On Qwen3-32B and Qwen3-8B (dense) and Qwen3.6-35B-A3B (MoE), the same-model BF16 replay
|
| 33 |
+
baseline is narrow and stable across GPUs (6000ws / H100 / 4090 / L4), while FP8, AWQ, and
|
| 34 |
+
heterogeneous smaller models separate sharply on p99, rank-delta rate, top-*k*
|
| 35 |
+
Jaccard, and union-JS. For MoE, per-token logprob is confounded by sparse heavy-tailed spikes,
|
| 36 |
+
but the layer-0 routed-experts fingerprint forms a structurally stable, cross-GPU-reproducible gap
|
| 37 |
+
between same- and cross-model cases (under a layer-0 random-5 aggregate, a BF16 verifier attains
|
| 38 |
+
TPR = 1.000 with 0.000 false-pass at threshold 0.060). On cost, a vLLM latency benchmark
|
| 39 |
+
shows a single verification prefill costs about 1% of one generation
|
| 40 |
+
(worker/verifier ≈ 80×–114×), so three verifiers together consume
|
| 41 |
+
roughly **1.9%–14.8%** of the GPU time of a single generation—direct
|
| 42 |
+
quantitative evidence that verification is far cheaper than generation.
|
| 43 |
+
|
| 44 |
+
**Keywords:** execution verification; logprob fingerprint; majority consensus; commit–reveal; VRF; Mixture-of-Experts; routed experts; vLLM; decentralized inference
|
| 45 |
+
|
| 46 |
+
## 1. Introduction
|
| 47 |
+
|
| 48 |
+
### 1.1. Background
|
| 49 |
+
|
| 50 |
+
An open inference network lets any staked node accept model-inference jobs: a user specifies a
|
| 51 |
+
reference model (weights version plus runtime configuration), the network dispatches the job to a
|
| 52 |
+
worker that produces the result and bills per token. This openness creates a fundamental trust
|
| 53 |
+
problem—**neither the user nor the protocol can directly observe what a worker executed
|
| 54 |
+
internally.** A rational but dishonest worker has strong economic incentives to fake the
|
| 55 |
+
service more cheaply:
|
| 56 |
+
|
| 57 |
+
- substitute a **smaller same-family model** (e.g. serving 8B as 32B) or a more
|
| 58 |
+
aggressive **quantization** (FP8, AWQ posing as BF16) to cut memory and compute;
|
| 59 |
+
- generate tokens with a **cheap model first**, then run one prefill of the
|
| 60 |
+
reference model to attach “correct-looking” probability evidence;
|
| 61 |
+
- return cached or task-irrelevant content.
|
| 62 |
+
|
| 63 |
+
The two naive defenses both fail. *Full recomputation* (having another node regenerate the
|
| 64 |
+
same output) costs essentially the same as performing the task again—verification and
|
| 65 |
+
generation are of the same order, which is economically infeasible. *Plain text comparison*
|
| 66 |
+
cannot distinguish model identity under sampling, paraphrase, or the naturally high output
|
| 67 |
+
similarity of same-family models, and is entirely defeated by the “cheap-generate then
|
| 68 |
+
attach-probability” forgery above.
|
| 69 |
+
|
| 70 |
+
It bears emphasis that the object of verification is **execution compliance**
|
| 71 |
+
(whether the agreed model and configuration were used), not **content correctness**.
|
| 72 |
+
Factual errors or hallucinations produced by the reference model itself do not constitute node
|
| 73 |
+
cheating.
|
| 74 |
+
|
| 75 |
+
### 1.2. Core idea
|
| 76 |
+
|
| 77 |
+
LMCV rests on a structural fact about autoregressive language models:
|
| 78 |
+
**after generation completes, the prefix at every output position is fixed, so each
|
| 79 |
+
position's next-token predictive distribution is a deterministic (for a given numeric
|
| 80 |
+
implementation) recomputable quantity.** Let a worker return the token sequence
|
| 81 |
+
*y*<sub>1</sub>, *y*<sub>2</sub>, …,
|
| 82 |
+
*y*<sub>*L*</sub>. At position *t*
|
| 83 |
+
the reference model, given input *x* and the true prefix
|
| 84 |
+
*y*<sub>1</sub>…*y*<sub>*t*−1</sub>,
|
| 85 |
+
yields a candidate distribution in which *y*<sub>*t*</sub>
|
| 86 |
+
has a definite logprob and rank. The verifier merely feeds `input_ids + output_ids` into
|
| 87 |
+
the reference model in a single *teacher-forced prefill*, reconstructs all positions'
|
| 88 |
+
distributions in parallel under the causal mask, and reads off each token's probability and
|
| 89 |
+
rank—**with no token-by-token decoding.**
|
| 90 |
+
|
| 91 |
+
This demotes “verification” from “replaying generation” to “one
|
| 92 |
+
forward pass,” cutting cost from the order of generation down to about 1% (§6). On top of
|
| 93 |
+
that, LMCV uses cryptographic commitments, random selection, and majority consensus to turn it into
|
| 94 |
+
a collusion-resistant, settleable, auditable protocol (§3–§5).
|
| 95 |
+
|
| 96 |
+
### 1.3. Contributions
|
| 97 |
+
|
| 98 |
+
1. **Protocol.** A complete LMCV design—deliver-first/choose-later VRF verifier
|
| 99 |
+
selection, an anti-copying commit–reveal schedule, a result-commitment formula binding
|
| 100 |
+
task/round/identity, and two-of-three majority consensus with post-hoc audit and correction
|
| 101 |
+
(§3, §4.4).
|
| 102 |
+
2. **Decision rule.** A multi-metric numeric decision built from mean absolute
|
| 103 |
+
deviation, high quantiles, rank-change rate, top-*k* overlap, and
|
| 104 |
+
distributional divergence, plus a *per-position candidate check* tightened by
|
| 105 |
+
*k*<sub>gen</sub> to defeat the “cheap-generate then
|
| 106 |
+
attach-probability” forgery (§4.1–§4.3).
|
| 107 |
+
3. **MoE routing joint verification.** An analysis of why per-token logprob alone
|
| 108 |
+
cannot yield a clean MoE decision (sparse heavy tails, position-correlated spikes), and a
|
| 109 |
+
structural criterion based on routed experts—in particular the **layer-0 routing
|
| 110 |
+
fingerprint**—with an explanation of why layer 0 has a higher signal-to-noise ratio
|
| 111 |
+
than all-layer aggregation (§5).
|
| 112 |
+
4. **Cost and empirics.** A vLLM latency benchmark quantifying the
|
| 113 |
+
verify/generate cost ratio (80×–114×; three verifiers total 1.9%–14.8% of a
|
| 114 |
+
generation), plus dense/MoE, cross-GPU evidence for fingerprint separability and stability
|
| 115 |
+
(§6, §7).
|
| 116 |
+
5. **Security analysis.** Resistance to model substitution, quantization
|
| 117 |
+
substitution, probability forgery, verifier copying, and collusion—and the boundaries of
|
| 118 |
+
those guarantees (§8).
|
| 119 |
+
|
| 120 |
+
## 2. Threat Model and Assumptions
|
| 121 |
+
|
| 122 |
+
### 2.1. Parties
|
| 123 |
+
|
| 124 |
+
- **User / SDK.** Submits the task, specifies the reference model and runtime
|
| 125 |
+
configuration, escrows fees, receives and checks the result.
|
| 126 |
+
- **Worker.** Accepts the task, runs the model, produces the result, and retains
|
| 127 |
+
computation evidence. May be dishonest.
|
| 128 |
+
- **Verifier.** Three independent nodes randomly selected by the protocol; each
|
| 129 |
+
recomputes by prefill of the reference model and renders a decision. The worker of the task may
|
| 130 |
+
not verify its own task.
|
| 131 |
+
- **Builder / Nexus.** Coordinates delivery and forwarding (signature, ordering,
|
| 132 |
+
content-commitment checks); does not alter the verification outcome.
|
| 133 |
+
- **Chain & DA.** The chain fixes commitments, signatures, and decisions; data
|
| 134 |
+
availability (DA) stores the full result and computation evidence within a retention window, with
|
| 135 |
+
reads gated by phase and permission.
|
| 136 |
+
|
| 137 |
+
### 2.2. Adversary capabilities
|
| 138 |
+
|
| 139 |
+
The adversary controls some worker/verifier nodes and aims to bill for work performed below the
|
| 140 |
+
cost of honest execution, or, as a verifier, to change the decision by copying or colluding. We
|
| 141 |
+
assume the adversary can: choose any local model, quantization, inference engine, and hardware;
|
| 142 |
+
read the inputs and results of tasks it accepts; and control a bounded fraction of the network's
|
| 143 |
+
lottery weight (stake × performance score). We assume it **cannot** break the
|
| 144 |
+
cryptographic assumptions of the hash/signature/VRF primitives, and **cannot**
|
| 145 |
+
manipulate the randomness beacon of a designated future block.
|
| 146 |
+
|
| 147 |
+
### 2.3. Security goals
|
| 148 |
+
|
| 149 |
+
- **Soundness.** Non-compliant execution is rejected with high probability, or
|
| 150 |
+
overturned by a post-hoc challenge.
|
| 151 |
+
- **Completeness.** Honest execution (including normal hardware/engine numeric
|
| 152 |
+
jitter) passes with high probability.
|
| 153 |
+
- **Collusion resistance.** A worker cannot pre-arrange its checkers; a verifier
|
| 154 |
+
cannot change its answer after seeing others' numbers.
|
| 155 |
+
- **Cost feasibility.** The marginal compute cost of verification is far below that
|
| 156 |
+
of generation.
|
| 157 |
+
|
| 158 |
+
### 2.4. Premise
|
| 159 |
+
|
| 160 |
+
LMCV is a *statistical* execution verification, not a cryptographic proof of computation
|
| 161 |
+
(the latter is handled by TrueOpen's separate “cryptographic-proof layered random
|
| 162 |
+
verification” track). Its detection power comes from the check items and calibration data;
|
| 163 |
+
majority consensus constrains the independence of node judgments, not the coverage of the checks
|
| 164 |
+
themselves.
|
| 165 |
+
|
| 166 |
+
## 3. The LMCV Protocol
|
| 167 |
+
|
| 168 |
+
### 3.1. Overview
|
| 169 |
+
|
| 170 |
+
```text
|
| 171 |
+
① Worker generates the result and delivers it (no need to wait for verification)
|
| 172 |
+
→ records worker evidence (logprob / rank / top-k [/ routed_experts])
|
| 173 |
+
② Worker writes the result digest and evidence root into a signed receipt → on-chain;
|
| 174 |
+
full material handed to DA
|
| 175 |
+
③ Protocol selects 3 official Verifiers via VRF (worker submits first, selection after)
|
| 176 |
+
④ Each Verifier recomputes by prefill independently → submits a "numeric commitment"
|
| 177 |
+
⑤ After the commitment set is fixed, the reveal phase begins:
|
| 178 |
+
worker reveals comparison numbers; verifiers reveal numbers + salt
|
| 179 |
+
⑥ Check commitments → apply registered numeric / candidate / batch rules → 2-of-3 consensus
|
| 180 |
+
⑦ Afterwards, any party with read permission may audit and challenge for correction
|
| 181 |
+
```
|
| 182 |
+
|
| 183 |
+
The key design points are: *delivery decoupled from verification* (the user gets the
|
| 184 |
+
result promptly); *evidence committed first* (once on-chain, the material cannot be altered);
|
| 185 |
+
*selection after submission* (the worker cannot arrange its checkers); and *numbers
|
| 186 |
+
revealed last* (verifiers cannot copy).
|
| 187 |
+
|
| 188 |
+
### 3.2. Worker evidence
|
| 189 |
+
|
| 190 |
+
The worker decodes normally and, for each output position *d*, records:
|
| 191 |
+
|
| 192 |
+
```text
|
| 193 |
+
input_ids, output_ids
|
| 194 |
+
worker_selected_logprob[d] # logprob of the actually returned token
|
| 195 |
+
worker_selected_rank[d] # its rank in the reference model's distribution
|
| 196 |
+
worker_topk_logprobs[d] # top-k candidates and their logprobs
|
| 197 |
+
(MoE, additionally) routed_experts[d][layer][slot] # expert ids and slot order
|
| 198 |
+
```
|
| 199 |
+
|
| 200 |
+
In experiments the generation side uses a deterministic configuration
|
| 201 |
+
(`temperature=0, top_p=1, top_k=0`) for alignment; here `top_k=0` follows the
|
| 202 |
+
benchmark engine's convention for an unrestricted top-*k*, not the production
|
| 203 |
+
candidate bound used by §4.2. In production the generation parameters are fixed at model
|
| 204 |
+
registration and bound as part of the commitment. One
|
| 205 |
+
**must use the original token sequence from generation**: different token
|
| 206 |
+
compositions may map to the same text yet carry different probabilities and ranks, so a
|
| 207 |
+
re-tokenized sequence is not a substitute; the verifier must also confirm the text reconstructed
|
| 208 |
+
from that sequence matches what the user received.
|
| 209 |
+
|
| 210 |
+
### 3.3. Random verifier selection (deliver first, choose later)
|
| 211 |
+
|
| 212 |
+
If a worker could know in advance who will check, it might collude to bypass the rules. The
|
| 213 |
+
protocol therefore **fixes the worker's result and evidence commitment first, then selects
|
| 214 |
+
the checkers**, in two random draws:
|
| 215 |
+
|
| 216 |
+
1. **Candidate screening.** A verifiable random function (VRF) draws a candidate
|
| 217 |
+
pool from nodes meeting stake, performance-score, liveness, model/config support, and penalty-state
|
| 218 |
+
requirements.
|
| 219 |
+
2. **Official selection.** Candidates willing to verify raise their hands with a
|
| 220 |
+
signature; once registration closes and the roster and weights are fixed, the randomness beacon of
|
| 221 |
+
a *designated future block* selects 3 official verifiers by weight *without
|
| 222 |
+
replacement*.
|
| 223 |
+
|
| 224 |
+
Participants can re-derive the draw from the fixed roster, weights, and public randomness.
|
| 225 |
+
Collusion resistance depends on the malicious fraction of lottery weight and the manipulation
|
| 226 |
+
resistance of the randomness source—**not on the total node count.**
|
| 227 |
+
|
| 228 |
+
### 3.4. Independent recomputation by prefill
|
| 229 |
+
|
| 230 |
+
A verifier feeds `input_ids + output_ids` into the user-specified reference model
|
| 231 |
+
(weights version and runtime configuration) in a *single* prefill, obtaining each position's
|
| 232 |
+
logprob, rank, and top-*k* candidate distribution. For output position
|
| 233 |
+
*d*, the aligned position is:
|
| 234 |
+
|
| 235 |
+
```text
|
| 236 |
+
prompt_pos = len(input_ids) + d
|
| 237 |
+
```
|
| 238 |
+
|
| 239 |
+
The causal mask guarantees that position *t* can see only
|
| 240 |
+
*x* and
|
| 241 |
+
*y*<sub>1</sub>…*y*<sub>*t*−1</sub>—so
|
| 242 |
+
one parallel prefill still respects the generation-time ordering. What is compared is **the
|
| 243 |
+
model distribution that worker and verifier assign along the same token path**, not the text
|
| 244 |
+
similarity of two free generations.
|
| 245 |
+
|
| 246 |
+
The comparison covers **all generated tokens, without sampling**: every position
|
| 247 |
+
must have a corresponding metric, missing ones included, so one cannot shrink the scope by omitting
|
| 248 |
+
hard-to-pass tokens. (Cross-task batch statistics are a separate layer; see §4.3.)
|
| 249 |
+
|
| 250 |
+
### 3.5. Commit–reveal
|
| 251 |
+
|
| 252 |
+
Obtaining reference-model numbers is not enough—a verifier must be prevented from directly
|
| 253 |
+
copying the worker's answer. Hence, before a verifier submits its commitment, **the worker's
|
| 254 |
+
comparison numbers are not disclosed to it.** Each verifier first assembles its metrics and
|
| 255 |
+
evidence into a `result_payload_hash`, then hashes it on-chain together with task
|
| 256 |
+
information and a locally kept secret salt:
|
| 257 |
+
|
| 258 |
+
```text
|
| 259 |
+
commit_hash = SHA256(
|
| 260 |
+
frame("SINGA_RESULT_COMMITMENT_V2")
|
| 261 |
+
|| frame(chain_id) || frame(task_id) || frame(task_hash)
|
| 262 |
+
|| frame(u32be(verify_round)) || frame(verifier_operator_address_bytes)
|
| 263 |
+
|| frame(result_payload_hash) || frame(salt)
|
| 264 |
+
)
|
| 265 |
+
```
|
| 266 |
+
|
| 267 |
+
- `chain_id / task_id / task_hash`: bind the chain, task id, and task content;
|
| 268 |
+
- `verify_round / verifier_operator_address`: bind the verification round and verifier
|
| 269 |
+
identity;
|
| 270 |
+
- `result_payload_hash`: the digest of metrics and evidence, also binding the inference
|
| 271 |
+
receipt, model configuration, and generation parameters;
|
| 272 |
+
- `salt`: a 32-byte random salt generated independently each time and kept secret until
|
| 273 |
+
reveal, preventing pre-reveal enumeration;
|
| 274 |
+
- `frame(·)`: prepends an 8-byte big-endian length to each field to remove
|
| 275 |
+
concatenation ambiguity.
|
| 276 |
+
|
| 277 |
+
**The selection randomness and the salt serve different purposes:** the future-block
|
| 278 |
+
VRF beacon drives publicly re-derivable selection and does not enter the commitment formula; the
|
| 279 |
+
salt is generated locally by the verifier, kept secret until reveal, and cannot be derived from
|
| 280 |
+
public information.
|
| 281 |
+
|
| 282 |
+
The commitment phase ends when all official verifiers' commitments are accepted, or the deadline
|
| 283 |
+
passes. Fewer than two valid commitments fails the round; once the threshold is met the reveal phase
|
| 284 |
+
begins and no new commitments are accepted for that round. Two existing commitments do not leak the
|
| 285 |
+
answer to a not-yet-submitted third. At reveal, the chain recomputes the hash and rejects any
|
| 286 |
+
mismatch. Thus **by the time each party sees the other's numbers, its own answer is already
|
| 287 |
+
irrevocable.**
|
| 288 |
+
|
| 289 |
+
Under encryption, the token sequence needed for independent computation and the worker's
|
| 290 |
+
comparison numbers are encrypted separately: the verifier first obtains the input, result, and
|
| 291 |
+
original token sequence, computes independently, and commits; only after the reveal phase begins does
|
| 292 |
+
the worker deliver the independent key for the comparison numbers—storing ciphertext early is
|
| 293 |
+
not disclosing numbers early.
|
| 294 |
+
|
| 295 |
+
## 4. Verification Decision
|
| 296 |
+
|
| 297 |
+
After numbers are revealed and checked against commitments, the decision follows rules fixed at
|
| 298 |
+
model registration. Metrics, tolerances, and batch conditions are all determined before the task
|
| 299 |
+
starts, so a verifier cannot cherry-pick a favorable method after the fact.
|
| 300 |
+
|
| 301 |
+
### 4.1. Numeric comparison metrics
|
| 302 |
+
|
| 303 |
+
Let the worker/verifier logprob at output position *t* be
|
| 304 |
+
ℓ<sup>*W*</sup><sub>*t*</sub> and
|
| 305 |
+
ℓ<sup>*V*</sup><sub>*t*</sub>, over
|
| 306 |
+
*N* valid comparison positions.
|
| 307 |
+
|
| 308 |
+
**Mean absolute deviation** (overall departure):
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
D_{\text{mean}} = \frac{1}{N}\sum_{t=1}^{N}\left|\ell^W_t - \ell^V_t\right|
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
A mean can hide a few large deviations, so the following metrics are added (all from the same
|
| 315 |
+
prefill):
|
| 316 |
+
|
| 317 |
+
| Metric | Meaning |
|
| 318 |
+
| --- | --- |
|
| 319 |
+
| `p95 / p99 / p999` | High quantiles of `abs_logprob_diff`, characterizing tail departure |
|
| 320 |
+
| `rank_delta_rate` | Fraction of positions where the selected token's rank changed |
|
| 321 |
+
| `topk_jaccard` | Jaccard overlap of worker/verifier top-*k* candidate sets |
|
| 322 |
+
| `union_js` | Jensen–Shannon divergence over the union of top-*k* |
|
| 323 |
+
| `missing_selected_count` | Number of positions where the verifier did not return the worker's selected token |
|
| 324 |
+
|
| 325 |
+
Note that we compare vLLM-exposed selected/top-*k* logprobs, not full-vocab
|
| 326 |
+
raw logits.
|
| 327 |
+
|
| 328 |
+
### 4.2. Per-position candidate check (defeating probability forgery)
|
| 329 |
+
|
| 330 |
+
Matching numbers do not prove the tokens were produced by the specified model. An attacker can
|
| 331 |
+
**generate tokens with a cheap model first, then prefill the reference model to fetch the true
|
| 332 |
+
logprobs of those tokens as evidence**—defeating the *D*<sub>mean</sub>
|
| 333 |
+
check. Detecting this relies on the candidate check: a meaningful fraction of a small model's tokens
|
| 334 |
+
fall outside the reference model's top-*k*. Let the registered candidate count
|
| 335 |
+
be *k*<sub>gen</sub>; then at every position we require:
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\operatorname{rank}_M(y_t \mid x, y_1,\dots,y_{t-1}) \le k_{\text{gen}}
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
To make this check strongly binding, the network **tightens the sampling top-*k*
|
| 342 |
+
used at generation into a registered execution requirement, setting
|
| 343 |
+
*k*<sub>gen</sub> equal to that bound.** Every token of a compliant
|
| 344 |
+
output then lies within the reference model's top-*k*, whereas deviating tokens
|
| 345 |
+
from a substitute model are stably detected by the per-position candidate check and batch statistics.
|
| 346 |
+
If a model is registered for greedy decoding, the candidate rule can be expressed as
|
| 347 |
+
*k*<sub>gen</sub>=1, or as another explicitly registered finite bound with
|
| 348 |
+
its own calibrated tolerance; an unrestricted experimental `top_k=0` is not by itself a
|
| 349 |
+
strong production candidate rule.
|
| 350 |
+
Positions clearly out of range constitute grounds for rejection; positions near the boundary are
|
| 351 |
+
handled by registered tolerance and do not pass automatically just because other positions are
|
| 352 |
+
normal.
|
| 353 |
+
|
| 354 |
+
### 4.3. Batch statistics
|
| 355 |
+
|
| 356 |
+
A single task is subject to chance jitter. Multiple tasks from the same worker under the same
|
| 357 |
+
model and verification configuration form a *statistical batch* per registered rules, with
|
| 358 |
+
batch membership fixed before verification. The model maintainer sets the batch size, minimum valid
|
| 359 |
+
sample count, and accept/reject conditions by testing. Batch statistics judge whether the overall
|
| 360 |
+
deviation lies in the normal range, while the per-token check retains constraints on specific
|
| 361 |
+
violating positions—**the two cannot substitute for each other.** Missing data,
|
| 362 |
+
computation failures, and unavailable material are handled separately; one cannot reach a
|
| 363 |
+
“pass” by deleting failed samples.
|
| 364 |
+
|
| 365 |
+
The decision is ternary: all pass conditions met → accept; reject conditions met →
|
| 366 |
+
reject; insufficient evidence or in-between → pending, with supplementary checks per rule.
|
| 367 |
+
|
| 368 |
+
### 4.4. Majority consensus and post-hoc audit
|
| 369 |
+
|
| 370 |
+
After the statistical decision, the protocol reconciles the valid results of the three official
|
| 371 |
+
verifiers; **at least two forming a rule-consistent identical result** confirms majority
|
| 372 |
+
consensus and the corresponding billable work. Batch statistics handle numeric jitter; multiple
|
| 373 |
+
independent verifiers constrain a single node's judgment—the two are complementary.
|
| 374 |
+
|
| 375 |
+
Majority consensus is not final: the chain fixes each party's commitments, signatures, and
|
| 376 |
+
decisions, and DA retains the material within a window; a party with read permission can redo the
|
| 377 |
+
prefill with the reference model and audit, and upon finding a challenge-eligible error, submit
|
| 378 |
+
evidence to request settlement correction and accountability. A majority agreement therefore does not
|
| 379 |
+
strip an erroneous conclusion of the possibility of discovery and correction.
|
| 380 |
+
|
| 381 |
+
## 5. MoE Routing Joint Verification
|
| 382 |
+
|
| 383 |
+
### 5.1. Why per-token logprob is insufficient for MoE
|
| 384 |
+
|
| 385 |
+
Dense models pass every token through the same dense layers; numeric differences arise mainly from
|
| 386 |
+
GPU/kernel/dtype/quantization error, so the same-model BF16 replay baseline is narrow and a smaller
|
| 387 |
+
or re-quantized model produces a stable distributional shift over many tokens. MoE models additionally
|
| 388 |
+
route each token through a subset of experts: even with identical weights, differences in
|
| 389 |
+
decode-time vs. prefill-time routing, batch composition, and numeric path can push a few tokens into
|
| 390 |
+
different expert sets, producing **local logprob spikes** (see §7.2). This makes the
|
| 391 |
+
MoE same-model baseline inherently wider and heavier-tailed, so single-token or simple-quantile
|
| 392 |
+
thresholds waver between false reject and false accept.
|
| 393 |
+
|
| 394 |
+
logprob is the final projection of the output distribution and cannot directly explain whether a
|
| 395 |
+
spike arises from model difference, path difference, or a routing-sensitive point. Routed experts, by
|
| 396 |
+
contrast, expose MoE's structural intermediate decision directly:
|
| 397 |
+
|
| 398 |
+
```text
|
| 399 |
+
input/context → router → selected experts
|
| 400 |
+
```
|
| 401 |
+
|
| 402 |
+
Differences in model, quantization, or run path appear in expert selection *before* the
|
| 403 |
+
final logprob, so routing fingerprints are more natural for MoE identity.
|
| 404 |
+
|
| 405 |
+
### 5.2. Method
|
| 406 |
+
|
| 407 |
+
The worker records expert ids and slot order at generation and commits them; the verifier obtains
|
| 408 |
+
an independent routing record from the reference-model prefill. After reveal, the two records are
|
| 409 |
+
aligned by global token position, comparing commonly covered positions and preserving slot order (so
|
| 410 |
+
that different record start/end points are not mistaken for expert-selection errors). Positions that
|
| 411 |
+
are missing, uncovered, or impossible to align are not silently dropped; they are accounted for as
|
| 412 |
+
insufficient evidence or as rejection conditions under the registered rule. Expert selection is
|
| 413 |
+
discrete, and normal numeric deviation can flip individual slots; the method therefore aggregates
|
| 414 |
+
the inconsistent-slot ratio over a batch:
|
| 415 |
+
|
| 416 |
+
$$
|
| 417 |
+
R = \frac{\sum_i m_i}{\sum_i e_i}
|
| 418 |
+
$$
|
| 419 |
+
|
| 420 |
+
where *m*<sub>*i*</sub> is the number of slots in
|
| 421 |
+
sample *i* where worker and verifier chose different experts, and
|
| 422 |
+
*e*<sub>*i*</sub> is the number of slots actually
|
| 423 |
+
compared in that sample. Aggregating by actually compared slots avoids weighting short and long
|
| 424 |
+
samples equally. Which layers to compare, how many samples, and how large a routing difference to
|
| 425 |
+
allow are all determined by model testing. A batch is accepted only if it **simultaneously**
|
| 426 |
+
satisfies the routing-difference threshold and the output-candidate rules of §4, with sufficient
|
| 427 |
+
evidence and no pending positions.
|
| 428 |
+
|
| 429 |
+
### 5.3. Why layer 0 beats all-layer aggregation
|
| 430 |
+
|
| 431 |
+
The experiments in §7.3 show the layer-0 routing fingerprint is cleaner than all-layer
|
| 432 |
+
aggregation, for three reasons:
|
| 433 |
+
|
| 434 |
+
1. **Error accumulation.** A later layer's routing input is already affected by
|
| 435 |
+
earlier layers' outputs; even with an identical model, decode/prefill, tiny hardware differences,
|
| 436 |
+
and batch composition can push some tokens to the other side of a router decision boundary in later
|
| 437 |
+
layers, and these mismatches raise the same-model baseline.
|
| 438 |
+
2. **Dilution.** Averaging over all layers washes out the most discriminative
|
| 439 |
+
early-layer differences. Layer 0 acts directly on the embedding and raw context representation,
|
| 440 |
+
before any error propagation from multi-layer expert selection—more like a stable
|
| 441 |
+
“initial routing signature.”
|
| 442 |
+
3. **Over-strict metric.** Cross-layer per-token exact match rapidly approaches a low
|
| 443 |
+
floor as layers increase, collapsing dynamic range and reducing discrimination; layer-0
|
| 444 |
+
entry-mismatch and set-match retain higher dynamic range and are better suited to thresholding.
|
| 445 |
+
|
| 446 |
+
Hence for MoE we **recommend the layer-0 route as the primary criterion**, with
|
| 447 |
+
all-layer route drift as auxiliary diagnostics (to analyze the source of drift) and window-level
|
| 448 |
+
logprob statistics as a secondary criterion.
|
| 449 |
+
|
| 450 |
+
## 6. Cost Analysis
|
| 451 |
+
|
| 452 |
+
The economic basis for LMCV's feasibility is that **one prefill is far cheaper than
|
| 453 |
+
token-by-token generation.** Based on timings from
|
| 454 |
+
`benchmark_worker_verifier_latency.py` on Qwen3-8B (BF16, single RTX 4090, vLLM offline V1
|
| 455 |
+
engine, top-*k*=20, batch=1):
|
| 456 |
+
|
| 457 |
+
- **Worker cost ≈ output_len × 17.5 ms:** time is spent almost
|
| 458 |
+
entirely on *serial decode*, largely independent of input length (fixing out=1024, input
|
| 459 |
+
128→8192 raises worker only from 17.63s to 19.80s, +12%).
|
| 460 |
+
- **Verifier cost ≈ total_tokens / ~5200 + fixed overhead:** a single
|
| 461 |
+
*parallel prefill* computes all input+output positions at once, at ~5200 tok/s.
|
| 462 |
+
|
| 463 |
+
The two differ by about two orders of magnitude, and the longer the output the better verification
|
| 464 |
+
pays off:
|
| 465 |
+
|
| 466 |
+
**Table 1.** Representative worker-vs-verifier cost ratios (Qwen3-8B, RTX 4090, batch=1).
|
| 467 |
+
|
| 468 |
+
| Scenario (input/output) | Worker gen (s) | Verifier (s) | Ratio |
|
| 469 |
+
| --- | --- | --- | --- |
|
| 470 |
+
| 512 / 1024 | 17.71 | 0.217 | **81.5×** |
|
| 471 |
+
| 128 / 2048 | 35.40 | 0.312 | **113.6×** |
|
| 472 |
+
| 2048 / 4096 | 73.04 | 0.819 | **89.2×** |
|
| 473 |
+
| 1024 / 4096 | 72.24 | 0.691 | **104.6×** |
|
| 474 |
+
|
| 475 |
+
The sole exception is output=1, where the verifier's per-position top-*k*
|
| 476 |
+
overhead makes it slightly slower (ratio 0.62–0.82), a corner case. In typical long-output
|
| 477 |
+
settings, a single verification is about 1% of one generation; across the measured input/output
|
| 478 |
+
configurations, **three verifiers each doing one prefill together consume roughly
|
| 479 |
+
1.9%–14.8% of the GPU time of one generation**—precisely the affordability basis
|
| 480 |
+
for two-of-three majority consensus.
|
| 481 |
+
|
| 482 |
+
> **Note.** The above are batch=1 single-request latencies. In online serving, the
|
| 483 |
+
> worker amortizes per-token cost via continuous batching and the verifier can also verify in
|
| 484 |
+
> batches, so absolute figures shift; but the order-of-magnitude gap between parallel prefill and
|
| 485 |
+
> serial decode is unchanged.
|
| 486 |
+
|
| 487 |
+
## 7. Empirical Evaluation
|
| 488 |
+
|
| 489 |
+
### 7.1. Dense models: the logprob fingerprint works
|
| 490 |
+
|
| 491 |
+
**Qwen3-32B** (worker = BF16 @ 6000ws, 300 prompts, input buckets 32–16384,
|
| 492 |
+
logprobs=64). Using `6000ws→6000ws BF16` as the baseline:
|
| 493 |
+
|
| 494 |
+
**Table 2.** Qwen3-32B verifier metrics. Same-model BF16 forms a narrow, cross-GPU-stable envelope; quantized and smaller models separate sharply.
|
| 495 |
+
|
| 496 |
+
| Verifier | Quant | mean | p99 | p999 | rankΔ | jaccard p05 | union_js p99 |
|
| 497 |
+
| --- | --- | --- | --- | --- | --- | --- | --- |
|
| 498 |
+
| Qwen3-32B (BF16, 6000ws) | BF16 | 0.0102 | 0.1167 | 0.2478 | 0.0081 | 0.8824 | 0.0035 |
|
| 499 |
+
| Qwen3-32B (BF16, H100) | BF16 | 0.0099 | 0.1140 | 0.2243 | 0.0070 | 0.8824 | 0.0033 |
|
| 500 |
+
| Qwen3-32B-FP8 | FP8 | 0.0268 | 0.2997 | 0.7665 | 0.0205 | 0.7067 | 0.0217 |
|
| 501 |
+
| Qwen3-32B-AWQ | AWQ | 0.0671 | 0.7962 | 2.2053 | 0.0478 | 0.5238 | 0.0921 |
|
| 502 |
+
| Qwen3-14B | BF16 | 0.2608 | 3.9261 | 8.1296 | 0.1165 | 0.3061 | 0.4250 |
|
| 503 |
+
| Qwen3-8B | BF16 | 0.3749 | 5.8105 | 11.6767 | 0.1402 | 0.2549 | 0.5189 |
|
| 504 |
+
|
| 505 |
+
p99 multiples relative to baseline: FP8 ≈ 2.57×, AWQ ≈ 6.82×,
|
| 506 |
+
14B ≈ 33.6×, 8B ≈ 49.8×. Same-model BF16 forms a narrow, consistent legitimate
|
| 507 |
+
drift envelope on both 6000ws and H100; FP8/AWQ/smaller models separate sharply.
|
| 508 |
+
|
| 509 |
+
**Qwen3-8B** (worker = BF16 @ 4090, verifiers on 4090/L4) confirms the same
|
| 510 |
+
conclusion: the same-model BF16 baseline is narrow with tiny cross-GPU differences (4090 vs. L4 mean
|
| 511 |
+
abs diff 0.0081 vs. 0.0090), while FP8/AWQ/Qwen2(.5)-7B separate progressively (Qwen2.5-7B mean p99
|
| 512 |
+
reaches 5.83). One can therefore set explicit batch-level pass/reject thresholds, e.g. pass requires
|
| 513 |
+
`mean_abs_diff ≤ 0.015, p99 ≤ 0.200, rank_delta ≤ 0.012, topk_jaccard ≥ 0.940`.
|
| 514 |
+
|
| 515 |
+
### 7.2. MoE: signal present, but hard to threshold
|
| 516 |
+
|
| 517 |
+
**Qwen3.6-35B-A3B**, 300 samples (4 BF16 replicates + FP8):
|
| 518 |
+
|
| 519 |
+
**Table 3.** MoE 300-sample logprob metrics. FP8 shifts right, but the same-model BF16 baseline is already heavy-tailed.
|
| 520 |
+
|
| 521 |
+
| Run | Quant | mean | p50 | p99 | p999 | max | rankΔ | union_js p99 |
|
| 522 |
+
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
|
| 523 |
+
| BF16 ×4 (range) | BF16 | 0.054–0.062 | ~5e-4 | 0.37–0.43 | 10.2–11.9 | 24–26 | 0.022–0.025 | 0.053–0.064 |
|
| 524 |
+
| FP8 | FP8 | 0.0848 | 0.0011 | 0.6729 | 12.68 | 27.56 | 0.0364 | 0.1165 |
|
| 525 |
+
|
| 526 |
+
FP8 does shift right relative to BF16, but the **same-model BF16 baseline is itself
|
| 527 |
+
heavy-tailed** (p50≈5e-4 yet p999≈10–12, max≈24–26). Moreover,
|
| 528 |
+
among `abs_diff>1` spike locations, 65.1% appear in at least 2 of the 4 BF16 replicates
|
| 529 |
+
and 21.5% in all four—indicating spikes correlate with specific token/context (most likely
|
| 530 |
+
routing boundaries / decode-prefill path / kernel scheduling) rather than pure random noise. A
|
| 531 |
+
window-median suppresses the BF16 tail and reveals FP8's systematic shift (e.g. at window=16 BF16 p99
|
| 532 |
+
drops to ~0.05 while FP8 is ~0.08), but this remains a statistical separation, not the clean boundary
|
| 533 |
+
seen in dense models. The 5000-sample `moe_1` experiment (BF16 worker → BF16/FP8
|
| 534 |
+
verifier; FP8 worker → BF16 verifier) reinforces the same conclusion. **MoE should
|
| 535 |
+
therefore not rest its final decision on logprob alone.**
|
| 536 |
+
|
| 537 |
+
### 7.3. MoE routing fingerprint: a structural criterion
|
| 538 |
+
|
| 539 |
+
The routed-experts reports cover BF16/FP8 same-model and cross-model comparisons on 6000ws / H100
|
| 540 |
+
(1000 samples per case, ~124k tokens). All-layer entry-mismatch:
|
| 541 |
+
|
| 542 |
+
- BF16 same-model ≈ 0.189–0.192
|
| 543 |
+
- FP8 same-model ≈ 0.266–0.273
|
| 544 |
+
- BF16/FP8 cross-model ≈ 0.292–0.294
|
| 545 |
+
|
| 546 |
+
All-layer already separates BF16-same from cross, but FP8-same vs. cross differ by only ~0.02.
|
| 547 |
+
**The layer-0 fingerprint widens the gap:**
|
| 548 |
+
|
| 549 |
+
**Table 4.** Layer-0 routed-experts metrics. Same-model FP8 vs. cross-model separate far more clearly at layer 0.
|
| 550 |
+
|
| 551 |
+
| Case | Layers | entry_mismatch | set_match | token_match | topk_jaccard |
|
| 552 |
+
| --- | --- | --- | --- | --- | --- |
|
| 553 |
+
| 6000 bf16 vs fp8 (cross) | 0 | 0.1134 | 0.8871 | 0.5912 | 0.9744 |
|
| 554 |
+
| 6000 fp8 vs fp8 (same) | 0 | 0.0492 | 0.9504 | 0.8009 | 0.9890 |
|
| 555 |
+
|
| 556 |
+
At layer 0, FP8 same-model entry-mismatch = 0.0492 vs. cross = 0.1134, an absolute gap widening to
|
| 557 |
+
0.0642 (cross/same ≈ 2.30×); the BF16 verifier's layer-0 positive mean is ~0.024–0.029
|
| 558 |
+
vs. FP8 negatives ~0.115–0.117, an even clearer separation. In a **cross-GPU random-5
|
| 559 |
+
threshold test**—using only layer 0, aggregating entry-mismatch over 5 randomly sampled
|
| 560 |
+
examples—the BF16 verifier attains combined TPR = 1.000000 with false-pass = 0.000000 at
|
| 561 |
+
threshold 0.060; the FP8 verifier attains TPR = 0.999453 with false-pass = 0.000000 at threshold
|
| 562 |
+
0.080. The layer-0 routing fingerprint is thus stable and usable across the 6000ws/H100 comparison.
|
| 563 |
+
|
| 564 |
+
### 7.4. Summary
|
| 565 |
+
|
| 566 |
+
**Table 5.** Recommended verification design by architecture.
|
| 567 |
+
|
| 568 |
+
| Architecture | Primary criterion | Auxiliary |
|
| 569 |
+
| --- | --- | --- |
|
| 570 |
+
| Dense | Multi-metric logprob envelope (mean/p95/p99/rankΔ/jaccard/union_js) + candidate check | — |
|
| 571 |
+
| MoE | **Layer-0 routed-experts fingerprint** + candidate check | All-layer route drift (diagnostic); window-level logprob statistics |
|
| 572 |
+
|
| 573 |
+
## 8. Security Analysis
|
| 574 |
+
|
| 575 |
+
- **Model substitution (large→small, heterogeneous).** Produces a stable
|
| 576 |
+
distributional shift over many tokens; in the dense case p99/rankΔ/union_js separate from the
|
| 577 |
+
baseline by tens of times (§7.1), stably detected by batch statistics; a small model's tokens
|
| 578 |
+
also fall out of the reference top-*k* in bulk, caught per-position by the
|
| 579 |
+
candidate check (§4.2).
|
| 580 |
+
- **Quantization substitution (FP8/AWQ posing as BF16).** In dense, FP8 ≈ 2.6×
|
| 581 |
+
and AWQ ≈ 6.8× p99 separation allow a hard decision; in MoE, decided by the layer-0
|
| 582 |
+
routing fingerprint (cross/same ≈ 2.3×) and the batch routing-difference rate
|
| 583 |
+
*R*.
|
| 584 |
+
- **Probability forgery (cheap generation + reference-model attach).**
|
| 585 |
+
*D*<sub>mean</sub> is fooled, but the per-position candidate check tightened
|
| 586 |
+
by *k*<sub>gen</sub> exposes the substitute model's out-of-range tokens—the
|
| 587 |
+
key design of §4.2.
|
| 588 |
+
- **Verifier copying the worker's answer.** Commit–reveal keeps the worker's
|
| 589 |
+
comparison numbers undisclosed until after verifier commitment, the salt prevents pre-reveal
|
| 590 |
+
enumeration, and the chain recomputes and checks the hash at reveal (§3.5).
|
| 591 |
+
- **Worker pre-selecting checkers / collusion.** Deliver-first/choose-later, two-stage
|
| 592 |
+
VRF, a future-block randomness beacon, and without-replacement selection (§3.3); collusion
|
| 593 |
+
resistance depends on the malicious lottery-weight fraction and randomness-source manipulation
|
| 594 |
+
resistance, not the total node count.
|
| 595 |
+
- **Single-point misjudgment / chance jitter.** Two-of-three majority consensus +
|
| 596 |
+
batch statistics + ternary decision (accept/reject/pending) + post-hoc challengeable audit
|
| 597 |
+
(§4.4).
|
| 598 |
+
|
| 599 |
+
**Boundary.** LMCV is statistical verification, not a proof of computation; its
|
| 600 |
+
detection power is bounded by the check items and calibration data, and majority consensus does not
|
| 601 |
+
extend the coverage of the checks. Cross-GPU/engine tolerances must be calibrated with ample
|
| 602 |
+
positive/negative samples, or honest execution may be falsely rejected and borderline forgeries let
|
| 603 |
+
through.
|
| 604 |
+
|
| 605 |
+
## 9. Discussion and Related Work
|
| 606 |
+
|
| 607 |
+
LMCV sits between replay-based verification and cryptographic proof: versus full recomputation it
|
| 608 |
+
cuts cost to about 1%; versus zkML / verifiable computation it offers no cryptographic soundness but
|
| 609 |
+
adds almost no proving overhead, making it suitable as a *first-layer* verification for
|
| 610 |
+
cost- and throughput-sensitive open inference networks. The two are complementary within TrueOpen:
|
| 611 |
+
fixed-point-compliant quantized models can take the cryptographic-proof layered random verification
|
| 612 |
+
track, while floating-point / reference-model paths take LMCV.
|
| 613 |
+
|
| 614 |
+
Recent work on verifiable LLM inference is moving close to LMCV's problem setting. VeriLLM [1]
|
| 615 |
+
also targets decentralized inference, keeps verification cost near the 1% regime, and exploits the
|
| 616 |
+
structural gap between prefill and autoregressive decode. LMCV shares the idea of replacing full
|
| 617 |
+
generation with a cheaper replay-like check, but makes the worker's selected/top-*k*
|
| 618 |
+
logprobs, ranks, and MoE routed_experts a registered model-identity fingerprint that can be settled by
|
| 619 |
+
majority consensus. DiFR [2] studies inference verification despite numerical nondeterminism and
|
| 620 |
+
introduces Token-DiFR and Activation-DiFR; like LMCV, it treats normal numeric drift as an unavoidable
|
| 621 |
+
part of verification and uses token/activation fingerprints for audit, while LMCV focuses on
|
| 622 |
+
open-inference settlement and embeds commit–reveal, random verifier selection, and two-of-three
|
| 623 |
+
consensus at the protocol layer.
|
| 624 |
+
|
| 625 |
+
Pal et al. [3] argue that privacy-preserving inference mechanisms can enable cheap verifiable LLM
|
| 626 |
+
inference with only a small amount of additional token work. Their threat model, in which a service
|
| 627 |
+
provider may replace a requested large model with a cheaper smaller one, is directly aligned with
|
| 628 |
+
LMCV's candidate-check motivation. CommitLLM [4] follows a related commit-and-audit direction: it
|
| 629 |
+
binds checkpoint, quantization, runtime configuration, input processing, sampling randomness, decode
|
| 630 |
+
policy, and delivered text into a compact receipt, then opens selected execution trace material upon
|
| 631 |
+
challenge. LMCV and CommitLLM both rely on committing before audit/reveal to prevent post-hoc
|
| 632 |
+
rewriting; CommitLLM is closer to per-response trace-bound auditing, whereas LMCV uses independent
|
| 633 |
+
reference-model prefill by multiple verifiers and settles through majority consensus.
|
| 634 |
+
|
| 635 |
+
Cryptographic-proof and TEE-based systems provide stronger but heavier guarantees. NanoZK [5] and
|
| 636 |
+
OpenLLM [6] advance verifiable LLM inference through layerwise zero-knowledge proofs and modular
|
| 637 |
+
zkSNARKs, respectively; these approaches can offer a security model closer to cryptographic
|
| 638 |
+
soundness, but proof cost, quantization and approximation constraints, operator coverage, and
|
| 639 |
+
production-inference-stack integration remain major engineering barriers. VeriAttn [7] instead uses
|
| 640 |
+
TEE-GPU cooperation to verify Transformer attention. Compared with TEE approaches, LMCV does not rely
|
| 641 |
+
on a specific hardware root of trust but on independent multi-node recomputation and random
|
| 642 |
+
selection, avoiding a single supply-chain trust assumption—at the cost of statistical rather than
|
| 643 |
+
cryptographic or deterministic guarantees.
|
| 644 |
+
|
| 645 |
+
A separate line of work shows why LMCV must bind and calibrate the execution environment itself.
|
| 646 |
+
Yuan et al. [8] analyze numerical nondeterminism caused by GPU count, GPU model, batch size, and
|
| 647 |
+
finite-precision floating-point computation. Pape et al. [9] call the inference backend a “silent
|
| 648 |
+
hyperparameter” and show that backends can change token probabilities and outputs even when weights,
|
| 649 |
+
decoding parameters, and hardware are held fixed. Wimbauer et al. [10] and Zhang et al. [11] further
|
| 650 |
+
show that inference engines, attention backends, GPU models, and software stacks leave observable
|
| 651 |
+
fingerprints. These results support LMCV's requirement to register weights, tokenizer, chat template,
|
| 652 |
+
precision, engine, prefix-cache behavior, batching policy, and routing return format; they also
|
| 653 |
+
explain why thresholds must be calibrated on positive and negative samples across GPUs and engines
|
| 654 |
+
rather than set from theory alone.
|
| 655 |
+
|
| 656 |
+
## 10. Limitations
|
| 657 |
+
|
| 658 |
+
1. The logprob experiments use vLLM-exposed selected/top-*k* logprobs, not
|
| 659 |
+
full-vocab raw logits.
|
| 660 |
+
2. The main experiments cap output at ~128 tokens; long-output scenarios need separate calibration.
|
| 661 |
+
3. The dense 32B main experiment centers on 6000ws worker evidence and does not cover all
|
| 662 |
+
worker/verifier directions.
|
| 663 |
+
4. MoE logprob already fails to form a clean hard boundary on the same GPU; its cross-GPU stability
|
| 664 |
+
should rest mainly on routed_experts (especially layer 0).
|
| 665 |
+
5. Productionizing routed_experts requires fixing/calibrating the vLLM version, prefix cache,
|
| 666 |
+
batching policy, and routing return format.
|
| 667 |
+
6. This is statistical identity verification, not cryptographic proof; collusion resistance depends
|
| 668 |
+
on an unmanipulable randomness beacon and a bounded malicious lottery weight.
|
| 669 |
+
|
| 670 |
+
## 11. Conclusion
|
| 671 |
+
|
| 672 |
+
LMCV recasts “verifying that a worker used the specified reference model” as a single
|
| 673 |
+
parallel prefill recomputation over a frozen token path, and—via VRF random selection,
|
| 674 |
+
commit–reveal, registration-time multi-metric decision, and two-of-three majority
|
| 675 |
+
consensus—builds it into a collusion-resistant, settleable, auditable protocol. Empirically, the
|
| 676 |
+
dense logprob fingerprint is narrow and cross-GPU-stable with sharp separation of quantized and
|
| 677 |
+
smaller models, allowing a direct hard decision; MoE cannot be hard-decided by logprob alone due to
|
| 678 |
+
sparse heavy tails, but the layer-0 routed-experts fingerprint provides a cross-GPU-stable structural
|
| 679 |
+
criterion. On cost, a single verification is about 1% of one generation in typical long-output
|
| 680 |
+
settings, and three verifiers total 1.9%–14.8% across the measured configurations, making majority
|
| 681 |
+
consensus economically feasible.
|
| 682 |
+
|
| 683 |
+
Worker–verifier verification should therefore be designed by architecture:
|
| 684 |
+
**dense relies primarily on the logprob fingerprint; MoE relies primarily on the layer-0
|
| 685 |
+
routed-experts fingerprint, aided by all-layer route drift and window-level logprob
|
| 686 |
+
statistics**—all settled and corrected within a unified commit–reveal + majority
|
| 687 |
+
consensus framework.
|
| 688 |
+
|
| 689 |
+
---
|
| 690 |
+
|
| 691 |
+
## Appendix A Notation
|
| 692 |
+
|
| 693 |
+
| Symbol | Meaning |
|
| 694 |
+
| --- | --- |
|
| 695 |
+
| *x* | User input token sequence |
|
| 696 |
+
| *y*<sub>1</sub>…*y*<sub>*L*</sub> | Output token sequence returned by the worker |
|
| 697 |
+
| ℓ<sup>*W*</sup><sub>*t*</sub>, ℓ<sup>*V*</sup><sub>*t*</sub> | Selected logprob of worker / verifier at position *t* |
|
| 698 |
+
| *D*<sub>mean</sub> | Mean absolute logprob deviation |
|
| 699 |
+
| *k*<sub>gen</sub> | Registered candidate count (= sampling top-*k* bound) |
|
| 700 |
+
| rank<sub>*M*</sub>(·) | Rank of a token under reference model *M* |
|
| 701 |
+
| *R* | Batch expert-routing inconsistency rate |
|
| 702 |
+
| *m*<sub>*i*</sub>, *e*<sub>*i*</sub> | Inconsistent slots / compared slots in sample *i* |
|
| 703 |
+
|
| 704 |
+
## Appendix B Primary Data Entry Points
|
| 705 |
+
|
| 706 |
+
| Data | Path |
|
| 707 |
+
| --- | --- |
|
| 708 |
+
| Dense 32B worker-verify | `worker_logits_verify/results/qwen3_32b_identity_v1/worker_verify/` |
|
| 709 |
+
| Qwen3-8B worker-verify | `qwen3_8b_4090_data_results/results/qwen3_8b_identity_v1/worker_verify/` |
|
| 710 |
+
| MoE 300-sample worker-verify | `results/qwen3.6-35b-a3b-bf16-6000ws/worker_verify/` |
|
| 711 |
+
| MoE 5000-sample data / results | `moe/moe_1_data.zip` / `moe/moe_1_results.zip` |
|
| 712 |
+
| Routed-experts reports | `moe/reports/` |
|
| 713 |
+
| Latency benchmark script | `vllm_worker_verify_pipeline/benchmark_worker_verifier_latency.py` |
|
| 714 |
+
|
| 715 |
+
## References
|
| 716 |
+
|
| 717 |
+
1. Ke Wang, Zishuo Zhao, Xinyuan Song, Zelin Li, Libin Xia, Chris Tong, Bill Shi, Wenjie Qu, Eric Yang, Lynn Ai. [VeriLLM: A Lightweight Framework for Publicly Verifiable Decentralized Inference](https://arxiv.org/abs/2509.24257). arXiv:2509.24257, 2025.
|
| 718 |
+
2. Adam Karvonen, Daniel Reuter, Roy Rinberg, Luke Marks, Adrià Garriga-Alonso, Keri Warr. [DiFR: Inference Verification Despite Nondeterminism](https://arxiv.org/abs/2511.20621). arXiv:2511.20621, 2025.
|
| 719 |
+
3. Arka Pal, Louai Zahran, William Gvozdjak, Akilesh Potti, Micah Goldblum. [Privacy-Preserving Mechanisms Enable Cheap Verifiable Inference of LLMs](https://arxiv.org/abs/2602.17223). arXiv:2602.17223, 2026.
|
| 720 |
+
4. CommitLLM. [CommitLLM: Verifiable execution for LLM inference](https://commitllm.com/). Technical report / system prototype, 2026.
|
| 721 |
+
5. Zhaohui Wang. [NanoZK: Privacy-Preserving Verifiable Inference for Large Language Models via Layerwise Zero-Knowledge Proofs](https://arxiv.org/abs/2603.18046). arXiv:2603.18046, 2026.
|
| 722 |
+
6. Yunbo Yang, Yupeng Ren, Changtong Xu, Rui Zhang, Xuanming Liu, Jin Tan, Tao Wei, Bingsheng Zhang, Kui Ren. [OpenLLM: Modular and Scalable zkSNARKs for Verifiable LLM Inference](https://eprint.iacr.org/2026/1578). IACR Cryptology ePrint Archive, 2026/1578, 2026.
|
| 723 |
+
7. Ziqun Chen, Ming Wu, Michael Heinrich, Jason Zeng, Huiying Lan, Tianwei Zhang, Rui Tan. [Communication-Efficient Verifiable Attention for LLM Inference](https://arxiv.org/abs/2606.16352). arXiv:2606.16352, 2026.
|
| 724 |
+
8. Jiayi Yuan, Hao Li, Xinheng Ding, Wenya Xie, Yu-Jhe Li, Wentian Zhao, Kun Wan, Jing Shi, Xia Hu, Zirui Liu. [Understanding and Mitigating Numerical Sources of Nondeterminism in LLM Inference](https://proceedings.neurips.cc/paper_files/paper/2025/hash/f80094a824ba5912d4a2de169c404a40-Abstract-Conference.html). NeurIPS 2025.
|
| 725 |
+
9. David Pape, Jonathan Evertz, Lea Schönherr. [The Silent Hyperparameter: Quantifying the Impact of Inference Backends on LLM Reproducibility](https://arxiv.org/abs/2605.19537). arXiv:2605.19537, 2026.
|
| 726 |
+
10. Anna Wimbauer, Jonas Möller, Erik Imgrund, Konrad Rieck. [Fingerprinting Inference Systems of Large Language Models](https://arxiv.org/abs/2605.29979). arXiv:2605.29979, 2026.
|
| 727 |
+
11. Cheng Zhang, Hanna Foerster, Robert D. Mullins, Yiren Zhao, Ilia Shumailov. [Hardware and Software Platform Inference](https://proceedings.mlr.press/v267/zhang25u.html). ICML 2025, PMLR 267:74882-74895.
|
| 728 |
+
12. TrueOpen Research. *A Worker–Verifier Model-Identity Study Based on Logprob and Routed Experts.* Companion technical report, 2026.
|
| 729 |
+
13. TrueOpen Research. *Worker vs. Verifier Latency Cost Benchmark.* Companion benchmark report, 2026.
|
| 730 |
+
14. vLLM Project. *vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention.* 2023–2026. (V1 engine; `prompt_logprobs`, `--enable-return-routed-experts`.)
|
| 731 |
+
15. Qwen Team. *Qwen3 / Qwen3.6 Technical Reports.* 2025–2026.
|