Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
\createprocedureblock

procbcenter,boxedcodesize=,width=

Artemis: Efficient Commit-and-Prove SNARKs for zkML

Hidde Lycklama1*, Alexander Viand2*, Nikolay Avramov1, Nicolas Küchler1, Anwar Hithnawi3

1ETH Zurich  2Intel Labs  3University of Toronto
Abstract

The widespread adoption of machine learning (ML) in various critical applications, from healthcare to autonomous systems, has raised significant concerns about privacy, accountability, and trustworthiness. To address these concerns, recent research has focused on developing zero-knowledge machine learning (zkML) techniques that enable the verification of various aspects of ML models without revealing sensitive information. Recent advances in zkML have substantially improved efficiency; however, these efforts have primarily optimized the process of proving ML computations correct, often overlooking the substantial overhead associated with verifying the necessary commitments to the model and data. To address this gap, this paper introduces two new Commit-and-Prove SNARK (CP-SNARK) constructions (Apollo and Artemis) that effectively address the emerging challenge of commitment verification in zkML pipelines. Apollo operates on KZG commitments and requires white-box use of the underlying proof system, whereas Artemis is compatible with any homomorphic polynomial commitment and only makes black-box use of the proof system. As a result, Artemis is compatible with state-of-the-art proof systems without trusted setup. We present the first implementation of these CP-SNARKs, evaluate their performance on a diverse set of ML models, and show substantial improvements over existing methods, achieving significant reductions in prover costs and maintaining efficiency even for large-scale models. For example, for the VGG model, we reduce the overhead associated with commitment checks from 11.5x to 1.2x. Our results suggest that these contributions can move zkML towards practical deployment, particularly in scenarios involving large and complex ML models.

footnotetext: * These authors contributed equally to this work.

Introduction

In recent years, the use of machine learning (ML) has become increasingly pervasive, with applications ranging from personalized recommendations and healthcare diagnostics to conversational agents like ChatGPT and autonomous vehicles. As ML transitions from an academic tool to a widely used technology with real-world impacts, concerns about privacy, accountability, and trustworthiness are mounting. In response, there has been a push to regulate AI, including efforts by governments to ensure these technologies are deployed responsibly and ethically [3, 26, 33]. At the same time, the research community has increasingly recognized that ensuring the integrity and correctness of ML models is crucial for maintaining trust in these systems, especially in high-stakes domains. This, in turn, has driven a wide range of research focused on developing transparent, verifiable, and auditable machine learning methods, targeting various stages of model development and deployment [38, 31, 41, 12, 32].

Much of the ML verification and auditing research assumes access to models and their underlying data. However, this assumption is often infeasible, particularly in contexts involving sensitive data or where organizations are unwilling to share models for competitive reasons. To address this, some recent efforts have focused on leveraging cryptographic techniques to verify various properties of ML models without requiring direct access to data or models, thereby preserving the privacy needed in these applications. Specifically, many of these efforts leverage zero-knowledge proofs (ZKPs) to verify various aspects of the data and/or the model, also known as “zkML” [27, 10, 30, 29, 46]. Applying Zero-Knowledge proofs to ML can present significant challenges due to the scalability issues inherent in ML. However, recent advances in zkML have greatly improved its efficiency and scalability, with the most efficient approaches today leveraging advanced lookup features in modern proof systems to optimize the proving process. In particular, zkML systems based on Halo2-style proof systems have demonstrated significant performance gains, allowing for large-scale, trustless deep learning inference with minimal overhead [27, 10].

Due to their zero-knowledge nature, zkML proofs do not disclose the specifics of the model used in an inference, thereby preserving intellectual property and privacy. However, this also means that such a proof of inference only verifies the correct execution of a machine learning model without providing information about the model’s identity. A proof of that is, by itself, not generally useful in practice, as it does not ensure the computation was performed using the intended model or that the model itself was not tampered with or replaced. Therefore, linking the proof to a specific model for which certain guarantees have been established – such as being trained under specific conditions or fulfilling particular attributes – is crucial. In practice, this link is established through cryptographic commitments to the model and, as part of the ZKP, demonstrating that the model in the zkML proof indeed corresponds to the model that was committed to.

To date, the vast majority of research in zkML has focused primarily on enhancing the efficiency of proving ML computations while largely neglecting the overhead associated with ensuring the consistency between the model and the model commitment [27]. However, as zkML methods continue improving, the overhead associated with model commitments is becoming a significant bottleneck. Recent studies have observed that commitment-related operations can account for a substantial portion of the total overhead in inference pipelines [27, 16]. In fact, as we show in this work, for larger models, existing approaches to commitment consistency checks for zkML [4, 27, 16, 45] can dominate the overall verification time with, for some models, more than 90% of the prover’s time spent on these checks rather than on ML computations.

Commit-and-Prove SNARKs. The need to efficiently verify that a part of a witness in a ZKP matches a value that was committed to earlier arises in many contexts beyond zkML. Similar patterns occur in applications such as anonymous credential systems, e-voting schemes, verifiable encryption protocols, and decentralized auditing systems [1]. Campanelli et al. [9] formalize this as Commit-and-Prove SNARKs (CP-SNARKs), i.e., a Succinct Non-Interactive Argument of Knowledge (SNARK) that can also show that (a part of) the witness is consistent with an external commitment. For certain types of ZKPs, such as Sigma Protocols and Bulletproofs [6], expressing statements about values contained in commitments is an inherent part of the protocol. As a result, these SNARKs either directly fulfill the Commit-and-Prove SNARK (CP-SNARK) definition or can be trivially adapted to fulfill it [11, 6]. However, for most generic SNARKs, an explicit construction is required [9, 7, 1]. This can either take the form of re-computing a commitment inside the SNARK (as is done in current zkML works that consider commitments), or it can take the form of an extension to the underlying proof system (as is the case in the LegoSNARK [9] line of work).

Contributions. In this paper, we present a new approach for constructing efficient Commit-and-Prove SNARKs that incorporates minimal computation within the SNARK and extends the underlying proof system in a highly efficient manner. More concretely, this paper presents the following contributions:

  1. 1.

    We introduce Apollo, a new Commit-and-Prove SNARK that extends the LegoSNARK-style techniques initially proposed in Lunar [8, 7]. Apollo simplifies the construction process by minimally adapting the arithmetization of the witness within the SNARK. This optimized approach allows Apollo to achieve 7.3x improvements in prover time over Lunar. However, Apollo inherits the trusted setup requirement from Lunar [7].

  2. 2.

    We also propose Artemis, a new Commit-and-Prove SNARK, which only makes black-box use of the underlying SNARK and supports any homomorphic polynomial commitment. As a result, it supports modern state-of-the-art proof systems without trusted setup, such as Halo2 with IPA-based commitments [17].

  3. 3.

    We provide the first implementation of Lunar’s CP-SNARK, along with our implementations of the Apollo and Artemis constructions, all of which are made publicly available as open-source software111 https://github.com/pps-lab/artemis .

  4. 4.

    We evaluate Apollo and Artemis on a diverse set of ML models, including GPT-2 [35], utilizing state-of-the-art zkML techniques for proving the correctness of ML computations [10]. Our evaluation shows that Apollo and Artemis dramatically outperform existing approaches, improving upon the state of the art by an order of magnitude. In addition, we show that Artemis without trusted setup achieves effectively the same performance as Apollo (and Artemis) with trusted setup.

Background

We begin by defining the two core building blocks of our work, namely Polynomial Commitments and (Commit-and-Prove) SNARKs. We then outline the Plonkish Arithmetization framework, which underpins the proof systems used in state-of-the-art zkML. These details will be relevant to understanding how we efficiently instantiate our construction for, e.g., the Halo2 proof system [17]. Due to space constraints, we refer to Appendix A for additional definitions.

Notation. We use the standard notation for bitstrings {0,1}superscript01\{0,1\}^{*}{ 0 , 1 } start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT, groups (hhitalic_h generates 𝔾𝔾\mathbb{G}blackboard_G) and fields 𝔽psubscript𝔽𝑝\mathbb{F}_{p}blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT with order p𝑝pitalic_p. We use bracket notation to denote ranges, e.g., [n]={1,,n}delimited-[]𝑛1𝑛[n]=\{1,\ldots,n\}[ italic_n ] = { 1 , … , italic_n }, and symbols representing polynomials are displayed in bold. We define a language \mathcal{L}caligraphic_L as a subset of {0,1}superscript01\{0,1\}^{*}{ 0 , 1 } start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT and a relation \mathcal{R}caligraphic_R as a subset of {0,1}×{0,1}superscript01superscript01\{0,1\}^{*}\times\{0,1\}^{*}{ 0 , 1 } start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT × { 0 , 1 } start_POSTSUPERSCRIPT ∗ end_POSTSUPERSCRIPT. The asymptotic security notions in this section are all quantified over λ𝜆\lambdaitalic_λ-compatible relations λsubscript𝜆\mathcal{R}_{\lambda}caligraphic_R start_POSTSUBSCRIPT italic_λ end_POSTSUBSCRIPT and we therefore use the simplified notation \mathcal{R}caligraphic_R instead.

Polynomial Commitments

Definition 2.1 (Polynomial Commitments [28]).

Polynomial commitments allow a prover to commit to a polynomial while retaining the ability to later reveal the polynomial’s value at any specific point, along with a proof that the revealed value is indeed correct. These commitments are an important building block for constructing succinct proofs. A polynomial commitment scheme consists of a triple (PC.Setup, PC.Commit, PC.Eval), where:

  • PC.Setup(d)\key[ck]PC.Setup𝑑\keydelimited-[]𝑐𝑘\textsf{{PC}.Setup}(d)\rightarrow\key[ck]PC.Setup ( italic_d ) → [ italic_c italic_k ]: prepares the public parameters given the maximum supported degree of polynomials d𝑑ditalic_d and outputs a common reference string pp.

  • PC.Commit(\key[ck],𝐠,r)cPC.Commit\keydelimited-[]𝑐𝑘𝐠𝑟𝑐\textsf{{PC}.Commit}(\key[ck],\mathbf{g},r)\rightarrow cPC.Commit ( [ italic_c italic_k ] , bold_g , italic_r ) → italic_c: computes a commitment c𝑐citalic_c to a polynomial 𝐠𝐠\mathbf{g}bold_g, using randomness r𝑟ritalic_r.

  • PC.Eval(\key[ck],c,x,y;𝐠,r){0,1}PC.Eval\keydelimited-[]𝑐𝑘𝑐𝑥𝑦𝐠𝑟01\textsf{{PC}.Eval}(\key[ck],c,x,y;\mathbf{g},r)\rightarrow\{0,1\}PC.Eval ( [ italic_c italic_k ] , italic_c , italic_x , italic_y ; bold_g , italic_r ) → { 0 , 1 }: A protocol in which the prover convinces a verifier that c𝑐citalic_c commits to f𝑓fitalic_f such that f(x)=y𝑓𝑥𝑦f(x)=yitalic_f ( italic_x ) = italic_y.

A polynomial commitment scheme is secure if it provides correctness, polynomial binding, evaluation binding, and hiding properties. We refer to [28] for a formal definition of these properties. Additionally, we require that PC.Eval be an interactive argument of knowledge with knowledge soundness, ensuring the existence of an extractor that can recover the committed polynomial from any evaluation, provided it has full access to the adversary’s state.

zk-SNARK s

A proof for a relation \mathcal{R}caligraphic_R is a protocol between a prover P𝑃Pitalic_P and an efficient verifier V𝑉Vitalic_V by which P𝑃Pitalic_P convinces V𝑉Vitalic_V that w:(x,w)=1:𝑤𝑥𝑤1\exists w:\mathcal{R}(x,w)=1∃ italic_w : caligraphic_R ( italic_x , italic_w ) = 1, where x𝑥xitalic_x is called an instance, and w𝑤witalic_w a witness for x𝑥xitalic_x. If the proof is a single message from P𝑃Pitalic_P to V𝑉Vitalic_V, it is non-interactive and consists of three polynomial-time algorithms:

  • Setup(1λ,)(pp,vk)Setupsuperscript1𝜆ppvk\textsf{Setup}(1^{\lambda},\mathcal{R})\rightarrow(\texttt{pp},\texttt{vk})Setup ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT , caligraphic_R ) → ( pp , vk ): Setup public parameters crs and a verification key vk for a relation \mathcal{R}caligraphic_R and security parameter λ𝜆\lambdaitalic_λ.

  • Prove(pp,x,w)πProvepp𝑥𝑤𝜋\textsf{Prove}(\texttt{pp},x,w)\rightarrow\piProve ( pp , italic_x , italic_w ) → italic_π: If (x,w)=1𝑥𝑤1\mathcal{R}(x,w)=1caligraphic_R ( italic_x , italic_w ) = 1, output a proof π𝜋\piitalic_π.

  • Verify(vk,x,π){0,1}Verifyvk𝑥𝜋01\textsf{Verify}(\texttt{vk},x,\pi)\rightarrow\{0,1\}Verify ( vk , italic_x , italic_π ) → { 0 , 1 }: Verify a proof π𝜋\piitalic_π for instance x𝑥xitalic_x.

Proofs generally support a class of relations, for instance bounded size arithmetic circuits, including the size of a relation \abs\abs\abs{\mathcal{R}}caligraphic_R. A proof that satisfies completeness, knowledge soundness, and succinctness is a Succinct Non-Interactive Argument of Knowledge (SNARK). If the proof also satisfies zero-knowledge, i.e., it does not reveal any other information than the statement being true, it is a zero-knowledge Succinct Non-Interactive Argument of Knowledge (zk-SNARK). We provide formal definitions of these properties in Definition A.4 in Appendix A.

Commit-and-Prove SNARK (CP-SNARK). CP-SNARKs are SNARKs where the instance contains one or more commitments to parts of the witness [9, 7, 1]. In particular, the instance contains a set of commitments, i.e., (x,c1,,c)𝑥subscript𝑐1subscript𝑐(x,c_{1},\ldots,c_{\ell})( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ), to subsets of the witness (w,r1,,r)𝑤subscript𝑟1subscript𝑟(w,r_{1},\ldots,r_{\ell})( italic_w , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_r start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) where ci=Com.Commit(wi,ri)subscript𝑐𝑖Com.Commitsubscript𝑤𝑖subscript𝑟𝑖c_{i}=\textsf{Com.Commit}(w_{i},r_{i})italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = Com.Commit ( italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) with wisubscript𝑤𝑖w_{i}italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT a subset of the witness.

Definition 2.2 (CP-SNARKs [9]).

Let \mathcal{R}caligraphic_R be a relation over 𝒟x×𝒟wsubscript𝒟𝑥subscript𝒟𝑤\mathcal{D}_{x}\times\mathcal{D}_{w}caligraphic_D start_POSTSUBSCRIPT italic_x end_POSTSUBSCRIPT × caligraphic_D start_POSTSUBSCRIPT italic_w end_POSTSUBSCRIPT where 𝒟wsubscript𝒟𝑤\mathcal{D}_{w}caligraphic_D start_POSTSUBSCRIPT italic_w end_POSTSUBSCRIPT splits over +11\ell+1roman_ℓ + 1 arbitrary domains 𝒟1××𝒟×𝒟vsubscript𝒟1subscript𝒟subscript𝒟𝑣\mathcal{D}_{1}\times\ldots\times\mathcal{D}_{\ell}\times\mathcal{D}_{v}caligraphic_D start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT × … × caligraphic_D start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT × caligraphic_D start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT for some arity parameter 11\ell\geq 1roman_ℓ ≥ 1. We denote the sub-witnesses w1,,w,wvsubscript𝑤1subscript𝑤subscript𝑤𝑣w_{1},\ldots,w_{\ell},w_{v}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT following this split. Let Com=(Com.Setup,Com.Commit,Com.Verify)ComCom.SetupCom.CommitCom.Verify\text{Com}=(\textsf{Com.Setup},\textsf{Com.Commit},\textsf{Com.Verify})Com = ( Com.Setup , Com.Commit , Com.Verify ) be a commitment scheme (as per Definition A.1) whose message space \mathcal{M}caligraphic_M is such that 𝒟isubscript𝒟𝑖\mathcal{D}_{i}\subset\mathcal{M}caligraphic_D start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⊂ caligraphic_M for all i[]𝑖delimited-[]i\in[\ell]italic_i ∈ [ roman_ℓ ]. A Commit-and-Prove SNARK for a relation \mathcal{R}caligraphic_R and a commitment scheme Com is a SNARK for a relation ComsuperscriptCom\mathcal{R}^{\text{Com}}caligraphic_R start_POSTSUPERSCRIPT Com end_POSTSUPERSCRIPT such that:

Com={((x,c1,,c),(w,r1,,r)):(x,w)j[]Com.Verify(\key[ck],cj,wj,rj)=1}superscriptCom:𝑥subscript𝑐1subscript𝑐𝑤subscript𝑟1subscript𝑟absent𝑥𝑤subscript𝑗delimited-[]Com.Verify\keydelimited-[]𝑐𝑘subscript𝑐𝑗subscript𝑤𝑗subscript𝑟𝑗1\mathcal{R}^{\textsf{Com}}=\left\{\begin{array}[]{c}\begin{array}[]{l}\left((x% ,c_{1},\ldots,c_{\ell}),(w,r_{1},\ldots,r_{\ell})\right)\end{array}:\\ \begin{array}[]{l}(x,w)\in\mathcal{R}\\ \bigwedge_{j\in[\ell]}\textsf{Com.Verify}(\key[ck],c_{j},w_{j},r_{j})=1\end{% array}\par\end{array}\right\}caligraphic_R start_POSTSUPERSCRIPT Com end_POSTSUPERSCRIPT = { start_ARRAY start_ROW start_CELL start_ARRAY start_ROW start_CELL ( ( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) , ( italic_w , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_r start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) ) end_CELL end_ROW end_ARRAY : end_CELL end_ROW start_ROW start_CELL start_ARRAY start_ROW start_CELL ( italic_x , italic_w ) ∈ caligraphic_R end_CELL end_ROW start_ROW start_CELL ⋀ start_POSTSUBSCRIPT italic_j ∈ [ roman_ℓ ] end_POSTSUBSCRIPT Com.Verify ( [ italic_c italic_k ] , italic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ) = 1 end_CELL end_ROW end_ARRAY end_CELL end_ROW end_ARRAY }

CP-SNARKs satisfy completeness, knowledge soundness, and succinctness properties similar to SNARKs. Similar to zk-SNARKs, we can also consider a zero-knowledge variant of CP-SNARKs. We refer to Campanelli et al. [9] for a formal definition of CP-SNARK properties.

Arithmetization

In the context of SNARKs that express statements over computations, the computation is generally expressed as bounded-depth arithmetic circuits. As most SNARKs internally rely on representing constraints as polynomials, arithmetization acts as an intermediary between the (circuit) computation and the polynomial representation required by the underlying proof system. Specifically, arithmetization reduces statements about computations to algebraic statements involving polynomials of a bounded degree. Some operations can be easily transformed into arithmetic operations, either because they are algebraic operations over a finite field or because they can be easily adapted to algebraic operations. However, more complex operations (e.g., comparisons or any higher-order function) are not as easily expressed in arithmetic circuits. As a result, modern SNARKs generally support more advanced arithmetization, such as lookups and custom gates that can help address this overhead. This induces a complex design problem, where different approaches to arithmetizing the same computation can give rise to proofs with vastly different efficiency. In the following, we focus on the Plonkish arithmetization that is used by many state-of-the-art proof systems, including Halo2 [17]. Halo2 is zk-SNARK that builds upon the original Halo protocol [5] but combines it with Plonkish arithmetization to express functions or applications as circuits, as originally introduced by Plonk [18]. Specifically, Halo2 relies on UltraPLONK’s [2] arithmetization, which adds support for custom gates and lookup arguments.

