Skip to content

Exponentiating Multilinears

Using GKR to multiply "twisted" multilinears

In this page, we explain a generic mathematical technique that exponentiates a variable base by a variable exponent pointwise on the cube. That is, we explain how to algebraically relate the multilinear extension of this exponentiation to the multilinear extensions of the base and the exponent. This protocol is the technical core of our multiplication protocol. In the next page, we apply this protocol to our situation.

We fix an mul\ell_\text{mul}-variate multilinear V~(X)\widetilde{V}(X) with values in F2128\mathbb{F}_{2^{128}}, and an F2\mathbb{F}_2-valued, oblong-multilinear exponent function z^(I^,X0,,Xmul1)\widehat{z}(\widehat{I}, X_0, \ldots , X_{\ell_\text{mul} - 1}). As a notational device, we write zi(x)z^(i^,x)z_i(x) \coloneqq \widehat{z}(\widehat{i}, x) for each i{0,,63}i \in \{0, \ldots , 63\} and each xBmulx \in \mathcal{B}_{\ell_\text{mul}}. For each xBmulx \in \mathcal{B}_{\ell_\text{mul}}, we define z[x]{0,,2641}z[x] \in \{0, \ldots , 2^{64} - 1\} by combining z^(I^,x)\widehat{z}(\widehat{I}, x)'s bits on DD:

z[x]i=0632iz^(i^,x).\begin{equation*}z[x] \coloneqq \sum_{i = 0}^{63} 2^i \cdot \widehat{z}(\widehat{i}, x).\end{equation*}

When zz is a constraint array and z^(I^,X0,,Xmul1)\widehat{z}(\widehat{I}, X_0, \ldots , X_{\ell_\text{mul} - 1}) its oblong-multilinearization, this condition indeed holds.

We define the exponentiated multilinear W~(X0,,Xmul1)\widetilde{W}(X_0, \ldots , X_{\ell_\text{mul} - 1}) by specifying its values on the cube. For each xBmulx \in \mathcal{B}_{\ell_\text{mul}}, we set:

W(x)V~(x)z[x].\begin{equation*}W(x) \coloneqq \widetilde{V}(x)^{z[x]}.\end{equation*}

In this page, our goal will be to efficiently reduce an evaluation claim on W~(X)\widetilde{W}(X) to evaluation claims on V~(X)\widetilde{V}(X) and z^(I^,X)\widehat{z}(\widehat{I}, X). This problem is tricky, since W~(X)\widetilde{W}(X) doesn't depend algebraically on V~(X)\widetilde{V}(X) and z^(I^,X)\widehat{z}(\widehat{I}, X) (the exponentiation operation is not algebraic).

The Product Decomposition

We first express W~(X)\widetilde{W}(X) pointwise on the cube as a product of 64 individual multilinears. Indeed, for each xBmulx \in \mathcal{B}_{\ell_\text{mul}},

W(x)=V~(x)z[x]=V~(x)i=0632izi(x)=i=063(V~(x)2i)zi(x).\begin{equation*}W(x) = \widetilde{V}(x)^{z[x]} = \widetilde{V}(x)^{\sum_{i = 0}^{63} 2^i \cdot z_i(x)} = \prod_{i = 0}^{63} \left( \widetilde{V}(x)^{2^i} \right)^{z_i(x)}.\end{equation*}

We thus define

Wi(x)(V~(x)2i)zi(x)\begin{equation*}W_i(x) \coloneqq \left( \widetilde{V}(x)^{2^i} \right)^{z_i(x)}\end{equation*}

for each i{0,,63}i \in \{0, \ldots , 63\}, and let Wi~(X)\widetilde{W_i}(X) be its multilinear extension.

Our treatment from this point onwards has two phases. First, we reduce an evaluation claim on W~(X)\widetilde{W}(X) to evaluation claims on the individual multilinears Wi~(X)\widetilde{W_i}(X). After that, we reduce claims on the Wi~(X)\widetilde{W_i}(X) to claims on V~(X)\widetilde{V}(X) and z^(I^,X)\widehat{z}(\widehat{I}, X).

The GKR Step

To reduce a claim on W~(X)\widetilde{W}(X) to claims on the Wi~(X)\widetilde{W_i}(X), the parties could directly multilinearize the expression for W(x)W(x) above and run a sumcheck. The resulting sumcheck would be of a multilinear of individual degree 64 (excluding the equality indicator), which is very large.

