Zero-knowledge machine learning (ZKML) lets a prover convince a verifier that a neural network was evaluated correctly while keeping the model, the input, or both private. A growing use case is protecting a proprietary model inside a hosted proving service, where the architecture itself is the confidential asset. Zero knowledge, however, protects only the proof transcript. Proof generation is ordinary software, and its memory-access behavior during proving depends on the model it is meant to hide. An unprivileged process that shares a CPU with the prover, with no shared memory and no privileged performance counters, can recover the proprietary architecture purely from cache contention during proof generation. Our attack, ZKCache, pairs cache-contention measurements with a source-level model of how a network's shape drives the prover's work. It combines learned trace evidence with exact structural constraints to recover operator types, their hyperparameters, and the network's computation graph. We evaluate two open-source Halo2-based ZKML systems, EZKL and TeleSparse, on VGG16 and ResNet-18. ZKCache recovers operator types with 98.6% accuracy and hyperparameters with 93.2% accuracy. For ResNet-18, it recovers the exact topology, meaning the complete operator-type sequence together with all residual connections, in 83.3% of trials. We further show that the leak is mitigable. A compiler defense that groups shape-compatible layers under a developer-specified budget hides per-layer parameters for 53% end-to-end overhead. ZKCache demonstrates that transcript-level zero knowledge does not, by itself, keep a model's architecture secret.
翻译:暂无翻译