用并行证明累积技术,让大模型推理验证更快更小。
ZKTorch: Compiling ML Inference to Zero-Knowledge Proofs via Parallel Proof Accumulation
- 将模型编译为基本密码块,分块独立证明
- 证明体积缩小3倍,生成速度提升6倍
- 开源通用系统,适合快速迭代的AI服务
随着人工智能模型日益普及,对机器学习服务透明度的需求不断增加。然而,模型所有者不愿公开权重,因其被视为商业机密。为此,研究者转向零知识证明来验证模型推理结果。现有方法分为两类:一是将模型编译为低级电路并用ZK-SNARK证明;二是针对特定模型类设计专用加密协议。前者效率极低,难以用于现代大模型;后者泛化能力差,难以适应快速变化的机器学习领域。为此,我们提出ZKTorch,一个开源端到端证明系统,将机器学习模型编译为基本密码操作(basic blocks),每个使用专用协议证明。ZKTorch基于一种新型并行扩展的Mira累积方案,实现简洁证明且累积开销极小。该设计使ZKTorch在证明大小上至少比专用协议减少3倍,在证明时间上相比通用型ZKML框架最高提速6倍。
原文摘要 · Abstract (English)
As AI models become ubiquitous in our daily lives, there has been an increasing demand for transparency in ML services. However, the model owner does not want to reveal the weights, as they are considered trade secrets. To solve this problem, researchers have turned to zero-knowledge proofs of ML model inference. These proofs convince the user that the ML model output is correct, without revealing the weights of the model to the user. Past work on these provers can be placed into two categories. The first method compiles the ML model into a low-level circuit, and proves the circuit using a ZK-SNARK. The second method uses custom cryptographic protocols designed only for a specific class of models. Unfortunately, the first method is highly inefficient, making it impractical for the large models used today, and the second method does not generalize well, making it difficult to update in the rapidly changing field of machine learning. To solve this, we propose ZKTorch, an open source end-to-end proving system that compiles ML models into base cryptographic operations called basic blocks, each proved using specialized protocols. ZKTorch is built on top of a novel parallel extension to the Mira accumulation scheme, enabling succinct proofs with minimal accumulation overhead. These contributions allow ZKTorch to achieve at least a $3\times$ reduction in the proof size compared to specialized protocols and up to a $6\times$ speedup in proving time over a general-purpose ZKML framework.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。