zkml  by ddkang

Framework for proofs of ML model execution in ZK-SNARKs

created 2 years ago
359 stars

Top 79.1% on sourcepulse

GitHubView on GitHub
Project Summary

zkml is a framework for constructing Zero-Knowledge Succinct Non-Interactive Arguments of Knowledge (ZK-SNARKs) proofs for machine learning model execution. It targets researchers and developers looking to verify the integrity and correctness of ML computations in a privacy-preserving manner. The primary benefit is enabling verifiable and auditable ML inference without revealing the model or input data.

How It Works

zkml translates ML models, currently supporting TFLite format, into ZK-SNARK circuits. It employs a custom circuit design optimized for ML operations, likely leveraging techniques for efficient polynomial commitments and constraint satisfaction. The framework handles the conversion of models and data into a msgpack format suitable for circuit execution and proof generation, aiming for performance and verifiability.

Quick Start & Requirements

  • Install: Requires Rust nightly build (rustup override set nightly).
  • Prerequisites: curl for Rust installation.
  • Run: cargo build --release followed by ./target/release/time_circuit examples/mnist/model.msgpack examples/mnist/inp.msgpack kzg.
  • Resources: ~2GB RAM, ~8 seconds for MNIST example proof generation.
  • Docs: Blog post and paper available for implementation details.

Highlighted Details

  • Supports TFLite model conversion via Python scripts.
  • Requires specific parameters (scale_factor, k, num_cols, num_randoms) for model conversion.
  • Includes a test_circuit binary for verifying circuit execution before proving.

Maintenance & Community

  • Contact: ddkang [at] g.illinois.edu for inquiries.
  • No explicit community channels or roadmap mentioned.

Licensing & Compatibility

  • License not specified in the README.
  • Compatibility for commercial or closed-source use is undetermined.

Limitations & Caveats

The project is presented as a framework for constructing proofs, implying it's a foundational tool rather than a complete end-to-end solution. Specific details on supported ML operations, model complexity limits, and performance benchmarks beyond the MNIST example are not provided. The reliance on Rust nightly builds may indicate a rapidly evolving or experimental project.

Health Check
Last commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
7 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.