GKR Protocol

The protocol is best presented in terms of the (arithmetic) circuit evaluation problem. In this problem, VV and PP first agree on a log-space uniform arithmetic circuit CC of fan-in 2 over a finite field FF, and the goal is to compute the value of the output gate(s) of CC. A log-space uniform circuit CC is one that possesses a succinct implicit description, in the sense that there is a logarithmic-space algorithm that takes as input the label of a gate aa of CC, and is capable of determining all relevant information about that gate. That is, the algorithm can output the labels of all of aa’s neighbors, and is capable of determining if aa is an addition gate or a multiplication gate.

Notation

Suppose we are given a layered arithmetic circuit CC of size SS, depth dd, and fan-in two (CC may have more than one output gate). Number the layers from 00 to dd, with 00 being the output layer and dd being the input layer. Let SiS_i denote the number of gates at layer ii of the circuit CC. Assume SiS_i is a power of 22 and let SiS_i = 2ki2^{k_i}. The GKR protocol makes use of several functions, each of which encodes certain information about the circuit:

  • Let Wi:{0,1}kiFW_i: \{0, 1\}^{k_i} → F denote the function that takes as input a binary gate label, and outputs the corresponding gate’s value at layer ii.

  • Let addi:{0,1}ki+2ki+1{0,1}add_i: \{0, 1\}^{k_i + 2k_{i+1}} → \{0,1\} denote the function that takes as input three gate labels (a,b,c)(a, b, c) and return 1 if and only if bb and cc are the first and second in-neighbour of gate aa and gate aa is an addition gate.

  • Let multi:{0,1}ki+2ki+1{0,1}mult_i: \{0, 1\}^{k_i + 2k_{i+1}} → \{0,1\} denote the function that takes as input three gate labels (a,b,c)(a, b, c) and return 1 if and only if bb and cc are the first and second in-neighbour of gate aa and gate aa is a multiplication gate.

  • Let Wi~\widetilde{W_i}, addi~\widetilde{add_i} and multi~\widetilde{mult_i} denote the multilinear extensions of WiW_i, addiadd_i and multimult_i.

Illustration

spinner

W0(0)=15W_0(0) = 15, W1(0)=12W_1(0) = 12, W1(1)=3W_1(1) = 3, W2(0,0)=3W_2(0, 0) = 3, W2(0,1)=4W_2(0, 1) = 4, W2(1,0)=1W_2(1, 0) = 1, W2(1,1)=2W_2(1, 1) = 2

add0(0,0,1)=1add_0(0, 0, 1) = 1 and equals to 0 for all other inputs

mult0mult_0 is 0 for all the inputs

add1(1,1,0,1,1)=1add_1(1, 1, 0, 1, 1) = 1, for all the other inputs the output is zero

mult1(0,0,0,0,1)=1mult_1(0, 0, 0, 0, 1) = 1, for all the other inputs the output is zero

Important lemma

Wi~(z)=b,c{0,1}ki+1addi~(z,b,c)(Wi+1~(b)+Wi+1~(c))+multi~(z,b,c)(Wi+1~(b)Wi+1~(c))\widetilde{W_i}(z) = \sum_{b,c \in \{0,1\}^{k_{i+1}}}\widetilde{add_i}(z, b,c)(\widetilde{W_{i+1}}(b)+\widetilde{W_{i+1}}(c)) + \widetilde{mult_i}(z, b,c)(\widetilde{W_{i+1}}(b)·\widetilde{W_{i+1}}(c))