Definition 2.3 (Plonkish Arithmetization [17, 2]).

Consider a grid comprised of n𝑛nitalic_n rows (where n=2k𝑛superscript2𝑘n=2^{k}italic_n = 2 start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT for some k𝑘kitalic_k) with nfsubscript𝑛𝑓n_{f}italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT fixed columns, nasubscript𝑛𝑎n_{a}italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT advice columns, and npsubscript𝑛𝑝n_{p}italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT instance columns. Let Fi,j𝔽psubscript𝐹𝑖𝑗subscript𝔽𝑝F_{i,j}\in\mathbb{F}_{p}italic_F start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT ∈ blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT be the value in the j𝑗jitalic_j-th row of the i𝑖iitalic_i-th fixed column, and let Ai,jsubscript𝐴𝑖𝑗A_{i,j}italic_A start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT and Pi,jsubscript𝑃𝑖𝑗P_{i,j}italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT be defined equivalently for advice and instance columns, respectively. Let {𝐟i(X)}infsubscriptsubscript𝐟𝑖𝑋𝑖subscript𝑛𝑓\{\mathbf{f}_{i}(X)\}_{i\in n_{f}}{ bold_f start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_X ) } start_POSTSUBSCRIPT italic_i ∈ italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT end_POSTSUBSCRIPT, {𝐚i(X)}inasubscriptsubscript𝐚𝑖𝑋𝑖subscript𝑛𝑎\{\mathbf{a}_{i}(X)\}_{i\in n_{a}}{ bold_a start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_X ) } start_POSTSUBSCRIPT italic_i ∈ italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT end_POSTSUBSCRIPT, and {𝐩i(X)}inpsubscriptsubscript𝐩𝑖𝑋𝑖subscript𝑛𝑝\{\mathbf{p}_{i}(X)\}_{i\in n_{p}}{ bold_p start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_X ) } start_POSTSUBSCRIPT italic_i ∈ italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT end_POSTSUBSCRIPT be the polynomials representing the fixed, advice, and instance columns, respectively, where

  • 𝐟i(X)subscript𝐟𝑖𝑋\mathbf{f}_{i}(X)bold_f start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_X ) interpolates s.t. 𝐟i(ωj)=Fi,jsubscript𝐟𝑖superscript𝜔𝑗subscript𝐹𝑖𝑗\mathbf{f}_{i}(\omega^{j})=F_{i,j}bold_f start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_ω start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT ) = italic_F start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT for i[nf],j[n]formulae-sequence𝑖delimited-[]subscript𝑛𝑓𝑗delimited-[]𝑛i\in[n_{f}],j\in[n]italic_i ∈ [ italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT ] , italic_j ∈ [ italic_n ]

  • 𝐚i(X)subscript𝐚𝑖𝑋\mathbf{a}_{i}(X)bold_a start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_X ) interpolates s.t. 𝐚i(ωj)=Ai,jsubscript𝐚𝑖superscript𝜔𝑗subscript𝐴𝑖𝑗\mathbf{a}_{i}(\omega^{j})=A_{i,j}bold_a start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_ω start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT ) = italic_A start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT for i[na],j[n]formulae-sequence𝑖delimited-[]subscript𝑛𝑎𝑗delimited-[]𝑛i\in[n_{a}],j\in[n]italic_i ∈ [ italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT ] , italic_j ∈ [ italic_n ]

  • 𝐩i(X)subscript𝐩𝑖𝑋\mathbf{p}_{i}(X)bold_p start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_X ) interpolates s.t. 𝐩i(ωj)=Pi,jsubscript𝐩𝑖superscript𝜔𝑗subscript𝑃𝑖𝑗\mathbf{p}_{i}(\omega^{j})=P_{i,j}bold_p start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_ω start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT ) = italic_P start_POSTSUBSCRIPT italic_i , italic_j end_POSTSUBSCRIPT for i[np],j[n]formulae-sequence𝑖delimited-[]subscript𝑛𝑝𝑗delimited-[]𝑛i\in[n_{p}],j\in[n]italic_i ∈ [ italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT ] , italic_j ∈ [ italic_n ].

for ω𝔽p𝜔subscript𝔽𝑝\omega\in\mathbb{F}_{p}italic_ω ∈ blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT a n=2k𝑛superscript2𝑘n=2^{k}italic_n = 2 start_POSTSUPERSCRIPT italic_k end_POSTSUPERSCRIPT primitive root of unity.

Constraints for (custom) gates are expressed as multivariate polynomials bisubscript𝑏𝑖b_{i}italic_b start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT in nf+na+ni+1subscript𝑛𝑓subscript𝑛𝑎subscript𝑛𝑖1n_{f}+n_{a}+n_{i}+1italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT + italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + italic_n start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT + 1 indeterminates of degree at most n1𝑛1n-1italic_n - 1, for which we only consider their evaluation at points of the form:

bi(X,\displaystyle b_{i}(X,italic_b start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ( italic_X , f0(X),,fnf1(X),a0(X),,ana1(X),subscript𝑓0𝑋subscript𝑓subscript𝑛𝑓1𝑋subscript𝑎0𝑋subscript𝑎subscript𝑛𝑎1𝑋\displaystyle f_{0}(X),...,f_{n_{f}-1}(X),a_{0}(X),...,a_{n_{a}-1}(X),italic_f start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( italic_X ) , … , italic_f start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT - 1 end_POSTSUBSCRIPT ( italic_X ) , italic_a start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( italic_X ) , … , italic_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT - 1 end_POSTSUBSCRIPT ( italic_X ) ,
p0(X),,pnp1(X)).\displaystyle p_{0}(X),...,p_{n_{p}-1}(X)).italic_p start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT ( italic_X ) , … , italic_p start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT - 1 end_POSTSUBSCRIPT ( italic_X ) ) .

We refer to the extensive literature on Plonkish arithmetization for details on copy and permutation constraints [11, 17, 39, 18].

Related Work

In this section, we provide a concise overview of recent developments in zkML, focusing on key state-of-the-art results. We then review existing work on Commit-and-Prove SNARKs and discuss their limitations.

zkML. The field of zero-knowledge machine learning has seen rapid development in recent years, driven by the application and optimization of various proof systems for ML inference and training tasks. While there has been some work addressing ML training [44, 20, 40], the majority of research has concentrated on ML inference. Initial efforts in this area were primarily focused on convolutional neural networks (CNNs) and used early proof systems such as Groth16 [23], which are capable of proving statements about relations formulated as Quadratic Arithmetic Programs (QAPs).

For instance, ZEN [16] proposes a stranded encoding method to optimize the multiplication of multiple small fixed-point numbers in one field element. vCNN [29] and pvCNN [46] enhance support for CNN architectures by proposing arithmetizations of convolutions that significantly reduce the number of multiplications required in their QAP representation. zkCNN [30] proposes a novel technique for proving convolutions with linear prover time using a sumcheck-based protocol. However, these works do not consider more recent ML developments and are generally not practical for larger models.

More recent research has favored the Halo2 proof system, which supports Plonkish arithmetization, due to its enhanced expressiveness and the absence of a trusted setup [5]. In particular, the support for custom gates and lookup arguments enables more efficient arithmetization of complex ML layers, which were previously costly to arithmetize. Kang et al. [27] propose a construction based on Halo2 to prove inference for ImageNet-scale models, demonstrating a substantial improvement in prover time compared to earlier methods. EZKL [43, 15, 19] provides an open-source platform that can arithmetize computational graphs to Plonkish, with support for a wide variety of deep learning and data science models. Finally, ZKML [10] introduces an optimizing compiler that translates Tensorflow Lite models into Plonkish arithmetizations for Halo2, supporting a wide range of neural network layers and models related to computer vision and language models, including language models such as GPT-2.

Commit-and-Prove SNARKs. Most zkML works overlook the issue of commitments entirely. The few that do discuss it, generally propose a straightforward approach based on effectively “(re-)computing” the commitment inside the SNARK [16, 27, 45, 14]. However, commitments and SNARKs generally rely on different algebraic structures; therefore, one needs to emulate operations, such as elliptic curve computations, using a large number of arithmetic circuit operations. To address this mismatch, ZK-friendly elliptic curves (e.g., the Jubjub curve from Zcash [17]) have been proposed. These curves reduce the overhead by decreasing the number of constraints needed to verify a commitment, but, despite these improvements, they remain far from efficient. Given these limitations of ZK-friendly elliptic curves, recent research has shifted towards hash-based commitments. While conventional hash functions like (e.g., SHA256) introduce more overhead than elliptic curve-based methods, ZK-friendly hash functions such as Poseidon [21] provide a more efficient alternative, outperforming elliptic curve-based commitments, including those using ZK-friendly curves. Nonetheless, our evaluation shows that even with these improvements, the overhead remains too high for zkML, particularly when dealing with large-scale models.

Campanelli et al. formalized the notion of “commit-and-proof-SNARKs” (CP-SNARKs) [9], and proposed an alternative approach to constructing them in LegoSNARK [9] which proposed an adaptation of the Groth16 [23] zk-SNARK to a CP-SNARK. Subsequent works have proposed CP-SNARKs for a variety of proof systems. For example, Chen et al. show how to convert sumcheck-based SNARKs to CP-SNARKs [11], though this only applies for expensive multilinear commitments which are required for sumcheck. Eclipse [1] introduces a compiler that transforms Interactive Oracle Proof (IOP)-style SNARKs instantiated with Pedersen-like commitments into CP-SNARKs relying on amortized Sigma protocols. This transformation results in a proof size sublinear in the number of commitments and size of the committed witness. However, the verifier’s computational overhead is linear with respect to the committed input size, which significantly impacts the verifier efficiency when a large portion of the witness is committed, as is the case in zkML.

Most relevant to our work, Lunar [7, 8] presents a compiler for IOP-style SNARKs with polynomial commitments by proving shifts of related polynomials using a pairing-based construction. This method offers a proof size overhead that is independent of the size of the committed witness. However, a limitation of this approach is that it only supports pairing-based polynomial commitments, which, for all currently known pairing-based polynomial commitments, requires a trusted setup [5]. Lunar does not provide an implementation and, as we show in the following sections, makes a series of simplifying assumptions about the layout and cost model of Plonkish arithmetizations. As we discuss in § 4.1, these result in significant overheads when applying Lunar in practice.

\procb

ΠArtemis=P((x,c1,,c),(w,r1,,r)),V((x,c1,,c))subscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠𝑃𝑥subscript𝑐1subscript𝑐𝑤subscript𝑟1subscript𝑟𝑉𝑥subscript𝑐1subscript𝑐\Pi_{Artemis}=\langle P((x,c_{1},\ldots,c_{\ell}),(w,r_{1},\ldots,r_{\ell})),V% ((x,c_{1},\ldots,c_{\ell}))\rangleroman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT = ⟨ italic_P ( ( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) , ( italic_w , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_r start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) ) , italic_V ( ( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) ) ⟩ P𝑃Pitalic_P : μ𝜇\muitalic_μ \sample𝔽𝔽\mathbb{F}blackboard_F _p, r𝑟ritalic_r _μ𝜇\muitalic_μ \sample𝔽𝔽\mathbb{F}blackboard_F _p, c𝑐citalic_c _μ𝜇\muitalic_μPC.Commit (\key[ck], 𝝁𝝁\bm{\mu}bold_italic_μ, r𝑟ritalic_r _μ𝜇\muitalic_μ) where 𝝁𝝁\bm{\mu}bold_italic_μ is the degree-0 polynomial defined by μ𝜇\muitalic_μ and send c𝑐citalic_c _μ𝜇\muitalic_μ to V𝑉Vitalic_V
V𝑉Vitalic_V : α\sample𝔽𝔽\mathbb{F}blackboard_F _p, β\sample𝔽𝔽\mathbb{F}blackboard_F _p and send α,β to P𝑃Pitalic_P
P𝑃Pitalic_P : define r𝑟ritalic_rr𝑟ritalic_r _μ𝜇\muitalic_μ + ∑i=0r𝑟ritalic_r i+1αi and 𝐠𝐠\mathbf{g}bold_g:= 𝝁𝝁\bm{\mu}bold_italic_μ + ∑i=0𝐰𝐢+𝟏subscript𝐰𝐢1\mathbf{w_{i+1}}bold_w start_POSTSUBSCRIPT bold_i + bold_1 end_POSTSUBSCRIPTαi where 𝐰𝐢subscript𝐰𝐢\mathbf{w_{i}}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT is defined by interpreting wi as a coefficient vector
P𝑃Pitalic_P : ρ𝐠𝐠\mathbf{g}bold_g (β) and send ρ to V𝑉Vitalic_V
P𝑃Pitalic_P and V𝑉Vitalic_V execute the zk-SNARK ΠΠ\Piroman_Π with ((x𝑥xitalic_x, α, β𝛽\betaitalic_β, ρ𝜌\rhoitalic_ρ), (w𝑤witalic_w, μ𝜇\muitalic_μ)) for the relation {((x,α,β,ρ),(w,μ)):(x,w)ρ=(𝝁+i𝐰𝐢+𝟏αi)(β)}𝑥𝛼𝛽𝜌𝑤𝜇:𝑥𝑤𝜌𝝁subscript𝑖subscript𝐰𝐢1superscript𝛼𝑖𝛽\left\{\begin{array}[]{c}((x,\alpha,\beta,\rho),(w,\mu))\\ :\\ (x,w)\in\mathcal{R}\land\rho=(\bm{\mu}+\sum_{i}\mathbf{w_{i+1}}\cdot\alpha^{i}% )(\beta)\end{array}\right\}{ start_ARRAY start_ROW start_CELL ( ( italic_x , italic_α , italic_β , italic_ρ ) , ( italic_w , italic_μ ) ) end_CELL end_ROW start_ROW start_CELL : end_CELL end_ROW start_ROW start_CELL ( italic_x , italic_w ) ∈ caligraphic_R ∧ italic_ρ = ( bold_italic_μ + ∑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT bold_w start_POSTSUBSCRIPT bold_i + bold_1 end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) ( italic_β ) end_CELL end_ROW end_ARRAY }
    and halt if ΠΠ\Piroman_Π aborts
P𝑃Pitalic_P and V𝑉Vitalic_V define c𝑐citalic_cc𝑐citalic_c μ𝜇\muitalic_μ + ∑i=0c𝑐citalic_c i+1αi
P𝑃Pitalic_P and V𝑉Vitalic_V execute PC.Eval (\key[ck], c𝑐citalic_c, β, ρ; 𝐠𝐠\mathbf{g}bold_g, r𝑟ritalic_r) and output the result

Figure 1: Artemis CP-SNARK. We denote w1,,w,wvsubscript𝑤1subscript𝑤subscript𝑤𝑣w_{1},\ldots,w_{\ell},w_{v}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_w start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT , italic_w start_POSTSUBSCRIPT italic_v end_POSTSUBSCRIPT as the sub-witnesses of w𝒟w𝑤subscript𝒟𝑤w\in\mathcal{D}_{w}italic_w ∈ caligraphic_D start_POSTSUBSCRIPT italic_w end_POSTSUBSCRIPT following the split of 𝒟wsubscript𝒟𝑤\mathcal{D}_{w}caligraphic_D start_POSTSUBSCRIPT italic_w end_POSTSUBSCRIPT.

Design

We begin by presenting Apollo, a CP-SNARK in the LegoSNARK style [9] for Plonk [18, 2] and KZG-style commitments [28]. Next, we introduce Artemis, a CP-SNARK that operates with arbitrary proof systems (i.e., makes only black-box use of the underlying SNARK) that supports any homomorphic polynomial commitment. Most importantly, it supports state-of-the-art proof systems like Halo2 that do not require a trusted setup. We then provide a formal security proof for Artemis. Finally, we discuss the efficient instantiation of Artemis for proof systems like Halo2 that use Plonkish arithmetization. A detailed discussion of concrete performance and a comparison to existing approaches is deferred to the next section (cf. § 5).

Apollo: Improved CP-SNARKs for Plonk and KZG

Recent zkML advancements based on Plonk-style proof systems have significantly reduced the overhead associated with proving ML computations [43, 27, 10]. Nonetheless, these works have either overlooked commitment checks entirely or only considered "recomputation" approaches, such as Poseidon-based commitments [27, 45]. Meanwhile, outside the scope of zkML, a series of works beginning with LegoSNARK [9] have introduced alternative approaches for handling commitment checks. These approaches are based on the insight that SNARKs, in general, inherently require committing to the witness internally. As a result, these works bypass the need to add costly recomputation constraints to the SNARK by constructing specialized proofs that link these internal witness commitments to external commitments. This has the potential to dramatically improve performance. However, as we discuss below, these solutions unfortunately have significant limitations in practice. We address these limitations by introducing Apollo, which significantly optimizes the state-of-the-art approach.

Lunar [7] proposes a LegoSNARK-style construction for Plonk-style proof systems that represents the current state of the art. One of the key challenges in this approach to CP-SNARKs is that the internal witness commitments usually do not directly correspond to the commitments we want to verify. For example, internal commitments generally commit to more than just the (part of) the witness that we are interested in. As a result, Lunar actually introduces two specialized proofs: a shifting proof (𝖢𝖯link(2)superscriptsubscript𝖢𝖯link2\mathsf{CP}_{\text{link}}^{(2)}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT in [7]) that effectively aligns the external and internal commitments, and the core linking proof (𝖢𝖯link(1)superscriptsubscript𝖢𝖯link1\mathsf{CP}_{\text{link}}^{(1)}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT in [7]) that establishes that the external proofs indeed commit to the witness values.

For example, in the Plonkish arithmetization (cf. Definition 2.3), the witness values of interest (e.g., the model weights) might appear across a variety of rows and columns in the grid. As part of the proof, the prover commits to a polynomial encoding of each column in the grid. Thus, the witness values of interest will be spread across multiple commitments and also across the entire evaluation domain. The shifting proof in Lunar shows that the original external commitment and a shifted version that aligns the values to the evaluation domain of the witness values are commitments to the same underlying polynomial. Lunar’s construction only operates on a single column, i.e., in the case of witness values being spread across multiple columns and, therefore, commitments, multiple instances of the shifting and linking proofs are required. More importantly, Lunar assumes that the values for each external commitment appear contiguously inside the witness column, which is unlikely to be the case for zkML. Whenever a value appears out-of-order, or after a gap, additional shifting and linking proofs are required. As a result, Lunar incurs significant overheads when applied to real-world settings because of the large amount of additional shifting and linking proofs to align complicated real-world arithmetizations with the external commitments. We show in our evaluation (cf. § 5) that these overheads are significant in practice.

In Apollo, our key insight is that instead of addressing the complexity of aligning commitments with complex real-world arithmetizations through multiple external proofs, we can exploit the flexibility of Plonkish arithmetizations to perform the alignment once inside the Plonk proof. Specifically, we add an additional advice column ana+1subscript𝑎subscript𝑛𝑎1a_{n_{a}+1}italic_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT that contains the witness values of interest in the same sequence as they appear in the external commitment, and already aligned correctly on the evaluation domain. We then add a copy constraint bisubscript𝑏𝑖b_{i}italic_b start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT for each witness value to link the new copies to their original cells in the grid. With this, we can directly perform the linking proof between the new advice column ana+1subscript𝑎subscript𝑛𝑎1a_{n_{a}+1}italic_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT and the external commitments c1,,csubscript𝑐1subscript𝑐c_{1},\ldots,c_{\ell}italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT. In case there are more witness values than can fit a single column, we overflow into additional columns, each requiring one additional linking proof.

