How zero-knowledge proofs enable verifiable, privacy-preserving AI inference — from ZK basics to zkML projects shaping the future.
Contents
Imagine proving to a hospital that your AI model correctly diagnosed a patient — without ever revealing the patient's medical records or the model's proprietary weights. That's not a thought experiment. It's what zero-knowledge proofs make possible today.
As AI systems handle increasingly sensitive data — medical records, financial transactions, biometric identifiers — the tension between transparency and privacy has become one of the defining challenges in the field. Zero-knowledge proofs (ZKPs) offer a cryptographic resolution: you can prove a computation happened correctly without exposing any of the underlying data.
Welcome to the world of zkML.
What Are Zero-Knowledge Proofs?
At their core, zero-knowledge proofs are a cryptographic technique that allows one party (the prover) to convince another party (the verifier) that a statement is true — without revealing any information beyond the validity of the statement itself.
The concept was introduced in a landmark 1985 paper by Goldwasser, Micali, and Rackoff, but it's become practically relevant only in the last decade thanks to breakthroughs in proof systems.
The Classic Analogy
Picture a cave with two entrances — A and B — connected by a locked door deep inside. You want to prove to someone standing outside that you know the secret code to unlock the door, but you don't want to reveal the code itself.
Here's what you do: you enter through a random entrance. The verifier, standing outside, shouts which exit they want you to come out of. If you know the code, you can always comply — unlock the door if needed and emerge from the requested side. If you don't know it, you can only succeed 50% of the time.
Repeat this 20 times, and a cheater's odds of faking it drop to less than one in a million. The verifier becomes convinced you know the code, yet never learns what it is.
Three Properties That Matter
Every zero-knowledge proof must satisfy three properties:
- Completeness — If the statement is true and both parties follow the protocol, the verifier will be convinced.
- Soundness — If the statement is false, no cheating prover can convince the verifier (except with negligible probability).
- Zero-knowledge — The verifier learns nothing beyond the fact that the statement is true.
Modern ZK Proof Systems
The ZK landscape has evolved rapidly. Today's practical systems include:
- zk-SNARKs (Succinct Non-interactive Arguments of Knowledge) — small proof sizes, fast verification, but require a trusted setup. Used in Zcash and many Ethereum rollups.
- zk-STARKs (Scalable Transparent Arguments of Knowledge) — no trusted setup, quantum-resistant, but larger proof sizes. Championed by StarkWare.
- Plonk and its variants — a universal, updatable setup that has become the workhorse for many modern ZK applications.
- Halo2 — recursive proof composition without a trusted setup, developed by the Zcash team.
These systems differ in proof size, verification time, prover overhead, and trust assumptions — but they all share the fundamental zero-knowledge property.
Enter zkML: Zero-Knowledge Machine Learning
zkML sits at the intersection of two powerful ideas: the verifiability guarantees of zero-knowledge proofs and the predictive power of machine learning. The core concept is straightforward — wrap a machine learning inference step inside a ZK circuit so that:
- The computation is verifiable — anyone can confirm the model produced a specific output for a given input.
- The inputs remain private — the data fed into the model stays hidden from the verifier.
- The model can remain private — the weights and architecture don't need to be revealed.
This is harder than it sounds. Neural networks involve millions of floating-point operations — matrix multiplications, nonlinear activations, normalization layers — that must be translated into the arithmetic circuits that ZK proof systems understand.
The Technical Challenge
ZK circuits operate over finite fields (large prime numbers), not floating-point arithmetic. This means every operation in a neural network must be:
- Quantized — floating-point weights and activations are converted to fixed-point or integer representations.
- Arithmetized — each operation becomes a constraint in a polynomial equation system.
- Optimized — the resulting circuit must be compact enough to generate proofs in reasonable time.
A simple MNIST classifier might produce a circuit with millions of constraints. A transformer model? Billions. The proving time and memory requirements scale accordingly, which is why zkML research focuses heavily on efficiency.
Projects Building the zkML Stack
Several teams are tackling this challenge from different angles, each making meaningful progress toward practical zkML.
EZKL
EZKL has emerged as one of the most accessible tools for converting standard machine learning models into ZK circuits. Given an ONNX-format model, EZKL automatically generates a Halo2-based circuit, produces proofs, and can deploy an on-chain verifier contract.
The workflow is surprisingly developer-friendly: export your PyTorch or TensorFlow model to ONNX, run EZKL's calibration step to determine optimal quantization parameters, generate a proving key, and start producing proofs. The team has demonstrated proofs for models with millions of parameters, though proving times still range from seconds (small models) to minutes (larger ones).
What makes EZKL particularly significant is its focus on the full pipeline — from model training in familiar ML frameworks all the way to on-chain verification on Ethereum.
Modulus Labs
Modulus Labs approaches zkML from the infrastructure side, building optimized proof systems specifically designed for AI workloads. Their Remainder prover is purpose-built for the kinds of operations neural networks rely on — large matrix multiplications, lookup tables for activation functions, and batch normalization.
Rather than adapting general-purpose ZK systems to ML, Modulus designs proving systems around ML primitives. This specialization yields significant performance improvements for AI-specific circuits.
Giza
Giza takes the "verifiable ML" concept and packages it as a platform for deploying provably correct AI models on-chain. Their stack allows developers to deploy machine learning models as smart contracts, where each inference comes with a cryptographic proof of correctness.
Giza's approach emphasizes developer experience and interoperability with the blockchain ecosystem. Their ONNX-to-Cairo transpiler converts standard models into programs that run on StarkNet, leveraging zk-STARKs for verification.
Real-World Use Cases
The combination of private computation and verifiable results unlocks use cases that neither AI nor blockchain could address alone.
Private Medical AI
Healthcare presents perhaps the most compelling case for zkML. Consider a diagnostic AI model that analyzes medical images:
- A hospital wants to use a third-party AI model for cancer screening.
- The patients' medical images cannot leave the hospital (HIPAA, GDPR).
- The AI company doesn't want to share its proprietary model weights.
- Regulators need assurance the correct, approved model was actually used.
With zkML, the hospital can run inference locally and generate a proof that the approved model was applied to the patient's data, producing a specific diagnosis. The proof is verifiable without revealing the image or the model weights. Regulators get their audit trail. Patients keep their privacy. The AI company protects its IP.
Financial Compliance
Banks use ML models for credit scoring, fraud detection, and anti-money laundering. These models process highly sensitive financial data while also being subject to regulatory requirements for explainability and fairness.
zkML enables a bank to prove to regulators that its credit scoring model satisfies fairness criteria (e.g., equal approval rates across demographics) without exposing individual applicant data or proprietary model details. The proof attests to the property without revealing the underlying information.
Decentralized AI Marketplaces
In a decentralized AI marketplace, users need assurance that they're getting inference from the model they paid for — not a cheaper, less accurate substitute. zkML provides this guarantee. A node operator proves they ran the exact model specified, with the exact weights, producing the exact output — without the user needing to trust the operator or see the model.
Identity and Authentication
Biometric authentication systems can use zkML to verify identity without storing or transmitting biometric data. A proof confirms that a face or fingerprint matches a stored template without revealing the biometric itself, reducing the catastrophic risk of biometric database breaches.
Challenges and Limitations
Despite the promise, zkML faces substantial hurdles before it reaches mainstream adoption.
Computational Overhead
Generating a ZK proof for a neural network inference is orders of magnitude more expensive than running the inference directly. For a moderately sized model, proving times can be 1,000x to 1,000,000x slower than native inference. This makes real-time applications impractical for now and limits zkML to scenarios where verification is worth the computational cost.
Model Size Constraints
Current zkML systems work well for small to medium models — image classifiers, simple regression models, small transformers. But the models driving the AI revolution — large language models with billions of parameters — remain far beyond what today's ZK proving systems can handle efficiently. Proving a single forward pass through GPT-scale models is not yet feasible.
Quantization Accuracy
Converting floating-point operations to finite field arithmetic introduces quantization errors. While careful calibration can minimize the accuracy loss, there is always a trade-off between proof efficiency and model fidelity. For high-stakes applications like medical diagnosis, even small accuracy differences matter.
Developer Experience
Despite tools like EZKL making the process more accessible, building zkML applications still requires expertise in both machine learning and zero-knowledge cryptography — a rare combination. The tooling is improving rapidly, but it's not yet at the "import and use" stage that most ML frameworks have reached.
The Road Ahead
The convergence of ZK proofs and AI is still in its early innings, but the trajectory is clear.
Hardware acceleration is coming. Just as GPUs revolutionized both ML training and ZK proving, purpose-built hardware (FPGAs, ASICs) for ZK proof generation will dramatically reduce proving times. Several teams are already building ZK-specific accelerators.
Proof system improvements continue at a rapid pace. Techniques like folding schemes, proof aggregation, and incremental verification are making it feasible to prove increasingly complex computations. Each generation of proof systems brings order-of-magnitude improvements in prover efficiency.
Hybrid approaches are emerging as a pragmatic path forward. Rather than proving an entire model inference in ZK, systems can prove critical components — the final classification layer, the attention weights, specific safety checks — while running the bulk of the computation in a trusted or optimistic execution environment.
Standardization will be essential. As zkML matures, the industry will need agreed-upon formats for model representation, proof schemas, and verification interfaces. Early work on interoperability between different ZK systems and ML frameworks is already underway.
Conclusion
Zero-knowledge proofs and AI are converging not because the math is elegant — though it is — but because the real world demands both intelligence and privacy. Healthcare systems need AI that respects patient confidentiality. Financial institutions need models that satisfy regulators without exposing customer data. Decentralized networks need verifiable computation without centralized trust.
zkML is the technology that makes these requirements compatible rather than contradictory. The challenges are real — proving costs, model size limitations, and tooling maturity all need significant improvement. But the fundamental primitives work, the projects building the infrastructure are making rapid progress, and the use cases are too compelling to ignore.
The future of AI isn't just smarter models. It's provably correct, privacy-preserving models — and zero-knowledge proofs are how we get there.
🧠 Test Your Knowledge
3 questions about this article
Question 1 of 3
What does a zero-knowledge proof verify?
Question 2 of 3
What is zkML?
Question 3 of 3
What is the main challenge of zkML?