
{"id":85337,"date":"2025-07-31T14:00:53","date_gmt":"2025-07-31T14:00:53","guid":{"rendered":"https:\/\/mycryptomania.com\/?p=85337"},"modified":"2025-07-31T14:00:53","modified_gmt":"2025-07-31T14:00:53","slug":"what-is-zkml-and-why-does-it-matter","status":"publish","type":"post","link":"https:\/\/mycryptomania.com\/?p=85337","title":{"rendered":"What is ZKML\u200a\u2014\u200aand Why Does It Matter?"},"content":{"rendered":"<h3>What is ZKML\u200a\u2014\u200aand Why Does It\u00a0Matter?<\/h3>\n<p>Imagine using an AI model to approve a loan or verify a piece of news\u200a\u2014\u200abut without anyone seeing the input, the output, or the model itself. Sounds like magic? That\u2019s <strong>ZKML<\/strong> in\u00a0action.<\/p>\n<p>This article is part of my personal learning journey\u200a\u2014\u200a<strong>I\u2019m not part of the Giza team<\/strong>, just a curious builder who learns best by documenting and teaching others. If you\u2019re like me and enjoy unpacking emerging tech by writing it out, then you\u2019re in good\u00a0company.<\/p>\n<p>Let\u2019s explore:<\/p>\n<p>What ZKML actually\u00a0isWhy it\u2019s a game-changer in web3 and\u00a0AIHow it works under the\u00a0hoodPractical use\u00a0casesA glimpse into the future (and where Giza fits\u00a0in)<\/p>\n<h3>What is\u00a0ZKML?<\/h3>\n<p><strong>ZKML = Zero-Knowledge + Machine Learning.<\/strong><\/p>\n<p>It allows you to prove that a machine learning model was run correctly <em>without revealing<\/em>:<\/p>\n<p>the input\u00a0datathe model\u00a0weightsor even the\u00a0output<\/p>\n<p>In short: <strong>\u201cYou can verify the result, without knowing the details.\u201d<\/strong><\/p>\n<p>Think of it like showing someone you solved a Rubik\u2019s cube <em>without them watching<\/em>\u200a\u2014\u200abut they can still verify it was solved\u00a0fairly.<\/p>\n<h3>Why Does ZKML\u00a0Matter?<\/h3>\n<h3>1. Trust Without Transparency<\/h3>\n<p>Most ML models today are black boxes. ZKML proves they worked correctly, <em>without showing what\u2019s\u00a0inside<\/em>.<\/p>\n<h3>2. Privacy<\/h3>\n<p>Healthcare? Finance? Personal data? ZKML ensures the model\u2019s inputs remain\u00a0private.<\/p>\n<h3>3. Onchain Verification<\/h3>\n<p>ZKML allows AI outputs to be verified on-chain <em>without rerunning<\/em> the\u00a0model.<\/p>\n<p><em>Imagine a game that uses AI enemies. With ZKML, their decisions can be proven fair\u200a\u2014\u200aeven if the logic is\u00a0hidden.<\/em><\/p>\n<h3>How Does ZKML\u00a0Work?<\/h3>\n<p>Here\u2019s a simplified flow:<\/p>\n<p><strong>Train a\u00a0Model<\/strong>import torch<br \/>model = torch.nn.Linear(2, 1)  # simple linear model<\/p>\n<p>2. <strong>Compile Model to a Provable Circuit<\/strong><br \/> Using Giza or another compiler, convert your model to Cairo (or a ZK-friendly format):<\/p>\n<p>giza compile model.onnx &#8211;output model.cairo<\/p>\n<p>3. <strong>Run Inference + Generate\u00a0Proof<\/strong><\/p>\n<p>giza prove &#8211;input input.json &#8211;model model.cairo &#8211;output proof.json<\/p>\n<p>4. <strong>Verify Proof (onchain)<\/strong><\/p>\n<p>@external<br \/>fn verify_prediction(proof: Proof) -&gt; bool {<br \/>    assert(is_valid_proof(proof));<br \/>    return true;<br \/>}<\/p>\n<h3>Use Cases<\/h3>\n<p><strong>Healthcare:<\/strong> Private diagnosis validation<\/p>\n<p><strong>Finance:<\/strong> Verifiable credit\u00a0scoring<\/p>\n<p><strong>Gaming:<\/strong> AI logic for enemies that can\u2019t\u00a0cheat<\/p>\n<p><strong>Identity:<\/strong> Proof-of-personality or proof-of-reputation<\/p>\n<p><strong>Oracles:<\/strong> Onchain DeFi platforms using ML\u00a0signals<\/p>\n<h3>Projects Leading the\u00a0Way<\/h3>\n<p>This isn\u2019t an endorsement\u200a\u2014\u200ajust part of what I\u2019ve been exploring while learning.<\/p>\n<h4>Giza Protocol<\/h4>\n<p>Compiles PyTorch models to\u00a0CairoVerifies ML outputs on\u00a0Starknet<\/p>\n<h4>EZKL<\/h4>\n<p>Uses Halo2-based proofs for ONNX\u00a0models<\/p>\n<h4>Modulus Labs<\/h4>\n<p>Research-focused ZKML\u00a0tooling<\/p>\n<h3>Giza from a Learner\u2019s Perspective<\/h3>\n<p>Giza caught my attention because:<\/p>\n<p>I could still use familiar ML tools like\u00a0PyTorchI could learn Cairo while applying AI\u00a0conceptsIt shows how real ZKML systems might work in\u00a0practice<em>Again, I\u2019m not affiliated with them\u200a\u2014\u200ajust documenting how their tooling helps me think through ZKML\u00a0better.<\/em><\/p>\n<h3>The Future of\u00a0ZKML<\/h3>\n<p>More efficient proof generationRicher model\u00a0supportTooling to train, prove, and deploy seamlessly<\/p>\n<p>ZKML may soon become a <strong>standard for responsible, verifiable AI<\/strong>\u200a\u2014\u200aespecially in decentralised systems.<\/p>\n<h3>Final Thoughts<\/h3>\n<p>ZKML isn\u2019t just theory. It\u2019s a <strong>powerful new way to build trust in AI systems<\/strong>, especially in blockchain.<\/p>\n<p>If you\u2019re passionate about:<\/p>\n<p>AIPrivacyWeb3Cairo\/Starknet<\/p>\n<p>\u2026 then ZKML is a playground worth exploring.<\/p>\n<p>As for me\u200a\u2014\u200aI\u2019ll keep learning by\u00a0writing.<\/p>\n<h3>Let\u2019s Connect<\/h3>\n<p>Are you trying Giza or EZKL?<br \/> Working on your own ZKML setup?<br \/> Trying to understand how ZK and ML come together?<\/p>\n<p>Let\u2019s learn together. Drop a comment or say hi on <a href=\"https:\/\/x.com\/0xOliviaNode\">X\/Twitter<\/a>. I\u2019d love to swap notes and questions.<\/p>\n<p><a href=\"https:\/\/medium.com\/coinmonks\/what-is-zkml-and-why-does-it-matter-1641b3d812af\">What is ZKML\u200a\u2014\u200aand Why Does It Matter?<\/a> was originally published in <a href=\"https:\/\/medium.com\/coinmonks\">Coinmonks<\/a> on Medium, where people are continuing the conversation by highlighting and responding to this story.<\/p>","protected":false},"excerpt":{"rendered":"<p>What is ZKML\u200a\u2014\u200aand Why Does It\u00a0Matter? Imagine using an AI model to approve a loan or verify a piece of news\u200a\u2014\u200abut without anyone seeing the input, the output, or the model itself. Sounds like magic? That\u2019s ZKML in\u00a0action. This article is part of my personal learning journey\u200a\u2014\u200aI\u2019m not part of the Giza team, just a [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-85337","post","type-post","status-publish","format-standard","hentry","category-interesting"],"_links":{"self":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/85337"}],"collection":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=85337"}],"version-history":[{"count":0,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=\/wp\/v2\/posts\/85337\/revisions"}],"wp:attachment":[{"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mycryptomania.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}