
Imagine using an AI model to approve a loan or verify a piece of news — but without anyone seeing the input, the output, or the model itself. Sounds like magic? That’s ZKML in action.
This article is part of my personal learning journey — I’m not part of the Giza team, just a curious builder who learns best by documenting and teaching others. If you’re like me and enjoy unpacking emerging tech by writing it out, then you’re in good company.
Let’s explore:
ZKML = Zero-Knowledge + Machine Learning.
It allows you to prove that a machine learning model was run correctly without revealing:
In short: “You can verify the result, without knowing the details.”
Think of it like showing someone you solved a Rubik’s cube without them watching — but they can still verify it was solved fairly.
Most ML models today are black boxes. ZKML proves they worked correctly, without showing what’s inside.
Healthcare? Finance? Personal data? ZKML ensures the model’s inputs remain private.
ZKML allows AI outputs to be verified on-chain without rerunning the model.
Imagine a game that uses AI enemies. With ZKML, their decisions can be proven fair — even if the logic is hidden.
Here’s a simplified flow:
import torch
model = torch.nn.Linear(2, 1) # simple linear model
2. Compile Model to a Provable Circuit
Using Giza or another compiler, convert your model to Cairo (or a ZK-friendly format):
giza compile model.onnx --output model.cairo
3. Run Inference + Generate Proof
giza prove --input input.json --model model.cairo --output proof.json
4. Verify Proof (onchain)
@external
fn verify_prediction(proof: Proof) -> bool {
assert(is_valid_proof(proof));
return true;
}
Healthcare: Private diagnosis validation
Finance: Verifiable credit scoring
Gaming: AI logic for enemies that can’t cheat
Identity: Proof-of-personality or proof-of-reputation
Oracles: Onchain DeFi platforms using ML signals
This isn’t an endorsement — just part of what I’ve been exploring while learning.
Giza caught my attention because:
Again, I’m not affiliated with them — just documenting how their tooling helps me think through ZKML better.
ZKML may soon become a standard for responsible, verifiable AI — especially in decentralised systems.
ZKML isn’t just theory. It’s a powerful new way to build trust in AI systems, especially in blockchain.
If you’re passionate about:
… then ZKML is a playground worth exploring.
As for me — I’ll keep learning by writing.
Are you trying Giza or EZKL?
Working on your own ZKML setup?
Trying to understand how ZK and ML come together?
Let’s learn together. Drop a comment or say hi on X/Twitter. I’d love to swap notes and questions.
What is ZKML — and Why Does It Matter? was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.