Home Artificial Intelligence Zero-Knowledge Machine Learning (ZKML): Projects Exploring the Space Zero-Knowledge Why is ZKML drawing attention recently? Use cases Projects exploring ZKML Closing words

Zero-Knowledge Machine Learning (ZKML): Projects Exploring the Space Zero-Knowledge Why is ZKML drawing attention recently? Use cases Projects exploring ZKML Closing words

3
Zero-Knowledge Machine Learning (ZKML): Projects Exploring the Space
Zero-Knowledge
Why is ZKML drawing attention recently?
Use cases
Projects exploring ZKML
Closing words

Over the previous 12 months, there have been significant developments in zero-knowledge technology, and in 2023, we’re experiencing a remarkable increase in its adoption across the blockchain sector.

In parallel, the deployment of machine learning (ML) is becoming more intricate. Quite a few enterprises are actually choosing ML-as-a-service providers (Amazon, Google, Microsoft, amongst others) to implement complicated, proprietary ML models. With the proliferation of those services, they grow to be progressively tougher to audit and understand, posing an important query: how can consumers of those services trust the validity of the predictions provided?

ZKML offers an answer by enabling the validation of personal data using public models or verifying private models with public data.

Zero-knowledge (ZK) proofs are a cryptographic mechanism where the prover can exhibit to the verifier that a given statement is true, without revealing any supplementary information except that the statement is true. The sector of ZK proofs has made significant strides on various fronts, from research to protocol implementations and real-world applications.

ZK proofs leverage two primary “primitives,” or constructing blocks, to enable their functionality. The primary is the power to ascertain proofs of computational integrity for a given set of computations. The proof is substantially more straightforward to validate than to execute the computation itself, known as “succinctness.” Moreover, ZK proofs offer the choice to hide specific parts of the computation while preserving computational accuracy, often known as “zero-knowledge.”

If you ought to learn more about ZK, I like to recommend you attend this ZKP MOOC.

The State of ZK report, a quarterly publication that examines key developments within the zero-knowledge ecosystem, highlights the trends which have generated essentially the most interest inside the ZK community:

The leading use case for ZK is . The zero-knowledge primitive of ZK proofs allows for concealing specific parts of the computation being validated. This capability is especially advantageous for creating applications that uphold users’ privacy and safeguard their personal data while producing cryptographic attestations. Several noteworthy initiatives on this regard include: Semaphore, MACI, Penumbra or Aztec Network.

ZK for ranks second. Distributed systems, comparable to public blockchains, possess restricted computational capabilities because every participating node (computer) must run the computations in each block by themselves to validate them. Nonetheless, by utilizing ZK proofs, we will perform these computations off-chain, generate a ZK proof, after which authenticate this proof on-chain, achieving scalability while maintaining security and decentralization. Exemplary projects include: Starknet, Scroll, Polygon, Zero, Polygon Miden, Polygon zkEVM or zkSync.

also draws attention indicating a growing curiosity in utilizing ZK technology within the realm of identity management. This includes developing proof-of-personhood protocols to create cryptographic attestations. Some notable initiatives on this area include: WorldID, Sismo, Clique or Axiom

When asked about essentially the most exciting recent use-cases, it is clear that the community’s focus is on , which is taken into account essentially the most appealing recent use-case (besides interoperability or zkBridges). The rest of this text will concentrate on ZKML for the aim of effectively verifying that every one computations have been accurately executed, which has far-reaching implications beyond just blockchains.

Creating zero-knowledge proofs requires significant computational resources, often far more than the unique computation. Because of this, there are specific computations which can be impractical to prove with zero-knowledge proofs due to time required to generate them. Nonetheless, recent progress in cryptography, hardware, and distributed systems has made it possible to generate zero-knowledge proofs for increasingly intensive computations. These advances have enabled the event of protocols that may use proofs of intensive computations, expanding the range of applications for which zero-knowledge proofs will be used. A recent study by the Modulus Labs team titled “The Cost of Intelligence” evaluates various existing ZK proof systems against a wide selection of models of various sizes.

As AI technology continues to advance, it becomes tougher to tell apart AI-generated content from human-generated content. Nonetheless, zero-knowledge cryptography may hold the potential to unravel this problem by enabling us to find out whether a specific piece of content was produced by applying a particular model to a given input, without revealing any additional information in regards to the model or the input. Within the case of enormous language models comparable to GPT-4, the creation of a zero-knowledge circuit representation could provide a way for verifying their outputs.

