Jason Morton 76fa35db73 badge
2022-07-23 18:12:55 -04:00
2022-07-22 11:24:54 -04:00
2022-07-23 18:01:31 -04:00
2022-07-23 18:12:55 -04:00

Halo2 DL

Test MNIST in a zk-snark

This is a proof-of-concept implementation of inference for deep learning models in a zk-snark using Halo2. 2d convolution, fully connected (affine) layers, and nonlinearities such as ReLu and sigmoid are implemented. The input image and model parameters are provided as private advice and the last layer is the public input (instance column). Other configurations are also possible.

We give an example of proving inference with a model that achieves 97.5% accuracy on MNIST.

Running examples

The MNIST inference example (test_prove_mnist_inference) is by default ignored because making the proof uses a lot of memory and takes about three minutes. To run it, use

cargo test --release -- --ignored --nocapture

or ``--include-ignored` to run together with the rest.

Description
No description provided
Readme 164 MiB
Languages
Rust 96.7%
Python 2.4%
Shell 0.9%