An Efficient ZK Compiler from SIMD Circuits to General Circuits

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

Abstract

Zero-Knowledge Proofs (ZKPs) are a cornerstone of privacy-preserving computation, yet a performance gap remains between specialized Single Instruction, Multiple Data (SIMD) circuits and general-purpose circuits. This paper introduces a generic compiler that bridges this gap, transforming efficient SIMD-ZK protocols into proofs for arbitrary circuits. By reformulating the "wiring consistency" problem as a linear mapping challenge, the authors achieve a sublinear communication complexity of $O(\sqrt{C})$ and introduce a streaming approach that enables memory-constrained provers to handle massive, billion-gate circuits.

1. Introduction

Zero-Knowledge Proofs allow a prover to demonstrate the validity of a statement without revealing the underlying witness. While the field has seen significant progress in efficiency, a disparity exists between the performance of SIMD circuits—where the same operation is applied to multiple data points—and general circuits. Real-world programs are rarely uniform, and the "wiring" required to connect disparate gates in a general circuit often incurs massive communication and memory overhead. This paper addresses these bottlenecks by proposing a compiler that leverages the efficiency of SIMD-ZK while maintaining the flexibility of general circuit representations.

2. The Wiring Consistency Problem

In a general circuit, the output of any given gate may serve as the input to any other gate. Proving that these "wires" are consistent—meaning the prover did not maliciously swap or alter values between gates—is a significant hurdle. Previous attempts at "SIMD-to-General" compilers often suffered from communication costs that scaled poorly (e.g., $O(C^{3/4})$) or required the prover to hold the entire circuit in RAM. For statements involving billions of gates, these requirements become prohibitive for standard hardware.

3. Methodology

The authors propose a three-pronged approach to solve the wiring and scalability challenges:

3.1 Extended SIMD-ZK ($F_{eSIMDZK}$)

The core innovation is the extension of standard SIMD-ZK functionality to include a proof of linear map. Instead of verifying wire consistency on a gate-by-gate basis, the authors represent the entire circuit's topology as a large, public matrix $L$. The consistency check is then treated as a matrix-vector product ($l = Lw$). By utilizing random challenges from the verifier and inner product arguments, the prover can demonstrate the correctness of this product with high efficiency.

3.2 The Generic SIMD Compiler

The proposed compiler acts as a wrapper for existing SIMD-ZK protocols. It utilizes the underlying SIMD-ZK to prove gate computations in large batches, while the new linear map proof handles the complex wiring between those batches. This modularity allows the compiler to be protocol-agnostic, compatible with various systems such as VOLE-based protocols (Antman) or discrete-log-based $\Sigma$-protocols.

3.3 Streaming for Scalability

To accommodate provers with limited memory, the authors introduce a streaming compiler. This tool processes the circuit segment-by-segment, "committing and proving" small chunks of the circuit sequentially. The linear map functionality links the outputs of one segment to the inputs of the next, ensuring that memory usage remains proportional to the segment size rather than the total circuit size.

4. Key Insights

  • Wiring as Linear Algebra: By treating circuit connectivity as a linear mapping problem, the authors compress the verification of millions of wires into a single, succinct proof.
  • Sublinear Communication: Most scalable ZKPs (such as those based on Quicksilver) scale linearly with circuit size. This compiler breaks that barrier, pushing communication complexity down to $O(\sqrt{C})$.
  • Protocol Agnosticism: The framework's ability to plug in diverse primitives—from multi-verifier systems to compressed $\Sigma$-protocols—makes it a versatile tool for the ZK ecosystem.

5. Evaluation and Results

The system was evaluated using synthetic layered circuits with up to $2^{27}$ (approximately 134 million) gates across varying bandwidths (10Mbps to 100Mbps).

  • Antman++ Improvement: When applied to the Antman protocol, the compiler improved communication complexity from $O(C^{3/4})$ to $O(C^{1/2})$. For a circuit of $2^{27}$ gates, this yielded an 83.6x improvement in communication compared to the state-of-the-art Quicksilver protocol.
  • Network Performance: In constrained 10Mbps environments, the new system demonstrated a 70% reduction in end-to-end running time.
  • Discrete-Log Efficiency: The authors obtained a discrete-log-based ZK argument with $O(\sqrt{C})$ communication and a common random string (CRS) of the same size, a significant improvement over previous linear-sized requirements.

6. Limitations and Future Work

While the compiler drastically reduces communication, it increases the computational burden on the prover due to more complex polynomial operations. However, the authors note that these operations are fully parallelizable, potentially mitigating the overhead on multi-core systems. Additionally, certain underlying schemes have a "usage limit" ($\tau_{max}$) on commitments, which remains a constraint for extremely complex, multi-stage proofs. Future research will focus on further optimizing the SIMD-ZK primitives to enhance the overall speed of the general ZK framework.

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