Benchmarking CNN Components in EZKL: A Layer-Level Analysis for EVM-Compatible Deployment
Abstract
Zero-knowledge machine learning (ZKML) enables verifiable inference on private data, but deploying convolutional neural networks (CNNs) in production remains constrained by a multi-dimensional tradeoff between proof-generation latency, bandwidth consumption, and computational complexity. Existing ZKML frameworks and engineering blogs provide qualitative heuristics, yet practitioners lack systematic, layer-level measurements to guide architecture design under these constraints. This work presents the first systematic, layer-level characterization of CNN component costs in EZKL, a Halo2-based ZKML framework targeting EVM-compatible blockchains. We profile 8 feasible layer types (activations, pooling, normalization, and linear) across two EZKL precision settings (scale 7 and 10), measuring proof-generation time, proof size, circuit complexity, and peak memory in 26 experiments. We reveal critical infrastructure requirements by documenting 10 additional experiments that exceeded hardware limits (Conv2d operations, LayerNorm, and ReLU-based composite CNNs requiring$>125\ \text{GB}$RAM). Contrary to conventional wisdom, we find that precision configuration has a negligible performance impact ($1.002 \times$ratio), and that system RAM, not GPU VRAM, is the primary bottleneck. We release an open-source profiling toolkit and a public dataset that enable practitioners to query expected costs for their architectures and constraints.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.