Our approach entirely removes the need to perform the shifting proofs and dramatically reduces the number of linking proof instances. For example, for an inference proof for MobileNet [37], Lunar requires 20 shifting and 20 linking proofs, while Apollo requires only a single linking proof. We omit formal proofs for Apollo, as we directly use the linking protocol (𝖢𝖯link(1)superscriptsubscript𝖢𝖯link1\mathsf{CP}_{\text{link}}^{(1)}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT) from Lunar [7] and otherwise merely extend the arithmetization of the underlying SNARK in a straightforward manner. Though Apollo represents a significant advance compared to the existing state of the art, it inherits some of the inherent shortcomings of Lunar’s construction. Specifically, both Lunar and Apollo are white-box constructions that depend very explicitly on details of the arithmetization, the commitments, and the proof system. In addition, Lunar’s linking proof (𝖢𝖯link(1)superscriptsubscript𝖢𝖯link1\mathsf{CP}_{\text{link}}^{(1)}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT) requires a pairing-based polynomial commitment, i.e., KZG which requires a trusted setup. Therefore, we next discuss Artemis, which addresses these drawbacks.

Artemis: Efficient CP-SNARKs w/o Trusted Setup

Current CP-SNARK constructions are closely tied to the specific proof systems and commitments they employ. In contrast, the re-computing approach is more general, as it treats the underlying proof system as a black box, but this flexibility comes with considerable overhead. With Artemis, we propose a new approach for CP-SNARKs that achieves both generality and efficiency. Our approach is compatible with any homomorphic polynomial commitment and any generic proof system (i.e., we only make black-box use of the proof system).

