bench(whir): FRI vs WHIR Pareto frontier (prover cost vs argument size)#1
Draft
camofu wants to merge 3 commits into
Draft
bench(whir): FRI vs WHIR Pareto frontier (prover cost vs argument size)#1camofu wants to merge 3 commits into
camofu wants to merge 3 commits into
Conversation
a475cbf to
3cae0b9
Compare
camofu
added a commit
that referenced
this pull request
Jun 1, 2026
Hosting branch for the rendered plot embedded in #1's description. Not part of any PR changeset. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The head-to-head FRI vs WHIR benchmark measures one default parameterisation per protocol. This adds an example that sweeps each protocol over its own knobs, holding the proof claim fixed (256 polynomials opened at one common point, 100-bit capacity-regime soundness), to show how each knob trades prover cost for argument size. WHIR is swept over folding factor, starting inverse-rate, and the per-round inverse-rate schedule slope; FRI over log_blowup and folding arity, with the query count derived for the target soundness. For each configuration it records the analytic total committed oracle length (a prover-cost proxy), the measured prover/verifier wall-clock, and the postcard proof size. It renders two log-log panels (oracle-length proxy and measured prover time), each drawing dotted iso-knob curves shaded by value — WHIR by k (blues), FRI by log_blowup (reds) — and writes a CSV of the raw data to the crate root when run. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3cae0b9 to
88665b1
Compare
camofu
added a commit
that referenced
this pull request
Jun 1, 2026
Shaded iso-knob curves, no frontier. Hosting branch for the plot embedded in #1; not part of any PR changeset. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
WHIR randomized grid search
camofu
added a commit
that referenced
this pull request
Jun 2, 2026
… for PR description Hosting branch for the plot embedded in #1; not part of any PR changeset. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
camofu
added a commit
that referenced
this pull request
Jun 4, 2026
… for PR description Hosting branch for the plot embedded in #1; not part of any PR changeset. 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
Extends PR Plonky3#1607 (Plonky3/Plonky3)'s single-point FRI-vs-WHIR benchmark into a parameter sweep that traces each scheme's full prover-cost-vs-argument-size trade-off, on an identical proof claim (the §1.1 univariate↔multilinear bridge: 2^m elements as 256 polynomials of size 2^(m−8), opened at one common point; 100-bit capacity-regime soundness; KoalaBear + Poseidon1).
What's swept
FoldingFactor::PerRound, entries1..=10, ≤4 intermediate rounds), the starting inverse-rate, and per-round inverse-rate schedules (any legal sequence — the only rule isnext_rate ≤ prev_rate + folding_i, otherwise the RS domain would grow), plus constant-folding baselines. Configurable viaPARETO_WHIR_SAMPLES,PARETO_WHIR_MAX_FOLDING,PARETO_WHIR_MAX_ROUNDS,PARETO_WHIR_FIRST_FOLDING,PARETO_WHIR_STARTS. (Earlier revisions only swept constant folding with affine rate schedules; the randomized search reaches the non-constant foldings where WHIR's best region often lives.)log_blowup(rate) ×max_log_arity;num_queriesderived as the minimum reaching 100 bits.Axes & metrics (both panels share the y-axis = postcard argument size)
EF.PcsProofbundles them; FRI returns them separately), so the comparison is apples-to-apples.Findings
Σ queries · 2^folding) — the upper cloud — which is why the best region uses moderate folding.Workload note
The "256 openings at one common point" models a width-256 trace opened at the verifier's challenge — batch-FRI's native mode, and a valid (batched) WHIR mode. The 256 openings collapse into a single combined constraint, so neither prover pays a 256× cost. This is one realistic use case, not the only one; a single-/few-opening workload would showcase WHIR's other sweet spot (one large multilinear, one point).
How to run
cargo run -p p3-whir --release --features parallel --example pareto_frontier # Tune via PARETO_WHIR_SAMPLES / _MAX_FOLDING / _MAX_ROUNDS / _FIRST_FOLDING / _STARTS, and PARETO_M.Notes
benches/fri_vs_whir.rs, no production code touched (one example + a dev[[example]]entry).