Scalable zkSNARKs for Matrix Computations: A Generic Framework for Verifiable Deep Learning

Mingshu Cong, Sherman S. M. Chow, Siu Ming Yiu, Tsz Hon Yuen

TL;DR

This paper introduces Evalyn, a novel framework for verifiable deep learning (VML) that achieves efficient, privacy-preserving proofs for neural network computations. Evalyn enables strictly linear prover time, logarithmic proof size and verification time, and architecture privacy, addressing key limitations of prior VML systems.

What Problem Does This Paper Address?

Verifiable Machine Learning (VML) aims to prove that a neural network (NN) produced a specific output for a given input, without revealing the NN's architecture or parameters. Existing VML approaches face a trade-off:

  • Monolithic zkSNARKs: Offer strong privacy and succinctness but suffer from prohibitively slow prover times due to the complexity of compiling entire NNs into circuits.
  • Layer-by-layer proofs: Achieve faster prover times but sacrifice succinctness (proof size and verification time grow with network depth) and often leak architecture details.

The core problem is to achieve the "best of both worlds": a VML system that is efficient, private, and generic enough to support diverse NN architectures.

Methods

Evalyn introduces a novel, generic framework for VML based on zkSNARKs for matrix computations. Key techniques include:

  • DAG-based Matrix Expression: NNs are modeled as directed acyclic graphs (DAGs) of atomic matrix operations. This abstraction allows for a unified approach across different NN architectures.
  • Dual-Layer Proof Composition:
    • Proof Reduction Layer: Atomic proofs for matrix operations are composed topologically. This layer reduces complex computations to simpler ones, inspired by the "reduction of knowledge" concept.
  • Proof-of-Proof (PoP) Layer: A recursive zkSNARK compresses the entire reduction transcript into a single, succinct proof. This layer ensures architecture privacy by proving only a commitment to the DAG's topology.
  • Evalyn Interface: A standardized interface for atomic operations (Type-1 and Type-2) that homogenizes different matrix operations, enabling modular composition.
  • LiteBullet Proof: A novel, polynomial-free inner-product proof based on folding techniques. This replaces the traditional sumcheck protocol, avoiding costly polynomial conversions and improving efficiency.
  • Type-2 to Type-1 Transformation: Non-linear operations (like activations) are transformed into Type-1 expressions, allowing them to be handled within the same framework.

Datasets

Not discussed in the paper. The focus is on the computational framework for VML, not specific trained models.

Key Insights and Ideas

  • DAG as a Unified Abstraction: Modeling NNs as DAGs of matrix operations provides a powerful, architecture-agnostic representation that simplifies proof composition.
  • Proof-of-Proof for Succinctness and Privacy: Using a PoP layer as an outer compression mechanism is a clever way to achieve succinctness and hide the NN architecture without sacrificing the efficiency of the underlying proof reduction.
  • LiteBullet: Polynomial-Free Proofs: Eliminating polynomials from inner-product proofs is a significant step towards making VML more accessible to ML practitioners and potentially more efficient by avoiding conversion overhead.
  • Modular Composition is Key: The framework's "Lego block" approach, where atomic proofs compose cleanly, is crucial for handling the heterogeneity of NN operations and architectures.

Key Results

Evalyn achieves the following for a matrix expression with $M$ atomic operations on $n \times n$ matrices:

  • Prover Time: Strictly linear, $O(Mn^2)$.
  • Proof Size: Logarithmic, $O(\log(Mn))$.
  • Verifier Time: Logarithmic, $O(\log(Mn))$.
  • Architecture Privacy: Achieved through the PoP layer.
  • Zero Knowledge: Ensured by the zkSNARK properties.

Experimental results on a mock NN with 210 layers and ~1 billion parameters showed a prover time of 34.8 minutes (8-bit quantization) and 36.8 minutes (16-bit quantization), with verifier times in milliseconds.

Limitations and Future Work

  • Quantization Limit: Evalyn currently supports up to 16-bit quantization. Extending to 32-bit would significantly increase commitment time and prover time, and 64-bit is not supported.
  • Prover Time for Large NNs: While linear, the prover time can still be substantial for very large NNs, especially due to commitment overhead.
  • Future Work: The authors suggest exploring parallel Groth16 for PoP proving, integrating with model compilers, supporting configurable per-layer bit widths, and extending to cryptographic neural network computation. They also mention potential improvements using different multilinear PCS schemes.

Summary updated

Abstract

Sublinear proof sizes have recently become feasible in verifiable machine learning (VML), yet no approach achieves the trio of strictly linear prover time, logarithmic proof size and verification time, and architecture privacy. Hurdles persist because we lack a succinct commitment to the full neural network and a framework for heterogeneous models, leaving verification dependent on architecture knowledge. Existing limits motivate our new approach: a unified proof-composition framework that casts VML as the design of zero-knowledge succinct non-interactive arguments of knowledge (zkSNARKs) for matrix computations. Representing neural networks with linear and non-linear layers as a directed acyclic graph of atomic matrix operations enables topology-aware composition without revealing the graph. Modeled this way, we split proving into a reduction layer and a compression layer that attests to the reduction with a proof of proof. At the reduction layer, inspired by reduction of knowledge (Crypto '23), root-node proofs are reduced to leaf-node proofs under an interface standardized for heterogeneous linear and non-linear operations. Next, a recursive zkSNARK compresses the transcript into a single proof while preserving architecture privacy. Complexity-wise, for a matrix expression with $M$ atomic operations on $n \times n$ matrices, the prover runs in $O(M n^2)$ time while proof size and verification time are $O(\log(M n))$, outperforming known VML systems. Honed for this framework, we formalize relations directly in matrices or vectors---a more intuitive form for VML than traditional polynomials. Our LiteBullet proof, an inner-product proof built on folding and its connection to sumcheck (Crypto '21), yields a polynomial-free alternative. With these ingredients, we reconcile heterogeneity, zero knowledge, succinctness, and architecture privacy in a single VML system.
BibTeX
@article{cong2025scalable,
  author = {Mingshu Cong and Sherman S. M. Chow and Siu Ming Yiu and Tsz Hon Yuen},
  title = {{Scalable zkSNARKs for Matrix Computations: A Generic Framework for Verifiable Deep Learning}},
  journal = {IACR Cryptol. ePrint Arch.},
  year = {2025},
}

Loading related content...

Figure