Git Product home page Git Product logo

zkml-demo's Introduction

zkml demo

Private quantized linear regression on Ethereum.

This is a demo of the zkml protocol, which implements a zk-SNARK circuit where the proof verifies that a private model has a certain accuracy under a public dataset, as well as the public encrypted model is exactly the private model encrypted using the shared key.

Presentation: https://www.loom.com/share/fdbe451385dd4a22b5593bf80747a4be

Running

  • download powersOfTau28_hez_final_18.ptau from circom and move to circuits
  • mkdir artifacts && mkdir artifacts/lr to store artifacts
  • cd circuits && yarn prod to build the circuits
  • cd eth && yarn compile && yarn deploy-{NETWORK} to deploy the contracts
  • set up Infura IPFS with keys/ipfs.json containing {"id": ..., "secret": ...}
  • export PRIVATE_KEY=... && export URL=... to export private key and RPC URL
  • for the jupyter demo, run jupyter kernelspec list to find kernel.json and add an "env": {"PRIVATE_KEY": ..., "URL": ...} entry
  • ./zkml to interact with cli (xDai)

Check it out on-chain

There is an outstanding 20 xDai bounty on the contract, available for claim as of December 2021.

https://blockscout.com/xdai/mainnet/address/0x5B54f06991871cd7EAE76a3D270D9EFFBdC01207/contracts

Protocol Overview

fig

Special Thanks

  • ETH Summer
  • Lattice

zkml-demo's People

Contributors

dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.