Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swan DevGrant<PrivyML> #12

Open
HappyTomatoo opened this issue Mar 20, 2024 · 2 comments
Open

Swan DevGrant<PrivyML> #12

HappyTomatoo opened this issue Mar 20, 2024 · 2 comments
Labels
Wave1 First Wave Grant

Comments

@HappyTomatoo
Copy link

Open Grant Proposal: PrivyML as a ZKML solution on the Swan network, aims to facilitate the implementation and execution of the ZKML concept on the Swan network.

Project Name:PrivyML

Proposal Category:Integrations
Individual or Entity Name: cala labs

Proposer: HappyTomatoo

Do you agree to open source all work you do on behalf of this RFP under the MIT/Apache-2 dual-license?: yes

Project Summary

PrivyML as a ZKML solution on the Swan network, aims to facilitate the implementation and execution of the ZKML concept on the Swan network. It integrates Crux to bridge the gap between machine learning developers and the Swan network, zero-knowledge proof systems, and zkDSL.
The PrivyML arketplace Protocol helps zkDSL ZKML contract developers get their due from the demand side. It also enables hardware providers to receive rewards from zkDSL Dapp projects for computing proofs.

Impact

In a world where AI-generated content is becoming increasingly similar to human-created content, the potential application of zero-knowledge cryptography can help us determine if a specific piece of content was generated by applying a specific model to a given input. If zero-knowledge circuit representations are created for large language models like GPT-4, text-to-image models like DALL-E 2, or any other model, it provides a way to verify the outputs of these models. The zero-knowledge properties of these proofs also allow us to hide parts of the input or the model if needed. A good example is when applying machine learning models on sensitive data, users can know the inference results of the model on their data without revealing their input to any third party (e.g., in the healthcare industry).
Note: When we talk about ZKML, we refer to creating zero-knowledge proofs for the inference steps of ML models, not the training of ML models (which is already computationally intensive in itself).
The current state of zero-knowledge systems, coupled with high-performance hardware, still has several orders of magnitude gap in proving large-scale models like Large Language Models (LLMs) that are currently available. However, progress has been made in creating proofs for smaller models.
While ZKML is rapidly improving and optimizing, it still faces some core challenges. These challenges include both technical and practical aspects, such as:
1. Quantization with minimal precision loss.
2. Huge Circuit size, especially when the network consists of many layers.
3. Efficient proofs for matrix multiplications.
4. Adversarial attacks.
5. Lack of realization of completed user stories
6. User Friendly Experience
7. Lack of developers with both zero-knowledge proofs and machine learning technology stacks
PrivyML is committed to solving the above problems.

Outcomes

Crux zkDSL Library

The ONNX runtime built in zkDSL by Crux establishes a transparent, verifiable, and fully open-source inference framework, providing runtime capabilities for verifiable ML model inference using Swan. Crux leverages Ethereum to ensure the reliability of inference and offers developers a user-friendly framework for building complex verifiable machine learning models.
Crux provides three APIs: Operators, Numeric Types, and High-Performance Circuit Optimization Implementation.

  1. Operators: It offers a comprehensive set of standard mathematical functions and operations specifically designed for computing neural network models, compatible with the ONNX standard. It introduces tensor types, including basic linear algebra operations like matrix multiplication (matmul), as well as neural network functions like softmax and linear layers. With this API, developers can efficiently perform neural network computations using various functions.
  2. Numeric Types: It extends ZkDSL's built-in numeric capabilities by introducing signed integers and fixed-point implementations. By integrating these functionalities, developers can handle a broader range of numeric data types, enabling more precise calculations in their applications.
  3. High-Performance Circuit Optimization Implementation: This includes a set of functions aimed at improving model performance. Memory efficiency and computational speed are well-known for their significance in machine learning applications. Therefore, our initial version supports 8-bit quantization. This feature reduces memory footprint, accelerates model computation, and allows you to build more efficient and faster ML applications without sacrificing accuracy.

Proof Marketplace

  1. User registration, login and personal information management.
  2. Task release and management.
  3. Task acceptance and completion.
  4. Payment and settlement.

Adoption, Reach, and Growth Strategies

Development Roadmap

Milestone 1: Carecompass

Completion Date: 6 weeks

  • Development of zkML contracts for different diseases
  • Creation of the Carecompass user interface
  • Establishment of Carecompass backend with indexing states from Swan chain

