An Efficient ZK Compiler from SIMD Circuits to General Circuits

Dung Bui, Haotian Chu, Geoffroy Couteau, Xiao Wang, Chenkai Weng, Kang Yang, Yu Yu

Introduction

Zero-knowledge (ZK) proofs are a cornerstone of modern cryptography, allowing a prover to demonstrate the validity of a statement without revealing sensitive underlying data. While highly efficient ZK protocols exist for SIMD (Single Instruction, Multiple Data) circuits—where the same operation is repeated across parallel data streams—real-world applications often require general circuits characterized by complex, irregular wiring.

Bridging the gap between SIMD-optimized protocols and general-purpose computation has historically introduced significant overhead. This paper presents a generic compiler that transforms efficient SIMD-ZK proofs into proofs for arbitrary circuits by optimizing the "wire consistency check." This innovation reduces communication complexity from $O(C^{3/4})$ to $O(C^{1/2})$, offering substantial bandwidth savings for large-scale computations.

The Extended SIMD-ZK Framework

The authors introduce Extended SIMD-ZK ($F_{eSIMDZK}$), a framework designed to handle the "wiring" of a circuit as a linear mapping problem. In a general circuit, the output of one gate must correctly serve as the input to another, even if those gates are processed in different SIMD batches.

Linear Map Proofs and Randomized Batching

Previous methods, such as the AntMan protocol, suffered from high communication costs when checking wire connectivity. The new compiler treats the entire circuit's wiring as a large, sparse linear mapping ($x = My$).

To verify this mapping efficiently, the system employs randomized batching. Rather than sending the entire matrix, the verifier provides a random challenge vector. The prover then utilizes an inner-product argument to demonstrate that the relation holds in a compressed form. This approach shifts the consistency check cost from $O(B^3)$ or $O(B^2)$ down to $O(B)$, where $B$ represents the batch size.

Streaming ZK for Scalability

To accommodate memory-constrained environments, the authors developed a second compiler for Streaming ZK. This system processes circuits segment-by-segment, "pruning" the circuit to keep only active wires in memory. By committing to these wires before moving to the next segment, the system can handle circuits with billions of gates on standard hardware without exhausting RAM.

Key Insights

  • Wiring as a Linear Map: By conceptualizing messy circuit connectivity as a linear transformation of a global witness vector, the authors apply standard cryptographic "random linear combination" techniques to prove consistency at a fraction of the previous cost.
  • SIMD as a Primitive: The framework treats SIMD-ZK as a high-performance "black box." This modularity ensures that any future improvements in SIMD-ZK performance will automatically translate to faster general-purpose ZK proofs.
  • CRS Reduction: For discrete-log-based protocols (such as $\Sigma$-protocols), this technique reduces the Common Reference String (CRS) size from linear $O(C)$ to square-root $O(\sqrt{C})$, significantly enhancing practicality for large circuits.

Experimental Results

The implementation, dubbed AntMan++, was evaluated against QuickSilver, the prior state-of-the-art for VOLE-based ZK, using a synthetic benchmark of $2^{27}$ (over 134 million) multiplication and addition gates across 2,048 layers.

  • Bandwidth Efficiency: AntMan++ achieved between 17.5x and 83.6x improvement in communication overhead compared to QuickSilver.
  • Execution Speed: In a 10Mbps network environment, the end-to-end running time was 70% faster than previous methods.
  • Complexity Milestone: The work successfully reduced communication complexity for several major classes of ZK protocols—including VOLE-based, $\Sigma$-protocols, and Multi-verifier ZK—to $O(C^{1/2})$.

Limitations and Future Directions

While the compiler drastically reduces bandwidth requirements, the prover's local computation time remains approximately 2-3x slower than QuickSilver due to the overhead of Fast Fourier Transforms (FFTs) and homomorphic evaluations. Future research may focus on optimizing these local computational bottlenecks.

Additionally, while the current VOLE-based instantiations are highly efficient, they are "designated-verifier" protocols. Extending these $O(C^{1/2})$ gains to publicly verifiable SNARKs remains a primary objective for the field.

Summary updated

BibTeX
@article{bui2025efficient,
  author = {Dung Bui and Haotian Chu and Geoffroy Couteau and Xiao Wang and Chenkai Weng and Kang Yang and Yu Yu},
  title = {{An Efficient ZK Compiler from SIMD Circuits to General Circuits}},
  journal = {J. Cryptol.},
  year = {2025},
  doi = {10.1007/s00145-024-09531-4},
}
Figure