research: verifier head-to-head — re-feed vs true-KV replay (H100, vLLM 0.23) - #109
Merged
Merged
Conversation
…LM 0.23) The GPU run behind the inference-receipt thesis. A replay verifier reconstructs a token's signature and compares to a commitment; the commitment is the decode-time logprob, but every replay verifier (DiFR, TOPLOC, SVIP, VeriLLM) reconstructs by RE-FEEDING the transcript. Re-feed (bulk prefill) != decode, so the verifier drifts at low-margin tokens. A thaw verifier replays from the true decode-time KV (.thawkv) and matches the commitment by construction. Fresh generations, Qwen2.5-7B, 1x H100, vLLM 0.23.0, 4652 tokens, prefix caching OFF so re-feed is a clean fresh prefill: - false-reject: at tau=0.01 nats a re-feed verifier wrongly rejects 6.9% of GENUINE tokens; the true-KV verifier rejects 0%. - forgery masking: at low-margin decision tokens, re-feed drift exceeds the top1-top2 gap 19.8% of the time (1 in 5) — a single-token swap hides inside the verifier's own re-feed noise; a true-KV verifier (drift ~0) catches it. So replay-from-re-feed verification pays a false-reject cost on genuine output AND has a forgery-acceptance hole at the tokens that matter; replay-from-true-KV (thaw's inference receipt) removes both. Harness + receipt; honest scope noted (true-KV arm sound by construction; deployed-verifier head-to-head is next).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a benchmark script that compares decode-time and re-feed verifier logprobs on fixed prompts, computes drift and false-reject metrics across tolerances, and writes a JSON receipt with the measured results. ChangesVerifier head-to-head benchmark
Sequence Diagram(s)sequenceDiagram
participant main as main()
participant llm as LLM
participant tokenizer as tokenizer
participant stdout as stdout
participant jsonout as json-out
main->>tokenizer: format PROMPTS with chat template
main->>llm: generate completions with decode-time logprobs
llm-->>main: committed token logprobs and top-5 alternatives
main->>llm: re-feed each transcript as a single prefill
llm-->>main: prompt-logprobs for each token
main->>stdout: print results as JSON
main->>jsonout: write JSON when requested
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GPU run behind the inference-receipt thesis (the $0.65 H100 experiment). A replay verifier compares a recomputed token signature to a commitment; the commitment is the decode-time logprob, but DiFR/TOPLOC/SVIP/VeriLLM all reconstruct by re-feeding the transcript — and re-feed (bulk prefill) != decode. A thaw verifier replays from the true decode-time KV (
.thawkv) and matches by construction.Fresh generations, Qwen2.5-7B, 1× H100, vLLM 0.23.0, 4,652 tokens, prefix caching off (re-feed = clean fresh prefill):
So re-feed verification pays a false-reject cost on genuine output and has a forgery-acceptance hole at the tokens that matter; thaw's true-KV inference receipt removes both.
benchmarks/verifier_headtohead.py+site/receipts/2026-06-25_h100_verifier_headtohead.json. Honest scope: true-KV arm sound by construction (decode-time logprob = commitment,.thawkvbit-identical per separate receipts); a deployed-verifier head-to-head + cross-model generality are the follow-ups.Summary by CodeRabbit