Try   HackMD

In this note, we will explore two versions of the Sum-Check protocol: the vanilla protocol, as well as a useful generalization that we'll refer to as "Specialized Sum-Check".

The Sum-Check problem statement

Sum-check is an algorithm where the following statement is proven:

x1{0,1}xm{0,1}g(x1,,xm)=C1,

where

g:FmF is any m-variate polynomial, and
C1F
is the result of computing the sum. The polynomial
g
is public (i.e. known to both the prover and verifier). Hence, the verifier could compute that sum itself. However, we often don't want the verifier to have to do all this work. The main benefit of sum-check is that the verifier can be convinced that the statement is true with very little work, at the cost of more work for the prover.

Throughout this note, we will use the following as a short-hand for the above statement:

(x1,,xm){0,1}mg(x1,,xm)=C1.

The Sum-Check Protocol

In this section, we present the algorithm. We will show why the algorithm properly proves the sum-check statement in the next section.

Sum-check is an interactive algorithm which can be made non-interactive using the Fiat-Shamir transform. The algorithm consists of

m rounds, where in round
i
, the prover sends a univariate polynomial
si:FF
to the verifier, and the verifier responds with a field element
riRF
sampled uniformly at random. After the last round, the verifier evaluates
g
at a single point, runs a final check, after which it is convinced that the statement is true.

Let's take a closer look at what happens in a round.

round 1

Prover

The prover constructs the univariate polynomial

s1(x1)=(x2,,xm){0,1}m1g(x1,x2,,xm).

In words,

s1:FF is defined as the sum of
g
over all variables except
x1
.

The prover sends

s1 to the verifier.

Verifier

The verifier checks

s1(0)+s1(1)=C1.

Then, the verifier samples

r1RF uniformly at random and sends it to the prover.

round 2

Prover

The prover constructs the univariate polynomial

s2(x2)=(x3,,xm){0,1}m2g(r1,x2,x3,,xm).

The prover sends

s2 to the verifier.

Verifier

The verifier checks

s2(0)+s2(1)=s1(r1).

Then, the verifier samples

r2RF uniformly at random and sends it to the prover.

round
i
,
3im

Prover

The prover constructs the univariate polynomial

si(xi)=(xi+1,,xm){0,1}mig(r1,,ri1,xi,xi+1,,xm).

The prover sends

si to the verifier.

Verifier

The verifier checks

si(0)+si(1)=si1(ri1).

Then, the verifier samples

riRF uniformly at random and sends it to the prover.

Verifier last check

In round

m, the verifier received
sm(xm)
from the prover, and sampled
rmRF
. Now, the verifier checks

g(r0,,rm)=sm(rm)

Note that this is the only evaluation of

g by the verifier in the entire protocol.

This completes the protocol. If the check passes, then the verifier is convinced that the original statement is true.

Sum-Check: Analysis

In this section, we will show why the protocol as described in the previous section is sound.

The first realization to make is that the protocol is recursive: each round reduces its statement to a new statement that can itself be proved using sum-check. That is, rounds are linked together by the following relationship: if the statement at round

i+1 is correct, then the statement at round
i
is correct.

Before we dive in further, let's introduce some useful notation. Given a function

f(x1,x2):F2F, then the function
fr1(x2)
is a function such that

fr1(x2)=f(r1,x2).

That is,

fr1:FF is a function of one less variable than
f
. We say that the variable
x1
is bound to
f
(with value
r1
) to yield the new function
fr1
. Intuitively, all this does is fix the evaluation of the variable
x1
to always be
r1
. Naturally, this is not limited to functions of 2 variables.

We are now ready to show why the sum-check protocol properly convinces the verifier that the sum-check problem statement being proved is true. Although not a formal proof, this will be in a format similar to a proof by induction: we will prove the recursive (or "inductive") case, and the base case. We move away from the formal proof format to help convey the intuition behind the proof rather than being formally correct. The recursive case covers how each round reduces its statement to a "smaller" statement, that is also provable using the sum-check protocol. The base case covers the part of the protocol after the last round is over.

Recursive case

To be more concrete, we will look at how the statement in round 1 is reduced to the statement in round 2. However, the idea is the same for every round.

Recall that the statement to prove in round 1 is:

(x1,,xm){0,1}mg(x1,,xm)=C1,

while the statement to prove in round 2 is:

(x2,,xm){0,1}m1gr1(x2,,xm)=s1(r1).

