## Cryptology ePrint Archive: Report 2021/087

ZEN: An Optimizing Compiler for Verifiable, Zero-Knowledge Neural Network Inferences

Boyuan Feng and Lianke Qin and Zhenfei Zhang and Yufei Ding and Shumo Chu

Abstract: We present ZEN, the first optimizing compiler that generates efficient verifiable, zero-knowledge neural network inference schemes. ZEN generates two schemes: ZEN$_{acc}$ and ZEN$_{infer}$. ZEN$_{acc}$ proves the accuracy of a committed neural network model; ZEN$_{infer}$ proves a specific inference result. Used in combination, these verifiable computation schemes ensure both the privacy of the sensitive user data as well as the confidentiality of the neural network models. However, directly using these schemes on zkSNARKs requires prohibitive computational cost. As an optimizing compiler, ZEN introduces two kinds of optimizations to address this issue: first, ZEN incorporates a new neural network quantization algorithm that incorporate two R1CS friendly optimizations which makes the model to be express in zkSNARKs with less constraints and minimal accuracy loss; second, ZEN introduces a SIMD style optimization, namely stranded encoding, that can encoding multiple 8bit integers in large finite field elements without overwhelming extraction cost. Combining these optimizations, ZEN produces verifiable neural network inference schemes with ${\bf 5.43} \sim {\bf 22.19} \times$ ($15.35 \times$ on average) less R1CS constraints.

Category / Keywords: applications / zero knowledge, neural networks, privacy

Date: received 23 Jan 2021, last revised 15 May 2021

Contact author: shumo at cs ucsb edu

Available format(s): PDF | BibTeX Citation

Note: fix abstract and author names

Short URL: ia.cr/2021/087

[ Cryptology ePrint archive ]