bench(whir): model open-phase prover cost (sumcheck + batching) on the left axis#3
Draft
camofu wants to merge 1 commit into
Draft
bench(whir): model open-phase prover cost (sumcheck + batching) on the left axis#3camofu wants to merge 1 commit into
camofu wants to merge 1 commit into
Conversation
The left-panel x-axis was total committed oracle length, which prices only
the commit phase (codeword FFT + Merkle hashing) and so under-counts WHIR:
it ignores the per-round sumcheck and the cost of batching the opened
claims — exactly the work that makes WHIR's measured prover time diverge
from the proxy.
Replace the raw oracle-length axis with a modelled prover cost in
base-field multiply-equivalents:
- encode (FFT, keeping the log factor and an EF-multiply weight) + Merkle
hash (leaf + compression count) per committed codeword;
- WHIR's multilinear sumcheck over the 2^m hypercube;
- the claim-batching term.
FRI keeps a single FFT (its folding is FFT-free) and no sumcheck.
With these terms the modelled-cost panel matches the shape of the measured
wall-clock panel (FRI owns the cheap-prover corner, WHIR reaches the
smallest proofs at higher cost) instead of contradicting it. The raw oracle
length is still emitted to the CSV. Constants are rough order-of-magnitude
values; calibrating them against measured points would fix the absolute
scale.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Summary
The left-panel x-axis ("theoretical proxy") was total committed oracle length — a commit-phase-only cost. It prices the codeword FFTs + Merkle hashing but charges nothing for WHIR's open phase: the per-round sumcheck and the cost of batching the opened claims. That omission is exactly why the proxy panel disagreed with the measured wall-clock (and the source of the recent discussion with @WizardOfMenlo about the proxy being "weird" and WHIR looking "too slow").
This replaces the raw oracle-length axis with a modelled prover cost that includes those terms.
What changed
The left panel's x is now a modelled prover cost in base-field multiply-equivalents = sum of, per committed codeword:
log Nfactor and an extension-field-multiply weight (~d²). WHIR re-encodes every round; FRI does one input LDE and then folds for free (no per-round FFT).N + N/L), so "fat leaves ⇒ fewer Merkle nodes" is visible.plus the open-phase terms the old proxy couldn't see:
~2·2^mextension-field multiply-adds over the hypercube. FRI has no analogue.The raw oracle length is still computed and emitted to the CSV (
oracle_len_elems), alongside a newmodel_costcolumn.Effect
With the open-phase terms, the modelled-cost panel now matches the shape of the measured wall-clock panel — FRI owns the cheap-prover corner; WHIR reaches the smallest proofs at higher cost — instead of contradicting it. The divergence the two panels used to show was the sumcheck + batching; now it's modelled rather than hidden.
Caveats (deliberately out of scope)
EXT_MUL_COST,PERM_COST,SUMCHECK_DEG) are rough order-of-magnitude values — only the relative shape is meaningful. Calibrating them against a few measured points (cost-model "Step 3") would make the absolute scale trustworthy.Notes
Stacked on top of #1 (base
carlo/whir-fri-pareto). One file changed (the example); the model lives inwhir_build/fri_costwith documented constants near the top.