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
