Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Sum-check protocol

Introduction

These notes replicate Thaler’s elegant presentation 1 of the sum-check protocol by Lund, Fortnow, Karloff, and Nisan 2, enriched with additional background information and interactive examples.

Definitions, conventions, and notation

Let F\mathbb{F} be a finite field, vv a positive integer, and gg a vv-variate polynomial with coefficients in F\mathbb{F}:

g(X0,,Xv1)=eNvaeX0e0Xv1ev1,aeF,e=(e0,,ev1),g(X_0,\ldots,X_{v - 1}) = \sum_{e \, \in \, \mathbb{N}^{v}} a_{e} X_0^{e_0}\cdots X_{v - 1}^{e_{v - 1}}, \quad a_e \in \mathbb{F}, \quad e = (e_0,\ldots,e_{v-1}),

where ae=0a_e = 0 for all but finitely many ee. The ring of all such polynomials is denoted F[X0,,Xv1]\mathbb{F}[X_0,\ldots,X_{v - 1}]. We use zero-based indexing throughout for consistency with the code and to minimize confusion, and define

N:={0,1,2,}.\mathbb{N} := \{0,1,2,\ldots\}.

In the RHS of (1), we may replace a subset of ww indeterminates XjX_j with field elements rjr_j, resulting in a (vw)(v - w)-variate polynomial in the remaining indeterminates, with their original indices preserved, and which we denote by substituting the corresponding rjr_j for each replaced XjX_j in the LHS. For instance, if v>1v > 1 then g(X0,r1,,rv1)g(X_0,r_1,\ldots,r_{v-1}) denotes the univariate polynomial in the indeterminate X0X_0, obtained by substituting X1,,Xv1X_1,\ldots,X_{v - 1} with r1,,rv1r_1,\ldots,r_{v - 1} in the RHS. For a more explicit example: if g(X0,X1,X2)=X0X1X2+X0X12+X2g(X_0,X_1,X_2) = X_0X_1X_2 + X_0X_1^2 + X_2 then g(X0,1,1)=2X0+1g(X_0,1,1) = 2X_0 + 1.

Formally, substituting field elements for indeterminates defines a ring homomorphism

F[X0,,Xv1]F[Xi1,,Xivw].\mathbb{F}[X_0,\ldots,X_{v - 1}] \mapsto \mathbb{F}[X_{i_1},\ldots,X_{i_{v - w}}].

The expression g(r0,,rv1)g(r_0,\ldots,r_{v - 1}) therefore denotes a constant polynomial in 0 indeterminates, which we identify with the corresponding field element. We call this the evaluation of gg at the point (r0,,rv1)(r_0,\ldots,r_{v - 1}). We call (r0,,rv1)(r_0,\ldots,r_{v-1}) a root or zero of gg in Fv\mathbb{F}^v if g(r0,,rv1)=0g(r_0,\ldots,r_{v-1}) = 0. For example, over F=Z/2Z\mathbb{F} = \mathbb{Z}/2\mathbb{Z}, the evaluation of g(X0,X1,X2)=X0X1X2+X0X12+X2g(X_0,X_1,X_2) = X_0X_1X_2 + X_0X_1^2 + X_2 at the point (1,1,1)(1,1,1) is g(1,1,1)=1g(1,1,1) = 1, so (1,1,1)(1,1,1) is not a root of gg, but g(0,0,0)=0g(0,0,0) = 0, so (0,0,0)(0,0,0) is a root of gg, as are (0,1,0)(0,1,0) and (1,0,0)(1,0,0).

In the sum-check protocol we will repeatedly substitute random field elements for some variables, so tracking degj(g)\mathrm{deg}_j(g) is useful because it bounds the degree of the univariate polynomials sent in each round.

DeMillo–Lipton–Schwartz–Zippel Lemma

This result, commonly referred to as the Schwartz-Zippel lemma, tells us that the roots of a multivariate polynomial over a field are sparse. This insight has useful implications; for instance, it suggests that two multivariate polynomials over a field are unlikely to agree at a randomly selected point, which is the crux of the soundness error in the sum-check protocol.

