zkTransformer: Scalable Zero-Knowledge Proofs for LLM Inference via Einsum Arithmetization and Structured Exponentiation Lookups
Abstract
Large language models (LLMs) are widely deployed through cloud APIs; however, their inference processes are opaque and cannot be externally audited without revealing proprietary model parameters. Zero-knowledge proofs (ZKPs) enable verifiable inference while preserving model confidentiality, but existing zero-knowledge machine learning (zkML) systems remain difficult to deploy in practice due to limitations in developer usability, completeness of prover implementations, and the cost of lookup operations. We present \zkt, an end-to-end zkML framework for transformer inference that addresses these challenges while achieving high prover performance. To improve usability and correctness, we introduce \zkes, a new sumcheck-based arithmetization that lifts linear tensor operations to an AI-friendly abstraction based on Einstein summation (Einsum), enabling automatic compilation of such operations into a single Sumcheck instance without manual circuit engineering over low-level addition and multiplication gates. To reduce the cost of nonlinear operations, we further propose \zkexp, a structured lookup technique for exponentiation that eliminates the need for table-sized commitments. Together, these techniques provide a unified and model-agnostic framework for verifiable transformer inference, supporting standard architectures such as GPT-2 and LLaMA2-7B. We implement and open-source \zkt. On GPT-2, it achieves an amortized prover time of 3.4 seconds per token, representing a 5--10× speedup over state-of-the-art systems such as zkLLM and zkGPT.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.