Polynomial Commitments. To verify the consistency of committed witness elements in a homomorphic polynomial commitment, consider the following setup. Let wisubscript𝑤𝑖w_{i}italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT for i[]𝑖delimited-[]i\in[\ell]italic_i ∈ [ roman_ℓ ] be the part of the witness w𝑤witalic_w (cf. Definition 2.2) that is committed to in a homomorphic polynomial commitment cisubscript𝑐𝑖c_{i}italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT (cf. Definition 2.1). For our CP-SNARK, we need to check ci=?PC.Commit(\key[ck],𝐰𝐢,ri)superscript?subscript𝑐𝑖PC.Commit\keydelimited-[]𝑐𝑘subscript𝐰𝐢subscript𝑟𝑖c_{i}\stackrel{{\scriptstyle?}}{{=}}\textsf{{PC}.Commit}(\key[ck],\mathbf{w_{i% }},r_{i})italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_RELOP SUPERSCRIPTOP start_ARG = end_ARG start_ARG ? end_ARG end_RELOP PC.Commit ( [ italic_c italic_k ] , bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) for ri𝔽psubscript𝑟𝑖subscript𝔽𝑝r_{i}\in\mathbb{F}_{p}italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ∈ blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT, where 𝐰𝐢subscript𝐰𝐢\mathbf{w_{i}}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT denotes the the polynomial encoding of wisubscript𝑤𝑖w_{i}italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. Equivalently, we can express this as checking that 𝐰𝐢=?𝐰𝐢superscript?subscript𝐰𝐢superscriptsubscript𝐰𝐢\mathbf{w_{i}}\stackrel{{\scriptstyle?}}{{=}}\mathbf{w_{i}}^{\prime}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT start_RELOP SUPERSCRIPTOP start_ARG = end_ARG start_ARG ? end_ARG end_RELOP bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT, where 𝐰𝐢𝔽p[X]superscriptsubscript𝐰𝐢subscript𝔽𝑝delimited-[]𝑋\mathbf{w_{i}}^{\prime}\in\mathbb{F}_{p}\left[X\right]bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT [ italic_X ] s.t. ci=PC.Commit(\key[ck],𝐰𝐢,ri)subscript𝑐𝑖PC.Commit\keydelimited-[]𝑐𝑘superscriptsubscript𝐰𝐢superscriptsubscript𝑟𝑖c_{i}=\textsf{{PC}.Commit}(\key[ck],\mathbf{w_{i}}^{\prime},r_{i}^{\prime})italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = PC.Commit ( [ italic_c italic_k ] , bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) for ri𝔽psuperscriptsubscript𝑟𝑖subscript𝔽𝑝r_{i}^{\prime}\in\mathbb{F}_{p}italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ∈ blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. At first glance, this might suggest that verification via the SNARK requires re-computing the commitment, as is typically required with Poseidon hash-based commitments. However, as polynomial commitments offer the ability to compute an opening of the polynomial evaluated at a specific point (PC.Eval), we can simplify the process by evaluating 𝐠wisubscript𝐠subscript𝑤𝑖\mathbf{g}_{w_{i}}bold_g start_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT on a random point β𝛽\betaitalic_β and checking that it matches the opening of the commitment at β𝛽\betaitalic_β (i.e., PC.Eval(\key[ck],c,β,𝐰𝐢(β);𝐰𝐢,ri)=1PC.Eval\keydelimited-[]𝑐𝑘𝑐𝛽subscript𝐰𝐢𝛽superscriptsubscript𝐰𝐢superscriptsubscript𝑟𝑖1\textsf{{PC}.Eval}(\key[ck],c,\beta,\mathbf{w_{i}}(\beta);\mathbf{w_{i}}^{% \prime},r_{i}^{\prime})=1PC.Eval ( [ italic_c italic_k ] , italic_c , italic_β , bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT ( italic_β ) ; bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = 1). This approach relies on the well-known DeMillo–Lipton–Schwartz–Zippel Lemma (c.f. Lemma A.5 in Appendix A), which states that a polynomial of degree d𝑑ditalic_d over a field 𝔽𝔽\mathbb{F}blackboard_F evaluated at a random point is non-zero with probability at most d/\abs𝔽𝑑\abs𝔽d/\abs{\mathbb{F}}italic_d / blackboard_F.

Efficient Checking of Polynomial Commitments. Evaluating the polynomial 𝐰𝐢subscript𝐰𝐢\mathbf{w_{i}}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT corresponding to the witness at a random point β𝛽\betaitalic_β requires only a few arithmetic operations, and can therefore be done very efficiently inside the SNARK. However, opening a polynomial commitment to a specific point is generally more expensive than recomputing the commitment. For example, for KZG commitments, this opening requires essentially the same computation as the original commitment and also additional pairing operations. However, with a polynomial commitment, we can use PC.Eval outside the SNARK to evaluate the commitment on the same random point without leaking the entire polynomial. Specifically, we can run this computation outside the SNARK by releasing the point ρi=𝐰𝐢(β)subscript𝜌𝑖subscript𝐰𝐢𝛽\rho_{i}=\mathbf{w_{i}}(\beta)italic_ρ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT ( italic_β ) from the SNARK as ρi=𝐰𝐢(β)+μisubscript𝜌𝑖subscript𝐰𝐢𝛽subscript𝜇𝑖\rho_{i}=\mathbf{w_{i}}(\beta)+\mu_{i}italic_ρ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT = bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT ( italic_β ) + italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT for a random masking value μi\sample𝔽psubscript𝜇𝑖\samplesubscript𝔽𝑝\mu_{i}\sample\mathbb{F}_{p}italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. Using a homomorphic polynomial commitment, the prover can easily provide a commitment cμi=PC.Commit(𝝁i,rμi)subscript𝑐subscript𝜇𝑖PC.Commitsubscript𝝁𝑖subscript𝑟subscript𝜇𝑖c_{\mu_{i}}=\textsf{{PC}.Commit}(\bm{\mu}_{i},r_{\mu_{i}})italic_c start_POSTSUBSCRIPT italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT = PC.Commit ( bold_italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ) where 𝝁isubscript𝝁𝑖\bm{\mu}_{i}bold_italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is the polynomial encoding of μisubscript𝜇𝑖\mu_{i}italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and rμi\sample𝔽psubscript𝑟subscript𝜇𝑖\samplesubscript𝔽𝑝r_{\mu_{i}}\sample\mathbb{F}_{p}italic_r start_POSTSUBSCRIPT italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. This allows us to run PC.Eval not on (\key[ck],ci,β,ρi;𝐰𝐢,ri)\keydelimited-[]𝑐𝑘subscript𝑐𝑖𝛽subscript𝜌𝑖subscript𝐰𝐢subscript𝑟𝑖(\key[ck],c_{i},\beta,\rho_{i};\mathbf{w_{i}},r_{i})( [ italic_c italic_k ] , italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_β , italic_ρ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ; bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) but on (\key[ck],ci+cμi,β,ρi;𝐰𝐢+𝝁i,ri+rμi)\keydelimited-[]𝑐𝑘subscript𝑐𝑖subscript𝑐subscript𝜇𝑖𝛽subscript𝜌𝑖subscript𝐰𝐢subscript𝝁𝑖subscript𝑟𝑖subscript𝑟subscript𝜇𝑖(\key[ck],c_{i}+c_{\mu_{i}},\beta,\rho_{i};\mathbf{w_{i}}+\bm{\mu}_{i},r_{i}+r% _{\mu_{i}})( [ italic_c italic_k ] , italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT + italic_c start_POSTSUBSCRIPT italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT , italic_β , italic_ρ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ; bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT + bold_italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT + italic_r start_POSTSUBSCRIPT italic_μ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT end_POSTSUBSCRIPT ), removing any potential leakage.

Aggregating Multiple Commitments. Up to this point, we have considered each 𝐰𝐢subscript𝐰𝐢\mathbf{w_{i}}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT and cisubscript𝑐𝑖c_{i}italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT individually. However, a key advantage of our approach—particularly in comparison to Lunar and Apollo —is the ability to aggregate all 𝐰𝐢subscript𝐰𝐢\mathbf{w_{i}}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT and cisubscript𝑐𝑖c_{i}italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT, thereby reducing the number of commitment checks to a single PC.Eval operation. To achieve this, we compute a linear combination with an additional challenge α𝛼\alphaitalic_α from the verifier, specifically, we set:

ρ=(𝝁+i𝐰𝐢αi)(β)𝜌𝝁subscript𝑖subscript𝐰𝐢superscript𝛼𝑖𝛽\rho=(\bm{\mu}+\textstyle\sum_{i}\mathbf{w_{i}}\cdot\alpha^{i})(\beta)italic_ρ = ( bold_italic_μ + ∑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) ( italic_β )

where 𝝁𝝁\bm{\mu}bold_italic_μ is the polynomial encoding of a single random masking value μ\sample𝔽p𝜇\samplesubscript𝔽𝑝\mu\sample\mathbb{F}_{p}italic_μ blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT, and α\sample𝔽p𝛼\samplesubscript𝔽𝑝\alpha\sample\mathbb{F}_{p}italic_α blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT is the verifier-provided challenge. We then run a single instance of PC.Eval:

PC.Eval(\key[ck],cμ+iciαi,β,ρ;𝝁+i𝐰𝐢αi,rμ+iriαi).PC.Eval\keydelimited-[]𝑐𝑘subscript𝑐𝜇subscript𝑖subscript𝑐𝑖superscript𝛼𝑖𝛽𝜌𝝁subscript𝑖subscript𝐰𝐢superscript𝛼𝑖subscript𝑟𝜇subscript𝑖subscript𝑟𝑖superscript𝛼𝑖\textsf{{PC}.Eval}(\key[ck],c_{\mu}+\textstyle\sum_{i}c_{i}\cdot\alpha^{i},% \beta,\rho;\bm{\mu}+\textstyle\sum_{i}\mathbf{w_{i}}\cdot\alpha^{i},r_{\mu}+% \textstyle\sum_{i}r_{i}\cdot\alpha^{i}).PC.Eval ( [ italic_c italic_k ] , italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT + ∑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT , italic_β , italic_ρ ; bold_italic_μ + ∑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT , italic_r start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT + ∑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) .

We show in our proof that the knowledge soundness error this introduces is negligible. Note, that this is distinct from the usual batch opening that some polynomial commitments support (e.g., employed in Plonk with KZG commitments [17]). Since we only consider opening of commitments at the same value, and do not need to verify each result individually but only the aggregated value, our optimization technique applies to any homomorphic polynomial commitment.

ΠArtemissubscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠\Pi_{Artemis}roman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT Construction. We construct ΠArtemissubscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠\Pi_{Artemis}roman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT, a (zk) CP-SNARK for a relation \mathcal{R}caligraphic_R matching Definition 2.2 and a homomorphic polynomial commitment scheme PC, given PC and a SNARK (or zk-SNARK) ΠΠ\Piroman_Π for a superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT that we will define below. We provide the complete protocol in Figure 1, and focus on discussing key points below. The prover commits to a random mask μ𝜇\muitalic_μ (specifically, its polynomial encoding 𝝁𝝁\bm{\mu}bold_italic_μ) and sends the commitment cμsubscript𝑐𝜇c_{\mu}italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT to the verifier. The verifier replies with two challenge values, α𝛼\alphaitalic_α and β𝛽\betaitalic_β. The prover uses α𝛼\alphaitalic_α to compute a linear combination 𝐠𝐠\mathbf{g}bold_g of the witnesses 𝐰𝐢subscript𝐰𝐢\mathbf{w_{i}}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT masked with 𝝁𝝁\bm{\mu}bold_italic_μ. The prover then evaluates 𝐠𝐠\mathbf{g}bold_g at β𝛽\betaitalic_β and sends the resulting value ρ𝜌\rhoitalic_ρ to the verifier. This enables the prover and verifier to run a SNARK ΠΠ\Piroman_Π for a slightly extended version of the original relation:

={((x,α,β,ρ),(w,μ)):(x,w)ρ=(𝝁+i𝐰𝐢+𝟏αi)(β)}superscript𝑥𝛼𝛽𝜌𝑤𝜇:𝑥𝑤𝜌𝝁subscript𝑖subscript𝐰𝐢1superscript𝛼𝑖𝛽\mathcal{R}^{\prime}=\leavevmode\hbox{$\left\{\begin{array}[]{c}((x,\alpha,% \beta,\rho),(w,\mu))\\ :\\ (x,w)\in\mathcal{R}\land\rho=(\bm{\mu}+\sum_{i}\mathbf{w_{i+1}}\cdot\alpha^{i}% )(\beta)\end{array}\right\}$}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = { start_ARRAY start_ROW start_CELL ( ( italic_x , italic_α , italic_β , italic_ρ ) , ( italic_w , italic_μ ) ) end_CELL end_ROW start_ROW start_CELL : end_CELL end_ROW start_ROW start_CELL ( italic_x , italic_w ) ∈ caligraphic_R ∧ italic_ρ = ( bold_italic_μ + ∑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT bold_w start_POSTSUBSCRIPT bold_i + bold_1 end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) ( italic_β ) end_CELL end_ROW end_ARRAY }

I.e., we extend the original relation by a simple masked polynomial evaluation of a linear combination of the witness polynomials at a challenge point. In practice, this does not introduce a significant overhead, and we discuss how to augment arithmetizations of \mathcal{R}caligraphic_R to efficient arithmetizations of superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT in § 4.4. Assuming ΠΠ\Piroman_Π does not abort, the protocol then proceeds to using PC.Eval to show that the commitments evaluate to the same value. Towards this, both verifier and prover compute a masked linear combination of the commitments using α𝛼\alphaitalic_α which is possible due to their homomorphic nature. This, together with the masked linear combination of the witness polynomials, and a masked linear combination of the commitment randomnesses, forms the input to PC.Eval. Due to the (repeated applications of) DeMillo–Lipton–Schwartz–Zippel Lemma, this check will complete (with high probability) only if the witnesses in the SNARK indeed agree with the committed values. We provide a full proof of security for Artemis in § 4.3.

|π|𝜋|\pi|| italic_π | Prove (time) Verify (time)
Eclipse [1] O(log(d))𝑂𝑑O(\log(\ell\cdot d))italic_O ( roman_log ( roman_ℓ ⋅ italic_d ) ) O(d)𝑂𝑑O(\ell\cdot d)italic_O ( roman_ℓ ⋅ italic_d ) O(d)𝑂𝑑O(\ell\cdot d)italic_O ( roman_ℓ ⋅ italic_d ) 𝔾𝔾\mathbb{G}blackboard_G
Lunar [7] O()𝑂O(\ell)italic_O ( roman_ℓ ) O(d)𝑂𝑑O(\ell\cdot d)italic_O ( roman_ℓ ⋅ italic_d ) O()𝑂O(\ell)italic_O ( roman_ℓ ) 𝖯𝖯\mathsf{P}sansserif_P
Apollo (§4.1) O()𝑂O(\ell)italic_O ( roman_ℓ ) O(d)𝑂𝑑O(\ell\cdot d)italic_O ( roman_ℓ ⋅ italic_d ) O()𝑂O(\ell)italic_O ( roman_ℓ ) 𝖯𝖯\mathsf{P}sansserif_P
Artemis (§4.2) O()𝑂O(\ell)italic_O ( roman_ℓ ) O(d)𝑂𝑑O(\ell\cdot d)italic_O ( roman_ℓ ⋅ italic_d ) O()𝑂O(\ell)italic_O ( roman_ℓ ) 𝔾𝔾\mathbb{G}blackboard_G + O(1)𝑂1O(1)italic_O ( 1 ) 𝖯𝖯\mathsf{P}sansserif_P
Table 1: Asymptotic comparison of the overhead introduced by CP-SNARKs for Plonkish relations with KZG-style commitments, with \ellroman_ℓ input commitments each of size d𝑑ditalic_d. Prover time is expressed in group operations, while verifier time is split into group exponentiations (𝔾𝔾\mathbb{G}blackboard_G) and pairings (𝖯𝖯\mathsf{P}sansserif_P).

Cost Analysis. We provide a comparison of the asymptotic complexity of CP-SNARKs that support Plonkish relations in Table 1. We consider only instantiations using KZG-style commitments, as Lunar and Apollo are only compatible with these. We report the commitment checking overhead, i.e., the overhead of the CP-SNARK over an equivalent non-CP SNARK for the same relation. All approaches introduce linear prover overhead, which is likely optimal as simply reading the external commitments already induces such an overhead. Similarly, all approaches add linear overhead to the proof size. While Lunar, Apollo and Artemis all add verifier overhead that is linear in the number of external commitments, we note that for Artemis, we require only a single pairing operation with the linear overhead only consisting of efficient group operations. We note that asymptotics do not provide a full picture of performance. For example, Apollo introduces the same asymptotic overhead as Lunar [7], but is significantly faster in practice. We refer to § 5 for a detailed evaluation of concrete performance.

Security Proof for Artemis

We now show that Artemis is a CP-SNARK. A technicality in the proof is that for knowledge soundness, our extractor must be able to extract the randomness of the individual commitments, even though we only have a single evaluation proof that is masked by a random value. To do so, our extractor internally invokes the extractor of PC several times to reconstruct the randomness from different evaluation proofs.

Theorem 4.1 (Artemis CP-SNARK).

ΠArtemissubscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠\Pi_{Artemis}roman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT in Fig. 1 is a CP-SNARK for the relation \mathcal{R}caligraphic_R and commitment scheme PC. If ΠΠ\Piroman_Π is zero-knowledge and PC is hiding, then ΠArtemissubscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠\Pi_{Artemis}roman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT is zero-knowledge.

Proof.

ΠArtemissubscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠\Pi_{Artemis}roman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT satisfies the properties of a CP-SNARK: Completeness:. It follows from the completeness of the SNARK and the homomorphic and completeness properties of the polynomial commitment scheme. P𝑃Pitalic_P convinces V𝑉Vitalic_V with high probability that ((x,α,β,ρ),(w,μ))𝑥𝛼𝛽𝜌𝑤𝜇superscript((x,\alpha,\beta,\rho),(w,\mu))\in\mathcal{R}^{\prime}( ( italic_x , italic_α , italic_β , italic_ρ ) , ( italic_w , italic_μ ) ) ∈ caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT from the completeness of the SNARK ΠΠ\Piroman_Π. Hence, it holds that ρ=(𝝁+j𝐰𝐢αj)(β)𝜌𝝁subscript𝑗subscript𝐰𝐢superscript𝛼𝑗𝛽\rho=(\bm{\mu}+\sum_{j}\mathbf{w_{i}}\cdot\alpha^{j})(\beta)italic_ρ = ( bold_italic_μ + ∑ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT ) ( italic_β ). Further, since PC is homomorphic, it holds that

c𝑐\displaystyle citalic_c =cμ+j=1cjαjabsentsubscript𝑐𝜇superscriptsubscript𝑗1subscript𝑐𝑗superscript𝛼𝑗\displaystyle=c_{\mu}+\textstyle\sum_{j=1}^{\ell}c_{j}\cdot\alpha^{j}= italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT + ∑ start_POSTSUBSCRIPT italic_j = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_c start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_j end_POSTSUPERSCRIPT
=PC.Commit(\key[ck],𝝁,rμ)+i=1PC.Commit(\key[ck],𝐰𝐢,ri)αiabsentPC.Commit\keydelimited-[]𝑐𝑘𝝁subscript𝑟𝜇superscriptsubscript𝑖1PC.Commit\keydelimited-[]𝑐𝑘subscript𝐰𝐢subscript𝑟𝑖superscript𝛼𝑖\displaystyle=\textsf{{PC}.Commit}(\key[ck],\bm{\mu},r_{\mu})+\textstyle\sum_{% i=1}^{\ell}\textsf{{PC}.Commit}(\key[ck],\mathbf{w_{i}},r_{i})\cdot\alpha^{i}= PC.Commit ( [ italic_c italic_k ] , bold_italic_μ , italic_r start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT ) + ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT PC.Commit ( [ italic_c italic_k ] , bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ) ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT
=PC.Commit(\key[ck],𝝁+i=1𝐰𝐢αi,rμ+i=1riαi)absentPC.Commit\keydelimited-[]𝑐𝑘𝝁superscriptsubscript𝑖1subscript𝐰𝐢superscript𝛼𝑖subscript𝑟𝜇superscriptsubscript𝑖1subscript𝑟𝑖superscript𝛼𝑖\displaystyle=\textsf{{PC}.Commit}(\key[ck],\bm{\mu}+\textstyle\sum_{i=1}^{% \ell}\mathbf{w_{i}}\cdot\alpha^{i},r_{\mu}+\textstyle\sum_{i=1}^{\ell}r_{i}% \cdot\alpha^{i})= PC.Commit ( [ italic_c italic_k ] , bold_italic_μ + ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT , italic_r start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT + ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT )

Hence, the opening proof of the PC for c𝑐citalic_c evaluates to ρ𝜌\rhoitalic_ρ at β𝛽\betaitalic_β due to the homomorphic property of the scheme. V𝑉Vitalic_V accepts because of the completeness of the polynomial commitment scheme.

Knowledge Soundness. Our goal is to extract a witness (w,r1,,r)𝑤subscript𝑟1subscript𝑟(w,r_{1},\ldots,r_{\ell})( italic_w , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_r start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) that satisfies the relation superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT given an instance (x,c1,,c)𝑥subscript𝑐1subscript𝑐(x,c_{1},\ldots,c_{\ell})( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ). Specifically, (w,r1,,r)𝑤subscript𝑟1subscript𝑟(w,r_{1},\ldots,r_{\ell})( italic_w , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_r start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) such that (x,w)𝑥𝑤(x,w)\in\mathcal{R}( italic_x , italic_w ) ∈ caligraphic_R and cisubscript𝑐𝑖c_{i}italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT opens to 𝐰𝐢subscript𝐰𝐢\mathbf{w_{i}}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT with randomness risubscript𝑟𝑖r_{i}italic_r start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT for all i[]𝑖delimited-[]i\in[\ell]italic_i ∈ [ roman_ℓ ]. At a high level our extractor Artemissubscript𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathcal{E}_{Artemis}caligraphic_E start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT works as follows:

  1. 1.

    Extract the witness of the SNARK ΠΠ\Piroman_Π w~~𝑤\tilde{w}over~ start_ARG italic_w end_ARG using ΠsubscriptΠ\mathcal{E}_{\Pi}caligraphic_E start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT.

  2. 2.

    Execute protocol +11\ell+1roman_ℓ + 1 times for distinct challenges by rewinding the prover to the second step of the protocol in order to reconstruct the masked polynomial defined by the randomness of the commitments r~1,,r~subscript~𝑟1subscript~𝑟\tilde{r}_{1},\ldots,\tilde{r}_{\ell}over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT through the different r𝑟ritalic_r obtained through the output of PCsubscriptPC\mathcal{E}_{\textsf{PC}}caligraphic_E start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT on the evaluation proof for c𝑐citalic_c.

  3. 3.

    Return (w~,r~1,,r~)~𝑤subscript~𝑟1subscript~𝑟(\tilde{w},\tilde{r}_{1},\ldots,\tilde{r}_{\ell})( over~ start_ARG italic_w end_ARG , over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ).

We now provide a detailed proof.
Suppose that \adv convinces V𝑉Vitalic_V that (x,w)𝑥𝑤superscript(x,w)\in\mathcal{R}^{\prime}( italic_x , italic_w ) ∈ caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT with non-negligible probability. We show that there exists Artemissubscript𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathcal{E}_{Artemis}caligraphic_E start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT that, assuming the existence of extractors ΠsubscriptΠ\mathcal{E}_{\Pi}caligraphic_E start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT for ΠΠ\Piroman_Π and PCsubscriptPC\mathcal{E}_{\textsf{PC}}caligraphic_E start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT for PC, outputs a valid witness (w,r1,,r)𝑤subscript𝑟1subscript𝑟(w,r_{1},\ldots,r_{\ell})( italic_w , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_r start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) for superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT with non-negligible probability given access to \adv.

We first invoke the extractor ΠsubscriptΠ\mathcal{E}_{\Pi}caligraphic_E start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT which exists due to the knowledge soundness of ΠΠ\Piroman_Π. Upon receiving the same input as \advΠsubscript\advΠ\adv_{\Pi}start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT, ΠsubscriptΠ\mathcal{E}_{\Pi}caligraphic_E start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT outputs a witness (w^,μ)^𝑤𝜇(\hat{w},\mu)( over^ start_ARG italic_w end_ARG , italic_μ ) after interacting with \adv such that ((x,β,ρ),(w^,μ^))𝑥𝛽𝜌^𝑤^𝜇((x,{\beta},{\rho}),(\hat{w},\hat{\mu}))( ( italic_x , italic_β , italic_ρ ) , ( over^ start_ARG italic_w end_ARG , over^ start_ARG italic_μ end_ARG ) ) satisfies the relation superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. If the cheating prover \adv convinces the ΠArtemissubscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠\Pi_{Artemis}roman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT verifier V𝑉Vitalic_V, then the proof ΠΠ\Piroman_Π is valid, except with negligible probability ϵΠsubscriptitalic-ϵΠ\epsilon_{\Pi}italic_ϵ start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT. Hence, in the following, we know that (x,w^)𝑥^𝑤(x,\hat{w})\in\mathcal{R}( italic_x , over^ start_ARG italic_w end_ARG ) ∈ caligraphic_R and ρ=𝐠^(β)𝜌^𝐠𝛽{\rho}=\hat{\mathbf{g}}({\beta})italic_ρ = over^ start_ARG bold_g end_ARG ( italic_β ) where 𝐠^^𝐠\hat{\mathbf{g}}over^ start_ARG bold_g end_ARG is defined as in the protocol using w^^𝑤\hat{w}over^ start_ARG italic_w end_ARG and μ^^𝜇\hat{\mu}over^ start_ARG italic_μ end_ARG.

The extractor then samples +11\ell+1roman_ℓ + 1 distinct random challenges for α𝛼\alphaitalic_α and runs the protocol with \adv +11\ell+1roman_ℓ + 1 times, rewinding the prover to the second step of the protocol where it receives α𝛼\alphaitalic_α from V𝑉Vitalic_V. On each iteration, if the cheating prover \adv convinces the ΠArtemissubscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠\Pi_{Artemis}roman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT verifier V𝑉Vitalic_V, then the verifier outputs 1 after the evaluation protocol except with negligible probability ϵPCsubscriptitalic-ϵPC\epsilon_{\textsf{PC}}italic_ϵ start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT. The extractor PCsubscriptPC\mathcal{E}_{\textsf{PC}}caligraphic_E start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT returns a polynomial 𝐠superscript𝐠\mathbf{g}^{\prime}bold_g start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT such that ρ=𝐠(β)𝜌superscript𝐠𝛽\rho=\mathbf{g}^{\prime}(\beta)italic_ρ = bold_g start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ( italic_β ), as well as a decommitment rsuperscript𝑟r^{\prime}italic_r start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT for csuperscript𝑐c^{\prime}italic_c start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT. Suppose that 𝐠𝐠^superscript𝐠^𝐠\mathbf{g}^{\prime}\neq\hat{\mathbf{g}}bold_g start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≠ over^ start_ARG bold_g end_ARG. Then, because β𝛽\betaitalic_β was sampled uniformly at random, from the Demillo-Lipton-Schwartz-Zippel (Lemma A.5 in Appendix A), it holds that:

Pr[PC.Eval(\key[ck],c,β,ρ;𝐠,r)=1]dp,PrPC.Eval\keydelimited-[]𝑐𝑘superscript𝑐𝛽𝜌superscript𝐠superscript𝑟1𝑑𝑝\Pr\left[\textsf{{PC}.Eval}(\key[ck],c^{\prime},\beta,\rho;\mathbf{g}^{\prime}% ,r^{\prime})=1\right]\leq\frac{d}{p}\enspace,roman_Pr [ PC.Eval ( [ italic_c italic_k ] , italic_c start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_β , italic_ρ ; bold_g start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_r start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = 1 ] ≤ divide start_ARG italic_d end_ARG start_ARG italic_p end_ARG ,

where d=maxi\abswi𝑑subscript𝑖\abssubscript𝑤𝑖d=\max_{i}\abs{w_{i}}italic_d = roman_max start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT. Hence, 𝐠=𝐠^superscript𝐠^𝐠\mathbf{g}^{\prime}=\hat{\mathbf{g}}bold_g start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = over^ start_ARG bold_g end_ARG with overwhelming probability.

With the +11\ell+1roman_ℓ + 1 evaluation pairs of α,r~𝛼~𝑟\alpha,\tilde{r}italic_α , over~ start_ARG italic_r end_ARG, Artemissubscript𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathcal{E}_{Artemis}caligraphic_E start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT reconstructs the randomness of the individual commitments r~1,,r~subscript~𝑟1subscript~𝑟\tilde{r}_{1},\ldots,\tilde{r}_{\ell}over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT. Interpolating the points of the +11\ell+1roman_ℓ + 1 decommitments α(j),r,(j)superscript𝛼𝑗superscript𝑟𝑗\alpha^{(j)},r^{\prime,(j)}italic_α start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT , italic_r start_POSTSUPERSCRIPT ′ , ( italic_j ) end_POSTSUPERSCRIPT, Artemissubscript𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathcal{E}_{Artemis}caligraphic_E start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT retrieves the randomness r~μ,r~1,,r~subscript~𝑟𝜇subscript~𝑟1subscript~𝑟\tilde{r}_{\mu},\tilde{r}_{1},\ldots,\tilde{r}_{\ell}over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT , over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT such that

r~μ+i=1r~i(α(j))i=r~,(j)subscript~𝑟𝜇superscriptsubscript𝑖1subscript~𝑟𝑖superscriptsuperscript𝛼𝑗𝑖superscript~𝑟𝑗\tilde{r}_{\mu}+\textstyle\sum_{i=1}^{\ell}\tilde{r}_{i}\cdot(\alpha^{(j)})^{i% }=\tilde{r}^{\prime,(j)}over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT + ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ ( italic_α start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT ) start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT = over~ start_ARG italic_r end_ARG start_POSTSUPERSCRIPT ′ , ( italic_j ) end_POSTSUPERSCRIPT

for all j[+1]𝑗delimited-[]1j\in[\ell+1]italic_j ∈ [ roman_ℓ + 1 ]. The probability that r~1,,r~r1,,rformulae-sequencesubscript~𝑟1subscript~𝑟subscript𝑟1subscript𝑟\tilde{r}_{1},\ldots,\tilde{r}_{\ell}\neq r_{1},\ldots,r_{\ell}over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , over~ start_ARG italic_r end_ARG start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ≠ italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_r start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT depends on the probability that any of the points α(j),r,(j)superscript𝛼𝑗superscript𝑟𝑗\alpha^{(j)},r^{\prime,(j)}italic_α start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT , italic_r start_POSTSUPERSCRIPT ′ , ( italic_j ) end_POSTSUPERSCRIPT is not on 𝐠^^𝐠\hat{\mathbf{g}}over^ start_ARG bold_g end_ARG or fails to be extracted by PCsubscriptPC\mathcal{E}_{\textsf{PC}}caligraphic_E start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT, and is bounded by

(+1)Pr[𝐠𝐠^]=(+1)(dp+ϵPC).1Prsuperscript𝐠^𝐠1𝑑𝑝subscriptitalic-ϵPC\displaystyle(\ell+1)\cdot\Pr\left[\mathbf{g}^{\prime}\neq\hat{\mathbf{g}}% \right]=(\ell+1)\cdot\left(\frac{d}{p}+\epsilon_{\textsf{PC}}\right).( roman_ℓ + 1 ) ⋅ roman_Pr [ bold_g start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ≠ over^ start_ARG bold_g end_ARG ] = ( roman_ℓ + 1 ) ⋅ ( divide start_ARG italic_d end_ARG start_ARG italic_p end_ARG + italic_ϵ start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT ) .

As a result, the total soundness error is bounded by

ϵΠ+(+1)dp+(+1)ϵPCsubscriptitalic-ϵΠ1𝑑𝑝1subscriptitalic-ϵPC\displaystyle\epsilon_{\Pi}+\frac{(\ell+1)\cdot d}{p}+(\ell+1)\cdot\epsilon_{% \textsf{PC}}italic_ϵ start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT + divide start_ARG ( roman_ℓ + 1 ) ⋅ italic_d end_ARG start_ARG italic_p end_ARG + ( roman_ℓ + 1 ) ⋅ italic_ϵ start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT
\displaystyle\leq{} ϵΠ+2\abswp+(\absw+1)ϵPCsubscriptitalic-ϵΠ2\abs𝑤𝑝\abs𝑤1subscriptitalic-ϵPC\displaystyle\epsilon_{\Pi}+\frac{2\cdot\abs{w}}{p}+(\abs{w}+1)\cdot\epsilon_{% \textsf{PC}}italic_ϵ start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT + divide start_ARG 2 ⋅ italic_w end_ARG start_ARG italic_p end_ARG + ( italic_w + 1 ) ⋅ italic_ϵ start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT

because d𝑑\ell\cdot droman_ℓ ⋅ italic_d is at most the size of the witness \absw\abs𝑤\abs{w}italic_w, resulting in a soundness error that is negligible in the security parameter λ𝜆\lambdaitalic_λ. Finally, the extractor performs the rewinding procedure an expected O()𝑂O(\ell)italic_O ( roman_ℓ ) times, resulting in a running time of Artemissubscript𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathcal{E}_{Artemis}caligraphic_E start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT linear in \absx\abs𝑥\abs{x}italic_x and \absw\abs𝑤\abs{w}italic_w.

Zero-knowledge. Artemis𝐴𝑟𝑡𝑒𝑚𝑖subscript𝑠Artemis_{\mathcal{R}}italic_A italic_r italic_t italic_e italic_m italic_i italic_s start_POSTSUBSCRIPT caligraphic_R end_POSTSUBSCRIPT satisfies zero-knowledge if PC is hiding and ΠΠ\Piroman_Π is a zk-SNARK. Concretely, we show that there exists a simulator 𝖲𝗂𝗆Artemissubscript𝖲𝗂𝗆𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathsf{Sim}_{Artemis}sansserif_Sim start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT that, assuming the existence of a simulator 𝖲𝗂𝗆PCsubscript𝖲𝗂𝗆PC\mathsf{Sim}_{\textsf{PC}}sansserif_Sim start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT for PC and a simulator 𝖲𝗂𝗆Πsubscript𝖲𝗂𝗆Π\mathsf{Sim}_{\Pi}sansserif_Sim start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT for ΠΠ\Piroman_Π, outputs a valid transcript when given an instance (x,c1,,c)𝑥subscript𝑐1subscript𝑐(x,c_{1},\ldots,c_{\ell})( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) as input. We will show that the transcript generated by 𝖲𝗂𝗆Artemissubscript𝖲𝗂𝗆𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathsf{Sim}_{Artemis}sansserif_Sim start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT is statistically indistinguishable from the view of an honest verifier V𝑉Vitalic_V running an interactive protocol ΠArtemissubscriptΠ𝐴𝑟𝑡𝑒𝑚𝑖𝑠\Pi_{Artemis}roman_Π start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT with the prover P𝑃Pitalic_P holding a valid instance and witness ((x,c1,,c),(w,r1,,r))𝑥subscript𝑐1subscript𝑐𝑤subscript𝑟1subscript𝑟((x,c_{1},\ldots,c_{\ell}),(w,r_{1},\ldots,r_{\ell}))\in\mathcal{R}( ( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) , ( italic_w , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_r start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) ) ∈ caligraphic_R.

At a high level, the simulator 𝖲𝗂𝗆Artemissubscript𝖲𝗂𝗆𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathsf{Sim}_{Artemis}sansserif_Sim start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT must generate a valid transcript consisting of cμsubscript𝑐𝜇c_{\mu}italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT, ρ𝜌\rhoitalic_ρ and valid transcripts for ΠΠ\Piroman_Π and PC for a given instance (x,c1,,c)𝑥subscript𝑐1subscript𝑐(x,c_{1},\ldots,c_{\ell})( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) and challenges α,β𝛼𝛽\alpha,\betaitalic_α , italic_β. The primary challenge is in generating the transcript for PC, as 𝖲𝗂𝗆Πsubscript𝖲𝗂𝗆Π\mathsf{Sim}_{\Pi}sansserif_Sim start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT will create a suitable transcript no matter what value of β𝛽\betaitalic_β the simulator passes to it (as long as it is consistent with other uses of β𝛽\betaitalic_β). However, an instance (c,β,ρ)𝑐𝛽𝜌(c,\beta,\rho)( italic_c , italic_β , italic_ρ ) for PC is valid only if the polynomial 𝐠𝐠\mathbf{g}bold_g inside c𝑐citalic_c evaluated at β𝛽\betaitalic_β equals ρ𝜌\rhoitalic_ρ. In addition, we need to ensure that c=cμ+i=1ciαi𝑐subscript𝑐𝜇superscriptsubscript𝑖1subscript𝑐𝑖superscript𝛼𝑖c=c_{\mu}+\textstyle\sum_{i=1}^{\ell}c_{i}\cdot\alpha^{i}italic_c = italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT + ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT, as this is how the verifier computes c𝑐citalic_c in Artemis. This can easily be achieved by setting cμ=cρi=1ciαisubscript𝑐𝜇subscript𝑐𝜌superscriptsubscript𝑖1subscript𝑐𝑖superscript𝛼𝑖c_{\mu}=c_{\rho}-\textstyle\sum_{i=1}^{\ell}c_{i}\cdot\alpha^{i}italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT = italic_c start_POSTSUBSCRIPT italic_ρ end_POSTSUBSCRIPT - ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT where cρsubscript𝑐𝜌c_{\rho}italic_c start_POSTSUBSCRIPT italic_ρ end_POSTSUBSCRIPT is a commitment to a polynomial that evaluates to ρ𝜌\rhoitalic_ρ everywhere. More specifically, the simulator 𝖲𝗂𝗆Artemissubscript𝖲𝗂𝗆𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathsf{Sim}_{Artemis}sansserif_Sim start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT proceeds as follows:

  1. 1.

    Sample two random values ρ\sample𝔽p,rμ\sample𝔽psuperscript𝜌\samplesubscript𝔽𝑝subscript𝑟𝜇\samplesubscript𝔽𝑝\rho^{\prime}\sample\mathbb{F}_{p},r_{\mu}\sample\mathbb{F}_{p}italic_ρ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and

  2. 2.

    Compute cρ=PC.Commit(\key[ck],𝐠ρ,rμ)superscriptsubscript𝑐𝜌PC.Commit\keydelimited-[]𝑐𝑘subscript𝐠superscript𝜌subscript𝑟𝜇c_{\rho}^{\prime}=\textsf{{PC}.Commit}(\key[ck],\mathbf{g}_{\rho^{\prime}},r_{% \mu})italic_c start_POSTSUBSCRIPT italic_ρ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = PC.Commit ( [ italic_c italic_k ] , bold_g start_POSTSUBSCRIPT italic_ρ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT ) where 𝐠ρsubscript𝐠superscript𝜌\mathbf{g}_{\rho^{\prime}}bold_g start_POSTSUBSCRIPT italic_ρ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT end_POSTSUBSCRIPT is the 0-degree polynomial defined by ρsuperscript𝜌\rho^{\prime}italic_ρ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT.

  3. 3.

    Compute cμ=cρi=1ciαisuperscriptsubscript𝑐𝜇superscriptsubscript𝑐𝜌superscriptsubscript𝑖1subscript𝑐𝑖superscript𝛼𝑖c_{\mu}^{\prime}=c_{\rho}^{\prime}-\textstyle\sum_{i=1}^{\ell}c_{i}\cdot\alpha% ^{i}italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = italic_c start_POSTSUBSCRIPT italic_ρ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT - ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT.

  4. 4.

    Invoke 𝖲𝗂𝗆PCsubscript𝖲𝗂𝗆PC\mathsf{Sim}_{\textsf{PC}}sansserif_Sim start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT to generate a transcript τPCsubscript𝜏PC\tau_{\textsf{PC}}italic_τ start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT on instance (cρ,β,ρ)superscriptsubscript𝑐𝜌𝛽𝜌(c_{\rho}^{\prime},\beta,\rho)( italic_c start_POSTSUBSCRIPT italic_ρ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_β , italic_ρ ).

  5. 5.

    Invoke 𝖲𝗂𝗆Πsubscript𝖲𝗂𝗆Π\mathsf{Sim}_{\Pi}sansserif_Sim start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT to generate a transcript τΠsubscript𝜏Π\tau_{\Pi}italic_τ start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT on instance (x,α,β,ρ)𝑥𝛼𝛽𝜌(x,\alpha,\beta,\rho)( italic_x , italic_α , italic_β , italic_ρ ).

  6. 6.

    Output the tuple (cμ,ρ,τPC,τΠ)superscriptsubscript𝑐𝜇superscript𝜌subscript𝜏PCsubscript𝜏Π(c_{\mu}^{\prime},\rho^{\prime},\tau_{\textsf{PC}},\tau_{\Pi})( italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_ρ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_τ start_POSTSUBSCRIPT PC end_POSTSUBSCRIPT , italic_τ start_POSTSUBSCRIPT roman_Π end_POSTSUBSCRIPT ).

The transcript output by 𝖲𝗂𝗆Artemissubscript𝖲𝗂𝗆𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathsf{Sim}_{Artemis}sansserif_Sim start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT is valid for (x,c1,,c)𝑥subscript𝑐1subscript𝑐(x,c_{1},\ldots,c_{\ell})( italic_x , italic_c start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_c start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT ) and challenges α,β𝛼𝛽\alpha,\betaitalic_α , italic_β, because c=cμ+i=1ciαi=cρi=1ciαi+i=1ciαi=cρ𝑐superscriptsubscript𝑐𝜇superscriptsubscript𝑖1subscript𝑐𝑖superscript𝛼𝑖subscript𝑐𝜌superscriptsubscript𝑖1subscript𝑐𝑖superscript𝛼𝑖superscriptsubscript𝑖1subscript𝑐𝑖superscript𝛼𝑖subscript𝑐𝜌c=c_{\mu}^{\prime}+\textstyle\sum_{i=1}^{\ell}c_{i}\cdot\alpha^{i}=c_{\rho}-% \textstyle\sum_{i=1}^{\ell}c_{i}\cdot\alpha^{i}+\textstyle\sum_{i=1}^{\ell}c_{% i}\cdot\alpha^{i}=c_{\rho}italic_c = italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT + ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT = italic_c start_POSTSUBSCRIPT italic_ρ end_POSTSUBSCRIPT - ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT + ∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_c start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT = italic_c start_POSTSUBSCRIPT italic_ρ end_POSTSUBSCRIPT, resulting in a valid instance (cρ,β,ρ)subscript𝑐𝜌superscript𝛽𝜌(c_{\rho},\beta^{\prime},\rho)( italic_c start_POSTSUBSCRIPT italic_ρ end_POSTSUBSCRIPT , italic_β start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_ρ ) for PC. The distribution of cμsuperscriptsubscript𝑐𝜇c_{\mu}^{\prime}italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT is the same as that of cμsubscript𝑐𝜇c_{\mu}italic_c start_POSTSUBSCRIPT italic_μ end_POSTSUBSCRIPT in the real interaction due to the hiding property of PC. The distribution of the evaluation point βsuperscript𝛽\beta^{\prime}italic_β start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT output by 𝖲𝗂𝗆Artemissubscript𝖲𝗂𝗆𝐴𝑟𝑡𝑒𝑚𝑖𝑠\mathsf{Sim}_{Artemis}sansserif_Sim start_POSTSUBSCRIPT italic_A italic_r italic_t italic_e italic_m italic_i italic_s end_POSTSUBSCRIPT is the same as β𝛽\betaitalic_β in the real interaction, as the former is uniformly random over 𝔽psubscript𝔽𝑝\mathbb{F}_{p}blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT, and the latter is masked by a random value uniformly sampled from 𝔽psubscript𝔽𝑝\mathbb{F}_{p}blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. Therefore, the full transcript is indistinguishable from the transcript of the verifier interacting with the prover in the real world.

\mathcal{R}caligraphic_R\cdotsρprevsubscript𝜌prev\rho_{\text{prev}}italic_ρ start_POSTSUBSCRIPT prev end_POSTSUBSCRIPTρ𝜌\rhoitalic_ρw𝑤witalic_wβ𝛽\betaitalic_βFnf+1subscript𝐹subscript𝑛𝑓1F_{n_{f}+1}italic_F start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPTβ𝛽\betaitalic_ββ𝛽\betaitalic_ββ𝛽\betaitalic_ββ𝛽\betaitalic_ββ𝛽\betaitalic_βw(0)superscript𝑤0w^{({0})}italic_w start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPTw(1)superscript𝑤1w^{({1})}italic_w start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPTw(2)superscript𝑤2w^{({2})}italic_w start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPTw(3)superscript𝑤3w^{({3})}italic_w start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPTw(4)superscript𝑤4w^{({4})}italic_w start_POSTSUPERSCRIPT ( 4 ) end_POSTSUPERSCRIPTρ2subscript𝜌2\rho_{2}italic_ρ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPTρ3subscript𝜌3\rho_{3}italic_ρ start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPTρ4subscript𝜌4\rho_{4}italic_ρ start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPTρ5subscript𝜌5\rho_{5}italic_ρ start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT00ρ1subscript𝜌1\rho_{1}italic_ρ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPTρ2subscript𝜌2\rho_{2}italic_ρ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPTρ3subscript𝜌3\rho_{3}italic_ρ start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPTρ4subscript𝜌4\rho_{4}italic_ρ start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPTρ5subscript𝜌5\rho_{5}italic_ρ start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPTω0superscript𝜔0\omega^{0}italic_ω start_POSTSUPERSCRIPT 0 end_POSTSUPERSCRIPTω1superscript𝜔1\omega^{1}italic_ω start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTω2superscript𝜔2\omega^{2}italic_ω start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPTω3superscript𝜔3\omega^{3}italic_ω start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPTω4superscript𝜔4\omega^{4}italic_ω start_POSTSUPERSCRIPT 4 end_POSTSUPERSCRIPT11111111111111111111𝐛hsubscript𝐛h\mathbf{b}_{\textsf{h}}bold_b start_POSTSUBSCRIPT h end_POSTSUBSCRIPTAdviceInstanceFixed
Figure 2: Simplified Visualization of a Plonkish grid with our extensions for a single commitment.
\mathcal{R}caligraphic_R\cdotsρprevsubscript𝜌prev\rho_{\text{prev}}italic_ρ start_POSTSUBSCRIPT prev end_POSTSUBSCRIPTρ𝜌\rhoitalic_ρw1subscript𝑤1w_{1}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT\ldots\ldotswnhsubscript𝑤subscript𝑛w_{n_{h}}italic_w start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_h end_POSTSUBSCRIPT end_POSTSUBSCRIPTβ1superscript𝛽1\beta^{1}italic_β start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT\ldots\ldotsβnhsuperscript𝛽subscript𝑛\beta^{n_{h}}italic_β start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_h end_POSTSUBSCRIPT end_POSTSUPERSCRIPTα1superscript𝛼1\alpha^{1}italic_α start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPT\ldots\ldotsαsuperscript𝛼\alpha^{\ell}italic_α start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPTFnf+1subscript𝐹subscript𝑛𝑓1F_{n_{f}+1}italic_F start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPTβ1superscript𝛽1\beta^{1}italic_β start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTβ1superscript𝛽1\beta^{1}italic_β start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTβ1superscript𝛽1\beta^{1}italic_β start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTβ1superscript𝛽1\beta^{1}italic_β start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTβ1superscript𝛽1\beta^{1}italic_β start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTβnhsuperscript𝛽subscript𝑛\beta^{n_{h}}italic_β start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_h end_POSTSUBSCRIPT end_POSTSUPERSCRIPTβnhsuperscript𝛽subscript𝑛\beta^{n_{h}}italic_β start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_h end_POSTSUBSCRIPT end_POSTSUPERSCRIPTβnhsuperscript𝛽subscript𝑛\beta^{n_{h}}italic_β start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_h end_POSTSUBSCRIPT end_POSTSUPERSCRIPTβnhsuperscript𝛽subscript𝑛\beta^{n_{h}}italic_β start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_h end_POSTSUBSCRIPT end_POSTSUPERSCRIPTβnhsuperscript𝛽subscript𝑛\beta^{n_{h}}italic_β start_POSTSUPERSCRIPT italic_n start_POSTSUBSCRIPT italic_h end_POSTSUBSCRIPT end_POSTSUPERSCRIPTα1superscript𝛼1\alpha^{1}italic_α start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTα1superscript𝛼1\alpha^{1}italic_α start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTα1superscript𝛼1\alpha^{1}italic_α start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTα1superscript𝛼1\alpha^{1}italic_α start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTα1superscript𝛼1\alpha^{1}italic_α start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTαsuperscript𝛼\alpha^{\ell}italic_α start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPTαsuperscript𝛼\alpha^{\ell}italic_α start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPTαsuperscript𝛼\alpha^{\ell}italic_α start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPTαsuperscript𝛼\alpha^{\ell}italic_α start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPTαsuperscript𝛼\alpha^{\ell}italic_α start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPTw1(0)superscriptsubscript𝑤10w_{1}^{({0})}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPTw1(2)superscriptsubscript𝑤12w_{1}^{({2})}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPTw1(4)superscriptsubscript𝑤14w_{1}^{({4})}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 4 ) end_POSTSUPERSCRIPTw1(6)superscriptsubscript𝑤16w_{1}^{({6})}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 6 ) end_POSTSUPERSCRIPTw1(8)superscriptsubscript𝑤18w_{1}^{({8})}italic_w start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 8 ) end_POSTSUPERSCRIPTw(d8)superscriptsubscript𝑤𝑑8w_{\ell}^{(d-{8})}italic_w start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_d - 8 ) end_POSTSUPERSCRIPTw(d6)superscriptsubscript𝑤𝑑6w_{\ell}^{(d-{6})}italic_w start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_d - 6 ) end_POSTSUPERSCRIPTw(d4)superscriptsubscript𝑤𝑑4w_{\ell}^{(d-{4})}italic_w start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_d - 4 ) end_POSTSUPERSCRIPTw(d2)superscriptsubscript𝑤𝑑2w_{\ell}^{(d-{2})}italic_w start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_d - 2 ) end_POSTSUPERSCRIPTw(d)superscriptsubscript𝑤𝑑w_{\ell}^{(d)}italic_w start_POSTSUBSCRIPT roman_ℓ end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_d ) end_POSTSUPERSCRIPTρ2subscript𝜌2\rho_{2}italic_ρ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPTρ3subscript𝜌3\rho_{3}italic_ρ start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPTρ4subscript𝜌4\rho_{4}italic_ρ start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPTρ5subscript𝜌5\rho_{5}italic_ρ start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPT00ρ1subscript𝜌1\rho_{1}italic_ρ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPTρ2subscript𝜌2\rho_{2}italic_ρ start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPTρ3subscript𝜌3\rho_{3}italic_ρ start_POSTSUBSCRIPT 3 end_POSTSUBSCRIPTρ4subscript𝜌4\rho_{4}italic_ρ start_POSTSUBSCRIPT 4 end_POSTSUBSCRIPTρ5subscript𝜌5\rho_{5}italic_ρ start_POSTSUBSCRIPT 5 end_POSTSUBSCRIPTω0superscript𝜔0\omega^{0}italic_ω start_POSTSUPERSCRIPT 0 end_POSTSUPERSCRIPTω1superscript𝜔1\omega^{1}italic_ω start_POSTSUPERSCRIPT 1 end_POSTSUPERSCRIPTω2superscript𝜔2\omega^{2}italic_ω start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPTω3superscript𝜔3\omega^{3}italic_ω start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPTω4superscript𝜔4\omega^{4}italic_ω start_POSTSUPERSCRIPT 4 end_POSTSUPERSCRIPT11111111111111111111𝐛hsubscript𝐛h\mathbf{b}_{\textsf{h}}bold_b start_POSTSUBSCRIPT h end_POSTSUBSCRIPTAdviceInstanceFixed
Figure 3: Visualization of a Plonkish grid with our extensions for \ellroman_ℓ commitments of size d𝑑ditalic_d.