Instead, we use GKR. We array the 64 multilinears Wi~(X)\widetilde{W_i}(X), for i{0,,63}i \in \{0, \ldots , 63\}, into the leaves of a balanced binary tree of height 6. Each internal node is defined to be the product of its children, pointwise on the cube.

Notationally, we index the layers as k{0,,6}k \in \{0, \ldots , 6\}. In the leaf layer k=6k = 6, for each i{0,,63}i \in \{0, \ldots , 63\}, we let

Wi(6)~(X)Wi~(X).\begin{equation*}\widetilde{W^{(6)}_i}(X) \coloneqq \widetilde{W_i}(X).\end{equation*}

For each intermediate layer k{0,,5}k \in \{0, \ldots , 5\} and each i{0,,2k1}i \in \{0, \ldots , 2^k - 1\}, we let

Wi(k)~(X)xBmuleq~(X,x)W2i(k+1)~(X)W2i+1(k+1)~(X).\begin{equation*}\widetilde{W^{(k)}_i}(X) \coloneqq \sum_{x \in \mathcal{B}_{\ell_\text{mul}}} \widetilde{\texttt{eq}}(X, x) \cdot \widetilde{W^{(k + 1)}_{2i}}(X) \cdot \widetilde{W^{(k + 1)}_{2i + 1}}(X).\end{equation*}

We claim that our original multilinear W~(X)\widetilde{W}(X) and the resulting root multilinear W0(0)~(X)\widetilde{W^{(0)}_0}(X) are identical, as multilinears. Indeed, it's enough to note that, for each k{0,,5}k \in \{0, \ldots , 5\}, each i{0,,2k1}i \in \{0, \ldots , 2^k - 1\}, and each xBmulx \in \mathcal{B}_{\ell_\text{mul}}, Wi(k)~(x)=W2i(k+1)~(x)W2i+1(k+1)~(x)\widetilde{W^{(k)}_i}(x) = \widetilde{W^{(k + 1)}_{2i}}(x) \cdot \widetilde{W^{(k + 1)}_{2i + 1}}(x), and use induction.

We fix an initial evaluation claim W~(r(0))=?s0(0)\widetilde{W}(r^{(0)}) \stackrel{?}= s^{(0)}_0. To assess it, the parties can run the following GKR loop:

  • for each tree layer k{0,,5}k \in \{0, \ldots , 5\} do:
    • for each i{0,,2k1}i \in \{0, \ldots , 2^k - 1\} do: verifier samples βi(k)F2128\beta^{(k)}_i \gets \mathbb{F}_{2^{128}}, and sends it to the prover.
    • the parties run a batched sumcheck on the claim: i=02k1βi(k)si(k)=?i=02k1βi(k)Wj(k)~(r(k))=i=02k1βi(k)[xBmuleq~(r(k),x)W2i(k+1)~(x)W2i+1(k+1)~(x)]=xBmuleq~(r(k),x)[i=02k1βi(k)W2i(k+1)~(x)W2i+1(k+1)~(x)],\begin{align*} \sum_{i = 0}^{2^k - 1} \beta^{(k)}_i \cdot s^{(k)}_i &\stackrel{?}= \sum_{i = 0}^{2^k - 1} \beta^{(k)}_i \cdot \widetilde{W^{(k)}_j}(r^{(k)}) \\ &= \sum_{i = 0}^{2^k - 1} \beta^{(k)}_i \cdot \left[ \sum_{x \in \mathcal{B}_{\ell_\text{mul}}} \widetilde{\texttt{eq}}(r^{(k)}, x) \cdot \widetilde{W^{(k + 1)}_{2i}}(x) \cdot \widetilde{W^{(k + 1)}_{2i + 1}}(x) \right] \\ &= \sum_{x \in \mathcal{B}_{\ell_\text{mul}}} \widetilde{\texttt{eq}}(r^{(k)}, x) \cdot \left[ \sum_{i = 0}^{2^k - 1} \beta^{(k)}_i \cdot \widetilde{W^{(k + 1)}_{2i}}(x) \cdot \widetilde{W^{(k + 1)}_{2i + 1}}(x) \right], \end{align*} which pertains to a composition of multilinears of degree just 2 (excluding the equality indicator).
    • in this way, after mul\ell_\text{mul} rounds, reduce the claim above to the further claim: send(i)=?eq~(r(k),r(k+1))[i=02k1βi(k)W2i(k+1)~(r(k+1))W2i+1(k+1)~(r(k+1))],\begin{equation*}s^{(i)}_\text{end} \stackrel{?}= \widetilde{\texttt{eq}}(r^{(k)}, r^{(k + 1)}) \cdot \left[ \sum_{i = 0}^{2^k - 1} \beta^{(k)}_i \cdot \widetilde{W^{(k + 1)}_{2i}}(r^{(k + 1)}) \cdot \widetilde{W^{(k + 1)}_{2i + 1}}(r^{(k + 1)}) \right],\end{equation*} where r(k+1)r^{(k + 1)} is a further mul\ell_\text{mul}-dimensional challenge sampled during the sumcheck.
    • for each i{0,,2k+11}i \in \{0, \ldots, 2^{k + 1} - 1\} do: the prover sends the claimed evaluation si(k+1)=Wi(k+1)~(r(k+1))s^{(k + 1)}_i = \widetilde{W^{(k + 1)}_i}(r^{(k + 1)}).
    • using the prover's claims si(k+1)s^{(k + 1)}_i, the verifier explicitly checks the equation just above.
  • output the reduced evaluation point r(6)r^{(6)} and the reduced claims si(6)s^{(6)}_i, for i{0,,63}i \in \{0, \ldots , 63\}.

