Zero Knowledge Machine Learning - Intelligent Blockchains & Autonomous AI

Zero Knowledge and Machine Learning can lead up to more than just being buzz words in crypto-sphere. Zero Knowledge proofs are used for verifying the computational integrity of machine learning models. The applications can be used in DeFi, CoFi, Autonomous World applications and oracles. It's an emerging domain where the goal is to execute machine learning models in such a way that the input, output, or the model itself remains private, but the computation is verifiable. Still  in its R&D phase of technology life cycle and still a huge technical debt to machine learning developers but might have huge implications in the future and the next era of computing.

Machine learning and  Zero-Knowledge Cryptography can lead to  smart and more complex decentralized applications by providing model privacydata privacy and transparent verification of computation and even first step of evolving blockchains. Machine learning adds dynamism to contracts making it more efficient and better flexible than hand ruled smart-contracts.  These developments will evolve into ML capabilities onchain which create a huge market for IP, RWA, Social Networks and more.

Recap on Zero Knowledge Proof’s and Machine Learning

Zero Knowledge Proofs

Zero-knowledge proofs are a cryptographic method that allows one party, known as the prover, to prove the validity of a statement to another party, known as the verifier, without revealing any information about the statement itself. It ensures that the verifier can be convinced of the truth of the statement without gaining any knowledge of the underlying information or how the prover obtained it. Zero-knowledge proofs have applications in improving privacy and security in various real-world scenarios, such as identity verification and sharing sensitive information.[1*]

Machine Learning

Machine learning (ML) is a field that involves the development of algorithms by machines to solve problems that would be too costly for human programmers to tackle. These algorithms are not explicitly programmed by humans, but are instead "discovered" by the machines themselves. The mathematical foundations of machine learning are provided by mathematical optimization methods. The latest trend in machine learning which are transformer based large language models, which is a subfield of deep learning have lots of model weights which stores the knowledge of the model and those weights make the model “intelligent”.

Zero Knowledge - Machine Learning

Machine learning can be used in conjunction with zero-knowledge proofs to ensure trustlessness and verifiability in digital products. This means that users can demand the same degree of trustlessness and verifiability assured by blockchains from machine learning models. The primary use-case for zero-knowledge proofs in the context of machine learning on-chain is to verify correct computation. For example, ZK-SNARKs allow an MLaaS provider to prove that the model was executed correctly, consumers can verify predictions which keeps the model private but also have integrity. This is because zero-knowledge proofs protect the privacy of the prover (and of the data it processed) from a prying verifier. In the future, advances in zero-knowledge proving systems will make it possible to secure private model weights and data with privacy-preserving zero-knowledge proofs that are on-chain and fully auditable [2]. The problem is even an optimized model like FastBERT ~1800 MFLOPS (million floating point operations) which is not feasible to run on EVM. Anyone can run a model off-chain and generate a succinct and verifiable proof showing that the intended model did in fact produce a particular result.

Zero Knowledge Machine Learning is a solution that address the privacy concerns in traditional machine learning while preserving IP of models and sensitive information.

  1. Input data can be private where user does not have to reveal the personal data to the ML provider.

  2. The model can be kept private and the model provider can verify that it has indeed used the model it said they used. This way model provider keep the weights of the model private which is company IP and also provide trust.

  3. The output of the inference model can be kept secret and necessary computation can be done on top the output. For instance, a model can predict its credit score without revealing the score it can give eligibility of the user.

How does it work

1- Translate ML Models: First, ML models need to be translated into arithmetic circuits or other representations compatible with zero-knowledge proof systems. This can be complex, especially for deep neural networks.

2- Generate Proofs: Once the model is in the right form, the prover (usually the machine running the model) can generate a proof that they executed the model correctly.

3- Verify: The verifier (could be any participant interested in the result) can then check this proof. If it's valid, they can be sure that the model was executed correctly, without needing to see the model, the input, or the output.

Challenges:

Computational Overhead: The process of generating and verifying proofs can be computationally intensive. Complexity: Translating complex ML models into forms compatible with ZKPs can be challenging. Interactivity: Some ZKP systems require multiple rounds of communication between the prover and verifier, which could be inefficient for ML tasks.

Ecosystem and Companies

Despite the merger of two of the most appealing terms to create a novel technology category, its applications remain limited. However, as with many technological advancements, it encompasses multiple layers. These layers include hardware, inference, and developmental tools, all crucial for constructing real-world applications.