The zero-knowledge property inherent in these proofs would enable us to hide any sensitive parts of the input or the model if obligatory. An illustrative example could be using a machine learning model on personal data, where a user could obtain the final result of the model inference on their data without disclosing their input to any external entity (comparable to within the healthcare sector).

ZKML remains to be a nascent technology and lots of use cases have yet to be explored. Nonetheless, below are among the most evident use cases as also highlighted by Worldcoin’s article and Elena Burger’s post.

Validity proofs comparable to SNARKs and STARKs have the aptitude to exhibit that a computation has been executed accurately, and this will be applied to machine learning by verifying ML model inference or that a model generated a specific output based on a particular input. The flexibility to simply prove and confirm that the output is the results of a specific model and input combination allows for the deployment of machine learning models on specialized hardware off-chain, while the ZK proofs will be conveniently verified on-chain.

When discussing ZKML, the main target is usually on generating zero-knowledge proofs of the inference step of the ML model, moderately than on verifying the validity of the information used to coach the model. The latter is already a highly computationally intensive process by itself.

Other than validity proofs, zero-knowledge cryptography will also be used to preserve privacy in machine learning applications. One example could be to prove that a model has a certain level of accuracy on test data without revealing the weights used. An example of one other use case is privacy-preserving inference, where private patient data will be used for medical diagnostics and the sensitive inference, comparable to a cancer test result, will be sent to the patient without revealing their data to any third party.

In cases where corporations offer access to ML models through their APIs, it might be difficult for users to know whether the provider is definitely offering the model that they claim to be providing, for the reason that API is basically a black box. Validity proofs which can be related to an ML model API could be beneficial in providing transparency to the user, as they may confirm which model they’re utilizing.

Performing machine learning inference or training in a decentralized way while allowing people to submit data to a public model requires deploying an existing model on-chain or constructing a recent network. Zero-knowledge proofs will be used to compress the model.

To include attestations from external verified parties, comparable to a digital platform or hardware that may produce a digital signature, into a sensible contract running on-chain, one can confirm the signature using a zero-knowledge proof and use it as an input in a program. This method will be applied to any digitally attested information, providing a way of verifying authenticity and provenance from a trusted source. Endpoints that generate digital signatures will be verified and utilized in this manner.

As advancements in cryptography, hardware, and distributed systems proceed to make zero-knowledge proofs feasible for increasingly intensive computations, an increasing variety of projects are exploring using ZKML. The illustration below provides a non-exhaustive overview of current projects, though it must be noted that there could also be some overlap between categories, and that this presentation is simplified for clarity. Moreover, there are many open source codebases available for constructing ZKML applications, indicating a growing interest and excitement in the neighborhood.

Not comprehensive; as of May 10, 2023; strict demarcations will not be possible between categories

As ZK technology continues to advance, it’s becoming increasingly feasible to prove larger machine learning models on less powerful machines in a shorter time period. That is as a consequence of improvements in specialized hardware, proof system architecture, and more efficient ZK protocol implementations. Because of this of those advancements, recent ZKML applications and use cases are expected to emerge.

While the large picture use case of ZKML in Web3 is to enable on-chain organizations to run machine learning models, the fast-paced evolution of ZKML offers potential solutions to intricate problems in multiple fields. In my opinion, the next use cases could arise on this context:

Decentralized finance (DeFi): using ZKML to validate yield-maximizing strategies or rebalancing of pools for patrons. One example of that is RockyBot

Gaming: using ZKML to validate betting mechanisms or AI-enhanced players. An example of that is Leela vs the World

Identity: using ZKML to perform AI evaluation on user biometric information while ensuring custody of the information. An example of that is WorldID

Healthcare: ZKML will be utilized within the medical field for disease prediction by running machine learning models over sensitive medical data while preserving privacy

Although ZKML shows great potential, the sector remains to be in its early stages of development. One challenge is that accuracy and fidelity could also be compromised in the course of the conversion of a model right into a circuit. One other limitation is that the parameters and activations of many machine learning models are encoded as 32-bits for precision, which current zero-knowledge proof systems struggle to represent within the required arithmetic circuit format without significant overhead.

Currently, the sector of ZKML remains to be catching up as zero-knowledge proofs proceed to be optimized to handle increasingly complex machine learning models.

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here