Original Author |
@DistilledCrypto
Translation | Golem
Since the rise of large language models like ChatGPT, running similar machine learning models on decentralized networks has become one of the main narratives in the blockchain + AI space. However, we can’t trust decentralized networks to use specific ML models for inference like we can trust reputable companies like OpenAI, so we need to verify. Considering the privacy of data, zero-knowledge machine learning (zkML) has been widely regarded as a promising solution. So, is zkML the future of AI on the blockchain?
In this article, Odaily Star Daily will briefly introduce the basics of zkML, highlight some zkML projects worth noting, and finally discuss the limitations and alternatives to zkML.
Basics of zkML
Zero-knowledge machine learning (zkML) is akin to a method of secrecy in computation. It involves two main parts:
1. Performing the task using machine learning (ML)
2. Proving that the task was performed correctly without revealing all the details
In simple terms, here’s how it works:
a. Task Execution
Someone uses an ML model to process some data and obtain a result, much like a chef baking a cake according to a recipe without revealing the ingredients to anyone.
b. Task Proof
After completing the task, they can showcase a proof. For example, “I used this specific model with this specific input and obtained this result.” Essentially, they are proving that they followed the steps on the recipe correctly.
c. Conservative Secrecy
The brilliance of zkML lies in the fact that when they prove the task was performed correctly, they can withhold some details such as the input data, model operation, or results. In short, zkML allows the prover to say, “Trust me, I did it right,” while still maintaining the privacy of their methods and data.
Notable zkML Projects
The zkML concept has been around for almost a year now, and there are currently several related projects under development, with a few already releasing tokens in the market. Messari has listed some well-known VC-backed zkML projects, and we will introduce them below.
Source: Messari
Spectral
Spectral is building an on-chain proxy economy for Web3. Their flagship product, SYNTAX, is a proprietary Large Language Model (LLM) that can generate Solidity code. Spectral enables users to create on-chain autonomous agents while leveraging decentralized ML inference to enhance smart contracts. Additionally, using zkML, Spectral can provide evidence that specific predictions were generated by specific ML models, ensuring trust and authenticity in the process. Spectral has already launched its token, SPEC, with a market cap of $119 million.
Worldcoin
Worldcoin is developing an open-source system aimed at enabling everyone to participate in the global economy. In Worldcoin, one potential use case of zkML is to enhance the security and privacy of iris recognition technology. The token, WLD, currently has a market cap of $1.07 billion.
Here’s how it works:
a. Self-sovereign Biometrics
Users of World ID can securely encrypt their biometric data, such as iris scans, on their mobile devices.
b. On-Device Processing
Then, users can download an ML model to their devices to generate unique codes from iris scans.
c. Privacy-Preserving Proof
Using zkML, they can create proofs directly on their devices, confirming that their iris codes were accurately generated using the correct model. All of these operations are performed without exposing the user’s actual data.
Risc Zero
RISC Zero aims to enhance trust and efficiency on the internet by providing compute services that do not require mutual trust between parties. Here are the key focus areas of RISC Zero:
a. Extending Blockchain
It uses the Bonsai Proof service to perform complex operations that enhance the security of the blockchain. Bonsai manages complex computations and privacy data off-chain to improve efficiency.
b. Collaboration with Spice AI
Spice AI provides composable, out-of-the-box data and AI infrastructure, including hosted cloud-level Spice.ai OSS. The collaboration aims to provide developers with a comprehensive zkML toolkit.
c. Machine Learning Services
Developers can use RISC Zero to securely access and query data, privately train ML models, and provide proofs of proper data handling. Essentially, RISC Zero offers ML-as-a-service, ensuring the privacy and security of data and execution processes.
Giza
Giza is a machine learning platform running on the Starknet network.
a. Main Objectives
Giza aims to directly scale ML operations on the blockchain.
b. Technical Foundation
It utilizes Starknet, which supports zero-knowledge (ZK) proofs, to verify ML operations, ensuring accuracy and security without leaking underlying data.
c. Applications
On Starknet, Giza enables “Giza Agents” to autonomously execute various financial strategies, including cross-protocol yield aggregation, asset allocation, and risk-free market-making. Essentially, leveraging the advantages of zkML, Giza allows for secure and automated execution of financial strategies on the blockchain.
Vanna
Vanna is a modular AI inference network that is not only compatible with EVM chains but also offers flexible security with various validation methods like zkML, optimistic ZK, opML, and teeML. Vanna’s future use cases include generating on-chain GameFi game dialogues using LLM, detecting vulnerabilities in smart contracts, risk warning engines for DeFi protocols, and reputation systems for witch accounts in airdrops.
Besides the projects mentioned above, there are other projects in the zkML ecosystem, as shown in the image below. Due to space limitations, we won’t introduce them here, but readers can refer to it for further information.
Source: SevenX Ventures
Limitations and Alternatives to zkML
Despite being theoretically attractive, zkML is currently not very practical. AI computations themselves are resource-intensive, and adding encryption methods like those used in zkML makes them even slower. Modulus Labs reports that zkML could be up to 1000 times slower than regular computations. In reality, waiting a few minutes longer is difficult to accept for most users in their daily experience.
Therefore, due to these limitations, zkML may currently only be suitable for very small ML models. In such cases, many AI projects have to consider alternative validation methods. Currently, there are two main alternatives:
1. opML (Optimistic ML)
2. teeML (Trusted Execution Environment ML)
The image below provides a simple illustration of the differences between the three.
Source: Marlin Protocol