Assume a matrix with a fixed number of rows $2^n$ and $2^k$ columns. There are two ways to represent this matrix:
The main challenge arises in zkVM systems, where the final recursion depth (and hence the matrix height) is unknown at the beginning. Moreover, each column has a different number of non-zero entries.
The Jagged polynomial commitments scheme (PCS) tackles the core problem of how to commit and verify efficiently when column heights are irregular.
Jagged PCS adds constraints to transition from sparse to dense format, so that only valid (non-padding) values are used in verification.
We encode the sparse matrix as a function:
We focus on efficient representation under a bounded number of multiplications (i.e., number of non-zero entries).
To commit to a sparse matrix of size $2^n \times 2^k$.
To index sparse polynomials, we define $row(i), col(i)$:
We define the sparse function $q(i) = p(row(i), col(i))$, where:
Conversion between $p$ (sparse polynomial) and $q$ (dense polynomial):
Use the Multivariate Sumcheck Protocol to verify the consistency between the sparse polynomial $p$ and dense polynomial $q$.
\[ \hat{p}(Z_r, Z_c) = \sum_{x} \sum_{y} p(x,y) \cdot eq(x, Z_r) \cdot eq(y, Z_c) = \sum_{i \in [m]} q(i) \cdot eq(row(i), Z_r) \cdot eq(col(i), Z_c) \]
where $\hat{p}$ is the multilinear extension of $p$, and $eq$ is the corresponding Lagrange basis polynomial.
\[ \hat{p}(Z_r, Z_c) = \sum_{i \in [m]} q(i) \cdot eq(row(i), Z_r) \cdot eq(col(i), Z_c) \]
Construct as follows:
\[ \sum_{i \in \{0,1\}^m} f_c(Z_r, Z_c, i) \cdot q(i) =^? \hat{p}(Z_r, Z_c) \]
\[ f_c(Z_r, Z_c, i) = e_{c1}(Z_r, b_i) \cdot e_{c2}(Z_c, b_i) \]
where $b_i$ is the binary expansion of $i$, and $e_{c1}, e_{c2}$ are boolean selector polynomials:
These ensure that the value is 1 if and only if $row(i) = Z_r$ and $col(i) = Z_c$, and 0 otherwise.
\[ \tilde{f}(z) = \sum_{x \in \{0,1\}^n} f(x) \cdot \prod_{j=1}^n (z_j x_j + (1-z_j)(1-x_j)). \]
In the final step, we run sumcheck over $i \in \{0,1\}^m$.
This completes the consistency check between the jagged and dense polynomial commitments.
Subscribe to the ZKM Blog to stay updated with the latest research by ZKM.
Explore the docs: https://docs.zkm.io/
Start building: https://github.com/ProjectZKM/Ziren
Follow on X: https://x.com/ProjectZKM
Assume a matrix with a fixed number of rows $2^n$ and $2^k$ columns. There are two ways to represent this matrix:
The main challenge arises in zkVM systems, where the final recursion depth (and hence the matrix height) is unknown at the beginning. Moreover, each column has a different number of non-zero entries.
The Jagged polynomial commitments scheme (PCS) tackles the core problem of how to commit and verify efficiently when column heights are irregular.
Jagged PCS adds constraints to transition from sparse to dense format, so that only valid (non-padding) values are used in verification.
We encode the sparse matrix as a function:
We focus on efficient representation under a bounded number of multiplications (i.e., number of non-zero entries).
To commit to a sparse matrix of size $2^n \times 2^k$.
To index sparse polynomials, we define $row(i), col(i)$:
We define the sparse function $q(i) = p(row(i), col(i))$, where:
Conversion between $p$ (sparse polynomial) and $q$ (dense polynomial):
Use the Multivariate Sumcheck Protocol to verify the consistency between the sparse polynomial $p$ and dense polynomial $q$.
\[ \hat{p}(Z_r, Z_c) = \sum_{x} \sum_{y} p(x,y) \cdot eq(x, Z_r) \cdot eq(y, Z_c) = \sum_{i \in [m]} q(i) \cdot eq(row(i), Z_r) \cdot eq(col(i), Z_c) \]
where $\hat{p}$ is the multilinear extension of $p$, and $eq$ is the corresponding Lagrange basis polynomial.
\[ \hat{p}(Z_r, Z_c) = \sum_{i \in [m]} q(i) \cdot eq(row(i), Z_r) \cdot eq(col(i), Z_c) \]
Construct as follows:
\[ \sum_{i \in \{0,1\}^m} f_c(Z_r, Z_c, i) \cdot q(i) =^? \hat{p}(Z_r, Z_c) \]
\[ f_c(Z_r, Z_c, i) = e_{c1}(Z_r, b_i) \cdot e_{c2}(Z_c, b_i) \]
where $b_i$ is the binary expansion of $i$, and $e_{c1}, e_{c2}$ are boolean selector polynomials:
These ensure that the value is 1 if and only if $row(i) = Z_r$ and $col(i) = Z_c$, and 0 otherwise.
\[ \tilde{f}(z) = \sum_{x \in \{0,1\}^n} f(x) \cdot \prod_{j=1}^n (z_j x_j + (1-z_j)(1-x_j)). \]
In the final step, we run sumcheck over $i \in \{0,1\}^m$.
This completes the consistency check between the jagged and dense polynomial commitments.
Subscribe to the ZKM Blog to stay updated with the latest research by ZKM.
Explore the docs: https://docs.zkm.io/
Start building: https://github.com/ProjectZKM/Ziren
Follow on X: https://x.com/ProjectZKM