Skip to content

Trains a differentially-private linear regression inside of the RISC-Zero virtual machine.

License

Notifications You must be signed in to change notification settings

Dustin-Ray/capy2vML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Computational Attestations of Polynomial Integrity Towards Verifiable Machine Learning

This project conducts differentially-private machine learning, ultimately producing both a model which can be readily used in a MLaaS setting, and a quantum-secure, non-interactive cryptographic proof that the program was executed honestly. It is derived from the RISC-Zero starter template.

To better understand the concepts behind this template, check out the Structure of a zkVM Application explainer.

Getting Started

Make sure you have the required dependencies:

sudo apt install curl build-essential libssl-dev pkgconf

install Rust if you don't already have it, then install the cargo risczero tool:

cargo install cargo-risczero

Next we'll need to install the risc0 toolchain with:

cargo risczero install

Quick Start

First, make sure rustup is installed. This project uses a nightly version of Rust. The rust-toolchain file will be used by cargo to automatically install the correct version.

The following command reads an (x,y) dataset from the csv included with this repo.

cargo run --release

Or, if you have CUDA and a GPU available:

cargo run -F cuda --release

Expect a lengthy, one-time build process when running with CUDA for the first time.

It processes the dataset into a vector, initializes the prover/guest, and commits the dataset to the guest environment. Following training, a "receipt" is produced which verifies the integrity of the computation. The receipt is zero-knowledge, and together with the differentially-private model, nothing is revealed about the training data.

DP Training Converges to Expected Model:

dp_training

Video Walkthrough

CAPY2vML DP-Training Codebase Walkthrough

About

Trains a differentially-private linear regression inside of the RISC-Zero virtual machine.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages