Table of Contents
Fetching ...

zkVC: Fast Zero-Knowledge Proof for Private and Verifiable Computing

Yancheng Zhang, Mengxin Zheng, Xun Chen, Jingtong Hu, Weidong Shi, Lei Ju, Yan Solihin, Qian Lou

TL;DR

The paper tackles the high computational overhead of zero-knowledge proofs for verifying matrix multiplication in cloud-outsourced ML tasks. It introduces zkVC, which combines Constraint-Reduced Polynomial Circuits (CRPC) to collapse constraints from O(n^3) to O(n) and Prefix-Sum Query (PSQ) to cut left wires, plus arithmetic approximations for nonlinear functions to support verifiable Transformer inference. Key contributions include a reported >12× improvement in proving time for matrix multiplication and a >15× runtime reduction on Vision Transformers, along with practical results in both vision and NLP models. This work advances private, verifiable computing for ML by delivering scalable ZKP methods with minimal trusted setup and broad applicability to real-world ML workloads.

Abstract

In the context of cloud computing, services are held on cloud servers, where the clients send their data to the server and obtain the results returned by server. However, the computation, data and results are prone to tampering due to the vulnerabilities on the server side. Thus, verifying the integrity of computation is important in the client-server setting. The cryptographic method known as Zero-Knowledge Proof (ZKP) is renowned for facilitating private and verifiable computing. ZKP allows the client to validate that the results from the server are computed correctly without violating the privacy of the server's intellectual property. Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (zkSNARKs), in particular, has been widely applied in various applications like blockchain and verifiable machine learning. Despite their popularity, existing zkSNARKs approaches remain highly computationally intensive. For instance, even basic operations like matrix multiplication require an extensive number of constraints, resulting in significant overhead. In addressing this challenge, we introduce \textit{zkVC}, which optimizes the ZKP computation for matrix multiplication, enabling rapid proof generation on the server side and efficient verification on the client side. zkVC integrates optimized ZKP modules, such as Constraint-reduced Polynomial Circuit (CRPC) and Prefix-Sum Query (PSQ), collectively yielding a more than 12-fold increase in proof speed over prior methods. The code is available at https://github.com/UCF-Lou-Lab-PET/zkformer

zkVC: Fast Zero-Knowledge Proof for Private and Verifiable Computing

TL;DR

The paper tackles the high computational overhead of zero-knowledge proofs for verifying matrix multiplication in cloud-outsourced ML tasks. It introduces zkVC, which combines Constraint-Reduced Polynomial Circuits (CRPC) to collapse constraints from O(n^3) to O(n) and Prefix-Sum Query (PSQ) to cut left wires, plus arithmetic approximations for nonlinear functions to support verifiable Transformer inference. Key contributions include a reported >12× improvement in proving time for matrix multiplication and a >15× runtime reduction on Vision Transformers, along with practical results in both vision and NLP models. This work advances private, verifiable computing for ML by delivering scalable ZKP methods with minimal trusted setup and broad applicability to real-world ML workloads.

Abstract

In the context of cloud computing, services are held on cloud servers, where the clients send their data to the server and obtain the results returned by server. However, the computation, data and results are prone to tampering due to the vulnerabilities on the server side. Thus, verifying the integrity of computation is important in the client-server setting. The cryptographic method known as Zero-Knowledge Proof (ZKP) is renowned for facilitating private and verifiable computing. ZKP allows the client to validate that the results from the server are computed correctly without violating the privacy of the server's intellectual property. Zero-Knowledge Succinct Non-Interactive Argument of Knowledge (zkSNARKs), in particular, has been widely applied in various applications like blockchain and verifiable machine learning. Despite their popularity, existing zkSNARKs approaches remain highly computationally intensive. For instance, even basic operations like matrix multiplication require an extensive number of constraints, resulting in significant overhead. In addressing this challenge, we introduce \textit{zkVC}, which optimizes the ZKP computation for matrix multiplication, enabling rapid proof generation on the server side and efficient verification on the client side. zkVC integrates optimized ZKP modules, such as Constraint-reduced Polynomial Circuit (CRPC) and Prefix-Sum Query (PSQ), collectively yielding a more than 12-fold increase in proof speed over prior methods. The code is available at https://github.com/UCF-Lou-Lab-PET/zkformer

Paper Structure

This paper contains 11 sections, 5 equations, 6 figures, 4 tables.

Figures (6)

  • Figure 1: Example of use case in verifiable and private neural network inference based on Zero-knowledge Proof (ZKP).
  • Figure 2: The workflow of zero-knowledge proof systems.
  • Figure 3: Proving Time Comparison for Matrix Multiplication with Prior Work.
  • Figure 4: Comparison of (a) basic constraint circuits with $12$ multiplications and our (b) CRPC with $2$ multiplications by transforming original matrix multiplication into polynomial multiplications of an intermediate variable $Z$.
  • Figure 5: Comparison: (a) traditional long addition with 6 left-wire variables vs. (b) our PSQ using only 3 variables.
  • ...and 1 more figures