Hardware

Hardware companies are trying to build efficient, cheaper and secure tools for zero knowledge proofs which is beneficial for verified machine learning. ZK accelerated hardware will become really important for the usability of ZK models in production just like GPU’s become the backbone of AI models.

  • SupraNational is a company that specializes in creating high-performance hardware and software solutions for verifiable and confidential computing. They work on optimizing cryptographic algorithms and have contributed to various projects in the blockchain and crypto space. Their goal is to improve the efficiency and security of computational processes, particularly those related to blockchain technology and cryptocurrencies.

  • Ingonyama is a next-generation semiconductor collective that focuses on designing accelerators for advanced cryptography. Their main goal is to improve the cost and energy efficiency of applications that use zero-knowledge proofs. They develop original chip designs, collaborate with teams working on cryptographic implementation, and experiment with zero-knowledge compute problems. They aim to make zero-knowledge proofs more accessible and faster for developers.

  • Aligned is a company that specializes in providing infrastructure solutions for the digital world. They focus on solving the complex challenges faced by data centers, cloud service providers, and large enterprises. Their mission is to create a sustainable and adaptable future for data center and IT infrastructure, ensuring that businesses can grow without being hindered by their infrastructure. They offer a dynamic, flexible, and future-focused data center platform that allows companies to align their data center infrastructure with their business needs.

  • Ulvetanna is an acceleration platform that focuses on providing fast, cheap, and easy-to-compute zero-knowledge succinct proofs (ZKPs). These proofs are crucial for enhancing privacy and security in blockchain and other Web3 networks.Their proving stack supports a variety of proof systems, including SNARKs, STARKs, PlonK, and Nova. These proofs are fully compatible with existing, secure verification contracts, and their hardware-accelerated proving backend is designed to integrate with the frontend library or zkDSL your application logic is written in.

  • Cysic is a zero-knowledge (ZK) hardware startup that focuses on providing hardware acceleration solutions for ZK proof protocols. They aim to enhance the efficiency and performance of ZK proof protocols through their hardware solutions.

Inference

Inference layer is for making serving layer of machine learning faster and cheaper.

  • TensorPlonk is a new proving system developed for high-performance proving for a wide range of ML models. It's referred to as a "GPU" for zero-knowledge machine learning (ZKML). Given the computational intensity of ML operations, particularly in linear layers, TensorPlonk optimizes matrix multiplications, non-linearities, and weight commitments, leading to up-to 1,000 times speedups for certain classes of ML models, improving the feasibility and cost-efficiency of ZKML for practical applications.

  • RiscZero is the underlying technology of a decentralized proving engine known as Bonsai. It empowers developers to integrate ZK proofs into their applications, blockchains, and appchains, enhancing security and allowing complex computations. The RISC Zero zkVM enables users to prove correct execution of arbitrary Rust code. It handles the underlying cryptography, allowing users to focus on building zkApps.

  • Hyperoracle is a decentralized oracle platform that leverages a network of nodes to gather and verify data from various sources. It ensures data quality and reliability through a reputation system, preventing malicious or inaccurate data from being included in smart contracts. By providing processed and verified data, Hyperoracle enhances the efficiency and scalability of smart contracts, making them more reliable and secure in the decentralized finance ecosystem. Hyper Oracle recently unveiled opML (Optimistic Machine Learning), a groundbreaking framework that brings a new era of fairness and verifiability to onchain AI and machine learning. opML is not merely a technological advancement; it addresses the pressing need for transparency and validity in the AI space.

  • Giza is a Machine Learning platform built on StarkNet, a decentralized ZK-Rollup on Ethereum. It enables the deployment and scaling of Machine Learning models, addressing challenges faced by traditional web2 solutions. Giza offers interoperability with popular ML frameworks, ensuring high availability, fault tolerance, and zero downtime. It leverages the transparency of on-chain deployments, storing monitoring and performance data in the blockchain. Giza opens up new possibilities for AI-powered smart contracts, gaming AI agents, and ML inferencing in Ethereum L1, aiming to build a thriving community around on-chain ML and StarkNet.

  • Axiom, a ZK coprocessor for Ethereum which provides smart contracts trustless access to all on-chain data and arbitrary expressive compute over it. These compute can be machine learning models.

  • Ritual builds a layer for executing AI tasks (training, inference, fine-tuning, and proof generation) and verifying the process by leveraging Infernet nodes. They are leveraging EZKL library for generating proofs on the processes and planning to invest more on generating proofs through ZKML

