Building an AI On-Chain

Written by glaze | Published 2022/12/22
Tech Story Tags: ai | machine-learning | blockchain | ethereum | cryptocurrency | web3 | zero-knowledge-proofs | zkp

TLDRModulus Labs is a Web3 project that aims to bring the capabilities of artificial intelligence (AI) onto the blockchain. By leveraging the decentralized nature of the blockchain, Modulus aims to enable secure and transparent AI models that can be trained and deployed on-chain. The team behind Modulus has not disclosed any information about its financing but has revealed in its blog that it will continuously receive support from Floodgate Ventures.via the TL;DR App

🙇 申し訳ない

I really didn't expect it to be four months after DeepNFT before I published my second article about a Web3 machine learning/AI project. On the one hand, this was because my work in the summer and autumn was too busy, and on the other hand, there were actually fewer projects worth mentioning in these months. Everyone's focus was generally on zkSync and zero-knowledge proofs. However, my busy period is now over and my Ph.D. is in its final stage. I hope to return to un.Block's regular workflow with this article.

Modulus Labs is a Web3 project that aims to bring the capabilities of artificial intelligence (AI) onto the blockchain. By leveraging the decentralized nature of the blockchain, Modulus labs aims to enable secure and transparent AI models that can be trained and deployed on-chain.

One of the key goals of Modulus Labs is to enable the creation of decentralized AI models that can be owned and controlled by their creators. This allows developers to retain ownership and control over their AI models, rather than having to rely on centralized platforms to host and manage their models.

Modulus labs is currently in the early stages of development and has not yet released any concrete details about its technology or roadmap. However, the team has outlined their vision for the project in various blog posts on their Medium page, which can be accessed by interested readers with English skills.

⌛Status

Modulus Labs, also known as Modulus, aims to enable secure and transparent AI models that can be trained and deployed on-chain. The team behind Modulus has not disclosed any information about its financing but has revealed in its blog that it will continuously receive support from Floodgate Ventures in terms of gas fees and technical costs.

Modulus' first product, Rockefeller Bot, has been launched since early October and accepts WETH/USDC donations. Its second product, Leela vs the World, is in development. Its whitepaper has not been finished. Its white paper is expected to be released in December or January.

👁️‍🗨️ Vision

Modulus Labs was officially founded in August by Daniel Shorr and Ryan Cao. They hope to create trustworthy, fully automated, powerful AI models using the development of Web3 and on-chain technology. They believe that the current on-chain technology and corresponding hardware environment are mature enough and that the AI models they develop can in turn enhance the security and automation of on-chain technology.

Most of the AI On-chain projects I have seen so far apply traditional AI models or algorithms to on-chain tasks, with typical examples being DeepNFTValue and Kosens Labs from the previous article - both essentially use traditional AI technology and ML models (regression models, DNNs) with appropriate hardware configurations to adapt to tasks with predictive properties.

They do not provide good solutions to the Web3 characteristics of the task itself, the security and transparency of data use, and other related issues. They answer these questions from their own perspective and give their own explanation of AI On-chain:

  1. Verified reasoning: The input data for pre-trained models, as well as the corresponding model parameters and architecture/deployment forms, will correspond to the generated proof
  2. Verifiable training: The information in the first point is not only presented through Proof during reasoning but also during training
  3. Ownership of training data: The model is not fixed after one training. The data flow used to update the model is deployed on the chain. The contribution of data will be quantified with Tokens
  4. Decentralized collaboration: All parties involved in data generation and model training can collaborate in a decentralized manner using smart contracts

At the technical level, similar to the mainstream concept, Modulus references ZK-proof knowledge and hopes to achieve full use of centralized hardware resources by deploying and reasoning the model completely on the chain while protecting the model and data from being controlled by centralized servers.

🎁 Rockefeller Bot

Modulus's first product is a fully on-chain trading robot called Rockefeller Bot, or "Rocky" for short. Rocky is built on StarkNet and uses a simple three-layer deep neural network to predict the price of WETH. Compared to traditional stock/currency prediction projects, Rocky's main innovations are twofold:

  1. It generates prediction data and gives trading advice via ZK proofs.

  2. Once Rocky has made its prediction, it submits the relevant information to an on-chain smart contract. The smart contract handles the remaining work of trading and cash storage, as the information itself is ZK proof and the smart contract cannot acquire the model training and hardware information used for inference.

Rocky itself has several limitations:

  • Errors in the related calculations are magnified

  • Potential high costs for model deployment

  • Interaction between Layer1 and Layer2 takes time

As such, Modulus hopes that Rocky will serve more as a platform to showcase the feasibility of on-chain development and deployment of AI models.

Modulus is currently also involved in several other ZK-related trading projects and blockchain gaming development, but there is not much public information available yet.

💡 Thoughts

Compared to other Web3 ML projects that are attempting to answer "how to apply mature AI/ML technologies to blockchain applications," Modulus focuses on "how to develop blockchain native AI/ML technologies." Compared to the former, Modulus emphasizes the advantages of blockchain and has launched its own products.

The prospects for this project are very optimistic from my personal point of view. Although Modulus's first product does not have much innovation in terms of ML technology itself, in terms of deployment, it gives ML practitioners who are starting to solve privacy issues a positive reference. I will continue to track this project and pay attention to their whitepaper updates.

❓Questions

As an ML researcher, my thoughts are more toward the ML industry. After reviewing this project, I have the following questions:

  1. Cost of on-chain training and deployment of ZKML. The deployment cost may not be too worried about, because most ML products are theoretically the same size and computing power as ordinary software as long as the optimization is in place. But at the same time, training an ML model is a process that requires a lot of computing power and hence occupies a lot of development costs. The current Modulus solution is to solve the trust problem through Proof. Let the decentralized computing part believe the centralized computing result and accept the computing result as input. I look forward to more details about this part.
  2. Suppose traditional ML models have the opportunity to be trained and deployed on the chain at an acceptable cost. In that case, the problems they face will be different from those in the traditional Web2 era. The focus of the problem shifts from data reliability and private transfer to model explainability, model self-adaptation/online scene optimization, gradient optimization (ZK model training cannot currently optimize gradients), and inference computation costs.

🔚 Conclusion

Modulus Labs' own approach and vision are very much in line with what I have been expecting. I am particularly excited to see that they are working on some of the decisive problems related to AI on-chain. Their first product takes a hybrid centralized-decentralized approach through Layer1.

While I think that AI on-chain will encounter some challenges that are different from those of the Web2 era, I am confident that the growing community and companies like Modulus, representing the best of Web3, will provide some beautiful answers.

As before, if any of the readers come across blockchain/Web3 projects that meet either of the following criteria:

  1. Application of AI/ML technology
  2. Use of blockchain-related data, involving the implementation and application of models

Welcome to contact me through the un.Block and my personal Twitter. Let's learn and share together!


Written by glaze | I am the cofounder of un.block and tech associate of Fundamental Labs
Published by HackerNoon on 2022/12/22