Multivariate polynomials, Multi-linear Extensions & Sumcheck, Binius.
A multivariate polynomial is a polynomial with more than one variable. For example, the polynomial
So far within the bootcamp we have worked with univariate polynomials, where we did interpolation with FFT and we made use of quotient polynomials by dividing some polynomial with a vanishing polynomial over some domain.
The degree of a multivariate polynomial is the highest sum of the exponents of the variables in any term of the polynomial. For example, the degree of the polynomial
Schwartz-Zippel lemma that we have made use of so far works here as well.
For a given function $f : S \to \mathbb{F}p$ we can obtain a multilinear extension $\tilde{f}$ such that for the given $(x_0, x_1, \ldots, x{n-1})$ we have:
where
We can think of this like interpolation we had done for univariate polynomials.
Multi-linear extension is unique, just like the univariate interpolations!
The set
We can talk about Lagrange basis polynomials in the multivariate case as well. Consider
where
Consider the Lagrange basis for 3-bit
$r$ inputs:
$L_0(x) = L_{000}(x_0, x_1, x_2) = (1-x_0)(1-x_1)(1-x_2)$ $L_1(x) = L_{001}(x_0, x_1, x_2) = x_0(1-x_1)(1-x_2)$ $L_2(x) = L_{010}(x_0, x_1, x_2) = (1-x_0)x_1(1-x_2)$ $L_3(x) = L_{011}(x_0, x_1, x_2) = x_0x_1(1-x_2)$ $L_4(x) = L_{100}(x_0, x_1, x_2) = (1-x_0)(1-x_1)x_2$ $L_5(x) = L_{101}(x_0, x_1, x_2) = x_0(1-x_1)x_2$ $L_6(x) = L_{110}(x_0, x_1, x_2) = (1-x_0)x_1x_2$ $L_7(x) = L_{111}(x_0, x_1, x_2) = x_0x_1x_2$
In the multivariate case, we do not make use of FFT; we instead use a clever algorithm around the Lagrange basis construction.
See the "Proofs, Arguments, and Zero-Knowledge" book by Justin Thaler to see the efficient method, chapters 3 & 4.
We can evaluate the multilinear extension at a random point
Sum-check protocol is an important protocol in the context of MLE-based proof systems. It is efficient, and has low communication costs. Consider a
We want to reduce the amount of work that the verifier has to do to check this result. In the naive version, the verifier would have to check
We will describe the interactive one, but one can use Fiat-Shamir to make this non-interactive.
-
The prover sends the verifier the value
$c_1$ which is claimed to be equal to$H$ . -
The prover sends
$g_1(x_1)$ (a univariate polynomial of degree less than$d$ ) which is claimed to equal to:
Basically, the sum is taken over all values except the first one.
The verifier checks that
Verifier can check the degree by checking the number of coefficients, since the polynomial is sent in clear.
- Verifier chooses random
$r_1$ and sends it to the prover. We must now make sure that$g_1(r_1)$ is the correct value.
Well, the expression above is just like the sum-check protocol, but instead of
- The prover sends
$g_2(x_2)$ which is claimed to equal:
The verifier checks that
- Verifier chooses random
$r_2$ and sends it to the prover. We must now make sure that$g_2(r_2)$ is the correct value.
and so on...
Towards the end, the prover sends
At the final step, verifier picks random
and if this is true, it accepts. This final evaluation over
There is also something called the Zero-Check Protocol.
-
HyperPlonk adapts the Plonk protocol to multivariate polynomials.
-
Spartan is a proof system based on R1CS.
-
Brakedown is a polynomial commitment scheme based on multivariate polynomials.
-
Binius is a really efficient proof system.
- Semiotic AI blog post
- Matteo notes
- 0xSage SumCheck implementation
- Punwai SumCheck implementation
- Ingonyama SumCheck implementation
- Arkworks SumCheck implementation
- Proofs, Arguments, and Zero-Knowledge by Justin Thaler Chapters 3 & 4
Binius is a modified Brakedown-type commitment. We will not go into details of Binius, but instead we will describe Brakedown and Binary Fields.
Brakedown is a hash-based commitment scheme, which we will now go over. Lets consider a polynomial
This actually translates to a "vector * matrix * vector" multiplication:
such that:
Now, a similar idea applies to multilinear extension as well. Recall that Lagrange basis are given by:
Here the circled
$$ \tilde{f}(r) = [ \textcircled{x}{i=l_1}^n(1-r_i, r_i)]^t \cdot M \cdot \textcircled{x}{i=0}^{l_1-1}(1-r_i, r_i) $$
What we have to do is that we must organize the coefficients within the MLE
$$ M = \begin{bmatrix} \text{row}_0 \ \text{row}1 \ \ldots \ \text{row}{n-l_1} \ \end{bmatrix} $$
Create a new matrix
$$ U = \begin{bmatrix} \text{Enc}(\text{row}_0) \ \text{Enc}(\text{row}1) \ \ldots \ \text{Enc}(\text{row}{n-l_1}) \ \end{bmatrix} $$
Then, we create a Merkle tree using the columns of
Prover wants to show that
whic is simply a linear combination of the rows of
- The verifier can check the evaluation by completing the rest of the operation using the right hand-side tensor product.
Doing this requires around
- Verifier then checks the encoding of
$L$ :
Instead of checking the entire encoding, we can do this statistically via columns:
$$ \text{Column}(\text{Enc}(L))k = [ \textcircled{x}{i=l_1}^n(1-r_i, r_i)]^t \cdot \text{Column}(U)_k $$
Prover responds with the required Columns and their authentication paths from the Merkle tree to answer the Verifier's queries during this step.
Verificaiton time & proof size are both
When Reed-Solomon encoding is used within Brakedown, we call that Shockwave.
Binius is achieved by using Brakedown over Binary Fields. A binary field is a field with characteristic 2, and is denoted by
The simplest binary field is
We would like to have irreducible polynomials of a given degree to create extension fields. For example, to create a quadratic extension we need an irreducible polynomial of degree 2. The polynomial
Since we are working with "bit" coefficients, it is often useful to represent the polynomials as binary numbers. For example, the polynomial
- Even in this notation, addition can be shown using XOR.
- However, multiplication is not that straightforward because the degree may change. One can build a multiplication table as a precomputed table to do this efficiently.
How can we go to higher extensions? There are two methods:
-
Direct Extension: Simply find a polynomial of higher degree that is irreducible.
For example,
$\mathbb{F}_2[x] / (1 + x + x^3 + x^4 + x^8)$ is a degree-8 extension used within AES, and coefficients are 0 and 1 only. -
Towers of Extension: Find an irreducible polynomial within your extension field, and extend over that, again and again.
- Start with $\mathbb{F}2 \to \mathbb{F}{2^2} = \mathbb{F}_2[x_0] / (1 +x_0 + x_0^2)$ with some degree-2 polynomial in the binary field.
- Then, extend to $\mathbb{F}{2^2} \to \mathbb{F}{2^4} = \mathbb{F}_{2^2}[x_1] / (1 + x_1x_0 + x_1^2)$ with some degree-2 polynomial in the previous extended field.
- Then, extend to $\mathbb{F}{2^4} \to \mathbb{F}{2^8} = \mathbb{F}_{2^4}[x_2] / (1 + x_2x_1 + x_2^2)$ with some degree-2 polynomial in the previous extended field.
- and so on...
Notice that an element in
and these look much similar to multilinear extensions we have been talking about.