Will zkML be a new direction for the zk field?

23-05-24 19:04
Read this article in 14 Minutes
总结 AI summary
View the summary 收起

Recently, the explosion of Worldcoin has also created enough momentum for a Web 3+AI narrative. Worldcoin belongs to the zkML concept, which comes from zk+ML (zero-knowledge proof and machine learning), and is also a new combination that has been widely discussed recently. The zk technology is naturally needless to say, while ML is a subfield of AI. Previously, AI+Web3 has already been a hot topic in the industry, but it seems that there is no good concept or use case to seamlessly connect the two. However, at the recent Black Mountain Conference, Vitalik also highly praised zkSNARK, coupled with the explosion of Worldcoin, so it is foreseeable that zkML will stand out.


You may not be familiar with zkML, so this article aims to uncover the mystery surrounding zkML and focus on its introduction, use cases, and potential projects. Because there are not 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 prepared.


Web 3 + ML


zkML combines zero-knowledge proofs and machine learning. In fact, outside of Web 3, ML is not a new term anymore. This technology has already been widely used in some fields, such as natural language processing (NLP), autonomous driving, e-commerce, etc., to achieve higher levels of performance through ML technology. In some fields, ML has even taken a dominant position. Therefore, the future of zkML is also a trend, 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 process 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 initially created. In short, 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 used in the crypto industry is because the computational cost of running these models on-chain is high. For example, fastBERP, a type of NLP language model, requires approximately 1800 MFLOPS (million floating-point operations) to be used, which cannot be directly run on the EVM. However, application models require predictions based on real-world data, and in order to have smart contracts with ML capabilities, the contracts must obtain such predictions.


The second reason is the need to address the trust framework issues of ML models, which mainly involve two points. First, their privacy: as mentioned earlier, model parameters are usually private, and in some cases, model inputs also need to be kept confidential, which naturally brings some trust issues between model owners and users. Second, the algorithm 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 lead to uncertain and sometimes random outputs, making the algorithm the culprit of bias and even discrimination. ZK technology can efficiently solve this trust issue.


Therefore, zkSNARK emerged at this time. In zkML, zk technology mostly refers to zkSNARK. zkSNARK provides us with a solution: anyone can run a model off-chain and generate a concise and verifiable proof that the expected model does indeed produce specific results. This proof can be published on-chain and obtained by smart contracts to enhance their intelligence. ML models typically require three parts: training data, model architecture, and model parameters. Once the model is trained and verified through inference, it can open up a new design space for smart contracts. (Model training and inference will not be discussed in detail here.)


zkML in the use cases of crypto


And the smart contracts enhanced by zkSNARK + ML will also have many use cases. Here are some examples:


DeFi


Verifiable Off-Chain Machine Learning Oracle


Combining zkSNARK with ML model verification and reasoning, these off-chain ML oracles can be used to reliably solve real-world prediction market and protocol contract issues by verifying reasoning and publishing evidence on the chain.


ML Parameterized DeFi


Many subfields of DeFi can actually be automated. For example, lending protocols can use ML models to update parameters in real time. Currently, lending protocols mainly rely on off-chain models run by organizations to determine collateral ratios, LTVs, liquidation thresholds, etc. ML can provide better alternatives, with open-source models trained by the community that anyone can run and verify.


Automated Trading Strategies


One way to verify the performance of a trading strategy is to provide investors with various backtesting tests. However, this cannot verify whether the strategist followed the model when executing trades. ZkML can provide a solution for this. MP can provide verification proof of financial model reasoning when deployed in specific locations.


Security Field


Smart Contract Fraud Monitoring


ML models can be used to detect potential malicious behavior and execute pause programs, instead of relying on human intervention or centralized participants to control the ability to pause contracts.


DID and Social


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


Private key management remains one of the headaches for Web3 users. Extracting private keys through facial recognition or other biometric features is a possible solution offered by zkML, and Worldcoin is applying this approach with its Orb device to determine if someone is a real person who has not attempted to falsify KYC, and using zk technology to ensure that the output of its ML model does not leak users' personal data. This is achieved through various camera sensors and machine learning models that analyze facial and iris features.


Web3 Personalized Recommendation and Content Filtering for Social Media


Similarly, some Web 3 social media platforms easily obtain user preferences and data, showing us some spam and fake links. Many fake links lead to users' wallets being stolen. However, through zkML technology, we can avoid a lot of 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. One possible model is an incentive contract, which can rebalance the economy in-game if a certain rebalancing threshold is reached and a verification proof is validated.


New On-Chain Game


You can create collaborative human-AI games and other innovative blockchain games, where untrusted AI models act as NPC characters. All actions of the NPCs are recorded on the blockchain and accompanied by proofs that anyone can verify to ensure the correct operation of the model.


zkML Ecological Potential Project


Due to the early development stage of zkML, there are not many projects available. Here are some potential projects we have found for you:


Worldcoin


Worldcoin needs no further introduction, as it is well-known in the industry. Please refer to "What impact will Worldcoin have on the cryptocurrency industry if it succeeds?" for more information.


Modulus Labs


Modulus Labs is one of the more diverse projects in the zkML industry, 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 chess game), a verifiable on-chain instance of human versus Leela chess engine gameplay.


Giza


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


Zkaptcha


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


Conclusion


Currently, there are not many products that combine zkML and crypto in the industry. During the construction of such products, there may be some issues encountered, and there may be a need for further improvement and optimization of zkML and crypto in the future. However, 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 seeing more diverse products in this field. The zk technology and crypto provide a secure and trustworthy environment for the operation of ML. In addition to product innovation, the future may also give rise to innovation in crypto business models, because in this wild and anarchic Web 3 world, decentralization, crypto technology, and trust are the most fundamental infrastructure.


Welcome to join the official community of BlockBeats by LuDong.

Telegram Subscription Group

Telegram Chat Group

Twitter Official Account



Reference link


欢迎加入律动 BlockBeats 官方社群:

Telegram 订阅群:https://t.me/theblockbeats

Telegram 交流群:https://t.me/BlockBeats_App

Twitter 官方账号:https://twitter.com/BlockBeatsAsia

举报 Correction/Report
Choose Library
Add Library
Cancel
Finish
Add Library
Visible to myself only
Public
Save
Correction/Report
Submit