Milestone 2: PythonSDK and Crux implementation

Completion Date: 8 weeks

  • Development of zkDSL converter for PythonSDK
  • Implementation of ONNX Runtime in Crux, which includes:
    • Development of Basic Numeric Types
    • Creation of Basic Operators
    • Implementation of 8-bit quantization to reduce memory and computation time
  • Development of ZKML algorithms Library that includes Decision Tree, K-means, XG-boost, and CNN algorithms

Milestone 3: Proof marketplace

Completion Date: 12 weeks

  • Development of Marketplace contracts
  • Creation of Proof marketplace user interface

Milestone 4: Delegate Proof Computing Network (Option)

Completion Date: 16 weeks

  • Development of MPC protocol for proving
  • Establishment of Proof computing Service
  • Creation of Accelerating Device Access Service
  • Establishment of P2P network

Total Budget Requested

Overall Timeline

42weeks

Funding Requested

$285,000 USD

Milestones

MILESTONE DESCRIPTION DUE DATES FUNDING
1 1. Carecompass
(1) zkML contracts for different disease
(2) Carecompass user interface
(3) Carecompass backend with indexing states from Swan chain
6 weeks $50,000 USD
2 1. PythonSDK
(1) PythonConvert
2. Implement ONNX Runtime in Crux
(1) Basic Numeric Types
(2) Basic Operators
(3) 8-bit quantization to reduce memory and computation time
3. ZKML algorithms Library
(1) Decision Tree
(2) K-means
(3) XG-boost
(4) CNN
8 weeks $115,000 USD
3 1. Proof marketplace
(1) Marketplace contracts
(2) Proof marketplace user interface
12 weeks $120,000 USD
4(Options) Delegate Proof Computing Network
(1) MPC protocol for proving
(2) Proof computing Service
(3) Accelerating Device Access Service
(4) P2P network
16 weeks $140,000 USD

Maintenance and Upgrade Plans

Our maintenance and upgrade plans are designed to ensure the ongoing reliability, performance, and improvement of the PrivyML system.

  • Routine Maintenance: Our team will perform routine checks and updates to ensure the system is running smoothly. This includes monitoring system performance, rectifying any bugs or issues, and updating the system to maintain security and compatibility with any new software or hardware updates.
  • System Upgrades: We plan to continuously improve and upgrade the PrivyML system based on user feedback and advances in technology. This could include adding new features, improving existing functionalities, and optimizing system performance.
  • User Support: We'll provide ongoing support to users to ensure they are able to use the PrivyML system effectively. This includes responding to user queries, providing troubleshooting assistance, and offering user training and documentation.
  • Security Updates: Given the sensitive nature of the data the system will be handling, maintaining and enhancing security will be a priority. We'll regularly update our security measures in line with the latest best practices and standards in the industry.
  • Future Developments: We'll actively explore and implement new technologies and methodologies that could enhance the PrivyML system. We'll ensure that our system keeps up with the rapid advancements in both machine learning and zero-knowledge proofs technologies.

Team

Team Members

CC Chao: PM/ Algorithm Engineer

Will Pan: Software Engineer

Cosmos Zhou: Software Engineer

Yuki Xu: Test Engineer

Kennes Liu: Marketing Manager

Team Member Github Profiles

CC Chao: https://github.com/HappyTomatoo

Will Pan: https://github.com/willpan1102

Cosmos Qin: https://github.com/yuqinzhou123

Yuki Xu: https://github.com/xiuqin-xu

Kennes Liu: https://github.com/liuzeming1

@flyworker flyworker added the Wave1 First Wave Grant label May 11, 2024
@JL289
Copy link

JL289 commented Jun 12, 2024

Hello there @HappyTomatoo,

We'd like to know more about the project, could you please provide more information pertaining to:

  • your and your teams development experience? We can't seem to find relevant development experience.

  • Marketing and Distribution plans for your application? No plan has been provided in your grant proposal that we can see.

  • Could you explain the reasons for this grant to be so large? Also, grant allocations will be in tokens, so please let us know how much SWAN you would want for this project.

Sorry for the wait, let us know if you have any questions!

Cheers,

@JL289
Copy link

JL289 commented Jul 2, 2024

@HappyTomatoo, could you please provide the required information?

Thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Wave1 First Wave Grant
Projects
None yet
Development

No branches or pull requests

3 participants