Multivariate Sumcheck Protocol - Part 4

Share on

We introduce the GKR protocol, explaining how it recursively verifies the correctness of layered circuit computation through the multivariate Sumcheck protocol. It elaborates on the circuit’s layered relationships, constraint construction, and verification procedures, demonstrating the efficiency and scalability of GKR in zero-knowledge proofs.

In Zero-Knowledge Proofs (ZKP), the GKR protocol (Goldwasser–Kalai–Rothblum protocol) is an efficient interactive proof system used to verify the correctness of arithmetic circuit computations. It recursively verifies the relationship between the outputs and inputs of layered circuits using the Multivariate Sumcheck Protocol, achieving correctness proofs for arbitrary multi-layer circuits while maintaining logarithmic communication complexity and sub-linear verification complexity.

1. Formal Definition of Arithmetic Circuits and Layered Structure

Consider an arithmetic circuit:

$$C : F^{S_n} \rightarrow F$$

The circuit consists of n layers, from input layer n to output layer 0, and the layers are connected through directed edges:

Layered Arithmetic Circuit:
Layer 0 <-- Output layer
Layer 1
Layer 2
...
Layer n-1
Layer n <-- Input layer

We define the following notation:

  • The index set of gates in layer $i \colon G_i = \{0,1\}^{S_i}$;
  • The output of each gate $p \in G_i$ is computed from two gates $u,v \in G_{i+1}$ in the next layer;
  • Each gate is either an addition gate or a multiplication gate;
  • The directed wiring pattern of the circuit is determined by the Boolean functions $\text{add}G^{(i)}(p, u, v)$ and $\text{mult}G^{(i)}(p, u, v)$:

\[ add^{(i)}(p, u, v) = \{1, \text{ if } p = u + v \text{ and } p \text{ is an addition gate } 0, \text{ otherwise} \]

\[ mult^{(i)}(p, u, v) = \{1, \text{ if } p = u \times v \text{ and } p \text{ is a multiplication gate } 0, \text{ otherwise} \]

To perform algebraic verification over the field F, we apply multilinear extensions (MLE) to these Boolean functions:

\[ \widetilde{add}^{(i)}, \widetilde{mult}^{(i)} : F^{s_{i} + 2s_{i+1}} \to F \]

They match the Boolean functions on 0,1 while being computable as polynomials over F.

2. Goal: Verifying Layer Consistency

The core task of the GKR protocol is to verify whether the outputs of each layer are consistent with the inputs of the lower layer. Let $\widetilde{w}_{i}: F^{s_{i}} \to F$ denote the multilinear extension of the output values of layer $i$, then for any $p \in G_{i}$, the following must hold:

\[ \widetilde{w}^*_i(p) = \sum_{u, v \in \{0, 1\}^{s_{i+1}}} \left[ \widetilde{add}^{(i)}(p, u, v) (\widetilde{w}^*_{i+1}(u) + \widetilde{w}^*_{i+1}(v)) + \widetilde{mult}^{(i)}(p, u, v) (\widetilde{w}^*_{i+1}(u) \cdot \widetilde{w}^*_{i+1}(v)) \right] \]

This expresses that each gate’s output equals the combination of the addition or multiplication of its input gates.

3. Algebraic Verification Objective

The core task of the GKR protocol is to verify whether the outputs of each layer are consistent with the inputs of the lower layer. Let $\widetilde{w}_{i}: F^{s_{i}} \to F$ denote the multilinear extension of the output values of layer $i$, then for any $p \in G_{i}$, the following must hold:

\[ \widetilde{w}^*_i(Z) = \sum_{u, v \in \{0, 1\}^{s_{i+1}}} g^{(i)}(Z, u, v) \]

where

\[ g^{(i)}(Z, u, v) = \widetilde{add}^{(i)}(Z, u, v) (\widetilde{w}^*_{i+1}(u) + \widetilde{w}^*_{i+1}(v)) + \widetilde{mult}^{(i)}(Z, u, v) (\widetilde{w}^*_{i+1}(u) \cdot \widetilde{w}^*_{i+1}(v)) \]

This identity is a multivariate polynomial identity with variables $(u, v) \in F^{2s_{i+1}}$. The Prover and Verifier can verify this sum using the Multivariate Sumcheck Protocol.

4. Nested Structure of the Sumcheck Protocol

4.1 Constructing the Sumcheck Instance

Define the full variable set $X = (u, v) \in F^{2s_{i+1}}$. We aim to verify:

\[ \sum_{X \in \{0, 1\}^{2s_{i+1}}} g^{(i)}(Z, X) = \widetilde{w}_i(Z) \]

The Sumcheck protocol allows the Prover to sequentially submit polynomials $G_1, G_2, \dots, G_{2s_{i+1}}$, each representing partial sums with respect to remaining variables.The Verifier sends random challenges $r_j$ each round, updating the target partial evaluation until, in the last round, only a single-point check of $g^{(i)}(Z, r)$ remains.

4.2 Recursing to the Next Layer

After Sumcheck concludes, the Verifier obtains point evaluations to be checked:

\[ \widetilde{w}^*_{i+1}(u), \widetilde{w}^*_{i+1}(v) \]

These two values become the inputs for the next recursive verification step. The Verifier again selects a random challenge $Z' \in F^{s_{i'}}$ , forming the new identity:

