0xResearch - How AI and Crypto Intersect on Ritual's Layer  - Revelo Intel

0xResearch – How AI and Crypto Intersect on Ritual’s Layer 

In this episode of 0xResearch which took place on April 11, 2024, Sam, Ren, and Saneel discuss Ritual Network, use cases of AI and crypto, data availability, and more. Read our notes below to learn more.

Background

What are Co-processors?

  • Saneel says that verifiability is crucial when models control or influence financial decisions. In scenarios like image generation for NFTs, the focus shifts from verifying the model’s process to ensuring the output meets expectations.
  • He adds that zero-knowledge proofs offer a way to verify models by packing them into circuits, suitable for smaller models but challenging for larger ones like Transformer models. Optimistic proofs provide an alternative approach, ideal for higher throughput and larger models without circuit constraints.
  • Saneel says that Ritual is developing proof techniques that go beyond existing methods, hinting at upcoming innovations in the space.
  • He adds that traditional AI frameworks lack robust mechanisms for verifiability and security, prompting the need for solutions like those offered by Ritual.

Benefits of Onchain AI Stack 

  • Saneel says that the entire AI supply chain can benefit from leveraging governance, incentive, and composability primitives. Crypto can be used to allow decentralized decision-making on model behavior, ensuring inclusivity and fairness.
  • He adds that Ritual aims to flip the traditional AI stack by redefining training processes and operational workflows. By adopting a first principles approach, Ritual unlocks innovative behaviors within the architecture, similar to advancements seen in other domains like game engines.

What is Ritual?

  • Saneel says that Ritual introduces stateful pre-compiles to extend functionality beyond standard specifications, enabling advanced operations such as inference and fine-tuning. These pre-compiles connect execution clients with models, facilitating seamless integration of diverse model operations through smart contract code.
  • He adds that nodes on Ritual’s execution layer can service models using GPU compute or powerful CPUs, streamlining model operations like inference and quantization. Initial phases involve an Oracle-like interface for requesting inference services on-chain, enhancing accessibility and efficiency for end users and developers.
  • Saneel says that developers can natively build on Ritual using full EVM functionality alongside additional features like dynamic parameter updates based on model outputs.
  • He adds that pre-compiles are a way to extend functionality around a chain without writing in the native language. Developers can add functionalities by writing state for precompile in languages like Go, allowing contracts to call these functions.
  • Saneel says that nodes should leverage idle GPU or CPU power for model training but distributed training faces challenges due to latency issues. Ritual focuses on AI operations stack parts not burdened with distributed training complexities like backpropagation.
  • He adds that geographical dispersion is crucial for creating an efficient peer-to-peer network within chains. User preferences regarding node location play a vital role in routing requests efficiently across the chain.
  • Saneel says that Ritual concentrates on operations not requiring distribution across multiple nodes presently but acknowledges future roadmap considerations.

Role of DA

  • Saneel says that the integration with Celestia aims to offer more options for chains, enhancing workflows beyond traditional methods. Users can post proofs generated in their workflows on the Ritual Network, providing flexibility and cost-efficiency compared to posting on Ethereum or other platforms. Celestia ensures best-in-class data availability and security guarantees, offering a streamlined approach for verification across various layers.
  • He adds that while users have the freedom to architect their own workflows, integrating with Celestia provides a secure and decentralized option for data across the network. The intention is not to enforce specific options but to create a streamlined workflow supported by a team known for ensuring security and decentralization.
  • Saneel says that one use case of Celestia involves posting proofs like ZK proofs generated by Ritual such as Infinite, highlighting its role in verifying validity within different contexts.
  • He adds that distinguishing between inference and fine-tuning in AI scenarios showcases varying State differences crucial for verifying input-output relationships within models. Inference focuses on proving inputs leading to outputs directly, while fine-tuning emphasizes changes in model weights based on training data batches. State differences akin to transactions in rollup environments are essential in understanding how training data impacts model weight transitions from one state to another.

AI Inference

  • Saneel says that addressing whether AI inference is deterministic reveals that it varies based on the model used, with LLMs potentially introducing non-determinism due to floating-point mathematics.
  • He adds that when running an LLM, determinism is crucial for consistent results between different runs. Quantization schemes are employed to convert weights from floating point to fixed point arithmetic, ensuring determinism.
  • Saneel says that initial quantization schemes led to performance drops due to loss of expressivity from truncating decimal values. Innovative quantization methods have minimized performance impact, making determinism feasible without significant losses.

Infernet SDK 

  • Saneel says that Infernet serves as Phase One of Ritual, aiming to establish a sovereign layer for AI within a protocol. Components include Infernet Node for off-chain operations and Infernet SDK for on-chain interactions.
  • He adds that the Infernet Node facilitates model execution off-chain with abstracted workflows for connectivity. The Infernet SDK operates on target chains like EVM chains, enabling inference requests and flexible data handling.
  • Saneel says that Ritual is positioned as a purpose-built AI Oracle Network, serving as a foundation for scaling into the Ritual chain. Current applications include AI-generated NFT creation and AI agent app development with on-chain incentives.
  • He adds that traditional Oracle Networks incorporate staking and slashing mechanisms to provide crypto economic guarantees. Users can pass arbitrary proofs via the Infernet SDK to validate inference integrity through various proof types like zero-knowledge or optimistic proofs.
  • Saneel says that the current infrastructure is primarily on-chain and composable. Trust assumptions in inference and usage are tied to proofs related to the model itself. The goal is to build a custom-built VM for native access to models within contracts.
  • He adds that the Ritual Superchain aims to provide modular execution layers for different classes of arbitrary computation. It allows developers to access models natively within the chain rather than through an oracle.
  • Saneel says that the Ritual Superchain refers to a custom-built VM designed for accessing models natively within contracts. It aims to enhance developer experience by providing familiarity while integrating AI functionalities seamlessly.
  • He adds that they are initially targeting an EVM-based execution environment for accessibility. Plans are underway to support other execution environments in progress.

Crypto AI Landscape

  • Saneel says that the integration of crypto and AI is deemed essential for mutual progress within both domains. Expectations are high for meaningful advancements in applications enabled by this synergy within the next 12 to 18 months. Challenges lie in building robust incentive schemes and architectures that merge open-source models with crypto AI frameworks.
  • He adds that Grass effectively utilizes technology to gather valuable data for training models, showcasing a practical application of cryptographic incentives. Allora‘s approach involves incentivizing continuous model enhancements to optimize performance, contributing to refining the model origination pipeline.
  • Saneel says that decentralized training is an intriguing concept, but there are challenges due to computational intensity and latency sensitivity. Centralized training may persist for fundamental model origination due to efficiency concerns; however, decentralized access to diverse models remains crucial.
  • He adds that Ritual serves as a pivotal link between infrastructure elements and end-users, facilitating seamless integration of advanced models into practical applications.

Actual Crypto & AI Use Cases

  • Saneel highlights the significance of assessing whether systems are fundamentally utilizing AI and crypto in a meaningful way rather than as gamified incentives. Many projects are criticized for lacking substantial integration of AI and crypto, potentially diluting their impact within the space.
  • He adds that the discussion shifts towards practical applications where integrating AI with crypto can enhance user experience, particularly through natural language interfaces for interacting with blockchain technology. Improving user experience by simplifying interactions with blockchain technology is crucial for broader adoption and usability within everyday life scenarios.
  • Saneel says that efficiently setting parameters for isolated lending pools can simplify deployment processes, enabling a wide range of financial use cases that benefit end-users.
  • He adds that bridge and DEX aggregators are solutions for seamless cross-chain transactions. A DEX aggregator functions as a multi-chain DEX, simplifying token swaps across various chains. He highlights the idea of a front end for aggregators, offering users a straightforward interface to execute transactions efficiently.
  • Saneel says that bridge aggregators are positioned as tools that users can plug into, enabling easy asset transfers between different chains without the need for complex interactions. The significance of a unified interface for interacting with multiple services is emphasized, providing users with a seamless experience across various chains.

Restaking AI on EigenLayer

  • Saneel encourages individuals with ML or crypto backgrounds to engage in developing models and reaching out to Ritual. He notes the shift in interest towards infrastructure within the crypto space and the need for purpose-built models. 
  • He highlights the current lack of talent in building models specific to crypto use cases but existing networks incentivize model creation. He discusses the bottleneck of needing purposeful models for certain applications and how talent shortage can be addressed through incentivization schemes.
  • Saneel compares historical trends in crypto infrastructure development, indicating a long-tailed distribution rather than a winner-takes-all scenario. He suggests that while some protocols may capture significant value, there will also be room for other protocols with specialized optimizations.
  • He emphasizes Ritual’s focus on user experience as key to attracting users and developers, potentially influencing market dynamics.
  • Saneel acknowledges MyShell‘s impressive user base and suite of open-source models available for use on the Ritual Network. Users can utilize MyShell’s tools to compose agents and apps using open-source models hosted on Ritual.

Ritual Roadmap

  • Saneel says that they focus on developing top-quality products and enhancing user experiences. Efforts are directed towards making nodes more accessible for users to run and establishing tighter feedback loops with the community.
  • He adds that they are working on rolling out devnet, testnet, and chain functionalities to make them available for users as soon as possible.
  • Saneel says that they focus on scaling from ecosystem usage to developing applications on-chain while targeting various parts of the supply chain with strategic partnerships.

Check out these important links

Show Information

  • Medium: YouTube (Video)
  • Show: 0xResearch 
  • Show Title: How AI and Crypto Intersect on Ritual’s Sovereign Execution Layer | Saneel, Founding Member
  • Show Date: April 11, 2024