Developer Tools

Developer tools are for making the development process of machine learning models and converting them into zero-knowledge circuits faster and easier for the engineers. Running AI models on blockchains are not feasible. zkSNARKs give us a solution: anyone can run a model off-chain and generate a succinct and verifiable proof showing that the intended model did in fact produce a particular result. Nil Foundation and Taceo recently partnered for the creation of a software pipeline that focuses on validating machine learning models on Ethereum's Layer 1 mainnet using zero-knowledge techniques. The Nil Foundation's zkLLVM compiler tool, which utilizes zero-knowledge proofs, plays a pivotal role in this collaboration by authenticating machine learning computations in various programming languages.

EZKL zkml is a library and command-line tool that allows for performing inference for deep learning models in a zk-SNARK (zero-knowledge succinct non-interactive argument of knowledge). It enables the definition of a computational graph in frameworks like Pytorch or TensorFlow, exporting it as an ONNX file with sample inputs in a JSON file, and using EZKL to generate a zkSNARK circuit. Zama is a cryptography company that specializes in building open source homomorphic encryption tools for developers. They are focused on developing fully homomorphic encryption (FHE) resources and provide a curated list of amazing homomorphic encryption tools.

Consumer Apps

Consumer Apps are the most important missing aspect in most of the decentralized applications space. AI based consumer apps on blockchains does not gain anything mostly that compensates the costs of having one. So we look at the future where the cost has dropped immensely and besides from adding only trust to the system (even though its transparent, verifiable and open source AI models will become more important for societies as ai models can lead to super centralization), we would like to have decentralized autonomous AI systems that lives on-chain which is update and trained from public input. Moreover, Collaborative Finance is one of the main building blocks of the world where the most optimistic kids dream about. Worldwide organization of financials and aligning finance with positive sum thinking is the way to the future. We need verifiable AI for lending, pricing, insurance and other financial instruments. Large Language Models like ChatGPT uses mixture of expert or LoRA adapters which are fine tuned lightweight matrices than be potentially stored on-chain, we can create an intent-pool on blockchains and an expert AI’s can execute the most optimized generative answer.

Finance

Noya AI utilizes ZKML (Zero-knowledge Machine Learning) technology to provide users with the best mining opportunities in liquidity mining. ZKML allows Noya to execute its strategies without the need for trust, ensuring the accuracy of model outputs without leaking more information. By combining AI and ZKML, Noya is able to be proactive and predictive, predicting returns, rewards, slippage, and more, to ensure users always mine in the most optimal way possible.

Lyra uses AI to enhance their AMM with intelligent features and Astraly uses AI to optimize token incentives through reputation.

DeFi stack can leverage ZK-ML to improve its offerings and create a better version of open protocols.

Verifiable Off-Chain ML Oracles

  • DeFi can integrate Real-world prediction markets, insurance protocol contracts in their services and provide trust at protocol level.

ML-parameterized DeFi applications

  • Lending protocols can utilize and create lending rates based on models

Automated trading strategies

  • Smart Vaults, Options pricing can be implemented on protocol level where funds or DeFi protocols can attract LP's without revealing their models.

Identification & AI-Oracles

Access to blockchain is still mostly used by people with technical capabilities and even they are complaining. Everyone want easier ways to manage their digital assets, most of web 2 companies because they have a kill-switch if the user fucks up

Worldcoin's biometric identification works by scanning someone's irises using a device called "orbs." These orbs capture an image of the colored parts of the eyes and create a unique identifier called a "World ID." This World ID serves as a form of identification that cannot be stolen or duplicated. Instead of relying on traditional methods like passwords, individuals can use their World ID to sign up for online services.

ZK-oracle verified by ZKML can be used for creating smart contracts from human language. We can connect to blockchain data with natural language or create smart contracts from conversation of humans.

Gaming

Modulus Labs’ Leela vs. the World, the verifier wants to ensure the stated 1900 ELO AI is picking the chess moves and not Magnus Carlson. Games like Dark Forest and ZK Hunt have been pioneers in using the privacy affordances of zero-knowledge proofs to create games with fog-of-war or hidden information mechanics. Autonomous Worlds and ZKML is becoming a overlapping two narratives in cryptocurrencies.

The Model is the Game

