Skip to content
Z

zkMNIST

zkMNIST is a proof of concept game that explores the possibility of running a neural network inside a zero knowledge circuit.

Created on 19th May 2024

Z

zkMNIST

zkMNIST is a proof of concept game that explores the possibility of running a neural network inside a zero knowledge circuit.

The problem zkMNIST solves

zkMNIST is a proof of concept game that explores the possibility of running a neural network inside a zero knowledge circuit. Game has the following rules:

The goal is to draw a number with the least amount of pixels activated that will be recognized by the model as some number. You can prove that you have such an image without revealing what that image is, to do so you generate a zero-knowledge proof. Later, the only thing you need to expose to is the proof, what digit it is and how many pixels are lit up. The proof is ran through the verifier generated from the circuit and if it passes your score is added to the leader board. Verifier without needing the used input image confirms all the calculations done by the model. Each digit is like a category in speed-running leader board where the proof is like the twitch recording made to confirm that you actually did it.

Challenges we ran into

We used zkFloat library, and a surprisingly big issue was understanding it's logic. This implementation was a big help, but confirming that those calculations are valid took us some time.

We were first planning to run the prover in the browser. After fighting with NoirJs compatibility issues, we stumbled upon Unreachable error from WASM. After further investigation, we realized that our model is using over 4GB or RAM (when proving from CLI), so, with WASM overhead, it turned out to be impossible to prove our circuit in the browser client. After confirming with person working in Noir team, they confirmed, that the amount of RAM used can be caused by not optimal approach of the noir compiler, especially regarding matrix multiplication. Noir is still in it's early development state, so it is entirely possible that future versions of the compiler would be able to prove in browser.

Tracks Applied (4)

Global Bounty

zkMNIST is a proof of concept game that explores the possibility of running a neural network inside a zero knowledge cir...Read More
Aleph Zero

Aleph Zero

Best zkML project

zkMNIST is a proof of concept game that explores the possibility of running a neural network inside a zero knowledge cir...Read More

Nethermind Research

Best ZK Application deployed on zkSync

zkMNIST is a proof of concept game that explores the possibility of running a neural network inside a zero knowledge cir...Read More
zkSync ∎

zkSync ∎

Prizes for Finalists, Hackers' Choice & Chewing Glass

zkMNIST is a proof of concept game that explores the possibility of running a neural network inside a zero knowledge cir...Read More

Discussion

Builders also viewed

See more projects on Devfolio