Skip to content

avoid caching 1st round evaluations in sumcheck prover #1274

@kunxian-xia

Description

@kunxian-xia

After the 1st round of the sumcheck, we need to store $f_i(r_0, b_1, ..., b_{n-1})$ for all the MLEs involved in this sumcheck, but these MLEs are defined over the extension field, therefore the total memory for them is 2x (deg(E/F) * 1/2). If we still want to keep the original MLEs as well, then the peak memory will be 3x.

This is a big problem.

Instead, we can avoid storing the 1st round MLEs and only store the MLEs at 2nd round.

In our current sumcheck prover in which we have the evaluations of original MLEs $\{ f_i(\vec{b}): \vec{b} \in H_n \}$

  1. To get the univariate polynomial at 2nd round, we need to compute all $f_i(r_0, x, \vec{b})$ where $\vec{b} \in H_{n-2}$. The formula is $f_i(r_0, x, \vec{b}) = \textrm{dot\_product}([1-x,x], [f_i(r_0, 0, \vec{b}), f_i(r_0, 1, \vec{b}])$. If we don't store $f_i(r_0, 0, \vec{b})$ and $f_i(r_0, 1, \vec{b})$ then the new formula becomes
$$f_i(r_0, x, \vec{b}) = \begin{bmatrix} f_i(0,0,\vec{b}) & f_i(1,0,\vec{b}) \\ f_i(0,1,\vec{b}) & f_i(1,1,\vec{b}) \end{bmatrix} * \begin{bmatrix} 1-r_0 \\ r_0 \end{bmatrix} * \begin{bmatrix} 1-x \\ x\end{bmatrix}$$
  1. For each MLE, to get the evaluations after 2nd round, the formula is $$f_i(r_0, r_1, \vec{b}) = \begin{bmatrix} f_i(0,0,\vec{b}) & f_i(1,0,\vec{b}) \\ f_i(0,1,\vec{b}) & f_i(1,1,\vec{b}) \end{bmatrix} * \begin{bmatrix} 1-r_0 \\ r_0 \end{bmatrix} * \begin{bmatrix} 1-r_1 \\ r_1 \end{bmatrix}$$

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions