Coder Social home page Coder Social logo

0g's Introduction

Zero Gravity is a system for proving an inference pass (i.e. a classification) for a pre-trained, public Weightless Neural Network run on a private input. Zero Gravity builds upon the recent BTHOWeN model by Susskind et al (2022), in which the authors improve upon earlier WNN models in a number of interesting ways. Most importantly for this hackathon project, they helpfully provide an implementation complete with pre-trained models and reproducible benchmarks.

See our blog post for an extensive description!

Built as part of the ZKHack hackathon, Lisbon, 2023.

Setup

Clone and install the custom aleo compiler supporting lookup arguments

Usage

Values in the example below were generated using our fork of BTHOWeN.

python3 scripts/generate_aleo_code.py 56
../aleo-setup/aleo/target/debug/aleo run main "$(cat input_file.txt)" "$(cat hash_values.txt)" "$(cat bloom_filters.txt)" $(cat winning_discriminator_value.txt) "$(cat winning_discriminator_index.txt)"

Implementation notes and limitations

  • All inputs are private, except for which discriminator (category) succeeded, as well as the model itself.
  • Proving time of e.g. a full MNIST example is not practical yet. PRs and suggestions for improvement are welcome.
  • โŒ Print statements during the build phase are expected - and will be removed in future iterations of Aleo.
  • The number of lookup constraints are not included in the final print statement but will show up when compiling in debug mode.
  • Note that even when changing certain inputs, the proof might succeed, as it essentially checks which discriminator won.

0g's People

Contributors

vicsn avatar superman32432432 avatar georgwiese avatar elusaegis avatar

Stargazers

Lulzx avatar Hudson Graeme avatar krane avatar  avatar YTTS avatar  avatar Nikolaus Schlemm avatar  avatar  avatar Yan-Tong Lin avatar 3for avatar Lorenz avatar  avatar ebigram avatar  avatar  avatar Rishabh Gupta avatar Yaseen avatar mao move avatar tacryt-socryp avatar Federico Carrone avatar Glaicon avatar Alex Based avatar sofiane avatar Kosuke July Hata avatar  avatar Daniel wu avatar Derek Barrera avatar jiangplus avatar  avatar Pabitraswain avatar Chen Kai avatar Georgios Konstantopoulos avatar Lyron Co Ting Keh avatar Richard avatar johann bestowrous avatar Erhan avatar  avatar Mike Turner avatar

Watchers

Benjamin Wilson avatar  avatar 3for 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.