What is the new direction of the zk+ML track?

What's the new direction for zk+ML?

Recently, the explosive popularity of Worldcoin has also created enough momentum for a Web 3+AI narrative. Worldcoin belongs to the zkML concept, originating from zk+ML (zero-knowledge proof and machine learning), and is also a new combination that has been discussed a lot recently. The zk technology goes without saying, and ML is a subfield of AI. Previously, AI+Web3 was already a hot topic in the industry, but at present, there doesn’t seem to be a good concept or use case to seamlessly connect the two. However, at the recent Black Mountain conference, Vitalik also spoke highly of zkSNARK, and with the explosive popularity of Worldcoin, it is foreseeable that zkML will stand out.

Some of you may not be familiar with zkML. This article mainly clears up the fog around zkML and focuses on its introduction, use cases, and some potential projects. Because there aren’t many use cases for zkML at present, we hope that everyone can seize the opportunity to learn about new concepts and use cases in advance and be well prepared.

Web 3 + ML

zkML combines zero-knowledge proof and machine learning. In fact, outside of Web 3, ML is not a new term. This technology has already gained use cases in some fields, such as natural language processing (NLP), autonomous driving, e-commerce, and so on. ML has even taken a dominant position in some fields. Therefore, zkML is also the trend of the future, and embedding ML in smart contracts will provide more complex and intelligent processing methods for smart contracts.

By adding ML capabilities, smart contracts can become more autonomous and dynamic, allowing them to make decisions based on real-time on-chain data rather than static rules. Smart contracts will be more flexible and adaptable to more scenarios, including those that may not have been anticipated when the contract was first created. In short, ML capabilities will expand the automation, accuracy, efficiency, and flexibility of any smart contract placed on the chain.

Currently, one reason why ML is not widely used in crypto is that the computational cost of running these models on the chain is very high. For example, fastBERP – a type of NLP language model – requires approximately 1800 MFLOPS (million floating-point operations) to be used, which cannot be run directly on the EVM. And to apply models, predictions based on real-world data must be made, and in order to have smart contracts of ML scale, the contract must obtain such predictions.

The second reason is the need to deal with the trust framework of ML models, which mainly involves two points. First, their privacy: as mentioned earlier, model parameters are often private, and in some cases, model inputs need to be kept confidential, which naturally brings some trust issues between model owners and model users. Second, the algorithmic black box, ML models are sometimes referred to as “black boxes” because they involve many automated steps that are difficult to understand or explain during the calculation process. These steps involve complex algorithms and a large amount of data, which can cause uncertain and sometimes random outputs, making algorithms the culprit of bias and even discrimination. zk technology can effectively address this trust issue.

So zkSNARK appeared at this time. The zk technology in zkML mostly refers to zkSNARK, which provides us with a solution: anyone can run a model off-chain and generate a concise and verifiable proof that the expected model did indeed produce specific results. This proof can be published on-chain and obtained by a smart contract to enhance its intelligence. ML models typically require three parts: training data, model architecture, and model parameters. After training, the model can open up a redesigned space for smart contracts as long as it is verified through inference. (Model training and inference are not described in detail.)

Use cases of zkML in crypto

Smart contracts with zkSNARK + ML can also have many use cases, including the following:

DeFi

Verifiable off-chain machine learning oracle

Combining zkSNARK with the verification inference of ML models, these off-chain ML oracles can be used to reliably solve real-world prediction markets and ensure protocol contracts by verifying inference and publishing evidence on-chain.

ML parameterized DeFi

Many sub-sectors of DeFi can actually be automated. For example, lending protocols can use ML models to update parameters in real time. Today, lending protocols mainly rely on off-chain models run by organizations to determine collateral coefficients, LTV, liquidation thresholds, etc. ML can provide better alternatives, and open source models trained by communities can be run and verified by anyone.

Automated trading strategies

One way to verify the return of a trading strategy is to let the MP provide various backtesting to investors. It is impossible to verify whether the strategist follows the model when executing trades, but zkML can provide a solution for it. The MP can provide verification proofs of financial model inference when it is deployed to a specific location.

Safety

Fraud monitoring of smart contracts

ML models can be used to detect potential malicious behavior and execute pause programs, rather than allowing individuals to control the ability to pause contracts.

DID and Social

Replace private keys with biometric authentication (as currently done by Worldcoin)

Private key management is still one of the headaches for Web3 users. Using facial recognition or other biometric features to extract private keys is a possible solution for zkML, and Worldcoin uses this method with its Orb device to determine if someone is a real person who has not attempted to falsify KYC, and uses zk technology to ensure that the output of its ML model does not leak users’ personal data, achieving this through various camera sensors and machine learning models that analyze facial and iris features.

Personalized recommendations and content filtering for Web3 social media

Similarly, some Web3 social media platforms easily obtain user preferences and data, showing us some spam and fake links, many of which lead to users’ wallets being stolen, but through zkML technology we can avoid much unnecessary content and email links.

Creator economy and gaming

Game economy rebalancing

ML models can be used to dynamically adjust token issuance, supply, destruction, voting thresholds, etc., and one possible model is an incentive contract that can rebalance the game economy if it reaches a certain threshold and verifies reasoning proof.

New on-chain games

Collaborative human and AI games and other innovative on-chain games can be created, where untrustworthy AI models serve as NPC characters, and all NPC actions are sent to the chain with proofs that anyone can verify to determine the correct operation of the model.

zkML Ecological Potential Projects

Since zkML is currently in the early stages of development, there are not many projects that can be found. Here are some potential projects that we have found:

Worldcoin

Worldcoin is well known, so we won’t go into too much detail here. Please refer to “What impact will Worldcoin have on the cryptocurrency industry if it succeeds?”

Modulus Labs

Modulus Labs is one of the more diverse projects in zkML, building the necessary technology for on-chain AI. It is dedicated to both use cases and related research. In terms of applications, Modulus Labs has developed RockyBot, an on-chain trading robot, and Leela vs. the World, a verifiable on-chain instance of human vs. Leela chess engine play.

Giza

Giza is a protocol dedicated to developing the economy through AI. It can deploy AI models on-chain using completely trustless methods and is supported by a collaboration with StarkWare. Ultimately, it aims to create a market that provides an alternative path for AI development.

Zkaptcha

Zkaptcha focuses on the problem of bots in Web3, protecting smart contracts from bot attacks. It uses zero-knowledge proofs to create smart contracts that are resistant to Sybil attacks and provides a captcha service for smart contracts. Currently, the project generates a proof of human work by requiring end users to complete a captcha. In the future, Zkaptcha will inherit zkML and introduce captcha services that analyze mouse movement and other behaviors to determine if a user is human.

Conclusion

Currently, there are not many products combining zkML and crypto, and there are still some problems to be solved in the construction of such products. However, with the combination of zkSNARK and ML, we have reason to believe that zkML can bring better prospects and development to crypto. We also look forward to seeing more diverse products in this field. Zk technology and crypto provide a secure and trustworthy environment for the operation of ML, and in the future, in addition to product innovation, this field may also drive innovation in crypto business models. In this wild and anarchic Web 3 world, decentralization, crypto technology, and trust are the most basic infrastructure.