The lemma was first proved jointly by DeMillo and Lipton 3, preceding the independent discoveries by both Schwartz 4 and Zippel 5 around the late 1970s. In fact, for the special case of finite fields—which is the only case relevant here—the result was originally established by Ore in 1922 6.

To set up the proof of the Schwartz-Zippel lemma, we begin by stating a foundational proposition upon which the proof relies.

Sum-check protocol of Lund, Fortnow, Karloff, and Nisan, as described by Thaler

This is a description of the sum-check protocol as presented by Lund, Fortnow, Karloff, and Nisan in 2, with the exposition following Thaler’s treatment in 1

Initialization. Given a nonzero vv-variate polynomial gg over a finite field F\mathbb{F}, let

H:=b0{0,1}bv1{0,1}g(b0,,bv1).H := \sum_{b_0 \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(b_0,\ldots,b_{v - 1}).

Although verifier V does not know gg, the number of indeterminates vv and upper bounds degXj(g)dj\mathrm{deg}_{X_j}(g) \le d_j are known to V. Prover P claims that

H=claimPH,H \overset{\mathsf{P}}{\underset{\text{claim}}{=}} H^*,

sending this claim to V, who needs to verify that this claim is true by interacting with P.

Round 0. Let

g0(X0):=b1{0,1}bv1{0,1}g(X0,b1,,bv1).g_0(X_0) := \sum_{b_1 \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(X_0,b_1,\ldots,b_{v - 1}).

P sends polynomial g0g^*_0 to V, claiming that

g0=claimPg0.g^*_0 \overset{\mathsf{P}}{\underset{\text{claim}}{=}} g_0.

(Here, ‘P sends a polynomial’ means P sends an explicit representation, e.g., its coefficients.) If so, then

deg(g0)=?deg(g0)deg0(g)=d0.\mathrm{deg}(g^*_0) \stackrel{?}{=} \mathrm{deg}(g_0) \le \mathrm{deg}_0(g) = d_0.

V verifies this: if deg(g0)>d0\mathrm{deg}(g^*_0) > d_0 then V ‘rejects’ and the protocol terminates. Otherwise, we continue. If P’s claims that

H=claimPHandg0=claimPg0H \overset{\mathsf{P}}{\underset{\text{claim}}{=}} H^* \quad \text{and} \quad g^*_0 \overset{\mathsf{P}}{\underset{\text{claim}}{=}} g_0

are both true, then

H=?g0(0)+g0(1).H^* \stackrel{?}{=} g^*_0(0) + g^*_0(1).

This is because H=g0(0)+g0(1)H = g_0(0) + g_0(1). V verifies (7), which is easy because g0g^*_0 is explicitly given as a univariate polynomial, even though V cannot compute g0g_0 efficiently from scratch. If (7) does not hold, then V rejects and the protocol terminates. Otherwise, V chooses r0r_0 uniformly at random from F\mathbb{F}, and sends it to P.

Round j (1jv11 \le j \le v - 1). Let

gj(Xj):=bj+1{0,1}bv1{0,1}g(r0,r1,,rj1,Xj,bj+1,,bv1).g_j(X_j) := \sum_{b_{j+1} \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(r_0,r_1,\ldots,r_{j-1},X_j,b_{j+1},\ldots,b_{v - 1}).

P responds to V’s random challenge rj1r_{j - 1} by sending V a polynomial gjg^*_{j}, claiming that

gj=claimPgj.g^*_{j} \overset{\mathsf{P}}{\underset{\text{claim}}{=}} g_j.

If so, then

deg(gj)=?deg(gj)degj(g)=dj.\mathrm{deg}(g^*_j) \stackrel{?}{=} \mathrm{deg}(g_j) \le \mathrm{deg}_j(g) = d_j.

V verifies this: if deg(gj)>dj\mathrm{deg}(g^*_j) > d_j then V ‘rejects’ and the protocol terminates. Otherwise, we continue. If P’s previous claims that

gj1=claimPgj1andgj=claimPgjg^*_{j-1} \overset{\mathsf{P}}{\underset{\text{claim}}{=}} g_{j - 1} \quad \text{and} \quad g^*_{j} \overset{\mathsf{P}}{\underset{\text{claim}}{=}} g_{j}

are both true, then

gj1(rj1)=?gj(0)+gj(1).g^*_{j - 1}(r_{j - 1}) \stackrel{?}{=} g^*_j(0) + g^*_j(1).

This is because gj1(rj1)=gj(0)+gj(1)g_{j - 1}(r_{j - 1}) = g_j(0) + g_j(1). To see this, note that by definition (8),

gj1(rj1)=bj{0,1}bv1{0,1}g(r0,r1,,rj2,rj1,bj,,bv1)\begin{align*} g_{j - 1}(r_{j - 1}) & = \sum_{b_{j} \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(r_0,r_1,\ldots,r_{j-2},r_{j-1},b_{j},\ldots,b_{v - 1}) \end{align*}

and

gj(0)+gj(1)=bj+1{0,1}bv1{0,1}g(r0,r1,,rj1,0,bj+1,,bv1)+bj+1{0,1}bv1{0,1}g(r0,r1,,rj1,1,bj+1,,bv1)=bj{0,1}bv1{0,1}g(r0,r1,,rj1,bj,bj+1,,bv1).\begin{align} g_j(0) + g_j(1) & = \sum_{b_{j+1} \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(r_0,r_1,\ldots,r_{j-1},0,b_{j+1},\ldots,b_{v - 1}) + \sum_{b_{j+1} \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(r_0,r_1,\ldots,r_{j-1},1,b_{j+1},\ldots,b_{v - 1}) \\ & = \sum_{b_{j} \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(r_0,r_1,\ldots,r_{j-1},b_j,b_{j+1},\ldots,b_{v - 1}). \end{align}

V verifies (9), which is easy because gj1g_{j - 1} and gjg_{j} are explicitly given as univariate polynomials, even though V cannot compute gj1g_{j - 1} and gjg_{j} efficiently from scratch. If (9) does not hold, V rejects and the protocol terminates. Otherwise, V chooses rjr_j uniformly at random from F\mathbb{F}, independently of r0,,rj1r_0,\ldots,r_{j-1}, and sends it to P.

It helps to write out Round v1v - 1 explicitly. In the final round, P sends gv1g^*_{v - 1} to V, claiming that

gv1=claimPgv1,g^*_{v - 1} \overset{\mathsf{P}}{\underset{\text{claim}}{=}} g_{v - 1},

where

gv1(Xv1):=g(r0,,rv2,Xv1).g_{v - 1}(X_{v - 1}) := g(r_0,\ldots,r_{v - 2},X_{v - 1}).

V verifies that deg(gv1)?dv1\mathrm{deg}(g^*_{v-1}) \stackrel{?}{\le} d_{v-1} and that gv2(rv2)=?gv1(0)+gv1(1)g^*_{v - 2}(r_{v - 2}) \stackrel{?}{=} g^*_{v - 1}(0) + g^*_{v - 1}(1). If either the degree bound or (9) with j=v1j = v - 1 does not hold, V rejects and the protocol terminates. Otherwise, we continue.

Final check. V chooses rv1r_{v - 1} uniformly at random from F\mathbb{F}, independently of r0,,rv2r_0,\ldots,r_{v-2}, and verifies that

gv1(rv1)=?g(r0,,rv2,rv1),g^*_{v - 1}(r_{v - 1}) \stackrel{?}{=} g(r_0,\ldots,r_{v - 2},r_{v - 1}),

which holds if gv1=claimPgv1g^*_{v-1} \overset{\mathsf{P}}{\underset{\text{claim}}{=}} g_{v-1} is true, in view of (10). If (11) does not hold, then V rejects. Otherwise, V accepts that H=claimPHH \overset{\mathsf{P}}{\underset{\text{claim}}{=}} H^* is true and P passes the sum-check protocol. The protocol is complete.

Why V should be convinced if P passes sum check

The sum-check protocol is complete: if P’s claims are true, P will pass the protocol, assuming V’s calculations are accurate. If V rejects, then at least one of P’s claims is inconsistent with the protocol checks.

In terms of soundness, a dishonest P may provide an incorrect value for the initial sum HH and still pass sum check. However, we can make the probability of this event—the soundness error—as small as desired by choosing a large field size #F\#\mathbb{F} relative to vdvd. The probability of V being convinced of a false value for the initial sum is at most vd/#Fvd/\#\mathbb{F}.

To recap the sum-check protocol, we have

H:=b0{0,1}bv1{0,1}g(b0,,bv1)g0(X0):=b1{0,1}bv1{0,1}g(X0,b1,,bv1)\begin{align} H & := \sum_{b_0 \, \in \, \{0,1\}} \cdots \sum_{b_{v - 1} \, \in \, \{0,1\}} g(b_0,\ldots,b_{v-1}) \\ g_0(X_0) & := \sum_{b_1 \, \in \, \{0,1\}} \cdots \sum_{b_{v - 1} \, \in \, \{0,1\}} g(X_0,b_1,\ldots,b_{v-1}) \end{align}

Also, r0,,rv1r_0,\ldots,r_{v-1} are selected independently and uniformly at random from F\mathbb{F}, and

gj(Xj):=bj+1{0,1}bv1{0,1}g(r0,,rj1,Xj,bj+1,,bv1),0jv2gv1(Xv1):=g(r0,,rv2,Xv1)\begin{align} g_j(X_j) & := \sum_{b_{j + 1} \, \in \, \{0,1\}} \cdots \sum_{b_{v - 1} \, \in \, \{0,1\}} g(r_0,\ldots,r_{j-1},X_j,b_{j+1},\ldots,b_{v-1}), \quad 0 \le j \le v - 2 \\ g_{v-1}(X_{v-1}) & := g(r_0,\ldots,r_{v-2},X_{v-1}) \end{align}

Letting dj:=degj(g)d_j := \mathrm{deg}_{j}(g) for 0jv10 \le j \le v - 1, we have

deg(gj)dj,0jv1.\mathrm{deg}(g_j) \le d_j, \quad 0 \le j \le v - 1.

Also,

H=g0(0)+g0(1)gj1(rj1)=gj(0)+gj(1),1jv1gv1(rv1)=g(r0,,rv1)\begin{align} H & = g_0(0) + g_0(1) \\ g_{j-1}(r_{j-1}) & = g_j(0) + g_j(1), \quad 1 \le j \le v - 1 \\ g_{v-1}(r_{v-1}) & = g(r_0,\ldots,r_{v-1}) \end{align}

P claims that H=claimPHH \overset{\mathsf{P}}{\underset{\text{claim}}{=}} H^* and gj=claimPgjg_j \overset{\mathsf{P}}{\underset{\text{claim}}{=}} g_j^* for 0jv10 \le j \le v - 1, passing sum check if and only if the V’s acceptance conditions hold:

deg(gj)?dj,0jv1,H=?g0(0)+g0(1)gj1(rj1)=?gj(0)+gj(1),1jv1gv1(rv1)=?g(r0,,rv1)\begin{align} \begin{split} \mathrm{deg}(g^*_j) & \stackrel{?}{\le} d_j, \quad 0 \le j \le v - 1, \\ H^* & \stackrel{?}{=} g^*_0(0) + g^*_0(1) \\ g^*_{j-1}(r_{j-1}) & \stackrel{?}{=} g^*_j(0) + g^*_j(1), \quad 1 \le j \le v - 1 \\ g^*_{v-1}(r_{v-1}) & \stackrel{?}{=} g(r_0,\ldots,r_{v-1}) \end{split} \end{align}

Suppose P’s claim for the value of the initial sum is false, i.e. in fact HHH^* \ne H, and that P passes sum-check in spite of this, i.e. V’s acceptance conditions (12) all hold. If we had g0=g0g^*_0 = g_0, then we’d have g0(0)+g0(1)=g0(0)+g0(1)=HHg^*_0(0) + g^*_0(1) = g_0(0) + g_0(1) = H \ne H^*, and so V would reject in Round 0. Therefore, g0g0g^*_0 \ne g_0.

Case 1. gjgjg^*_j \ne g_j for all jj, 0jv10 \le j \le v - 1. In particular, gv1gv1g^*_{v - 1} \ne g_{v - 1}, and by the final acceptance condition,

gv1(rv1)=gv1(rv1)=g(r0,,rv1).g^*_{v-1}(r_{v - 1}) = g_{v-1}(r_{v-1}) = g(r_0,\ldots,r_{v-1}).

Case 2. There is a minimal kk, 1kv11 \le k \le v - 1, such that gk1gk1g^*_{k-1} \ne g_{k-1} and gk=gkg^*_k = g_k. By the acceptance condition of Round k,

gk1(rk1)=gk(0)+gk(1)=gk(0)+gk(1)=gk1(rk1).g^*_{k-1}(r_{k-1}) = g^*_k(0) + g^*_k(1) = g_k(0) + g_k(1) = g_{k - 1}(r_{k - 1}).

If Case 1 holds, take k=vk = v\,; else take kk as in Case 2. In either case, there is a sequence of polynomials g0g0,,gk1gk1g^*_0 \ne g_0,\ldots,g^*_{k-1} \ne g_{k-1}, where 1kv1 \le k \le v, such that gk1(rk1)=gk1(rk1)g^*_{k-1}(r_{k-1}) = g_{k-1}(r_{k-1}). Since gk1g_{k - 1} and gk1g^*_{k-1} are fixed after seeing the transcript (r0,,rk1)(r_0,\ldots,r_{k - 1}) but before rk1r_{k - 1} is chosen, they are independent of rk1r_{k - 1}. Moreover, by the degree bounds, the (univariate) polynomial gk1gk1g^*_{k - 1} - g_{k - 1} is nonzero and has degree at most dk1d:=deg(g)d_{k - 1} \le d := \mathrm{deg}(g). Therefore, since rk1r_{k - 1} is uniform in F\mathbb{F},

Pr[(gk1gk1)(rk1)=0]dk1#Fd#F(12)\mathrm{Pr}[(g^*_{k - 1} - g_{k - 1})(r_{k-1}) = 0] \le \frac{d_{k - 1}}{\#\mathbb{F}} \le \frac{d}{\#\mathbb{F}} \tag{12}

by the univariate root bound (equivalently, the v=1v = 1 case of Schwartz-Zippel Schwartz-Zippel).

In each round j1j \ge 1, while V verifies that gj1(rj1)=gj(0)+gj(1)g^*_{j-1}(r_{j-1}) = g^*_j(0) + g^*_j(1) (which could hold even if gj1(rj1)gj1(rj1)g^*_{j-1}(r_{j-1}) \ne g_{j-1}(r_{j-1})), P can check whether gj1(rj1)=gj1(rj1)g^*_{j - 1}(r_{j - 1}) = g_{j-1}(r_{j - 1}). (This check is possible because the prover knows [or can compute from a witness defining] the underlying polynomial gg and can efficiently evaluate gg at arbitrary points. In particular, P can compute the value gj1(rj1)g_{j - 1}(r_{j - 1}) directly as a sum of evaluations of gg without ever expanding gj1g_{j - 1} symbolically.) If this equality holds, P can then revert to sending the ‘true’ polynomials gj=gjg^*_j = g_j for subsequent rounds jj and pass the sum-check protocol.

Finally, we note that V will accept a false value for the sum HH in the end in the event that the above occurs for any kk, 1kv1 \le k \le v. Therefore, by the union bound and (12)(12),

Pr[V acceptsHH]j=0v1dj#Fvd#F.\mathrm{Pr}[ \text{V accepts} \, | \, H^* \ne H] \le \frac{\sum_{j = 0}^{v - 1}d_j}{\#\mathbb{F}} \le \frac{vd}{\#\mathbb{F}}.

Complexity and proof size

Verifier’s runtime

In Round jj of the sum-check protocol, verifier V performs the following steps:

  1. Degree bound check: verify that deg(gj)dj\deg(g_j^*) \le d_j.

  2. Consistency check: verify that gj1(rj1)=gj(0)+gj(1)g^*_{j-1}(r_{j-1}) = g^*_j(0) + g^*_j(1) (with HH^* substituted for g1(r1)g^*_{-1}(r_{-1}) in Round 0, i.e. H=g0(0)+g0(1)H^* = g^*_0(0) + g^*_0(1)).

  3. Sample a random field element rjFr_j \in \mathbb{F}.

  4. Final check: verify that gv1(rv1)=g(r0,,rv1)g^*_{v-1}(r_{v-1}) = g(r_0,\ldots,r_{v-1}).

Note that each dj:=degj(g)d_j := \deg_j(g) satisfies djdd_j \le d, where d:=deg(g)d := \deg(g) is the total degree. Since each gjg^*_j is a univariate polynomial, the work in Round jj is:

  1. Degree verification: O(tj)O(t_j) field operations, where tjt_j is the number of terms used to represent gjg_j^* (e.g. the number of nonzero coefficients sent as pairs (i,ci)(i,c_i)). In the dense-coefficient representation this is O(d)O(d).

  2. Evaluation check: O(d)O(d) field operations, because evaluating a univariate polynomial of degree at most dd can be done with dd multiplications and dd additions using Horner’s method.

  3. Random field element generation: this is often treated as O(1)O(1) in protocol analyses (randomness is assumed available). In bit complexity, sampling a uniform element from Fpk\mathbb{F}_{p^k} costs O(klogp)O(k\log p) expected time (e.g. by rejection sampling in Fp\mathbb{F}_p and sampling kk coefficients for Fpk\mathbb{F}_{p^k}).

  4. Final round verification: O(d)O(d) field operations to compute gv1(rv1)g^*_{v-1}(r_{v-1}), plus the cost of obtaining and verifying the value g(r0,,rv1)g(r_0,\ldots,r_{v-1}) (one oracle query in the interactive-proof model, or one commitment opening verification in cryptographic implementations).

Horner’s method is an efficient way to evaluate a polynomial given its coefficients. Rewrite a degree-dd polynomial

P(X)=c0+c1X++cdXdP(X) = c_0 + c_1X + \cdots + c_d X^d

in nested form:

P(X)=c0+X(c1+X(c2++X(cd1+Xcd))).P(X) = c_0 + X\bigl(c_1 + X\bigl(c_2 + \cdots + X(c_{d-1} + Xc_d)\cdots\bigr)\bigr).

Given aFa \in \mathbb{F}, set Ad:=cdA_d := c_d and compute recursively

Aj=cj+aAj+1,j=d1,d2,,0.A_j = c_j + aA_{j+1}, \quad j = d-1, d-2,\ldots,0.

Then P(a)=A0P(a) = A_0.

In practical implementations, dd is usually much smaller than klogpk\log p, so random number generation can dominate if done online. To mitigate this, r0,,rv1r_0,\ldots,r_{v-1} are typically precomputed. We assume this is the case.

Complexity of evaluating gg at a point. A vv-variate polynomial of total degree dd has at most

(v+dd)\binom{v + d}{d}

monomials (nonzero terms): one for each exponent tuple (e0,,ev1)(e_0,\ldots,e_{v-1}) with e0++ev1de_0 + \cdots + e_{v-1} \le d.

Using a monomial-sum representation, one can evaluate g(r0,,rv1)g(r_0,\ldots,r_{v-1}) by evaluating and summing all monomials. Each monomial evaluation requires O(v)O(v) field operations (e.g. multiplying together the vv contributions rieir_i^{e_i}, with eide_i \le d), so the total is

O ⁣((v+dd)v).O\!\left(\binom{v + d}{d}\cdot v\right).

Since (v+dd)=Θ(vd)\binom{v + d}{d} = \Theta(v^d) for constant dd, this becomes O(vd+1)O(v^{d+1}) when dd is bounded (in many applications dd is 2 or 3).

Verifier’s total runtime. Ignoring randomness generation (or assuming it is done offline), V’s work across all rounds is

O(vd),O(vd),

plus the cost of a single oracle query / commitment opening verification for g(r0,,rv1)g(r_0,\ldots,r_{v-1}) in the final check.

Verifier’s space complexity

The verifier generates and stores the vv random field elements r0,,rv1r_0, \ldots, r_{v-1}, all of which must be retained because g(r0,,rv1)g(r_0,\ldots,r_{v-1}) is compared against gv1(rv1)g^*_{v-1}(r_{v-1}) in the final round.

In each round jj (0jv10 \le j \le v-1), V receives a univariate polynomial gjg_j^* of degree at most djdd_j \le d. If gjg_j^* is sent in coefficient form, storing it requires O(d+1)O(d+1) field elements (or O(tj)O(t_j) in sparse form). Evaluating gjg_j^* at a point via Horner’s method uses only O(1)O(1) working memory beyond access to the coefficients (one running accumulator), and each polynomial is needed for at most two consecutive rounds.

Thus, measured in field elements, the total space complexity for the verifier is O(v+d)O(v + d). If the field is Fpk\mathbb{F}_{p^k} and each field element is represented using O(klogp)O(k\log p) bits, then the bit space complexity is O((v+d)klogp)O((v + d)k\log p).

Prover’s runtime

In Round 0, an honest prover P computes

g0(X0):=b1{0,1}bv1{0,1}g(X0,b1,,bv1).g_0(X_0) := \sum_{b_1 \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(X_0,b_1,\ldots,b_{v-1}).

Computing g0g_0 by direct summation requires evaluating gg at each point (X0,b1,,bv1)(X_0,b_1,\ldots,b_{v-1}) with (b1,,bv1){0,1}v1(b_1,\ldots,b_{v-1}) \in \{0,1\}^{v-1}, i.e. at 2v12^{v-1} points. If gg is represented as a sum of monomials, evaluating gg at one point takes

O ⁣((v+dd)v)O\!\left(\binom{v + d}{d}\cdot v\right)

field operations, so the total cost in Round 0 is

O ⁣((v+dd)v2v1).O\!\left(\binom{v + d}{d}\cdot v \cdot 2^{v-1}\right).

In Round jj, 1jv11 \le j \le v-1, an honest prover P computes

gj(Xj):=bj+1{0,1}bv1{0,1}g(r0,,rj1,Xj,bj+1,,bv1),g_j(X_j) := \sum_{b_{j+1} \in \{0,1\}} \cdots \sum_{b_{v-1} \in \{0,1\}} g(r_0,\ldots,r_{j-1},X_j,b_{j+1},\ldots,b_{v-1}),

which involves 2vj12^{v-j-1} evaluations of (a specialization of) gg. Using the same monomial-sum evaluation model, the work in Round jj is at most

O ⁣((v+dd)v2vj1).O\!\left(\binom{v + d}{d}\cdot v \cdot 2^{v-j-1}\right).

Summing across all rounds gives

j=0v1O ⁣((v+dd)v2vj1)=O ⁣((v+dd)v2v),\sum_{j=0}^{v-1} O\!\left(\binom{v + d}{d}\cdot v \cdot 2^{v-j-1}\right) = O\!\left(\binom{v + d}{d}\cdot v \cdot 2^v\right),

since 2v1+2v2++1=2v12^{v-1} + 2^{v-2} + \cdots + 1 = 2^v - 1.

Equivalently,

O ⁣((v+dd)v2v)=O ⁣(v(v+d)d2vd!).O\!\left(\binom{v + d}{d}\cdot v \cdot 2^v\right) = O\!\left(\frac{v(v + d)^d 2^v}{d!}\right).

If dd is bounded, this simplifies to O(vd+12v)O(v^{d+1}2^v), dominated by the exponential term 2v2^v arising from the Boolean hypercube.

Prover’s space complexity

P’s space complexity is dominated by storing the multivariate polynomial g(X0,,Xv1)g(X_0,\ldots,X_{v-1}). In a monomial-sum representation, gg may have up to (v+dd)\binom{v + d}{d} nonzero terms, and each term requires storing a coefficient together with its exponent tuple. Thus the storage for gg is O ⁣((v+dd))O\!\left(\binom{v + d}{d}\right) field elements (up to constant-factor overhead for exponents).

During each round, P computes and sends a univariate polynomial gj(Xj)g_j(X_j) of degree at most dd, which can be stored using O(d+1)O(d+1) field elements. The working memory needed to sum over the hypercube can be kept small: P can stream through the 2vj12^{v-j-1} points, maintaining only an accumulator for each coefficient of gjg_j (i.e. O(d+1)O(d+1) field elements), plus whatever temporary values are needed to evaluate gg at one point. If P precomputes the powers ri0,,ridr_i^0,\ldots,r_i^d for the specialized point, this adds O(vd)O(vd) field elements; otherwise the working memory can be treated as O(1)O(1) beyond the accumulator.

Overall, the prover’s space is dominated by the representation size of gg, namely O ⁣((v+dd))O\!\left(\binom{v + d}{d}\right) field elements (or O(vd)O(v^d) for bounded dd), plus lower-order terms such as O(vd)O(vd) and O(d)O(d).

Proof size

The proof size is the total amount of information communicated from the prover to the verifier during the sum-check protocol.

In each round jj, 0jv10 \le j \le v-1, P sends a univariate polynomial of degree at most djdd_j \le d to V. In coefficient form this requires at most d+1d+1 field elements per round (or fewer in sparse form). Thus, counting only the sum-check messages, the total proof size is

O(vd)O(vd)

field elements. In bit terms, since each element of Fpk\mathbb{F}_{p^k} can be encoded using O(klogp)O(k\log p) bits, the sum-check proof size is

O(vdklogp)O(vdk\log p)

bits. (In cryptographic implementations, one must additionally account for the size of the opening proof used in the final check to justify the value g(r0,,rv1)g(r_0,\ldots,r_{v-1}).)

References
  1. Thaler, J. (2015). A note on the GKR protocol. https://api.semanticscholar.org/CorpusID:16402332
  2. Lund, C., Fortnow, L., Karloff, H., & Nisan, N. (1992). Algebraic methods for interactive proof systems. Journal of the ACM, 39(4), 859–868. 10.1145/146585.146605
  3. DeMillo, R. A., & Lipton, R. J. (1978). A probabilistic remark on algebraic program testing. Information Processing Letters, 7(4), 193–195. 10.1016/0020-0190(78)90067-4
  4. Schwartz, J. T. (1980). Fast probabilistic algorithms for verification of polynomial identities. Journal of the ACM, 27(4), 701–717. 10.1145/322217.322225
  5. Zippel, R. (1979). Probabilistic algorithms for sparse polynomials. In E. W. Ng (Ed.), Symbolic and Algebraic Computation, EUROSAM ’79, An International Symposium on Symbolic and Algebraic Computation, Marseille, France, June 1979, Proceedings (Vol. 72, pp. 216–226). Springer. 10.1007/3-540-09519-5_73
  6. Ore, Ø. (1922). Über höhere Kongruenzen. Norsk Matematisk Forenings Skrifter, Ser. I, 7, 15.