Blockchain technology and machine learning are two highly anticipated fields that are leading technological advancements with their decentralized nature and data-driven capabilities, respectively. ZK (Zero-Knowledge) in blockchain technology is a concept in cryptography that refers to a proof or interaction process where the prover can prove the truthfulness of a statement to the verifier without revealing any specific information about the statement. ML (Machine Learning) is a subfield of AI. Machine learning learns from input data, summarizes it, forms models, and can make predictions and decisions.
Against this background, ZKML (Zero-Knowledge Machine Learning) has flourished recently, combining the privacy protection and verification capabilities of zero-knowledge proofs with the data processing and decision-making capabilities of machine learning, bringing new opportunities and possibilities for blockchain applications. ZKML provides a solution that simultaneously protects data privacy, verifies model accuracy, and enhances computational efficiency.
This article will delve into ZKML, explore its technical principles and application scenarios, and reveal how ZKML builds a more complete, secure, and efficient digital future with developers.
ZKML: The Combination of Zero-Knowledge Proof and Machine Learning
There are two reasons why zero-knowledge proofs and machine learning can be combined on the blockchain:
- Understanding the Cosmos Inter-Blockchain Communication Protocol (IBC): How Secure Is It? What Applications Has It Implemented?
- Polygon (MATIC): A Powerful Assistant to Ethereum
- Maverick Protocol launches its first season of the ecosystem incentive program, providing incentives to early adopters and ecosystem builders.
On the one hand, ZK’s zero-knowledge technology not only hopes to achieve efficient verification of on-chain transactions but also wants ZK to be used in a wider ecological field. The powerful AI support of ML can become an excellent helper for ZK’s ecological expansion.
On the other hand, the entire process of ML models from development to use faces trust proof issues, and ZK can help ML achieve effective proof without leaking data and information, thus solving the trust dilemma of ML. The combination of ZKML is a mutual benefit of both, and will also add momentum to the blockchain ecology.
The Complementary Needs and Capabilities of ZK and ML
ML has a lot of trust issues to solve, and the accuracy, completeness, and privacy of each workflow need to be proved. ZK can effectively verify whether any type of calculation is running correctly under the premise of ensuring privacy, which solves the long-standing trust proof problem in machine learning very well. The integrity of the model is an important trust proof problem in the ML training process, but the privacy protection of the data and information used in ML model training and usage is equally important. This makes it difficult for the ML training to go through third-party auditing and regulatory agencies for trust proof. ZK with the decentralized zero-knowledge attribute is a trust proof path that matches ML very well.
“AI enhances productivity, blockchain optimizes production relationships”, ML injects higher innovation momentum and service quality into ZK track. ZK provides verifiability and privacy protection for ML. Both complement each other’s operation in the blockchain environment.
Technical advantages of ZKML
The main technical advantages of ZKML combine computational integrity, privacy protection, and heuristic optimization. From a privacy perspective, ZKML’s advantages are:
Achieve Transparent Verification
Zero-knowledge proof (ZK) can evaluate model performance without revealing internal model details, achieving a transparent and trust-free evaluation process.
Data Privacy Protection
ZK can be used to validate public data with public models or private data with private models to ensure data privacy and sensitivity.
ZK itself ensures the correctness of a certain statement while ensuring privacy through cryptographic protocols, which solves the shortcomings of machine learning in privacy protection for computational correctness proof and homomorphic encryption machine learning. By incorporating ZK into the ML process, a secure and privacy-protected platform is created, which solves the shortcomings of traditional machine learning. This not only encourages privacy companies to adopt machine learning technology, but also motivates Web2 developers to explore the potential of Web3 technology.
ZK empowers ML: providing on-chain infrastructure
The shackle of computing power and ZK-SNARKs on ML
ML, which is already quite mature off-chain, has just entered the chain due to the high computing power cost of the blockchain. Many machine learning projects cannot run directly in the blockchain environment represented by EVM due to computing power limitations. At the same time, although the validity verification of ZK is more efficient than repeated computing efficiency, this advantage is limited to the processing of native transaction data in the blockchain. When ZK’s already complex cryptography operations and interactions face a large number of operations of ML, the low TPS problem of the blockchain is exposed, and the problem of low blockchain computing power becomes the biggest shackle to prevent ML from going on-chain.
The emergence of ZK-SNARKs alleviates the problem of high computing power demand for ML. ZK-SNARKs is a cryptographic construction of zero-knowledge proof, which stands for “Zero-Knowledge Succinct Non-Interactive Argument of Knowledge”. It is a technology based on elliptic curve cryptography and homomorphic encryption, used to achieve efficient zero-knowledge proof. ZK-SNARK has the characteristics of high compactness. By using ZK-SNARKs, the prover can generate a short and compact proof, and the verifier only needs to perform a small amount of calculation to verify the validity of the proof without multiple interactions with the prover. This property of requiring only one interaction between the prover and the verifier makes ZK-SNARKs efficient and practical in practical applications, and more adaptable to the on-chain computing power requirements of ML. Currently, ZK-SNARKs are the main form of ZK in ZKML.
ML On-Chain Infrastructure Requirements and Corresponding Projects
ZK empowers ML mainly through zero-knowledge proofs throughout the entire ML process, which is the interaction between ML and on-chain functionality. The two major problems that need to be solved for this interaction are to align the data forms of both and to provide computing power for the ZK proof process.
ZK Hardware Acceleration: ZK proofs for ML are relatively complex, which requires hardware-assisted on-chain computing power to accelerate proof computation. These projects include: Cysic, Ulvetanna, Ingonyama, Supranational, Accseal.
On-Chain Data Processing for ML: Process on-chain data into a form that can be used for ML training and help to make ML’s output results more easily accessible from the chain. These projects include: Axiom, Herodotus, LAGRANGE, Hyper Oracle.
Circuitization of ML Computing: The computing mode of ML is different from the on-chain circuitized proof of ZK. The on-chain of ML must convert its computing mode into a circuit form that can be processed by the blockchain ZK. These projects include: Modulus Labs, Jason Morton, Giza.
ZK Proof of ML Results: The trust proof problem of ML needs to be solved by on-chain ZK. Applications based on ZK-SNARKs constructed on Risc Zero or Nil Foundation can achieve model authenticity proof. These projects include: RISC Zero, Axiom, Herodotus, Delphinus Lab, Hyper Oracle, Poseidon ZKP, IronMill.
ML Empowers ZK: Enriching Web3 Application Scenarios
ZK solves the trust proof problem of ML and provides on-chain opportunities for ML. Many areas in Web3 urgently need the productivity or decision-making support of AI and ML, and ZKML enables on-chain applications to achieve AI empowerment while ensuring decentralization and effectiveness.
ZKML can help DeFi become more automated, including the automation of on-chain protocol parameter updates and transaction strategies.
Modulus Labs introduced RockyBot, the first fully on-chain AI trading robot ever.
ZKML can help with the construction of decentralized identities (DIDs) in Web3. Traditionally, identity management using private keys and mnemonic phrases has made for a poor user experience in Web3. By using ZKML, true DID construction can be achieved through the identification of Web3 subjects’ biological information, while also ensuring the privacy of that information.
Worldcoin is using ZKML to implement zero-knowledge DID verification based on iris scanning.
ZKML can help Web3 games achieve full functionality on the blockchain. ML can bring differentiated automation to game interactions, increasing the fun of the game. ZK can make the interaction decisions made by ML be put on the chain.
Modulus Labs has launched the chess game @VsLeela, which is driven by ZKML.
AI ARENA has used ZKML to achieve high interactivity in its on-chain NFT game.
Healthcare and Legal Consultation
Healthcare and legal consultation are both fields that require a lot of privacy and a large accumulation of cases. ZKML can help users make decisions and ensure the privacy of their information is not leaked.
ZKML is currently growing rapidly, but it faces two major challenges due to its non-native nature to blockchain and its need for a lot of computing power:
The problem of parameter distortion during ML parameter quantization to the chain:
Most ML models use floating-point numbers to represent model parameters, while ZK circuits need to use fixed-point numbers. In this process of converting between number types, the precision of the ML model’s parameters will be reduced, which will to some extent cause distortions in the ML output results.
The problem of high computing power requirements for its large-model ZK proofs:
Currently, the computing power of blockchain cannot meet the high computing demands of large-scale, high-computational ZKML on the chain. The popular ZK-SNARKs only support small-scale, low-computational zero-knowledge proofs for ML. The limitation of computing power is a key factor affecting the development of ZKML in blockchain applications.
The computational complexity of the ZK proof generation phase is high and requires a lot of computing resources. Because there is a high degree of correlation between the data that needs to be accessed and processed during the ZK proof phase, it is difficult to carry out this process in a distributed manner, and it is not “parallelizable”. Distributing this process may introduce additional complexity and even reduce overall performance. Currently, the mainstream research direction for solving the ZK computation efficiency problem is more focused on algorithm optimization and hardware acceleration.
ZKML is a dual-oriented pursuit of zero-knowledge proof and machine learning. The growing blockchain technology ZK helps ML solve the problem of trust proof and provides a chain-based environment for ML. The mature AI technology ML helps ZK realize the expansion of the Web3 ecosystem and application innovation.
ZKML faces some challenges, such as the problem of parameter distortion and the high computational power requirement of large models, but these problems can be solved through technological innovation and hardware acceleration. With the continuous emergence and development of ZKML projects, we can foresee that it will bring more innovation and value to the Web3 ecosystem in fields such as DeFi, DID, games, and healthcare.
In the future, ZKML is expected to become the key to truly unlocking the cross-fusion of Web3 + AI, providing strong support for further building secure, privacy-protected, and efficient blockchain applications. By combining the zero-knowledge nature of ZK with the data processing capabilities of ML, we can definitely create a more open, intelligent, and trustworthy digital world!