Efficient Arithmetization for Artemis

In Artemis, we need to augment arithmetizations of \mathcal{R}caligraphic_R to an efficient arithmetization of superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT

={((x,α,β,ρ),(w,μ)):(x,w)ρ=(𝝁+i𝐰𝐢+𝟏αi)(β)}superscript𝑥𝛼𝛽𝜌𝑤𝜇:𝑥𝑤𝜌𝝁subscript𝑖subscript𝐰𝐢1superscript𝛼𝑖𝛽\mathcal{R}^{\prime}=\leavevmode\hbox{$\left\{\begin{array}[]{c}((x,\alpha,% \beta,\rho),(w,\mu))\\ :\\ (x,w)\in\mathcal{R}\land\rho=(\bm{\mu}+\sum_{i}\mathbf{w_{i+1}}\cdot\alpha^{i}% )(\beta)\end{array}\right\}$}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT = { start_ARRAY start_ROW start_CELL ( ( italic_x , italic_α , italic_β , italic_ρ ) , ( italic_w , italic_μ ) ) end_CELL end_ROW start_ROW start_CELL : end_CELL end_ROW start_ROW start_CELL ( italic_x , italic_w ) ∈ caligraphic_R ∧ italic_ρ = ( bold_italic_μ + ∑ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT bold_w start_POSTSUBSCRIPT bold_i + bold_1 end_POSTSUBSCRIPT ⋅ italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ) ( italic_β ) end_CELL end_ROW end_ARRAY }

While doing this naively will generally be reasonably efficient, in the following we show an optimized approach, focusing on Plonkish arithmetizations (cf. Definition 2.3) as these are used by the state-of-the-art zkML approaches. In Figures 2 and 3, we visualize the required additions to the Plonkish grid. Note that this is not to scale: in practice, grids will have many more rows, and the vast majority of the grid will be dedicated to the original relation \mathcal{R}caligraphic_R rather than our additions.

Strawman Approach. A naive approach to arithmetizing superscript\mathcal{R}^{\prime}caligraphic_R start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT would be express it as the inner product of the witness polynomial and the powers of β0,,βdsubscript𝛽0superscript𝛽𝑑\beta_{0},\ldots,\beta^{d}italic_β start_POSTSUBSCRIPT 0 end_POSTSUBSCRIPT , … , italic_β start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT. As β𝛽\betaitalic_β is public, the verifier can easily compute these powers, resulting in fewer constraints. Unfortunately, this approach leads to a significant overhead for the verifier, as it must interpolate a polynomial for the powers of β𝛽\betaitalic_β over the evaluation domain, resulting in a linear overhead of the verifier.

Horner’s Method. As the additional constraint that we need to add is essentially an evaluation of a polynomial at a specific point, we can utilize an arithmetization based on Horner’s method [25]. In order to illustrate this, we first consider a simplified setting, with a single commitment c𝑐citalic_c to witness polynomial 𝐰𝐰\mathbf{w}bold_w with coefficients w𝑤witalic_w (i.e., =11\ell=1roman_ℓ = 1). For this simplified setting, which we visualize in Figure 2, we will also assume that the size d𝑑ditalic_d of the witness matches the number of rows n𝑛nitalic_n of the Plonkish grid. We denote the individual elements wisubscript𝑤𝑖w_{i}italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT as wi(0),,wi(d1)superscriptsubscript𝑤𝑖0superscriptsubscript𝑤𝑖𝑑1w_{i}^{(0)},\ldots,w_{i}^{(d-1)}italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT , … , italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_d - 1 ) end_POSTSUPERSCRIPT. Note that we specifically use zero-based indexing here as this is more natural when considering these elements as coefficients of 𝐰𝐢subscript𝐰𝐢\mathbf{w_{i}}bold_w start_POSTSUBSCRIPT bold_i end_POSTSUBSCRIPT.

According to Horner’s method, we can then compute

w(0)+w(1)β+w(2)β2+w(3)β3+superscript𝑤0superscript𝑤1𝛽superscript𝑤2superscript𝛽2superscript𝑤3superscript𝛽3w^{(0)}+w^{(1)}\beta+w^{(2)}\beta^{2}+w^{(3)}\beta^{3}+\cdotsitalic_w start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT italic_β + italic_w start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + ⋯

as

w(0)+β(w(1)+β(w(2)+β(w(3)+))).superscript𝑤0𝛽superscript𝑤1𝛽superscript𝑤2𝛽superscript𝑤3w^{(0)}+\beta\bigg{(}w^{(1)}+\beta\Big{(}w^{(2)}+\beta\big{(}w^{(3)}+\cdots% \big{)}\Big{)}\bigg{)}.italic_w start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT + italic_β ( italic_w start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT + italic_β ( italic_w start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT + italic_β ( italic_w start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT + ⋯ ) ) ) .