There are three key things to notice:

  1. the sum is over one less variable in round 2 than it was in round 1,
  2. g
    has been replaced with
    gr1
    ,
  3. the right-hand side is a scalar value (i.e.
    s1(r1)F
    ), which we can name
    C2
    .

The statement in round 2 is a valid sum-check problem, to which we can apply the sum-check protocol!

Now, crucially, let's see why the statement in round 1 reduces to the statement in round 2. That is, if the statement in round 2 is true, then the statement in round 1 is true.

Assume that the second statement is true. That is,

(x2,,xm){0,1}m1gr1(x2,,xm)=s1(r1).

Then, since

r1 was sampled uniformly at random, by the Schwartz-Zippel lemma,

(x2,,xm){0,1}m1gx1(x2,,xm)=s1(x1)x1F.

Or equivalently,

(x2,,xm){0,1}m1g(x1,x2,,xm)=s1(x1)x1F.

That is, we can now treat the entire polynomials on the left-hand side and the right-hand side as equal. Then,

s1(0)+s1(1)=((x2,,xm){0,1}m1g(0,x2,,xm))+((x2,,xm){0,1}m1g(1,x2,,xm))=(x2,,xm){0,1}m1g(0,x2,,xm)+g(1,x2,,xm)=(x1,,xm){0,1}mg(x1,,xm),

which is the left-hand side of the statement in round 1! Hence, the statement in round 1 can be written as

s1(0)+s1(1)=C1. Unsurprisingly, this is exactly the check that the verifier does in the protocol!

To recap, when we assume that the statement in round 2 is true, then the statement in round 1 can be rewritten as

s1(0)+s1(1)=C1. So after the verifier runs this check, all that is left to show is that the statement in round 2 is actually true (which will be carried out in the next round of the protocol). This is another way of saying that the statement in round 1 does indeed reduce to the statement in round 2, which was our initial goal.

Next, we will look at the base case, which occurs after round

m.

Base case

The statement left to prove after round

m is:

gr1,,rm=sm(rm)

That is, there is no more sum left, and all the variables are bound. Recall that in round

m, the verifier received the polynomial
sm
, and randomly sampled
rmRF
.

Now, this check is trivially done by the verifier. The verifier evaluates

g(r1,,rm) to yield the left-hand side of the statement, and checks if it is equal to
sm(rm)
.

Since this was the last statement to prove in the protocol, then the verifier is convinced that the original statement in round 1 is correct!

The Specialized Sum-Check protocol

We will now look at a specialization of the problem statement that turns out to be quite useful in practice. We call it a "specialization" because we make more assumptions about the structure of the inner sum than in the traditional sum-check protocol.

Problem statement

The sum-check problem statement can be specialized to:

(x1,,xm){0,1}mg(f1(x1,,xm),,fn(x1,,xm))=C1,

where

f1,,fn are multilinear polynomials. Notice that when
fi(x1,,xm)=xi
, then we recover the vanilla problem statement explored in the previous sections.

The protocol

The protocol works exactly the same as the vanilla sum-check protocol. The

si polynomials are defined similarly:

s1(x1)=(x2,,xm){0,1}m1g(f1(x1,x2,,xm),,fn(x1,x2,,xm)),

s2(x2)=(x3,,xm){0,1}m2g(f1r1(x2,x3,,xm),,fnr1(x2,x3,,xm)),

Analysis

The argument for why the specialized sum-check protocol is sound is actually the same as for the previous one. We will briefly look at the recursive case, again by focusing on how the problem statement in round 1 reduces to the problem statement in round 2.

Assume that the problem statement in round 2 is true. That is,

(x2,,xm){0,1}m1g(f1r1(x2,,xm),,fnr1(x2,,xm))=s1(r1),

This is actually the same state as in the vanilla problem. To make this a bit more clear, let's rewrite the summand slightly. We define

hr1(x2,,xm) as

hr1(x2,,xm)=g(f1r1(x2,,xm),,fnr1(x2,,xm))

Notice that

hr1 is nonlinear in all its variables. Then, we can rewrite the problem statement in round 2 as

(x2,,xm){0,1}m1hr1(x2,,xm)=s1(r1).

Hopefully, it is now clear that since this is the same form as in the vanilla sum-check problem, then the exact same argument for the recursive case applies.

As for the base case, the verifier needs to check

g(f1(r1,,rm),,fn(r1,,rm))=sm(rm).

Efficient evaluation of round polynomials
si

This specialization is useful in practice, in part because there exists an efficient algorithm for the prover to construct the polynomials

si at each round. We go over the algorithm in great detail in this note.