The security analysis of this protocol is just standard GKR and batched sumcheck. The invariant of the loop is that, as of the beginning of each iteration k{0,,5}k \in \{0, \ldots , 5\}, we have reduced the initial evaluation claim to the list of 2k2^k individual evaluation claims Wi(k)~(r(k))=?si(k)\widetilde{W^{(k)}_i}(r^{(k)}) \stackrel{?}= s^{(k)}_i, for i{0,,2k1}i \in \{0, \ldots , 2^k - 1\}. By the usual batched sumcheck, the validity of these claims, individually, is implied—up to soundness error 2k2128\frac{2^k}{2^{128}}—by the validity of the sum claim that the parties check. The sumcheck's soundness analysis reduces this claim in turn, with soundness error just 2mul2128\frac{2 \cdot \ell_\text{mul}}{2^{128}}, to the validity of the prover's claimed evaluations Wi(k+1)~(r(k+1))=?si(k+1)\widetilde{W^{(k + 1)}_i}(r^{(k + 1)}) \stackrel{?}= s^{(k + 1)}_i, for i{0,,2k+11}i \in \{0, \ldots , 2^{k + 1} - 1\}. This proves the security of the reduction.

The Frobenius Step

We now reduce the individual evaluation claims Wi~(r(6))=?si(6)\widetilde{W_i}(r^{(6)}) \stackrel{?}= s^{(6)}_i, for i{0,,63}i \in \{0, \ldots, 63\}, to a single claim on both V~(X)\widetilde{V}(X) and z^(I^,X)\widehat{z}(\widehat{I}, X). For notation, we rename rxr(6)r_x \coloneqq r^{(6)}.

By definition, we have

Wi(x)(V~(x)2i)zi(x)\begin{equation*}W_i(x) \coloneqq \left( \widetilde{V}(x)^{2^i} \right)^{z_i(x)}\end{equation*}

on each cube point xBmulx \in \mathcal{B}_{\ell_\text{mul}}. Since each zi(x)z_i(x) is either 00 or 11, each (V~(x)2i)zi(x)\left( \widetilde{V}(x)^{2^i}\right)^{z_i(x)} is either 11 or V~(x)2i\widetilde{V}(x)^{2^i}, and we just need to select between those two. We thus get the equivalent expression:

Wi(x)=1+zi(x)(V~(x)2i1)\begin{equation*}W_i(x) = 1 + z_i(x) \cdot \left( \widetilde{V}(x)^{2^i} - 1 \right)\end{equation*}

for each xBmulx \in \mathcal{B}_{\ell_\text{mul}}. Taking the multilinear extension, we get in turn:

Wi~(X)=xBmuleq~(X,x)(1+zi(x)(V~(x)2i1)).\begin{equation*}\widetilde{W_i}(X) = \sum_{x \in \mathcal{B}_{\ell_\text{mul}}} \widetilde{\texttt{eq}}(X, x) \cdot \left( 1 + z_i(x) \cdot \left( \widetilde{V}(x)^{2^i} - 1 \right) \right).\end{equation*}

