The recent popularity of Worldcoin has also created enough momentum for a Web 3+AI narrative. Worldcoin belongs to the zkML concept and is derived from zk+ML (zero-knowledge proof and machine learning). It is also an emerging combination that has been talked about a lot recently, zk It goes without saying that technology needs to be mentioned, and ML is a subfield of AI. AI+Web3 has been a popular narrative in the industry before, but currently there is no good concept or use case to seamlessly connect the two. At the recent Montenegro conference, Vitalik also highly praised zkSNARK. Coupled with the popularity of Worldcoin, it is foreseeable that zkML will stand out.

You may not be familiar with zkML. This article mainly clears up the fog about zkML, focusing on the introduction, use cases and some potential projects of zkML. Officially, because there are not many use cases for zkML at present, I hope you can seize the opportunity and learn about it in advance. Be prepared for new concepts and use cases.

Web 3 + ML

zkML combines zero-knowledge proof and machine learning. In fact, outside of Web 3, ML is no longer a new word. The technology has been widely used in some fields, such as natural language processing (NLP), autonomous driving, e-commerce, etc. Fields have reached a higher level through ML technology, and ML has even taken a dominant position in some fields. Therefore, zkML is also the general trend in the future. Embedding ML in smart contracts will also 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 act 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 originally created. Simply put, ML capabilities will expand the automation, accuracy, efficiency, and flexibility of any smart contract we put on the chain.

Currently, one of the reasons why ML is not widely adopted 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, the adoption of this model requires the use of approximately 1800 MFLOPS (million floats). point arithmetic), which cannot be run directly on the EVM. While application models need to make predictions based on real-world data, in order to have smart contracts at ML scale, the contract must obtain such predictions;

The second reason is the need to deal with the trust framework issue of ML models. There are two main points. One is its privacy: as mentioned earlier, model parameters are usually private. In some cases, model inputs also need to be kept confidential. This is natural. This will bring about some trust issues between model owners and model users; the second is the algorithmic black box. ML models are sometimes called "black boxes" because they involve many automated steps in the calculation process that are difficult to understand or explain. These steps involve complex algorithms and large amounts of data, which can lead to uncertain and sometimes random outputs, making algorithms the culprits of bias and even discrimination. And zk technology can solve this trust problem very efficiently.

So zkSNARK appeared at this time. The zk technology in zkML mostly refers to zkSNARK. zkSNARK provides us with a solution: anyone can run a model off-chain and generate a concise and verifiable proof indicating the expected The model does produce a specific result, and this proof can be published on-chain and captured by the smart contract and enhance its intelligence. ML models usually require three parts: training data, model architecture, and model parameters. The trained model can open up an updated design space for smart contracts as long as it passes reasoning and verification. (Model training and inference will not be described in detail)

zkML use cases in crypto

The smart contract added with zkSNARK +ML will also have many use cases. The following are its use cases:

DeFi

Verifiable off-chain machine learning oracles

Combined with zkSNARKs combined with verified inference of ML models, these off-chain ML oracles can be used to reliably solve real-world prediction markets, secure protocol contracts, and more by verifying inference and publishing evidence on-chain.

ML Parameterized DeFi

Many subdivisions of DeFi can actually be automated. For example, lending protocols can use ML models to update parameters in real time. While today’s lending protocols primarily trust off-chain models run by organizations to determine collateral coefficients, LTV, liquidation thresholds, etc., ML can provide a better alternative with community-trained open source models that anyone can run and verify.

Automated trading strategies

One way to verify the returns of a trading strategy is to have MP provide various backtests to investors. There is no way to verify whether the strategist is following the model when executing trades, but zkML can provide a solution for it. MP can when deployed to a specific location. Provide verification proof of financial model reasoning.

Security field

Smart contract fraud monitoring

Instead of having hands-on governance or centralized actors controlling the ability to suspend contracts, ML models can be used to detect possible malicious behavior and enforce suspension procedures.

DID and Social

Replace private keys with biometric authentication (which is what Worldcoin currently does)

Private key management is still one of the headaches for Web3 users. Extracting private keys through facial recognition or other biometrics is a possible solution for zkML, and Worldcoin is applying this with its Orb device to determine whether someone is a real person without trying to KYC them, and It uses zk technology to ensure that the output of its ML models does not reveal 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 Web 3 social media can easily obtain user preferences and data, show us some spam emails and false links, and many false links lead to user wallets being stolen, etc., but through zkML technology we can avoid a lot of unnecessary content and email links. .

Creator Economy and Gaming

In-game economy rebalancing

ML models can be used to dynamically adjust token issuance, supply, destruction, voting thresholds, etc. One possible model is an incentive contract, which can rebalance the in-game economy if a certain rebalancing threshold is reached and the reasoning proof is verified.

New on-chain games

Cooperative human-AI games and other innovative on-chain games can be created, in which untrusted AI models act as NPCs, and all NPC actions are sent to the chain with accompanying instructions that anyone can verify to determine correct operation. Proof of the model.

zkML ecological potential project

Since zkML is still in an early stage of development, there are not many projects that can be found. The following are the potential projects found for everyone:

Worldcoin

I won’t go into detail about Worldcoin. Everyone should be familiar with it. Please refer to “If Worldcoin succeeds, what impact will it have on the encryption industry?”

Modulus Labs

Modulus Labs is one of zkML’s more diverse projects, building the technology needed for on-chain AI. Work both on use cases and related research. On the application side, Modulus Labs has developed RockyBot, an on-chain trading bot, and Leela vs. the World, a chess game in which real people play against a verifiable on-chain instance of the Leela chess engine.

human

Giza is a protocol dedicated to growing the economy through AI, enabling the deployment of AI models on-chain using a completely trustless approach, supported by a StarkWare partnership, ultimately enabling a marketplace that provides alternative paths for AI development.

Zkaptcha

Zkaptcha focuses on the robot problem in Web3, protects smart contracts from robot attacks, uses zero-knowledge proofs to create smart contracts that are resistant to Sybil attacks, and provides verification code services for smart contracts. Currently, the project enables end users to generate a proof of human work by completing a verification code. In the future, Zkaptcha will inherit zkML and launch a service similar to the existing Web 2 verification code, but can also analyze behaviors such as mouse movement to determine the user's performance. Whether it is a real person.

Conclusion

At present, it seems that there are not many products in the field of combining zkML and crypto. There will still be some problems encountered in the process of building such products. zkML and crypto may need more improvements and optimizations in the future. But with the combination of zkSNARK and ML, we have reason to believe that the power of zkML can bring better prospects and development to crypto. We also look forward to more diverse products in this field. zk technology and crypto provide security for the operation of ML Trusted environment, and in the future, in addition to product innovation, it may also spawn innovation in crypto business models, because in this wild and anarchic Web 3 world, decentralization, crypto technology and trust are the most important Basic facilities.