Protocol

  1. Let CC be a layered arithmetic circuit of depth dd and fan-in two on input xFnx ∈ F^n. Throughout, kik_i denotes log2(Si)\log_2(S_i) where SiS_i is the number of gates at layer ii of CC.

  2. At the start of the protocol, PP sends a function D:{0,1}k0FD: \{0, 1\}^{k_0} → F claimed to equal W0W_0 (the function mapping output gate labels to output values).

  3. VV picks a random r0Fk0r_0 ∈ F^{k_0} and lets m0=D~(r0)m_0 = \widetilde{D}(r_0). The remainder of the protocol is devoted to confirming that m0=W0~(r0)m_0 = \widetilde{W_0}(r_0).

  4. For i=0,1,...,d1:i = 0, 1,...,d-1:

    1. Define the (2ki+1)-variate(2k_{i+1})\text{-variate} polynomial fri(i)(b,c)=addi~(ri,b,c)(Wi+1~(b)+Wi+1~(c))+multi~(ri,b,c)(Wi+1~(b)Wi+1~(c))f_{r_i}^{(i)}(b,c) = \widetilde{add_i}(r_i, b, c)(\widetilde{W_{i+1}}(b) + \widetilde{W_{i+1}}(c)) + \widetilde{mult_i}(r_i, b, c)(\widetilde{W_{i+1}}(b) · \widetilde{W_{i+1}}(c)).

    2. PP claims that b,c{0,1}ki+1fri(i)(b,c)=mi\sum_{b,c \in \{0,1\}^{k_{i+1}}}f_{r_i}^{(i)}(b,c) = m_i

    3. So that VV may check this claim, PP and VV apply the sum-check protocol to fri(i)f_{r_i}^{(i)}, up until V’sV\text{'s} final check in that protocol, when VV must evaluate fri(i)f_{r_i}^{(i)} at a randomly chosen point (b,c)Fki+1×Fki+1(b^{*}, c^{*}) \in F^{k_{i+1}}×F^{k_{i+1}}. See Remark (a).

    4. Let ll be the unique line satisfying l(0)=bl(0) = b^∗ and l(1)=cl(1) = c^∗. PP sends a univariate polynomial qq of degree at most ki+1k_{i+1} to VV, claimed to equal Wi+1~\widetilde{W_{i+1}} restricted to ll.

    5. VV now performs the final check in the sum-check protocol, using q(0)q(0) and q(1)q(1) in place of Wi+1~(b)\widetilde{W_{i+1}}(b^{*}) and Wi+1~(c)\widetilde{W_{i+1}}(c^{*}). See Remark (b).

    6. VV chooses rFr^* \in F at random and sets ri+1=l(r)r_{i+1} = l(r^*) and mi+1=q(ri+1)m_{i+1} = q(r_{i+1}).

  5. VV checks directly that md=Wd~(rd)m_d = \widetilde{W_d}(r_d). Note that Wd~\widetilde{W_d} is simply x~\tilde{x}, the multilinear extension of the input xx when xx is interpreted as the evaluation table of function mapping {0,1}lognF\{0, 1\}^{\log n} → F.

Remark a. Note that VV does not actually know the polynomial fri(i)f_{r_i}^{(i)}, because VV does not know the polynomial Wi+1~\widetilde{W_{i+1}} that appears in the definition of fri(i)f_{r_i}^{(i)}. However, the sum-check protocol does not require VV to know anything about the polynomial to which it is being applied, until the very final check in the protocol.

Remark b. We assume here that for each layer ii of CC, VV can evaluate the multilinear extensions addi~\widetilde{add_i} and multi~\widetilde{mult_i} at the point (ri,b,c)(r_i, b^∗, c^∗) in polylogarithmic time. Hence, given Wi+1~(b)\widetilde{W_{i+1}}(b^{*}) and Wi+1~(c)\widetilde{W_{i+1}}(c^{*}), VV can quickly evaluate fri(i)(b,c)f_{r_i}^{(i)}(b^{*}, c^{*}) and thereby perform its final check in the sum-check protocol applied to fri(i)f_{r_i}^{(i)}.

Properties

  • perfect completeness

  • soundness error: O(dlogS/F)O(d \log S / |F|)

Costs

Let nn be a number of inputs.

Communication
Rounds
V time
P time

O(dlogS)O(d \log S)

O(dlogS)O(d \log S)

O(n+dlogS)O(n + d \log S)

poly(S)poly(S)

Note (a): It is now known how to achieve prover runtime of O(S)O(S) for arbitrary layered arithmetic circuits CC [XZZ+19].

Last updated