This latter form enables a convenient recursive computation, that, in order to compute the partial evaluation down to degree j𝑗jitalic_j only requires access to the j𝑗jitalic_j-th coefficient, β𝛽\betaitalic_β, and the j+1𝑗1j+1italic_j + 1-th partial evaluation. We denote the partial evaluation for the j𝑗jitalic_j-th degree as ρjsubscript𝜌𝑗\rho_{j}italic_ρ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT. Then, we have the recurrence relation

ρj=w(j)+βρj+1 with ρd=0.subscript𝜌𝑗superscript𝑤𝑗𝛽subscript𝜌𝑗1 with subscript𝜌𝑑0\rho_{j}=w^{(j)}+\beta*\rho_{j+1}\text{\ with \ }\rho_{d}=0.italic_ρ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = italic_w start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT + italic_β ∗ italic_ρ start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT with italic_ρ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT = 0 .

To express this in the Plonkish grid, we extend the grid with a set of additional columns: 𝐚na+1subscript𝐚subscript𝑛𝑎1\mathbf{a}_{n_{a}+1}bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT to store ρj+1subscript𝜌𝑗1\rho_{j+1}italic_ρ start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT, 𝐚na+2subscript𝐚subscript𝑛𝑎2\mathbf{a}_{n_{a}+2}bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 2 end_POSTSUBSCRIPT to store ρjsubscript𝜌𝑗\rho_{j}italic_ρ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT, and 𝐚na+3subscript𝐚subscript𝑛𝑎3\mathbf{a}_{n_{a}+3}bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 3 end_POSTSUBSCRIPT to store w(j)superscript𝑤𝑗w^{(j)}italic_w start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT. We also add a selector column 𝐟nf+1subscript𝐟subscript𝑛𝑓1\mathbf{f}_{n_{f}+1}bold_f start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT, and an instance column 𝐩np+1subscript𝐩subscript𝑛𝑝1\mathbf{p}_{n_{p}+1}bold_p start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT to store β𝛽\betaitalic_β. Generally, the verifier needs to interpolate a polynomial for each instance column, which would be expensive for 𝐩np+1subscript𝐩subscript𝑛𝑝1\mathbf{p}_{n_{p}+1}bold_p start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT, as it contains values across the entire evaluation domain. However, the polynomial simply needs to evaluate to the β𝛽\betaitalic_β across the entire evaluation domain. Therefore, we can forgo the expensive interpolation and directly generate a constant polynomial 𝒈(X)=β𝒈𝑋𝛽\bm{g}(X)=\betabold_italic_g ( italic_X ) = italic_β. We add copy constraints to ensure that the copies of the witness values correspond to their original occurrences in the arithmetization of \mathcal{R}caligraphic_R. In addition, we add copy constraints to link the occurrences of each ρjsubscript𝜌𝑗\rho_{j}italic_ρ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT across both columns, i.e., 𝐚na+1subscript𝐚subscript𝑛𝑎1\mathbf{a}_{n_{a}+1}bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT and 𝐚na+2subscript𝐚subscript𝑛𝑎2\mathbf{a}_{n_{a}+2}bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 2 end_POSTSUBSCRIPT. Finally we add a custom gate constraint:

𝐛h(X,,𝐚na+1(X),𝐚na+2(X),𝐚na+3(X),𝐩np+1(X),𝐟nf+1(X))=𝐟nf+1(X)(𝐚na+3(X)+𝐚na+1(X)𝐩np+1(X)𝐚na+2(X))subscript𝐛h𝑋subscript𝐚subscript𝑛𝑎1𝑋subscript𝐚subscript𝑛𝑎2𝑋subscript𝐚subscript𝑛𝑎3𝑋subscript𝐩subscript𝑛𝑝1𝑋subscript𝐟subscript𝑛𝑓1𝑋subscript𝐟subscript𝑛𝑓1𝑋subscript𝐚subscript𝑛𝑎3𝑋subscript𝐚subscript𝑛𝑎1𝑋subscript𝐩subscript𝑛𝑝1𝑋subscript𝐚subscript𝑛𝑎2𝑋\begin{split}\mathbf{b}_{\textsf{h}}(X,\ldots,\mathbf{a}_{n_{a}+1}(X),\mathbf{% a}_{n_{a}+2}(X),\mathbf{a}_{n_{a}+3}(X),\mathbf{p}_{n_{p}+1}(X),\mathbf{f}_{n_% {f}+1}(X))\\ =\mathbf{f}_{n_{f}+1}(X)\cdot(\mathbf{a}_{n_{a}+3}(X)+\mathbf{a}_{n_{a}+1}(X)% \cdot\mathbf{p}_{n_{p}+1}(X)-\mathbf{a}_{n_{a}+2}(X))\end{split}start_ROW start_CELL bold_b start_POSTSUBSCRIPT h end_POSTSUBSCRIPT ( italic_X , … , bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT ( italic_X ) , bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 2 end_POSTSUBSCRIPT ( italic_X ) , bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 3 end_POSTSUBSCRIPT ( italic_X ) , bold_p start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT ( italic_X ) , bold_f start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT ( italic_X ) ) end_CELL end_ROW start_ROW start_CELL = bold_f start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_f end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT ( italic_X ) ⋅ ( bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 3 end_POSTSUBSCRIPT ( italic_X ) + bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT ( italic_X ) ⋅ bold_p start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT ( italic_X ) - bold_a start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_a end_POSTSUBSCRIPT + 2 end_POSTSUBSCRIPT ( italic_X ) ) end_CELL end_ROW

Finally, we note that we could forgo the ρprevsubscript𝜌prev\rho_{\text{prev}}italic_ρ start_POSTSUBSCRIPT prev end_POSTSUBSCRIPT column and instead use a custom gate spanning two rows, saving one column. However, as in the state of the art zkML approaches using Plonkish arithmetizations [10], we restrict ourselves to single-row custom gates.

Supporting Larger Commitments. So far, we have assumed that the size d𝑑ditalic_d of the commitment w𝑤witalic_w matches the number of rows n𝑛nitalic_n in the plonkish grid. Where d𝑑ditalic_d is smaller, we can trivially pad w𝑤witalic_w with zeros. However, if d𝑑ditalic_d is larger than n𝑛nitalic_n, we need to split w𝑤witalic_w across multiple advice columns. A straightforward approach might add a separate pair of advice columns for the intermediate values ρ,ρprevsuperscript𝜌superscriptsubscript𝜌𝑝𝑟𝑒𝑣\rho^{\prime},\rho_{prev}^{\prime}italic_ρ start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , italic_ρ start_POSTSUBSCRIPT italic_p italic_r italic_e italic_v end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT for each witness column, as well as multiple custom gates and selector columns. However, we can avoid this overhead by combining Horner’s method with a (generalized) even-odd decomposition approach. Specifically, we use the common observation that

w(0)+w(1)β+w(2)β2+w(3)β3+w(4)β4+w(5)β5+superscript𝑤0superscript𝑤1𝛽superscript𝑤2superscript𝛽2superscript𝑤3superscript𝛽3superscript𝑤4superscript𝛽4superscript𝑤5superscript𝛽5w^{(0)}+w^{(1)}\beta+w^{(2)}\beta^{2}+w^{(3)}\beta^{3}+w^{(4)}\beta^{4}+w^{(5)% }\beta^{5}+\cdotsitalic_w start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT italic_β + italic_w start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 3 end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 4 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 4 end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 5 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 5 end_POSTSUPERSCRIPT + ⋯

can be rewritten as

w(0)+w(2)β2+w(4)β22++β(w(1)+w(3)β2+w(5)β22+)superscript𝑤0superscript𝑤2superscript𝛽2superscript𝑤4superscript𝛽superscript22𝛽superscript𝑤1superscript𝑤3superscript𝛽2superscript𝑤5superscript𝛽superscript22\begin{split}&w^{(0)}+w^{(2)}\beta^{2}+w^{(4)}\beta^{2^{2}}+\cdots\\ +\beta&\left(w^{(1)}+w^{(3)}\beta^{2}+w^{(5)}\beta^{2^{2}}+\ldots\right)\\ \end{split}start_ROW start_CELL end_CELL start_CELL italic_w start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 4 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 2 start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT + ⋯ end_CELL end_ROW start_ROW start_CELL + italic_β end_CELL start_CELL ( italic_w start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT + italic_w start_POSTSUPERSCRIPT ( 5 ) end_POSTSUPERSCRIPT italic_β start_POSTSUPERSCRIPT 2 start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT end_POSTSUPERSCRIPT + … ) end_CELL end_ROW

which can be interpreted as a combination of two polynomials in X2superscript𝑋2X^{2}italic_X start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. Combining this with the Horner’s method approach, we arrive at

(w(0)+βw(1))+β2((w(2)+βw(3))+β2())).\left(w^{(0)}+\beta w^{(1)}\right)+\beta^{2}\Bigg{(}\left(w^{(2)}+\beta w^{(3)% }\right)+\beta^{2}\Big{(}\cdots\Big{)}\bigg{)}\Bigg{)}.( italic_w start_POSTSUPERSCRIPT ( 0 ) end_POSTSUPERSCRIPT + italic_β italic_w start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT ) + italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ( ( italic_w start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT + italic_β italic_w start_POSTSUPERSCRIPT ( 3 ) end_POSTSUPERSCRIPT ) + italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT ( ⋯ ) ) ) .

which gives rise to the recurrence

ρj=(w(j)+βw(j+1))+β2ρj+1subscript𝜌𝑗superscript𝑤𝑗𝛽superscript𝑤𝑗1superscript𝛽2subscript𝜌𝑗1\rho_{j}=\left(w^{(j)}+\beta*w^{(j+1)}\right)+\beta^{2}\rho_{j+1}italic_ρ start_POSTSUBSCRIPT italic_j end_POSTSUBSCRIPT = ( italic_w start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT + italic_β ∗ italic_w start_POSTSUPERSCRIPT ( italic_j + 1 ) end_POSTSUPERSCRIPT ) + italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT italic_ρ start_POSTSUBSCRIPT italic_j + 1 end_POSTSUBSCRIPT

where n𝑛nitalic_n is the number of rows in the grid and ρd=0subscript𝜌𝑑0\rho_{d}=0italic_ρ start_POSTSUBSCRIPT italic_d end_POSTSUBSCRIPT = 0. This is why we split the witness into the columns not based on sequential chunks, but instead based on even and odd terms (cf. Figure 3). We can easily adapt our custom gate to compute this new formula by introducing a new instance column 𝐩np+2subscript𝐩subscript𝑛𝑝2\mathbf{p}_{n_{p}+2}bold_p start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT + 2 end_POSTSUBSCRIPT for β2superscript𝛽2\beta^{2}italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT. As is the case for the instance column 𝐩np+1subscript𝐩subscript𝑛𝑝1\mathbf{p}_{n_{p}+1}bold_p start_POSTSUBSCRIPT italic_n start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT + 1 end_POSTSUBSCRIPT that contains β𝛽\betaitalic_β, the verifier does not need to interpolate this, as we can directly construct the (constant) polynomial that evaluates to β2superscript𝛽2\beta^{2}italic_β start_POSTSUPERSCRIPT 2 end_POSTSUPERSCRIPT at all points. This approach generalizes to any number k=\ceild/n𝑘\ceil𝑑𝑛k=\ceil{d/n}italic_k = italic_d / italic_n of columns: instead of splitting the polynomial into even and odd components, we split it modulo k𝑘kitalic_k. This requires the addition of an instance column βisuperscript𝛽𝑖\beta^{i}italic_β start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT for i[1,k]𝑖1𝑘i\in[1,k]italic_i ∈ [ 1 , italic_k ], but as these do not need to be interpolated, this does not impact runtime significantly.

Refer to caption
Figure 4: Prover Time in minutes for KZG-based (top) and IPA-based (bottom) approaches for various models. As Apollo and Lunar only support KZG-based instantiations, they are omitted in the bottom row. Poseidon fails to scale to Diffusion and GPT-2, while Lunar fails to scale to GPT-2, as described in § 5.3, and are therefore omitted for these models.

Supporting Multiple Commitments. Finally, we consider the case with \ellroman_ℓ commitments, beginning with the naive approach, then show how this can be extended to an efficient solution for a large number of small commitments, before introducing our optimization for multiple large commitments. Similar to the naive approach to supporting larger commitments, we can resolve this by adding a pair of advice columns (for ρisubscript𝜌𝑖\rho_{i}italic_ρ start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT and ρprevisubscriptsubscript𝜌𝑝𝑟𝑒𝑣𝑖{\rho_{prev}}_{i}italic_ρ start_POSTSUBSCRIPT italic_p italic_r italic_e italic_v end_POSTSUBSCRIPT start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT) for each witness column. This introduces three advice columns per commitment, however, in cases where all commitments are small, this is highly inefficient, as the vast majority of each column will be unused. Instead, if all commitments are sufficiently small (specifically, smaller than n3𝑛3\frac{n}{3}divide start_ARG italic_n end_ARG start_ARG 3 end_ARG), we can more efficiently “stack” multiple commitments into a single column, and make use of the same additional advice columns (and the same custom gate) by simply setting ρprevisubscriptsubscript𝜌𝑝𝑟𝑒𝑣𝑖{\rho_{prev}}_{i}italic_ρ start_POSTSUBSCRIPT italic_p italic_r italic_e italic_v end_POSTSUBSCRIPT start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT to zero whenever a new commitment starts. However, when each commitment might be larger than we can accommodate in a single column (as will generally be the case in zkML), we cannot apply this technique. Instead, our optimization relies on aggregating multiple commitments. The key insight here is that we can use essentially the same optimized technique we used to handle multiple columns per witness to also handle multiple witnesses. For this, we introduce additional instance columns for the powers of α𝛼\alphaitalic_α, and in our custom gate, replace each occurrence of wi(j)subscriptsuperscript𝑤𝑗𝑖w^{(j)}_{i}italic_w start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT with

i=1αiwi(j)superscriptsubscript𝑖1superscript𝛼𝑖superscriptsubscript𝑤𝑖𝑗\textstyle\sum_{i=1}^{\ell}\alpha^{i}w_{i}^{(j)}∑ start_POSTSUBSCRIPT italic_i = 1 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT roman_ℓ end_POSTSUPERSCRIPT italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT italic_w start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( italic_j ) end_POSTSUPERSCRIPT

We visualize our additions to grid in Figure 3. For ease of presentation, we assume all commitments require d𝑑\lceil\frac{\ell}{d}\rceil⌈ divide start_ARG roman_ℓ end_ARG start_ARG italic_d end_ARG ⌉ columns. In practice, one can trivially adjust the custom gate in order to support different amounts of columns for each witness.

Masking. Finally, we consider μ𝜇\muitalic_μ, which needs to be added to the result of the polynomial evaluation. For the vast majority of arithmetizations of \mathcal{R}caligraphic_R, there will be suitable empty cells and existing custom gates (e.g., addition or inner products) that we can reuse, in which case we only need to add a single copy constraint to link the computed value of ρ1subscript𝜌1\rho_{1}italic_ρ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT with its copy in the addition. In the rare cases where it is not possible to integrate this addition into the existing grid, we add a new row that contains only μ𝜇\muitalic_μ and a copy of ρ1subscript𝜌1\rho_{1}italic_ρ start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and, if necessary, a custom gate for addition and an associated selector column.

Evaluation

In this section, we evaluate the performance of Apollo and Artemis for various computer vision and natural language processing models. We compare against the existing state of the art, namely Lunar [8] and Poseidon [21]. We focus on showing that our constructions make zkML significantly more practical, especially for large models. In addition, we show that Artemis can achieve similarly low overheads even without relying on trusted setup.

Implementation

In addition to implementing our constructions, Apollo and Artemis, we provide the first (to the best of our knowledge) complete implementation of Lunar’s 𝖢𝖯linksubscript𝖢𝖯link\mathsf{CP}_{\text{link}}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT construction [7]. We implement all techniques in Rust, as an extension of the Halo2 library [17], which includes implementations for KZG- [28] and IPA-based [5] zero-knowledge proofs. We instantiate the underlying group with the pairing-friendly BN256 curve for KZG-based proofs and the Pallas curve for the IPA-based proofs. This allows us to use our constructions in combination with the models used in the state-of-the-art zkML work [10], which is also based on Halo2. We make all our implementations and benchmarking configurations available as open-source222https://github.com/pps-lab/artemis . Below, we discuss the implementation of each of the approaches we evaluate in more detail:

Refer to caption
Figure 5: Verifier Time in seconds for KZG-based (top) and IPA-based (bottom) approaches for various models. As Apollo and Lunar only support KZG-based instantiations, they are omitted in the bottom row. Poseidon fails to scale to Diffusion and GPT-2, while Lunar fails to scale to GPT-2, as described in § 5.3, and are therefore omitted for these models. Note that because IPA-based proof systems have logarithmic verifier time, we use a different y-axis scaling for the bottom row.
  • No Commitment: This baseline does not check commitments at all, as in Chen et al. [10].

  • Poseidon: We used a Poseidon [21] gadget provided by the Halo2 library [17].

  • Lunar: We implement Lunar’s CP-SNARK construction [7] for Halo2’s Plonkish arithmetization. Specifically, we implement 𝖢𝖯link(1)superscriptsubscript𝖢𝖯link1\mathsf{CP}_{\text{link}}^{(1)}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 1 ) end_POSTSUPERSCRIPT and 𝖢𝖯link(2)superscriptsubscript𝖢𝖯link2\mathsf{CP}_{\text{link}}^{(2)}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT start_POSTSUPERSCRIPT ( 2 ) end_POSTSUPERSCRIPT from [7]. We use Halo2’s underlying finite field Rust library ff. 𝖢𝖯linksubscript𝖢𝖯link\mathsf{CP}_{\text{link}}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT relies heavily on division of vanishing polynomials on a subset of the evaluation domain, which is not directly supported by Halo2’s polynomial implementation. Therefore, we extend this implementation with support for efficient FFT-based polynomial division to ensure competitive performance of 𝖢𝖯linksubscript𝖢𝖯link\mathsf{CP}_{\text{link}}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT.

  • Apollo: We implement Apollo (cf. § 4.1) which performs the alignment of the witness in the arithmetization using a small set of extra columns and copy constraints, resulting in a significantly more efficient 𝖢𝖯linksubscript𝖢𝖯link\mathsf{CP}_{\text{link}}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT. The implementation otherwise uses the same approach as Lunar.

  • Artemis: For Artemis (cf. § 4.2), our construction based on homomorphic polynomial commitments, we use Halo2’s standard implementation of polynomial commitments, and implement the arithmetization of polynomial evaluation using Horner’s method (cf. § 4.4) as a gadget in the Halo2 library.

Experimental Setup

