Paper 2021/087

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

Boyuan Feng, Lianke Qin, Zhenfei Zhang, 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.

Note: fix abstract and author names

Metadata
Available format(s)
PDF
Category
Applications
Publication info
Preprint. MINOR revision.
Keywords
zero knowledgeneural networksprivacy
Contact author(s)
shumo @ cs ucsb edu
History
2021-05-15: revised
2021-01-27: received
See all versions
Short URL
https://ia.cr/2021/087
License
Creative Commons Attribution
CC BY

BibTeX

@misc{cryptoeprint:2021/087,
      author = {Boyuan Feng and Lianke Qin and Zhenfei Zhang and Yufei Ding and Shumo Chu},
      title = {{ZEN}: An Optimizing Compiler for Verifiable, Zero-Knowledge Neural Network Inferences},
      howpublished = {Cryptology {ePrint} Archive, Paper 2021/087},
      year = {2021},
      url = {https://eprint.iacr.org/2021/087}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.