Our claims thus take the form

si(6)=?xBmuleq~(rx,x)(1+zi(x)(V~(x)2i1)),\begin{equation*}s^{(6)}_i \stackrel{?}= \sum_{x \in \mathcal{B}_{\ell_\text{mul}}} \widetilde{\texttt{eq}}(r_x, x) \cdot \left( 1 + z_i(x) \cdot \left( \widetilde{V}(x)^{2^i} - 1 \right) \right),\end{equation*}

for i{0,,63}i \in \{0, \ldots , 63\}.

We could again in theory run sumcheck here, since the right-hand expression above is fully algebraic in V~(X)\widetilde{V}(X) and z^(I^,X)\widehat{z}(\widehat{I}, X). On the other hand, the relevant multivariate would be of enormous degree: on the order of 2i2^i. Instead, we use a trick, based on the Frobenius endomorphism φ\varphi.

Indeed, for each i{0,,63}i \in \{0, \ldots , 63\}, applying φi\varphi^{-i} to both sides of the above equality, we get the equivalent claim:

φi(si(6))=?xBmuleq~(φi(rx),x)(1+zi(x)(V~(x)1)).\begin{equation*}\varphi^{-i}\left( s^{(6)}_i \right) \stackrel{?}= \sum_{x \in \mathcal{B}_{\ell_\text{mul}}} \widetilde{\texttt{eq}}\left(\varphi^{-i} \left( r_x \right), x \right) \cdot \left( 1 + z_i(x) \cdot \left( \widetilde{V}(x) - 1 \right) \right).\end{equation*}

Indeed, first off, the Frobenius is invertible, so φi\varphi^{-i} makes sense. Second, φi\varphi^{-i} is a ring homomorphism, so we can distribute it over all sums and products. Since eq~\widetilde{\texttt{eq}} is defined over F2\mathbb{F}_2, φi(eq~(rx,x))=eq~(φi(rx),x)\varphi^{-i}\left( \widetilde{\texttt{eq}}(r_x, x) \right) = \widetilde{\texttt{eq}}\left(\varphi^{-i} \left( r_x \right), x \right). Finally, φi\varphi^{-i} has no effect on 11 or zi(x)z_i(x), since it fixes F2\mathbb{F}_2, and it exactly "undoes" the 2i2^ith power attached to V~(x)\widetilde{V}(x), since V(x)2i=φi(V(x))V(x)^{2^i} = \varphi^i\left( V(x) \right).

We thus now have 64 evaluation claims about low-degree multivariates. We can now apply the usual batch sumcheck to these. The verifier samples and sends to the prover 64 random scalars γi\gamma_i, for i{0,,63}i \in \{0, \ldots , 63\}; the parties then sumcheck the claim:

i=063γiφi(si(6))=?i=063γi[xBmuleq~(φi(rx),x)(1+zi(x)(V~(x)1))]=xBmul[i=063γieq~(φi(rx),x)(1+zi(x)(V~(x)1))].\begin{align*} \sum_{i = 0}^{63} \gamma_i \cdot \varphi^{-i}\left( s^{(6)}_i \right) &\stackrel{?}= \sum_{i = 0}^{63} \gamma_i \cdot \left[ \sum_{x \in \mathcal{B}_{\ell_\text{mul}}} \widetilde{\texttt{eq}}\left(\varphi^{-i} \left( r_x \right), x \right) \cdot \left( 1 + z_i(x) \cdot \left( \widetilde{V}(x) - 1 \right) \right) \right] \\ &= \sum_{x \in \mathcal{B}_{\ell_\text{mul}}} \left[ \sum_{i = 0}^{63} \gamma_i \cdot \widetilde{\texttt{eq}}\left(\varphi^{-i} \left( r_x \right), x \right) \cdot \left( 1 + z_i(x) \cdot \left( \widetilde{V}(x) - 1 \right) \right) \right]. \end{align*}

In this way, they can further reduce all 64 claims to a further claim of the form