We evaluate the prover time, verifier time and proof size for Halo2-based zkML inference proofs with a commitment to the model for a wide range of different models. We perform the evaluation on AWS EC2 instances running Ubuntu 24.04, with instance types adjusted to meet each model’s resource demands: r6i.8xlarge (32 vCPUs, 256 GB RAM), r6i.16xlarge (64 vCPUs, 512 GB RAM), and r6i.32xlarge (128 vCPUs, 1024 GB RAM). This corresponds to the model-instance mapping used in [10], except for VGG-16, for which Poseidon requires a larger instance. We therefore evaluate all VGG-16 experiments on r6i.32xlarge instances. Below, we briefly describe the models we consider in our evaluation.

  • MNIST: A minimal CNN [22] with 8.18.18.18.1K parameters and 444.9444.9444.9444.9K FLOPs, trained on the MNIST image classification task, evaluated on an r6i.8xlarge instance.

  • ResNet-18: An image classifier [24] trained on CIFAR-10, with 280.9280.9280.9280.9K parameters and 81.981.981.981.9M FLOPs, evaluated on an r6i.8xlarge instance.

  • DLRM: A deep learning recommendation model [34], with 764.3764.3764.3764.3K parameters and 1.91.91.91.9M FLOPs, evaluated on an r6i.8xlarge instance.

  • MobileNet: A mobile-optimized image classifier [37] trained on ImageNet, with 3.53.53.53.5M parameters and 601.8601.8601.8601.8M FLOPs, evaluated on an r6i.16xlarge instance

  • VGG-16: A CNN with 15.215.215.215.2M parameters and 627.9627.9627.9627.9M FLOPs, trained on CIFAR-10 [42], evaluated on an r6i.32xlarge instance.

  • Diffusion: A small text-to-image Stable Diffusion model [36], with 19.519.519.519.5M parameters and 22.922.922.922.9B FLOPs, evaluated on an r6i.32xlarge instance.

  • GPT-2: A distilled transformer-based language model optimized for inference [35], with 81.381.381.381.3M parameters and 188.9188.9188.9188.9M FLOPs, evaluated on an r6i.32xlarge instance.

We perform five measurements for the verifier time and report the mean and the standard deviation (as error bars) in the figures.

Results

In  Figure 4 we report wall clock runtimes for the prover, similarly, we report verifier times in  Figure 5, while we report proof sizes in  Table 2.

Prover Overhead. We begin by discussing prover overhead (cf. Figure 4), which is by far the most important metric when considering the practicality of zkML. For Poseidon, the overhead of recomputing the commitment inside the SNARK results in a significant overhead that scales roughly linearly in the model size, ranging from 3.2x-17.3x for KZG, and from 3.2x-17.2x for IPA compared to the baseline (No Commitment). The approach of Lunar using the internal witness commitment of the SNARK reduces the overhead to 3.0x-7.5x in the case of KZG, which is an improvement over Poseidon, but is still significant because the number of 𝖢𝖯linksubscript𝖢𝖯link\mathsf{CP}_{\text{link}}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT proofs scales with the number of witness-containing columns. A notable exception where Poseidon outperforms Lunar is for MobileNet, whose architecture results in a large number of columns relative to the number of weights. Nevertheless, the overheads of prior approaches are prohibitively expensive, particularly for larger models. Note that, for GPT-2 and Diffusion, Poseidon was unable to complete successfully because of memory requirements beyond 1024GB, which is the maximum available memory for AWS r6i instances. Similarly, for Lunar, which does not run successfully for GPT-2.

In comparison, our CP-SNARK constructions Apollo and Artemis outperform the related approaches across all configurations, introducing an overhead of only 1.01x-1.18x for KGZ and 1.03x-1.42x for IPA. These approaches only require adaptations to the arithmetization and the proof system that are very concretely efficient. Apollo is significantly faster than Lunar, because the alignment of the witness using copy constraints in the arithmetization obviates the need for shifting proofs. For smaller models, Apollo outperforms Artemis as the latter needs to extend the arithmetization with a custom gate, the relative impact of which reduces as the model grows. As a result, we observe Artemis outperforming Apollo for larger models. More importantly, we note that Artemis offers very similar prover times whether using KZG or IPA commitments (without trusted setup), a setting which Lunar and Apollo do not support.

Verifier. We present the verifier times in Figure 5. KZG-based proof systems provide a verification time constant in the size of the witness. However, even for the baseline (No Commitment) the verifier times for different models still vary, because the different model output size result in different proof instance sizes. Similarly, merely adding the commitments to the instance increases the KZG verifier time. However, the vast majority of the differences in verifier time between the different approaches are due to the additional checks that (some of) the approaches introduce. In contrast, verifier times for IPA scale (logarithmically) with the size of the witness so we expect slower verification times in general.

Poseidon shows a negligible increase in verification time for KZG, as it only adapts the arithmetization of the relation and not the SNARK, resulting in a tiny increase in verification time due the addition of the commitment to the public input. In contrast, for IPA-based Poseidon, we observe a considerable increase in verifier time (2x-11x) due to the complex arithmetization of Poseidon. Lunar (which only supports KZG) increases the verification time compared to No Commitment significantly (8.5x-252.9x), as it requires a linear number of additional pairing operations to verify the 𝖢𝖯linksubscript𝖢𝖯link\mathsf{CP}_{\text{link}}sansserif_CP start_POSTSUBSCRIPT link end_POSTSUBSCRIPT proofs. Although Apollo (which also only supports KZG) reduces the number of required pairing operations compared to Lunar, the verification overhead is, in some configurations, still significant (1x-4x), compared to the baseline (No Commitment). Artemis, on the other hand, requires only one additional pairing verification, resulting in a negligible overhead in verification time (1.0x-1.1x) for KZG. For IPA, the verification overhead is also relatively low (at most 1.2x), which is significantly lower than the prior state of the art in this setting.

No Com. Artemis Apollo Lunar Poseidon
§ 4.2 § 4.1 [7] [21]
KZG MNIST 9 10 10 9 12
ResNet-18 14 15 15 14 16
DLRM 5 6 6 4 10
MobileNet 18 18 18 18 21
VGG 16 17 16 11 15
Diffusion 32 33 33 16 -
GPT-2 15 16 15 - -
IPA MNIST 10 12 - - 14
ResNet-18 16 18 - - 18
DLRM 7 9 - - 11
MobileNet 19 21 - - 23
VGG 17 20 - - 17
Diffusion 34 36 - - -
GPT-2 17 19 - - -
Table 2: Proof size in kB for KZG-based (top) and IPA-based (bottom) approaches for various models. As Apollo and Lunar only support KZG-based instantiations, they are omitted in the bottom row. Poseidon fails to scale to Diffusion and GPT-2, while Lunar fails to scale to GPT-2, as described in § 5.3, and are therefore omitted for these models.

Proof Size. While not of primary concern for most zkML applications, we report proof sizes in Table 2 for completeness. In general, proof sizes are very small (a few dozen kB at most) for the baseline (No Commitment) across all models. Furthermore, the overhead of adding commitment verification is generally low across all approaches. In fact, in some cases we see a decrease in proof size for Lunar. This is an artifact of the restrictions of Lunar’s construction, which require the evaluation domain of the SNARK to be at least as large as the (committed) witness. As a result, there are instances where we need to increase the number of rows in the Plonkish grid to achieve this. In these cases, we can then make use of these additional rows by re-layouting the original grid into fewer columns, which reduces the proof size.

Summary. In conclusion, we demonstrate that both Apollo and Artemis significantly advance the state-of-the-art for practical zkML. Commitment verification is essential for real-world usage zkML, yet existing approaches introduced significant overheads that made zkML impractical for all but the smallest models. We demonstrate that, with Apollo and Artemis, it is possible to apply zkML with commitment verification to large models of real-world interest. Furthermore, we show that, with Artemis, this is possible while using state-of-the-art SNARKs that do not require trusted setup.

Acknowledgements

We would like to thank Christian Knabenhans for his insightful feedback. We would also like to acknowledge our sponsors for their generous support, including Meta, Google, and SNSF through an Ambizione Grant No. PZ00P2_186050.

References

  • [1] Diego F Aranha, Emil Madsen Bennedsen, Matteo Campanelli, Chaya Ganesh, Claudio Orlandi, and Akira Takahashi. ECLIPSE: Enhanced compiling method for pedersen-committed zkSNARK engines. Cryptology ePrint Archive, 2021.
  • [2] Aztec Network. Proving system components. https://docs.aztec.network/protocol-specs/cryptography/proving-system/overview, 2021. Accessed: 2024-9-1.
  • [3] Abeba Birhane, Ryan Steed, Victor Ojewale, Briana Vecchione, and Inioluwa Deborah Raji. AI auditing: The broken bus on the road to AI accountability. arXiv [cs.CY], January 2024.
  • [4] EZKL Blog. Removing additional commitment cost, 2023. Accessed: 2024-07-22.
  • [5] Sean Bowe, Jack Grigg, and Daira Hopwood. Halo: Recursive proof composition without a trusted setup. Technical report, Cryptology ePrint Archive, Report 2019/1021, 2019.
  • [6] Benedikt Bünz, Jonathan Bootle, Dan Boneh, Andrew Poelstra, Pieter Wuille, and Greg Maxwell. Bulletproofs: Short proofs for confidential transactions and more. In 2018 IEEE Symposium on Security and Privacy (SP), May 2018.
  • [7] Matteo Campanelli, Antonio Faonio, Dario Fiore, Anaïs Querol, and Hadrián Rodríguez. Lunar: a toolbox for more efficient universal and updatable zkSNARKs and commit-and-prove extensions. Cryptology ePrint Archive, Paper 2020/1069, 2020. (Extended Version).
  • [8] Matteo Campanelli, Antonio Faonio, Dario Fiore, Anaïs Querol, and Hadrián Rodríguez. Lunar: A toolbox for more efficient universal and updatable zkSNARKs and commit-and-prove extensions. In ASIACRYPT 2021, 2021.
  • [9] Matteo Campanelli, Dario Fiore, and Anaïs Querol. LegoSNARK: Modular design and composition of succinct zero-knowledge proofs. CCS ’19. ACM, November 2019.
  • [10] Bing-Jyue Chen, Suppakit Waiwitlikhit, Ion Stoica, and Daniel Kang. ZKML: An optimizing system for ML inference in zero-knowledge proofs. 2024.
  • [11] Binyi Chen, Benedikt Bünz, Dan Boneh, and Zhenfei Zhang. HyperPlonk: Plonk with linear-time prover and high-degree custom gates. In EUROCRYPT 2023. 2023.
  • [12] Dami Choi, Yonadav Shavit, and David Duvenaud. Tools for verifying neural models’ training data. arXiv [cs.LG], July 2023.
  • [13] Richard A Demillo and Richard J Lipton. A probabilistic remark on algebraic program testing. Inf. Process. Lett., 7(4):193–195, June 1978.
  • [14] EZKL Docs. Visibility: What is private?, 2023. https://docs.ezkl.xyz/visibility_what_is_private/. Accessed: 2024-09-03.
  • [15] EZKL. An engine for doing inference for deep learning models and other computational graphs in a zk-snark (ZKML). Accessed: 02-09-2024.
  • [16] Boyuan Feng, Lianke Qin, Zhenfei Zhang, Yufei Ding, and Shumo Chu. ZEN: An optimizing compiler for verifiable, zero-knowledge neural network inferences. Cryptology ePrint Archive, 2021.
  • [17] Zcash Foundation. Halo2 book, 2021. https://zcash.github.io/halo2/. Accessed: 2024-078-02.
  • [18] Ariel Gabizon, Zachary J Williamson, and Oana Ciobotaru. Plonk: Permutations over lagrange-bases for oecumenical noninteractive arguments of knowledge. Cryptology ePrint Archive, 2019.
  • [19] Bianca-Mihaela Ganescu and Jonathan Passerat-Palmbach. Trust the process: Zero-knowledge machine learning to enhance trust in generative AI interactions. In The 5th AAAI Workshop on Privacy-Preserving Artificial Intelligence, 2024.
  • [20] Sanjam Garg, Aarushi Goel, Somesh Jha, Saeed Mahloujifar, Mohammad Mahmoody, Guru-Vamsi Policharla, and Mingyuan Wang. Experimenting with zero-knowledge proofs of training. 2023.
  • [21] Lorenzo Grassi, Dmitry Khovratovich, Christian Rechberger, Arnab Roy, and Markus Schofnegger. Poseidon: A new hash function for zero-knowledge proof systems. USENIX Security, pages 519–535, 2021.
  • [22] Ruslan Grimov. The minimal neural network that achieves 99 https://github.com/ruslangrimov/mnist-minimal-model, 2018.
  • [23] Jens Groth. On the size of pairing-based non-interactive arguments. In EUROCRYPT 2016, 2016.
  • [24] Kaiming He, X. Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, 2016.
  • [25] W. G. Horner. A new method of solving numerical equations of all orders, by continuous approximation. Philosophical Transactions of the Royal Society of London, 109:308–335, 1819.
  • [26] White House. Executive order on the safe, secure, and trustworthy development and use of artificial intelligence, October 2023. E.O. 14110.
  • [27] Daniel Kang, Tatsunori Hashimoto, Ion Stoica, and Yi Sun. Scaling up trustless DNN inference with zero-knowledge proofs. arXiv [cs.CR], October 2022.
  • [28] Aniket Kate, Gregory M Zaverucha, and Ian Goldberg. Constant-size commitments to polynomials and their applications. In ASIACRYPT 2010, 2010.
  • [29] Seunghwa Lee, Hankyung Ko, Jihye Kim, and Hyunok Oh. vCNN: Verifiable convolutional neural network based on zk-SNARKs. Cryptology ePrint Archive, 2020.
  • [30] Tianyi Liu, Xiang Xie, and Yupeng Zhang. zkCNN: Zero knowledge proofs for convolutional neural network predictions and accuracy. 2021.
  • [31] Hidde Lycklama, Nicolas Küchler, Alexander Viand, Emanuel Opel, Lukas Burkhalter, and Anwar Hithnawi. Cryptographic auditing for collaborative learning. In NeurIPS ML Safety Workshop, 2022.
  • [32] Hidde Lycklama, Alexander Viand, Nicolas Küchler, Christian Knabenhans, and Anwar Hithnawi. Holding Secrets Accountable: Auditing Privacy-Preserving Machine Learning. In USENIX Security, Philadelphia, PA, August 2024.
  • [33] National Science and Technology Council Committee on Technology. Preparing for the future of artificial intelligence, October 2016.
  • [34] Maxim Naumov, Dheevatsa Mudigere, Hao-Jun Michael Shi, et al. Deep learning recommendation model for personalization and recommendation systems. CoRR, abs/1906.00091, 2019.
  • [35] Alec Radford, Jeff Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2019.
  • [36] Robin Rombach, A. Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. High-resolution image synthesis with latent diffusion models. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 10674–10685, 2021.
  • [37] Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, and Liang-Chieh Chen. Mobilenetv2: Inverted residuals and linear bottlenecks. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4510–4520, 2018.
  • [38] Peter Schulam and Suchi Saria. Can you trust this prediction? auditing pointwise reliability after learning. In AISTATS, volume 89, pages 1022–1031, 2019.
  • [39] Srinath Setty, Justin Thaler, and Riad Wahby. Customizable constraint systems for succinct arguments. IACR Cryptol eprint Arch, 2023:552, 2023.
  • [40] Ali Shahin Shamsabadi, Sierra Calanda Wyllie, Nicholas Franzese, Natalie Dullerud, Sébastien Gambs, Nicolas Papernot, Xiao Wang, and Adrian Weller. Confidential-PROFITT: Confidential PROof of FaIr training of trees. In ICLR, 2022.
  • [41] Reza Shokri. PRIVACY AUDITING OF MACHINE LEARNING USING MEMBERSHIP INFERENCE ATTACKS. ICLR, 2022.
  • [42] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014.
  • [43] Tobin South, Alexander Camuto, Shrey Jain, Shayla Nguyen, Robert Mahari, Christian Paquin, Jason Morton, and Alex Pentland. Verifiable evaluations of machine learning models using zkSNARKs. arXiv [cs.LG], February 2024.
  • [44] Haochen Sun and Hongyang Zhang. ZkDL: Efficient zero-knowledge proofs of deep learning training. arXiv [cs.LG], July 2023.
  • [45] Suppakit Waiwitlikhit, Ion Stoica, Yi Sun, Tatsunori Hashimoto, and Daniel Kang. Trustless audits without revealing data or models. In ICML’24, April 2024.
  • [46] Jiasi Weng, Jian Weng, Gui Tang, Anjia Yang, Ming Li, and Jia-Nan Liu. pvcnn: Privacy-preserving and verifiable convolutional neural network testing. IEEE Transactions on Information Forensics and Security, 18:2218–2233, 2023.

Appendix A Definitions

Definition A.1 (Commitment Scheme).

A non-interactive commitment scheme consists of a message space \mathcal{M}caligraphic_M, randomness space 𝒪𝒪\mathcal{O}caligraphic_O, a commitment space 𝒞𝒞\mathcal{C}caligraphic_C and a tuple of polynomial-time algorithms (Com.Setup,Com.Commit,Com.Verify)Com.SetupCom.CommitCom.Verify(\textsf{Com.Setup},\textsf{Com.Commit},\textsf{Com.Verify})( Com.Setup , Com.Commit , Com.Verify ) defined as follows:

  • Com.Setup(1λ)crsCom.Setupsuperscript1𝜆crs\textsf{Com.Setup}(1^{\lambda})\rightarrow\textsf{crs}Com.Setup ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT ) → crs: Given a security parameter λ𝜆\lambdaitalic_λ, it outputs public parameters crs.

  • Com.Commit(crs,m,r)cCom.Commitcrs𝑚𝑟𝑐\textsf{Com.Commit}(\textsf{crs},m,r)\rightarrow cCom.Commit ( crs , italic_m , italic_r ) → italic_c: Given public parameters crs, a message m𝑚m\in\mathcal{M}italic_m ∈ caligraphic_M and randomness r𝒪𝑟𝒪r\in\mathcal{O}italic_r ∈ caligraphic_O, it outputs a commitment c𝑐citalic_c.

  • Com.Verify(crs,c,r,m){0,1}Com.Verifycrs𝑐𝑟𝑚01\textsf{Com.Verify}(\textsf{crs},c,r,m)\rightarrow\{0,1\}Com.Verify ( crs , italic_c , italic_r , italic_m ) → { 0 , 1 }: Given public parameters crs, a commitment c𝑐citalic_c, a decommitment r𝑟ritalic_r, and a message m𝑚mitalic_m, it outputs 1111 if the commitment is valid, otherwise 00.

A non-interactive commitment scheme has the following properties:

  • Correctness. For all security parameters λ𝜆\lambdaitalic_λ, for all m𝑚mitalic_m and for all crs output by Com.Setup(1λ)Com.Setupsuperscript1𝜆\textsf{Com.Setup}(1^{\lambda})Com.Setup ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT ), if c=Com.Commit(crs,m,r)𝑐Com.Commitcrs𝑚𝑟c=\textsf{Com.Commit}(\textsf{crs},m,r)italic_c = Com.Commit ( crs , italic_m , italic_r ), then Com.Verify(crs,c,m,r)=1Com.Verifycrs𝑐𝑚𝑟1\textsf{Com.Verify}(\textsf{crs},c,m,r)=1Com.Verify ( crs , italic_c , italic_m , italic_r ) = 1.

  • Binding. For all polynomial-time adversaries 𝒜𝒜\mathcal{A}caligraphic_A, the probability

    Pr[Com.Verify(crs,c,m1,r1)=1Com.Verify(crs,c,m2,r2)=1m1m2:crsCom.Setup(1λ),(c,r1,r2,m1,m2)𝒜(crs)]\begin{split}\Pr\bigl{[}\textsf{Com.Verify}(\textsf{crs},c,m_{1},r_{1})&=1% \land\\ \textsf{Com.Verify}(\textsf{crs},c,m_{2},r_{2})&=1\land m_{1}\neq m_{2}:\\ \textsf{crs}\leftarrow\textsf{Com.Setup}(1^{\lambda}),(c,r_{1},r_{2},&m_{1},m_% {2})\leftarrow\mathcal{A}(\textsf{crs})\bigl{]}\end{split}start_ROW start_CELL roman_Pr [ Com.Verify ( crs , italic_c , italic_m start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) end_CELL start_CELL = 1 ∧ end_CELL end_ROW start_ROW start_CELL Com.Verify ( crs , italic_c , italic_m start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) end_CELL start_CELL = 1 ∧ italic_m start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ≠ italic_m start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT : end_CELL end_ROW start_ROW start_CELL crs ← Com.Setup ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT ) , ( italic_c , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , end_CELL start_CELL italic_m start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_m start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) ← caligraphic_A ( crs ) ] end_CELL end_ROW

    is negligible.

  • Hiding. For all polynomial-time adversaries 𝒜𝒜\mathcal{A}caligraphic_A, the advantage

    |Pr[𝒜(crs,c)=1:cCom.Commit(crs,m1,r)]Pr[𝒜(crs,c)=1:cCom.Commit(crs,m2,r)]|Pr:𝒜crs𝑐1𝑐Com.Commitcrssubscript𝑚1𝑟Pr:𝒜crs𝑐1𝑐Com.Commitcrssubscript𝑚2𝑟\begin{split}|\Pr[\mathcal{A}(\textsf{crs},c)=1:c&\leftarrow\textsf{Com.Commit% }(\textsf{crs},m_{1},r)]-\\ \Pr[\mathcal{A}(\textsf{crs},c)=1:c&\leftarrow\textsf{Com.Commit}(\textsf{crs}% ,m_{2},r)]|\end{split}start_ROW start_CELL | roman_Pr [ caligraphic_A ( crs , italic_c ) = 1 : italic_c end_CELL start_CELL ← Com.Commit ( crs , italic_m start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_r ) ] - end_CELL end_ROW start_ROW start_CELL roman_Pr [ caligraphic_A ( crs , italic_c ) = 1 : italic_c end_CELL start_CELL ← Com.Commit ( crs , italic_m start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , italic_r ) ] | end_CELL end_ROW

    is negligible, for all messages m1,m2subscript𝑚1subscript𝑚2m_{1},m_{2}italic_m start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_m start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT.

