-
Notifications
You must be signed in to change notification settings - Fork 22
sumcheck svo: full integration #403
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| // Fold after Round 1 | ||
| // | ||
| // After round 1, fold both p and W with challenge r_1. | ||
| // This correctly computes: | ||
| // p'(x_1, ...) = (1-r_1)*p(0, x_1, ...) + r_1*p(1, x_1, ...) | ||
| // W'(x_1, ...) = (1-r_1)*W(0, x_1, ...) + r_1*W(1, x_1, ...) | ||
| // | ||
| // Now p' is in extension field, and we continue with standard sumcheck. | ||
| let mut folded_evals: EvaluationsList<EF> = poly.compress_ext(r_1); | ||
| let mut folded_weights: EvaluationsList<EF> = weights.clone(); | ||
| folded_weights.compress(r_1); | ||
|
|
||
| // Rounds 2-3: Standard Sumcheck | ||
| // | ||
| // Use standard sumcheck on the folded polynomials. | ||
| // This correctly handles the cross-terms. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@quangvdao Here I've tried a first attempt at fully integrating SVO optimization with multiple constraints to WHIR, as discussed in detail in Option 2 of https://hackmd.io/@tcoratger/H1SNENAeZg.
Due to cross-terms after Round 1 with the folding and accumulators, I'm not sure how to apply the pre-computed accumulators for Rounds 2 and 3. Is it even possible to do this, or should we only apply SVO to Round 1 and then switch to normal sumcheck for the rest of the rounds (in which case I'm not sure about the optimization's effectiveness)?
Let me try to summarize a bit my understanding here.
We want to optimize the sumcheck prover for a batched statement involving a polynomial
My initial optimization attempt with SVO
The naive optimization attempts to precompute accumulators for all rounds
The Math
In Round 1, we fold variable
For Round 2, we need to compute the sum over the product of these folded polynomials:
Expanding this product reveals the issue:
where
The Issue
-
Single Constraint: If
$W = eq(z, x)$ , it factorizes cleanly ($W_0 \propto W_1$ ), causing the cross terms to collapse into the main terms. -
Batched Constraints:
$W$ does not factorize.$W_0$ and$W_1$ are distinct linear combinations. -
Result: Precomputed accumulators only track
$W_0 p_0$ and$W_1 p_1$ . They fundamentally lack the information to reconstruct the cross terms ($W_0 p_1 + W_1 p_0$ ).
That's why is this draft PR I've tried first to apply the pre computed accumulators only to the first round and then switch to basic sumcheck. But then the optimization looks pretty unefficient no?
No description provided.