This category is where interacting with an AI agent is the game itself an example is cryptoidol developed by EZKL team

ZKML as Digital Physics

This category is where verifiably built machine learning model generates the next state of the game where the user can play the game off-chain but has to follow the physics rules of ZKML model.

ZKML for Lore and Narrative

EZKL implemented a generative model, described here, which models the voltage activations (given sensory inputs) of the C. Elegans nervous system. We could generate sensory inputs for the worm using an on-chain game engine such as MUD, and then generate proofs that update the worm’s brain activity given the on-chain sensory environment. Anyone can run these proofs and keep the worm “alive” on-chain, effectively creating an autonomous agent that other games and interfaces can leverage within their own games- ZKML and Autonomous Worlds

AI Safety & ZK-ML

AI safety is one of the most important topics of this decade, worst case scenarios are topic of another post. Zero Knowledge Proofs can be the way for AI companies to verify their models are trained according to jurisdiction rules without revealing their model weight or their dataset which are like company IP. This can be used in distributed training setting as well in which Bittensor, and Gensyn AI are after as well.

Daniel Kang and zkpod.ai called the Attested Audio Experiment, which aims to verify the authenticity of audio recordings and differentiate between original recordings and AI-generated audio. [zkpod.ai & Attested Audio Experiment with Daniel Kang]

AI Safety is one the hottest topics in AI chambers where views differ among the top AI people. However, most of us agree that AI should be used for betterment of humanity and there should be more work on tools on AI safety and cryptography & zero knowledge proofs are usually not in AI researchers tool list.

Conclusion ZK-ML is still in its infancy but filled with intelligent builders and backed by networks all around the world enabled by tokenization. The advancements in hardware acceleration, inference optimization, and developer tools are commendable, setting the stage for more robust, efficient, and accessible ZK-ML applications. However, the true potential of this technology lies in its ability to democratize AI and ability to build efficient decentralized systems, ensuring equitable access and fostering trust through transparency and verifiability. The role of consumer applications in achieving this is paramount, as they represent the bridge between high-level technical innovation and everyday utility.

Looking ahead, the ZK-ML ecosystem is poised for exponential growth, driven by a global network of developers, researchers, and innovators. As we advance, it is essential to foster an environment of open collaboration and knowledge sharing, ensuring that the benefits of this revolutionary technology are accessible to all. The future of ZK-ML, while still unfolding, is undeniably bright, and its impact on the next era of computing and beyond is something we should all watch with great interest and active participation.

References

<nft://loading?1 - Ethereum Foundation / Zero Knowledge Proofs - https://ethereum.org/en/zero-knowledge-proofs/

‍2 - a16z / ZKML - https://a16zcrypto.com/posts/article/checks-and-balances-machine-learning-and-zero-knowledge-proofs/

‍3 - Cathie So / ZKML - https://hackmd.io/@cathie/zkml

‍4 -AI Public Input - https://www.anthropic.com/index/collective-constitutional-ai-aligning-a-language-model-with-public-input

‍5 - AI generated audio by Daniel Kang - https://medium.com/@danieldkang/fighting-ai-generated-audio-with-attested-microphones-and-zk-snarks-the-attested-audio-experiment-d6ea0fc296ac

‍6- ZKML and Autonomous Worlds - https://world.mirror.xyz/r09swfSb2r11uagYk34srjMH09VBGFl29Pa8k4qw3VA>

2 - a16z / ZKML - https://a16zcrypto.com/posts/article/checks-and-balances-machine-learning-and-zero-knowledge-proofs/

3 - Cathie So / ZKML - https://hackmd.io/@cathie/zkml

4 -AI Public Input - https://www.anthropic.com/index/collective-constitutional-ai-aligning-a-language-model-with-public-input

5 - AI generated audio by Daniel Kang - https://medium.com/@danieldkang/fighting-ai-generated-audio-with-attested-microphones-and-zk-snarks-the-attested-audio-experiment-d6ea0fc296ac

nft://undefined/undefined/undefined?showBuying=true&showMeta=true

nft://undefined/undefined/undefined?showBuying=true&showMeta=true

nft://undefined/undefined/undefined?showBuying=true&showMeta=true

nft://undefined/undefined/undefined?showBuying=true&showMeta=true

Subscribe to Blueflow AI
Receive the latest updates directly to your inbox.
Mint this entry as an NFT to add it to your collection.
Verification
This entry has been permanently stored onchain and signed by its creator.