Original author | @DistilledCrypto

Compilation | Golem

Since the popularity of large language models such as ChatGPT, running similar machine learning models on decentralized networks has also become one of the main narratives of blockchain + AI. But we cannot trust decentralized networks to use specific ML models for reasoning like we trust reputable companies like OpenAI, so we need to verify it. Considering the privacy of data, zero-knowledge machine learning (zkML) is generally optimistic, so will it be the future of on-chain AI?

In this article, Odaily Planet Daily will briefly introduce the basic knowledge of zkML, noteworthy zkML projects, and finally briefly explain the limitations of zkML and alternatives.

Basic knowledge about zkML

Zero-knowledge machine learning (zkML) is similar to a method of confidentiality in computing. It mainly involves two parts:

  • Use machine learning (ML) to perform tasks;

  • Prove that the task was completed correctly without revealing all the details.

In simple terms, here’s how it works:

a. Run the task

Someone uses an ML model to process some data and get a result, which is like a chef following a recipe to bake a cake but not telling anyone the ingredients.

b. Proof Task

When the task is completed, they can show a proof. For example, "I used this specific input in this specific model and got this result." They are actually proving that they followed the steps in the recipe correctly.

c. Keep confidentiality

The beauty of zkML is that when they prove that a task was done correctly, they can keep some details, such as the input data, how the model worked, or the results, private. In short, zkML allows the prover to say “trust me, I did it right” while still keeping their methods and data private.

Introduction to noteworthy zkML projects

It has been nearly a year since the concept of zkML was proposed. Currently, many related projects are under construction, and a few of them have issued tokens on the market. Messari lists some zkML projects invested by well-known VCs, which will be introduced below.

Source: Messari

Spectral

Spectral is building an on-chain agent economy for Web3. Their flagship product SYNTAX is a proprietary LLM (Large Language Model) that generates Solidity code. Spectral enables users to create on-chain autonomous agents while leveraging decentralized ML inference to improve smart contracts. Additionally, using zkML, Spectral is able to provide evidence that a specific prediction was generated by a specific ML model, ensuring trust and authenticity in the process.

Spectral has issued its token, SPEC, with a market value of US$119 million.

Worldcoin

Worldcoin is developing an open source system that aims to allow everyone to participate in the global economy. In Worldcoin, one potential use of zkML is to improve the security and privacy of iris recognition technology. The token WLD currently has a market value of $1.07 billion.

Here’s how it works:

a. Biometric self-hosting

World ID users can store their biometric data, such as iris scans, securely and encrypted on their mobile devices.

b. Local processing

Users can then download the ML model to their device to generate a unique code from an iris scan.

c. Privacy Protection Proof

Using zkML, they can create a proof directly on their device. This proof confirms that their iris code was accurately generated from the scan using the correct model. All of this is done without exposing the user’s actual data.

Zero Risk

RISC Zero aims to increase trust and efficiency on the Internet by providing computing services that do not require parties to trust each other.

Here are the key areas of focus for RISC Zero:

a. Scaling the blockchain

It uses Bonsai proof services to perform complex operations, thereby enhancing the security of the blockchain. Bonsai manages complex computations and private data off-chain, thereby improving efficiency.

b. Collaboration with Spice AI

Spice AI provides composable, ready-to-use data and AI infrastructure, including managed, cloud-scale 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 proof that data was processed correctly.

Essentially, RISC Zero provides developers with MLaaS (ML as a service) while ensuring that data and execution remain private and secure.

human

Giza is a machine learning platform that runs on the Starknet network.

a. Main objectives

Giza aims to scale ML operations directly on the blockchain.

b. Technical basis

It uses Starknet, which supports zero-knowledge (ZK) proofs, to verify ML operations, ensuring the accuracy and security of calculations without leaking underlying data.

c. Application

On Starknet, Giza enables "Giza Agents" to automatically execute various financial strategies, including cross-protocol yield aggregation, asset allocation, and risk-free market making. Essentially, leveraging the advantages of zkML, Giza allows financial strategies to be executed securely and automatically on the blockchain.

Bath

Vanna is a modular AI inference network that is not only compatible with the EVM chain, but also provides flexible security. Users can choose from a variety of verification methods such as zkML, optimistic ZK, opML, teeML, etc. Combining Vanna's future usage scenarios, it will use LLM to generate on-chain GameFi game dialogues; on-chain smart contract vulnerability detection; risk warning engine for DeFi protocols; and a reputation system for witch accounts in airdrops.

In addition to the projects introduced above, there are also projects in the zkML ecosystem as shown in the figure below. Due to space constraints, they will not be introduced here for readers' reference.

Source: SevenX Ventures

Limitations of zkML and alternatives

While appealing in theory, zkML isn’t very practical right now. AI calculations are inherently resource-intensive, and adding encryption methods like those used in zkML makes them even slower, with Modulus Labs reporting that zkML can be 1,000 times slower than regular calculations. In reality, for most users, waiting a few extra minutes is simply not acceptable in everyday experience.

Therefore, due to these limitations, zkML may only be suitable for very small ML models at present. In this case, many AI projects have to consider other verification methods. There are currently two main alternatives:

  • opML(Optimistic ML)

  • teeML(Trusted Execution Environment ML)

The following figure simply illustrates the difference between the three:

Source: Marlin Protocol