Definition A.2 (Homomorphic Commitment Scheme [6]).

A homomorphic commitment scheme is a non-interactive commitment scheme such that \mathcal{M}caligraphic_M, 𝒪𝒪\mathcal{O}caligraphic_O and 𝒞𝒞\mathcal{C}caligraphic_C are all abelian groups and for all m1,m2subscript𝑚1subscript𝑚2m_{1},m_{2}\in\mathcal{M}italic_m start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_m start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ∈ caligraphic_M and r1,r2𝒪subscript𝑟1subscript𝑟2𝒪r_{1},r_{2}\in\mathcal{O}italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ∈ caligraphic_O, we have

Com.Commit(crs,m1+m2,r1+r2)=Com.Commit(crs,m1,r1)+Com.Commit(crs,m2,r2).Com.Commitcrssubscript𝑚1subscript𝑚2subscript𝑟1subscript𝑟2Com.Commitcrssubscript𝑚1subscript𝑟1Com.Commitcrssubscript𝑚2subscript𝑟2\begin{split}&\textsf{Com.Commit}(\textsf{crs},m_{1}+m_{2},r_{1}+r_{2})=\\ &\textsf{Com.Commit}(\textsf{crs},m_{1},r_{1})+\textsf{Com.Commit}(\textsf{crs% },m_{2},r_{2}).\end{split}start_ROW start_CELL end_CELL start_CELL Com.Commit ( crs , italic_m start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + italic_m start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = end_CELL end_ROW start_ROW start_CELL end_CELL start_CELL Com.Commit ( crs , italic_m start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) + Com.Commit ( crs , italic_m start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT , italic_r start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) . end_CELL end_ROW
Definition A.3 (KZG Commitments [28]).

KZG commitments leverage bilinear pairings to create a commitment scheme for polynomials where the commitments have constant size. Let 𝔾1subscript𝔾1\mathbb{G}_{1}blackboard_G start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, 𝔾2subscript𝔾2\mathbb{G}_{2}blackboard_G start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT and 𝔾Tsubscript𝔾𝑇\mathbb{G}_{T}blackboard_G start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT be cyclic groups of prime order p𝑝pitalic_p such with generators h1𝔾1subscript1subscript𝔾1h_{1}\in\mathbb{G}_{1}italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ∈ blackboard_G start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and h2𝔾2subscript2subscript𝔾2h_{2}\in\mathbb{G}_{2}italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ∈ blackboard_G start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT. Let e:𝔾1×𝔾2𝔾T:𝑒subscript𝔾1subscript𝔾2subscript𝔾𝑇e:\mathbb{G}_{1}\times\mathbb{G}_{2}\rightarrow\mathbb{G}_{T}italic_e : blackboard_G start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT × blackboard_G start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT → blackboard_G start_POSTSUBSCRIPT italic_T end_POSTSUBSCRIPT be a bilinear pairing, so that e(αh1,βh2)=αβe(h1,h2)𝑒𝛼subscript1𝛽subscript2𝛼𝛽𝑒subscript1subscript2e(\alpha\cdot h_{1},\beta\cdot h_{2})=\alpha\beta\cdot e(h_{1},h_{2})italic_e ( italic_α ⋅ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_β ⋅ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = italic_α italic_β ⋅ italic_e ( italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ). The KZG polynomial commitment scheme for some polynomial 𝐠𝐠\mathbf{g}bold_g made up of coefficients 𝐠isubscript𝐠𝑖\mathbf{g}_{i}bold_g start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT is defined by four algorithms:

  • PC.Setup(d)PC.Setup𝑑\textsf{{PC}.Setup}(d)PC.Setup ( italic_d ): Sample α\sample𝔽p𝛼\samplesubscript𝔽𝑝\alpha\sample\mathbb{F}_{p}italic_α blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and output

    pp(αh1,,αdh1,αh2)pp𝛼subscript1superscript𝛼𝑑subscript1𝛼subscript2\texttt{pp}\leftarrow\left(\alpha\cdot h_{1},\ldots,\alpha^{d}\cdot h_{1},% \alpha\cdot h_{2}\right)pp ← ( italic_α ⋅ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , … , italic_α start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT ⋅ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_α ⋅ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT )
  • PC.Commit(pp,𝐠)PC.Commitpp𝐠\textsf{{PC}.Commit}(\texttt{pp},\mathbf{g})PC.Commit ( pp , bold_g ): Output com=𝐠(α)h1com𝐠𝛼subscript1\text{com}=\mathbf{g}(\alpha)\cdot h_{1}com = bold_g ( italic_α ) ⋅ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, computed as

    comi=0d𝐠i(αih1)comsuperscriptsubscript𝑖0𝑑subscript𝐠𝑖superscript𝛼𝑖subscript1\text{com}\leftarrow\sum_{i=0}^{d}\mathbf{g}_{i}\cdot(\alpha^{i}\cdot h_{1})com ← ∑ start_POSTSUBSCRIPT italic_i = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT bold_g start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ ( italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ⋅ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT )
  • PC.Prove(pp,com,𝐠,x)::PC.Proveppcom𝐠𝑥absent\textsf{{PC}.Prove}(\texttt{pp},\text{com},\mathbf{g},x):PC.Prove ( pp , com , bold_g , italic_x ) : Compute the remainder and quotient

    q(X),r(X)(𝐠(X)𝐠(x))/(Xx).𝑞𝑋𝑟𝑋𝐠𝑋𝐠𝑥𝑋𝑥q(X),r(X)\leftarrow\left(\mathbf{g}(X)-\mathbf{g}(x)\right)/\left(X-x\right).italic_q ( italic_X ) , italic_r ( italic_X ) ← ( bold_g ( italic_X ) - bold_g ( italic_x ) ) / ( italic_X - italic_x ) .

    Check that the remainder r(X)𝑟𝑋r(X)italic_r ( italic_X ) and, if true, output π=q(α)h1𝜋𝑞𝛼subscript1\pi=q(\alpha)\cdot h_{1}italic_π = italic_q ( italic_α ) ⋅ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT, computed as i=0d(qi(αih1))superscriptsubscript𝑖0𝑑subscript𝑞𝑖superscript𝛼𝑖subscript1\sum_{i=0}^{d}\left(q_{i}\cdot(\alpha^{i}\cdot h_{1})\right)∑ start_POSTSUBSCRIPT italic_i = 0 end_POSTSUBSCRIPT start_POSTSUPERSCRIPT italic_d end_POSTSUPERSCRIPT ( italic_q start_POSTSUBSCRIPT italic_i end_POSTSUBSCRIPT ⋅ ( italic_α start_POSTSUPERSCRIPT italic_i end_POSTSUPERSCRIPT ⋅ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ) ).

  • PC.Check(pp,com,x,y,π)PC.Checkppcom𝑥𝑦𝜋\textsf{{PC}.Check}(\texttt{pp},\text{com},x,y,\pi)PC.Check ( pp , com , italic_x , italic_y , italic_π ): Accept if the following pairing equation holds:

    e(π,αh2xh2)=e(comyh1,h2)𝑒𝜋𝛼subscript2𝑥subscript2𝑒com𝑦subscript1subscript2e(\pi,\alpha\cdot h_{2}-x\cdot h_{2})=e(\text{com}-y\cdot h_{1},h_{2})italic_e ( italic_π , italic_α ⋅ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT - italic_x ⋅ italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) = italic_e ( com - italic_y ⋅ italic_h start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , italic_h start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT )

The security properties of KZG commitments fundamentally rely on the hardness of the polynomial division problem. The parameter α𝛼\alphaitalic_α acts as a trapdoor and must be discarded after PC.Setup to ensure the binding property. Hence, we require a trusted setup to generate the public parameters and securely discard α𝛼\alphaitalic_α, which can be computed using MPC or, depending on the deployment, computed by the auditor acting as a trusted dealer. Together, PC.Prove and PC.Check form the evaluation protocol for the scheme. The hiding property relies on the discrete logarithm assumption, so if α𝛼\alphaitalic_α is not discarded this breaks the binding property but not the hiding property. We refer to [28] for a detailed security analysis. Further, KZG commitments are homomomorphic, i.e., if com1subscriptcom1\text{com}_{1}com start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and com2subscriptcom2\text{com}_{2}com start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT are commitments to polynomials 𝐠1subscript𝐠1\mathbf{g}_{1}bold_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT and 𝐠2subscript𝐠2\mathbf{g}_{2}bold_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT, then com1+com2subscriptcom1subscriptcom2\text{com}_{1}+\text{com}_{2}com start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + com start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT is a commitment to polynomial 𝐠1+𝐠2subscript𝐠1subscript𝐠2\mathbf{g}_{1}+\mathbf{g}_{2}bold_g start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT + bold_g start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT.

Definition A.4.

A zk-SNARK is a proof with the following properties:

  • Completeness. For every true statement for the relation \mathcal{R}caligraphic_R an honest prover with a valid witness always convinces the verifier, i.e., (x,w)::for-all𝑥𝑤absent\forall(x,w)\in\mathcal{R}{}:∀ ( italic_x , italic_w ) ∈ caligraphic_R :

    \condprobVerify\vk(x,π)=1(crs,\vk)Setup(1λ)πProvecrs(x,w)=1\condprobsubscriptVerify\vk𝑥𝜋1crs\vkSetupsuperscript1𝜆𝜋subscriptProvecrs𝑥𝑤1\condprob{\textsf{Verify}_{\vk}(x,\pi)=1}{\begin{gathered}(\textsf{crs},\vk)% \leftarrow\textsf{Setup}(1^{\lambda})\\ \pi\leftarrow\textsf{Prove}_{\textsf{crs}}(x,w)\end{gathered}}=1Verify start_POSTSUBSCRIPT end_POSTSUBSCRIPT ( italic_x , italic_π ) = 1 start_ROW start_CELL ( crs , ) ← Setup ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT ) end_CELL end_ROW start_ROW start_CELL italic_π ← Prove start_POSTSUBSCRIPT crs end_POSTSUBSCRIPT ( italic_x , italic_w ) end_CELL end_ROW = 1
  • Knowledge Soundness. For every PPT adversary, there exists a PPT extractor that gets full access to the adversary’s state (including its random coins and inputs). Whenever the adversary produces a valid argument, the extractor can compute a witness with high probability: \adv::for-all\advabsent\forall\adv{}\exists\mathcal{E}:∀ ∃ caligraphic_E :

    \condprobVerify\vk(x~,π~)=1(x~,w)=0(crs,\vk)Setup(1λ)((x~,π~);w)\adv|(crs)=\negl\condprobsubscriptVerify\vk~𝑥~𝜋1~𝑥superscript𝑤0crs\vkSetupsuperscript1𝜆~𝑥~𝜋superscript𝑤conditional\advcrs\negl\condprob{\begin{gathered}\textsf{Verify}_{\vk}(\tilde{x},\tilde{\pi})=1\\ \land\mathcal{R}(\tilde{x},w^{\prime})=0\end{gathered}}{\begin{gathered}(% \textsf{crs},\vk)\leftarrow\textsf{Setup}(1^{\lambda})\\ ((\tilde{x},\tilde{\pi});w^{\prime})\leftarrow\adv{}|\mathcal{E}(\textsf{crs})% \\ \end{gathered}}=\neglstart_ROW start_CELL Verify start_POSTSUBSCRIPT end_POSTSUBSCRIPT ( over~ start_ARG italic_x end_ARG , over~ start_ARG italic_π end_ARG ) = 1 end_CELL end_ROW start_ROW start_CELL ∧ caligraphic_R ( over~ start_ARG italic_x end_ARG , italic_w start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) = 0 end_CELL end_ROW start_ROW start_CELL ( crs , ) ← Setup ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT ) end_CELL end_ROW start_ROW start_CELL ( ( over~ start_ARG italic_x end_ARG , over~ start_ARG italic_π end_ARG ) ; italic_w start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) ← | caligraphic_E ( crs ) end_CELL end_ROW =

    We stress here that this definition requires a non-black-box extractor, i.e., the extractor gets full access to the adversary’s state.

  • Succinctness. For any x𝑥xitalic_x and w𝑤witalic_w, the length of the proof is given by |π|=\poly\pcpolynomialstylepolylog(|x|+|w|)𝜋\poly\pcpolynomialstyle𝑝𝑜𝑙𝑦𝑙𝑜𝑔𝑥𝑤|\pi|=\poly\cdot\pcpolynomialstyle{polylog}(|x|+|w|)| italic_π | = ⋅ italic_p italic_o italic_l italic_y italic_l italic_o italic_g ( | italic_x | + | italic_w | ).

  • Zero-Knowledge. There exists a PPT simulator \sdv=(\sdv1,\sdv2)\sdvsubscript\sdv1subscript\sdv2\sdv=(\sdv_{1},\sdv_{2})= ( start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ) such that \sdv1subscript\sdv1\sdv_{1}start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT outputs a simulated CRS crs and a trapdoor \key[td]; On input crs, x𝑥xitalic_x, and \key[td], \sdv2subscript\sdv2\sdv_{2}start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT outputs a simulated proof π𝜋\piitalic_π, and for all PPT adversaries \adv=(\adv1,\adv2)\advsubscript\adv1subscript\adv2\adv=(\adv_{1},\adv_{2})= ( start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT , start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ), such that

    |\condprob(x,w)\adv2(π)=1(crs,\vk)Setup(1λ)(x,w)\adv1(1λ,crs)πProvecrs(x,w)\displaystyle\left|\condprob{\begin{gathered}(x,w)\in\mathcal{R}\\ {}\land{}\\ \adv_{2}(\pi)=1\end{gathered}}{\begin{gathered}(\textsf{crs},\vk)\leftarrow% \textsf{Setup}(1^{\lambda})\\ (x,w)\leftarrow\adv_{1}(1^{\lambda},\textsf{crs})\\ \pi\leftarrow\textsf{Prove}_{\textsf{crs}}(x,w)\end{gathered}}-\right.| start_ROW start_CELL ( italic_x , italic_w ) ∈ caligraphic_R end_CELL end_ROW start_ROW start_CELL ∧ end_CELL end_ROW start_ROW start_CELL start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_π ) = 1 end_CELL end_ROW start_ROW start_CELL ( crs , ) ← Setup ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT ) end_CELL end_ROW start_ROW start_CELL ( italic_x , italic_w ) ← start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT , crs ) end_CELL end_ROW start_ROW start_CELL italic_π ← Prove start_POSTSUBSCRIPT crs end_POSTSUBSCRIPT ( italic_x , italic_w ) end_CELL end_ROW -
    \condprob(x,w)\adv2(π)=1(crs,\key[td])\sdv1(1λ)(x,w)\adv1(1λ,crs)π\sdv2(crs,\key[td],x)|=\negl\displaystyle\left.\condprob{\begin{gathered}(x,w)\in\mathcal{R}\\ {}\land{}\\ \adv_{2}(\pi)=1\end{gathered}}{\begin{gathered}(\textsf{crs}^{\prime},\key[td]% )\leftarrow\sdv_{1}(1^{\lambda})\\ (x,w)\leftarrow\adv_{1}(1^{\lambda},\textsf{crs}^{\prime})\\ \pi\leftarrow\sdv_{2}(\textsf{crs}^{\prime},\key[td],x)\end{gathered}}\right|=\neglstart_ROW start_CELL ( italic_x , italic_w ) ∈ caligraphic_R end_CELL end_ROW start_ROW start_CELL ∧ end_CELL end_ROW start_ROW start_CELL start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( italic_π ) = 1 end_CELL end_ROW start_ROW start_CELL ( crs start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , [ italic_t italic_d ] ) ← start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT ) end_CELL end_ROW start_ROW start_CELL ( italic_x , italic_w ) ← start_POSTSUBSCRIPT 1 end_POSTSUBSCRIPT ( 1 start_POSTSUPERSCRIPT italic_λ end_POSTSUPERSCRIPT , crs start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT ) end_CELL end_ROW start_ROW start_CELL italic_π ← start_POSTSUBSCRIPT 2 end_POSTSUBSCRIPT ( crs start_POSTSUPERSCRIPT ′ end_POSTSUPERSCRIPT , [ italic_t italic_d ] , italic_x ) end_CELL end_ROW | =
Lemma A.5 (Demillo-Lipton-Schwartz-Zippel [13]).

Let f𝔽p[X]𝑓subscript𝔽𝑝delimited-[]𝑋f\in\mathbb{F}_{p}[X]italic_f ∈ blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT [ italic_X ] be a non-zero polynomial of degree d𝑑ditalic_d over a prime field 𝔽psubscript𝔽𝑝\mathbb{F}_{p}blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT. Let S𝑆Sitalic_S be any finite subset of 𝔽psubscript𝔽𝑝\mathbb{F}_{p}blackboard_F start_POSTSUBSCRIPT italic_p end_POSTSUBSCRIPT and let r𝑟ritalic_r be a field element selected independently and uniformly from set S𝑆Sitalic_S. Then

Pr[f(r)=0]d|S|.Pr𝑓𝑟0𝑑𝑆\Pr[f(r)=0]\leq\frac{d}{|S|}.roman_Pr [ italic_f ( italic_r ) = 0 ] ≤ divide start_ARG italic_d end_ARG start_ARG | italic_S | end_ARG .

Appendix B Ethics and Open Science Statements

Ethics Statement. This work introduces Efficient Commit-and-Prove SNARKs for zkML, aiming to improve privacy and security in machine learning applications. Our work aims to empower users by providing tools that ensure data privacy, transparency, and integrity in machine learning applications. By enhancing privacy-preserving ML, we contribute to the responsible use of data, protecting individuals’ sensitive data from unauthorized access or misuse. However, we recognize that any cryptographic tool, including SNARKs, can be misused if applied irresponsibly. To mitigate these risks, we encourage the community to adhere to ethical guidelines when deploying zkML solutions in practice.

Open Science Statement. To ensure the reproducibility of our results, we will publish the code for our system, including the implementation of existing work generated as part of this work. We will also provide detailed documentation of our experimental setup and an artifact evaluation to facilitate the reproduction of our results. All resources will be publicly accessible.