\[ \widetilde{w}^*_{i+1}(Z') = \sum_{x, y \in \{0, 1\}^{s_{i+2}}} g^{(i+1)}(Z', x, y) \]

The Sumcheck process is repeated.

4.3 Termination of Recursion

When recursion reaches the bottom layer (input layer $n$), $\widetilde{w}_n(x)$ corresponds to the circuit input values, which are public or directly verifiable:

\[ \widetilde{w}_n(x) = Input(x) \]

The Verifier can check this identity directly, completing the entire verification process.

5. Fully Formalized Description of the Protocol

  • Circuit wiring polynomials $\widetilde{add}^{(i)}$, $\widetilde{mult}^{(i)}$;
  • Layer output extension functions $\widetilde{w}_i$;
  • Public input values $x \in F^n$;
  • Output value provided by the Prover $y = \widetilde{w}_0(0)$.

Output:

  • The Verifier accepts or rejects the Prover’s claim.

Interactive Procedure:

  1. The Verifier randomly chooses $Z \in F^{s_0}$;
  2. The Prover and Verifier run the Sumcheck protocol to verify:\[ \sum_{u, v \in \{0, 1\}^{s_1}} g^{(0)}(Z, u, v) = \widetilde{w}_0(Z) \]
  3. If the check passes, recurse to layer 1;
  4. Repeat until reaching the input layer;
  5. At the input layer, the Verifier directly checks input consistency.

6. Complexity and Security Analysis

7. Summary and Extensions

The GKR protocol recursively verifies inter-layer consistency using the multivariate Sumcheck, achieving efficient algebraic verification of arithmetic circuits. Its core features include:

  1. Layered algebraization Converting circuit Boolean wiring into multilinear polynomials.
  2. Sumcheck verification Interactively verifying polynomial identities layer by layer.
  3. Recursive reduction Each layer’s verification depends only on two point evaluations from the next layer, greatly reducing communication and computation.
  4. Verifiable base case At the input layer, the Verifier directly checks consistency between inputs and the claimed outputs.

This design makes the GKR protocol a fundamental algebraic component of modern zero-knowledge proof systems (such as Spartan, Halo, Nova, Lasso, Sumcheck-based zkVMs), widely applied in efficient circuit verification, scalable proof systems, and recursive proof constructions.

Subscribe to the ZKM Blog to stay updated with the latest research by ZKM.

