Paper 2025/1184

zkGPT: An Efficient Non-interactive Zero-knowledge Proof Framework for LLM Inference

Wenjie Qu, National University of Singapore
Yijun Sun, Hong Kong University of Science and Technology
Xuanming Liu, National University of Singapore
Tao Lu, National University of Singapore
Yanpei Guo, National University of Singapore
Kai Chen, Hong Kong University of Science and Technology
Jiaheng Zhang, National University of Singapore
Abstract

Large Language Models (LLMs) are widely employed for their ability to generate human-like text. However, service providers may deploy smaller models to reduce costs, potentially deceiving users. Zero-Knowledge Proofs (ZKPs) offer a solution by allowing providers to prove LLM inference without compromising the privacy of model parameters. Existing solutions either do not support LLM architectures or suffer from significant inefficiency and tremendous overhead. To address this issue, this paper introduces several new techniques. We propose new methods to efficiently prove linear and non-linear layers in LLMs, reducing computation overhead by orders of magnitude. To further enhance efficiency, we propose constraint fusion to reduce the overhead of proving non-linear layers and circuit squeeze to improve parallelism. We implement our efficient protocol, specifically tailored for popular LLM architectures like GPT-2, and deploy optimizations to enhance performance. Experiments show that our scheme can prove GPT-2 inference in less than 25 seconds. Compared with state-of-the-art systems such as Hao et al. (USENIX Security'24) and ZKML (Eurosys'24), our work achieves nearly $279\times$ and $185\times$ speedup, respectively.

Metadata
Available format(s)
PDF
Category
Cryptographic protocols
Publication info
Published elsewhere. Minor revision. Usenix Security 2025
Keywords
Zero-knowledge Proof; LLM
Contact author(s)
wen_jie_qu @ outlook com
History
2025-08-27: last of 2 revisions
2025-06-24: received
See all versions
Short URL
https://ia.cr/2025/1184
License
Creative Commons Attribution-NonCommercial
CC BY-NC

BibTeX

@misc{cryptoeprint:2025/1184,
      author = {Wenjie Qu and Yijun Sun and Xuanming Liu and Tao Lu and Yanpei Guo and Kai Chen and Jiaheng Zhang},
      title = {{zkGPT}: An Efficient Non-interactive Zero-knowledge Proof Framework for {LLM} Inference},
      howpublished = {Cryptology {ePrint} Archive, Paper 2025/1184},
      year = {2025},
      url = {https://eprint.iacr.org/2025/1184}
}
Note: In order to protect the privacy of readers, eprint.iacr.org does not use cookies or embedded third party content.