arXiv:2609.10149cs.CRSep 2026

Manuscript Offprint

arXiv:2609.10149

Sound Debloating of Redundant Checks in Zero-Knowledge Machine-Learning Circuits

Zhantong Xue, Pingchuan Ma, Zhaoyu Wang, Yuguang Zhou, Huaijin Wang, Shuai Wang

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Zhantong Xue

Hong Kong University of Science and Technology

Hong Kong, China

zxueai@cse.ust.hk

Pingchuan Ma †^{\dagger}

Zhejiang University of Technology

Hangzhou, China

pma@zjut.edu.cn

Yuguang Zhou

Hong Kong University of Science and Technology

Hong Kong, China

yzhougv@cse.ust.hk

Zhaoyu Wang

Hong Kong University of Science and Technology

Hong Kong, China

zwangjz@cse.ust.hk

Huaijin Wang

Shandong University

Jinan, China

huaijinwang@sdu.edu.cn

Shuai Wang

Hong Kong University of Science and Technology

Hong Kong, China

shuaiw@cse.ust.hk

Abstract

Zero-knowledge (ZK) proof systems for neural-network inference compile the model into a system of arithmetic constraints. Many of these constraints are redundant checks: range proofs, sign lookups, and bit decompositions who are globally entailed by the rest of the circuit through chains of reasoning that span distant gadgets. Removing them shrinks the circuit and accelerates proving, but the removal must be carefully justified: an unsoundly debloated circuit becomes forgeable, accepting witnesses the original would have rejected and so allowing a prover to claim, for example, that a neural network produced an output it never actually computed. Such soundness vulnerabilities are not hypothetical: under-constrained circuits in deployed ZK systems have enabled attackers to forge transactions and bypass verification entirely.

We present an automated framework that removes redundant checks while provably preserving soundness. For each candidate removal, our tool first checks whether the rest of the circuit, on its own, can still rule out every value the removed check was excluding. Using whole-circuit abstract interpretation, the analysis searches for such alternative justifications and records them in a provenance graph; a check is then removed only when an alternative path through the graph still derives the facts that it is checking. This ensures that the debloated circuit opens no new forging strategy to an adversary. We evaluate circuits spanning MLP, CNN, RNN, and transformer architectures generated by two production frameworks (ezkl and zkml), with up to 25.3 million constraints. Our tool removes up to 48.7% of constraints and reduces prover time by up to 72.8%, without weakening security.

CCS Concepts

• Security and privacy → Cryptography; • Theory of computation → Program analysis.

References (29)