More articles
Entangled Rollups:无需桥接的多链互操作性
我们最近推出了一种名为 Entangled Rollup 的新型信任最小化多链互操作性基础设施。‍ 在这项工作中,我们利用我们最先进的递归 zkVM (zkMIPs),在 zkRollUps 的标准安全假设下审慎地纠缠底层原语,从而实现互操作性协议。‍ Entangled Rollup 协议是去信任的,是解决流动性分散问题向前迈出的一步,此外还简化了作为多链世界主要采用障碍的用户和开发者体验。‍
布鲁塞尔 ZK 之家:零知识卓越展示
House of ZK活动恰逢2024年7月11日在布鲁塞尔举行的ETHCC周,该活动被证明是致力于探索和推进基于ZK技术的区块链开发人员、学者和行业领导者的中心枢纽。为期一天的活动包括教育主题演讲、引人入胜的小组讨论和深入的讨论,重点讨论了ZK在区块链中的巨大潜力和多样化应用。
Multivariate Sumcheck Protocol - Part 4

We introduce the GKR protocol, explaining how it recursively verifies the correctness of layered circuit computation through the multivariate Sumcheck protocol. It elaborates on the circuit’s layered relationships, constraint construction, and verification procedures, demonstrating the efficiency and scalability of GKR in zero-knowledge proofs.

In Zero-Knowledge Proofs (ZKP), the GKR protocol (Goldwasser–Kalai–Rothblum protocol) is an efficient interactive proof system used to verify the correctness of arithmetic circuit computations. It recursively verifies the relationship between the outputs and inputs of layered circuits using the Multivariate Sumcheck Protocol, achieving correctness proofs for arbitrary multi-layer circuits while maintaining logarithmic communication complexity and sub-linear verification complexity.

1. Formal Definition of Arithmetic Circuits and Layered Structure

Consider an arithmetic circuit:

$$C : F^{S_n} \rightarrow F$$

The circuit consists of n layers, from input layer n to output layer 0, and the layers are connected through directed edges:

Layered Arithmetic Circuit:
Layer 0 <-- Output layer
Layer 1
Layer 2
...
Layer n-1
Layer n <-- Input layer

We define the following notation:

  • The index set of gates in layer $i \colon G_i = \{0,1\}^{S_i}$;
  • The output of each gate $p \in G_i$ is computed from two gates $u,v \in G_{i+1}$ in the next layer;
  • Each gate is either an addition gate or a multiplication gate;
  • The directed wiring pattern of the circuit is determined by the Boolean functions $\text{add}G^{(i)}(p, u, v)$ and $\text{mult}G^{(i)}(p, u, v)$:

\[ add^{(i)}(p, u, v) = \{1, \text{ if } p = u + v \text{ and } p \text{ is an addition gate } 0, \text{ otherwise} \]

\[ mult^{(i)}(p, u, v) = \{1, \text{ if } p = u \times v \text{ and } p \text{ is a multiplication gate } 0, \text{ otherwise} \]

To perform algebraic verification over the field F, we apply multilinear extensions (MLE) to these Boolean functions:

\[ \widetilde{add}^{(i)}, \widetilde{mult}^{(i)} : F^{s_{i} + 2s_{i+1}} \to F \]

They match the Boolean functions on 0,1 while being computable as polynomials over F.

2. Goal: Verifying Layer Consistency

The core task of the GKR protocol is to verify whether the outputs of each layer are consistent with the inputs of the lower layer. Let $\widetilde{w}_{i}: F^{s_{i}} \to F$ denote the multilinear extension of the output values of layer $i$, then for any $p \in G_{i}$, the following must hold:

\[ \widetilde{w}^*_i(p) = \sum_{u, v \in \{0, 1\}^{s_{i+1}}} \left[ \widetilde{add}^{(i)}(p, u, v) (\widetilde{w}^*_{i+1}(u) + \widetilde{w}^*_{i+1}(v)) + \widetilde{mult}^{(i)}(p, u, v) (\widetilde{w}^*_{i+1}(u) \cdot \widetilde{w}^*_{i+1}(v)) \right] \]

This expresses that each gate’s output equals the combination of the addition or multiplication of its input gates.

3. Algebraic Verification Objective

The core task of the GKR protocol is to verify whether the outputs of each layer are consistent with the inputs of the lower layer. Let $\widetilde{w}_{i}: F^{s_{i}} \to F$ denote the multilinear extension of the output values of layer $i$, then for any $p \in G_{i}$, the following must hold:

\[ \widetilde{w}^*_i(Z) = \sum_{u, v \in \{0, 1\}^{s_{i+1}}} g^{(i)}(Z, u, v) \]

where

\[ g^{(i)}(Z, u, v) = \widetilde{add}^{(i)}(Z, u, v) (\widetilde{w}^*_{i+1}(u) + \widetilde{w}^*_{i+1}(v)) + \widetilde{mult}^{(i)}(Z, u, v) (\widetilde{w}^*_{i+1}(u) \cdot \widetilde{w}^*_{i+1}(v)) \]

This identity is a multivariate polynomial identity with variables $(u, v) \in F^{2s_{i+1}}$. The Prover and Verifier can verify this sum using the Multivariate Sumcheck Protocol.

4. Nested Structure of the Sumcheck Protocol

4.1 Constructing the Sumcheck Instance

Define the full variable set $X = (u, v) \in F^{2s_{i+1}}$. We aim to verify:

\[ \sum_{X \in \{0, 1\}^{2s_{i+1}}} g^{(i)}(Z, X) = \widetilde{w}_i(Z) \]

The Sumcheck protocol allows the Prover to sequentially submit polynomials $G_1, G_2, \dots, G_{2s_{i+1}}$, each representing partial sums with respect to remaining variables.The Verifier sends random challenges $r_j$ each round, updating the target partial evaluation until, in the last round, only a single-point check of $g^{(i)}(Z, r)$ remains.

4.2 Recursing to the Next Layer

After Sumcheck concludes, the Verifier obtains point evaluations to be checked:

\[ \widetilde{w}^*_{i+1}(u), \widetilde{w}^*_{i+1}(v) \]

These two values become the inputs for the next recursive verification step. The Verifier again selects a random challenge $Z' \in F^{s_{i'}}$ , forming the new identity:

\[ \widetilde{w}^*_{i+1}(Z') = \sum_{x, y \in \{0, 1\}^{s_{i+2}}} g^{(i+1)}(Z', x, y) \]

The Sumcheck process is repeated.

4.3 Termination of Recursion

When recursion reaches the bottom layer (input layer $n$), $\widetilde{w}_n(x)$ corresponds to the circuit input values, which are public or directly verifiable:

\[ \widetilde{w}_n(x) = Input(x) \]

The Verifier can check this identity directly, completing the entire verification process.

5. Fully Formalized Description of the Protocol

  • Circuit wiring polynomials $\widetilde{add}^{(i)}$, $\widetilde{mult}^{(i)}$;
  • Layer output extension functions $\widetilde{w}_i$;
  • Public input values $x \in F^n$;
  • Output value provided by the Prover $y = \widetilde{w}_0(0)$.

Output:

  • The Verifier accepts or rejects the Prover’s claim.

Interactive Procedure:

  1. The Verifier randomly chooses $Z \in F^{s_0}$;
  2. The Prover and Verifier run the Sumcheck protocol to verify:\[ \sum_{u, v \in \{0, 1\}^{s_1}} g^{(0)}(Z, u, v) = \widetilde{w}_0(Z) \]
  3. If the check passes, recurse to layer 1;
  4. Repeat until reaching the input layer;
  5. At the input layer, the Verifier directly checks input consistency.

6. Complexity and Security Analysis

7. Summary and Extensions

The GKR protocol recursively verifies inter-layer consistency using the multivariate Sumcheck, achieving efficient algebraic verification of arithmetic circuits. Its core features include:

  1. Layered algebraization Converting circuit Boolean wiring into multilinear polynomials.
  2. Sumcheck verification Interactively verifying polynomial identities layer by layer.
  3. Recursive reduction Each layer’s verification depends only on two point evaluations from the next layer, greatly reducing communication and computation.
  4. Verifiable base case At the input layer, the Verifier directly checks consistency between inputs and the claimed outputs.

This design makes the GKR protocol a fundamental algebraic component of modern zero-knowledge proof systems (such as Spartan, Halo, Nova, Lasso, Sumcheck-based zkVMs), widely applied in efficient circuit verification, scalable proof systems, and recursive proof constructions.

Subscribe to the ZKM Blog to stay updated with the latest research by ZKM.