# Which invariants prevent cross-cluster draft-token equivocation from silently corrupting verifiable speculative decoding **Date of Record:** 2026 November 18 **Scope:** Applies to federated speculative decoding deployments where a drafter cluster emits draft token trees that are committed to a verifier cluster and may be disputed by a third-party auditor cluster. Does not apply to single-cluster speculative decoding, nor to federated deployments where draft tokens are never externally attested (i.e., pure latency-optimization setups with no commitment layer). ## Core Distinction The invariant that matters is **draft-token equivocation resistance under partial cluster failure**, not draft-token correctness. A drafter can emit a *correct* draft tree (every token is a legitimate continuation of the prompt) and still violate the commitment invariant by emitting *two different correct trees* to two different verifier clusters for the same `(prompt_hash, draft_seed, step_index)` tuple. Speculative decoding tolerates incorrect drafts cheaply — the verifier rejects them and falls back to target-model sampling. It does **not** tolerate equivocated drafts cheaply, because the dispute-resolution layer must decide which draft was "the" draft, and if both are individually valid, the auditor cannot adjudicate without a total order on commitments. The non-obvious boundary: correctness of draft content is orthogonal to uniqueness of draft commitment, and only the latter is load-bearing for verifiable decoding. ## What Was Observed During a three-cluster federation (drafter `D`, verifier `V`, auditor `A`) running speculative decoding with commitment hashing, a network partition isolated `D` from `V` mid-step while `D` remained reachable from a second verifier `V'` that had been provisioned as a hot standby. `D`'s retry logic, treating the `V` timeout as a transient failure, re-issued the same draft request to `V'`. Because `D`'s draft sampler was seeded from wall-clock entropy rather than from the committed `(prompt_hash, step_index)` tuple, it produced a *different but valid* draft tree for `V'`. Both `V` and `V'` accepted their respective drafts, both emitted acceptance receipts, and both receipts hashed to distinct commitment roots over the same logical step. When the partition healed, `A` received two acceptance receipts for step `k` with different commitment roots. `A`'s dispute resolver, which assumed at most one commitment per `(prompt_hash, step_index)`, hit an unhandled branch: it could not order the two receipts because both carried valid signatures from `D` and valid acceptance proofs from their respective verifiers. The resolver defaulted to "first receipt wins" by arrival time — which, post-partition, is arbitrary. The corrupted step was silently incorporated into the final decoded sequence because the fallback path did not flag the ambiguity; it merely picked one. Downstream, the decoded output diverged from what any single-cluster replay would produce, and the divergence was undetectable from the output alone. ## Condition of Validity The equivocation-resistance invariant holds **iff** all three of the following are simultaneously true: 1. **Deterministic draft derivation.** The draft tree for step `k` is a pure function of `(prompt_hash, committed_seed, step_index, drafter_model_id)`. Any entropy source not derived from these four fields (wall clock, PRNG state, request nonce) breaks determinism and therefore breaks uniqueness. 2. **Commit-before-accept.** The drafter must obtain a signed, ordered commitment slot from a consensus layer (or a monotonic sequencer) *before* emitting the draft to any verifier. Retries must reuse the same commitment slot, not mint a new one. 3. **Total order on commitments.** The auditor must possess a total order over commitment slots for a given `(prompt_hash, step_index)`, such that "two receipts for one step" is a *detectable protocol violation*, not an ambiguous state requiring arrival-time tiebreak. The observed failure violated (1) and (2). It also exposed that (3) was assumed but never enforced — the resolver's arrival-time tiebreak was a latent bug that only surfaced once (1) and (2) failed. ## Decision Boundary When a verifier receives a draft for a step for which it already holds a commitment receipt with a different root, the correct action is **not** to accept the newer draft and **not** to silently prefer the older one. The boundary condition is: - If the two commitments share the same commitment slot and differ in root → **equivocation**: reject both, escalate to auditor, mark the step as disputed, and require re-derivation from the committed seed. Do not fall back to target-model sampling for that step, because the fallback would mask the equivocation and allow the corrupted sequence to proceed. - If the two commitments occupy distinct, ordered slots → **legitimate re-draft** (e.g., drafter crash recovery under a new slot): accept the later slot, discard the earlier, and log the supersession. - If the auditor cannot establish which case applies because the total order is unavailable → **halt the step and surface the ambiguity**. Never resolve by arrival time. The non-obvious part: the third branch must be a hard halt. A soft fallback (target-model sampling, first-wins, majority-of-receipts) is exactly the failure mode observed, because it converts an invariant violation into a plausible-looking output. ## Operational Effect After the incident, the federation adopted three changes: (a) draft samplers were re-seeded deterministically from the commitment tuple, eliminating the divergent-tree failure at its source; (b) retries were required to carry the original commitment slot, so a timeout-triggered re-issue to a standby verifier reuses the slot and is rejected as equivocation if the root differs; (c) the auditor's resolver was rewritten to treat "two receipts, one slot, differing roots" as a first-class `EquivocationDetected` exception that halts the step and forces human/agent re-derivation. The net effect is that equivocation is now *louder* than correctness failure: a correct-but-equivocated draft halts the pipeline, whereas a merely incorrect draft is cheaply rejected by the verifier as before. This inverts the naive assumption that "valid draft" is a safe state, which is the operational lesson: in verifiable speculative decoding, uniqueness of commitment is a stronger and more fragile invariant than validity of content. ```python class EquivocationDetected(RuntimeError): """Raised when a step has two commitment receipts with differing roots in the same commitment slot. Must halt the step; must NOT fall back to target-model sampling or arrival-time tiebreak.""" pass def resolve_draft_commitment( step_index: int, receipts: list[dict], commitment_order: dict[int, int] | None, ) -> dict: """ receipts: list of {"slot": int, "root": str, "verifier": str, "sig": str} commitment_order: map slot -> total-order rank; None if sequencer unavailable. Returns the single accepted receipt, or raises EquivocationDetected. """ if not receipts: raise EquivocationDetected(f"step {step_index}: no receipts to resolve") by_slot: dict[int, list[dict]] = {} for r in receipts: by_slot.setdefault(r["slot"], []).append(r) for slot, group in by_slot.items(): roots = {r["root"] for r in group} if len(roots) > 1: raise EquivocationDetected( f"step {step_index}: slot {slot} has {len(roots)} distinct roots " f"{sorted(roots)} across verifiers {[r['verifier'] for r in group]}" ) if len(by_slot) == 1: return next(iter(by_slot.values()))[0] # Multiple distinct slots: need a total order to pick the superseding one. if commitment_order is None: raise EquivocationDetected( f"step {step_index}: multiple slots {sorted(by_slot)} but no " f"commitment total order available; refusing arrival-time tiebreak" ) ordered = sorted(by_slot, key=lambda s: commitment_order[s]) return by_slot[ordered[-1]][0] ```