send=?i=063γieq~(φi(rx),rx)(1+zi(rx)(V~(rx)1)),\begin{equation*}s_\text{end} \stackrel{?}= \sum_{i = 0}^{63} \gamma_i \cdot \widetilde{\texttt{eq}}\left(\varphi^{-i} \left( r_x \right), r'_x \right) \cdot \left( 1 + z_i(r'_x) \cdot \left( \widetilde{V}(r'_x) - 1 \right) \right),\end{equation*}

for some challenge rxr'_x sampled during the sumcheck. The verifier can evaluate each quantity eq~(φi(rx),rx)\widetilde{\texttt{eq}}\left(\varphi^{-i} \left( r_x \right), r'_x \right) himself. As a practical matter, we note that φi=φ128i\varphi^{-i} = \varphi^{128 - i}—since the order of φ\varphi as an operator is 128—so the verifier can always evaluate φi\varphi^{-i} using a few squarings. As for the rest, the prover can nondeterministically send evaluation claims αV=?V~(rx)\alpha_V \stackrel{?}= \widetilde{V}(r'_x) and αz,i=?zi(rx)\alpha_{z, i} \stackrel{?}= z_i(r'_x) for each i{0,,63}i \in \{0, \ldots , 63\}, say. Pending the correctness of these, the verifier can close out the above sumcheck.

Oblong-Multilinearizing

We've reduced everything to claims on V~(X)\widetilde{V}(X) and on all 64 polynomials zi(X)=z^(i^,X)z_i(X) = \widehat{z}(\widehat{i}, X). On the other hand, our goal was to reduce everything to a single claim on the oblong-multilinear z^(I^,X)\widehat{z}(\widehat{I}, X). To do this, the verifier samples a random scalar ri^F2128r_{\widehat{i}} \gets \mathbb{F}_{2^{128}}, and outputs the single reduced evaluation claim

i=063αz,iδD(ri^,i^)=?z^(ri^,rx).\begin{equation*}\sum_{i = 0}^{63} \alpha_{z, i} \cdot \delta_D(r_{\widehat{i}}, \widehat{i}) \stackrel{?}= \widehat{z}(r_{\widehat{i}}, r'_x).\end{equation*}

I.e., it outputs the claim αz=?z^(ri^,rx)\alpha_z \stackrel{?}= \widehat{z}(r_{\widehat{i}}, r'_x), where αzi=063αz,iδD(ri^,i^)\alpha_z \coloneqq \sum_{i = 0}^{63} \alpha_{z, i} \cdot \delta_D(r_{\widehat{i}}, \widehat{i}).

To see why this is correct, we note that the equality of degree-63, univariate polynomials

z^(I^,rx)=i=063δD(I^,i^)z^(i^,rx)\begin{equation*}\widehat{z}(\widehat{I}, r'_x) = \sum_{i = 0}^{63} \delta_D(\widehat{I}, \widehat{i}) \cdot \widehat{z}(\widehat{i}, r'_x)\end{equation*}

holds, since z^(I^,X)\widehat{z}(\widehat{I}, X) is oblong-multilinear. Specializing both sides to ri^r_{\widehat{i}}, we get the correctness of this step. Conversely, if αz,iz^(i^,rx)\alpha_{z, i^*} \neq \widehat{z}(\widehat{i}^*, r'_x) holds for some i{0,,63}i^* \in \{0, \ldots , 63\}, then the degree-63 univariate polynomials

P(I^)i=063αz,iδD(I^,i^)\begin{equation*}P(\widehat{I}) \coloneqq \sum_{i = 0}^{63} \alpha_{z, i} \cdot \delta_D(\widehat{I}, \widehat{i})\end{equation*}

and z^(I^,rx)\widehat{z}(\widehat{I}, r'_x) are unequal, as univariate polynomials, since they differ at i^D\widehat{i}^* \in D. The chance, over the verifier's challenge ri^F2128r_{\widehat{i}} \gets \mathbb{F}_{2^{128}}, that P(ri^)=z^(ri^,rx)P(r_{\widehat{i}}) = \widehat{z}(r_{\widehat{i}}, r'_x) is thus at most 642128\frac{64}{2^{128}}. If this doesn't happen, then we get

αz=i=063αz,iδD(ri^,i^)=P(ri^)z^(ri^,rx),\begin{equation*}\alpha_z = \sum_{i = 0}^{63} \alpha_{z, i} \cdot \delta_D(r_{\widehat{i}}, \widehat{i}) = P(r_{\widehat{i}}) \neq \widehat{z}(r_{\widehat{i}}, r'_x),\end{equation*}

so the reduction is sound.