Optimistic Machine Learning

How Neural Applies OPML

Introduction

Optimistic Machine Learning (opML) presents an innovative approach to AI model inference. Unlike ZKML, opML leverages blockchain systems to conduct AI model inference efficiently, assuming computations' validity by default. This enables streamlined ML service execution. However, a crucial aspect of this approach is the interactive fraud-proof protocol. Through this mechanism, participants can submit proofs upon detecting erroneous computations, initiating a dispute resolution process on the Ethereum Virtual Machine (EVM) using verifiable fault proofs. This ensures decentralized and verifiable consensus for ML services, similar to optimistic rollup systems.

Neural’s Application of OPML

In contrast to ZKML, OPML offers significant advantages, including lower computational costs and higher efficiency. This makes it feasible to execute even large language models on standard hardware without GPUs, enhancing accessibility and enabling more versatile AI functionalities on the blockchain. Neural chain addresses this by employing on-chain optimistic interactive fraud proofs. Neural's machine learning models can be compiled to operate on a RISC V VM, and in the event of a dispute, the execution is bisected, with the disputed step executed in a smart contract on-chain. While this approach requires less memory than ZKML, it entails a longer wait time before confirming the machine learning output.

Dispute Mechanism and Dispute Resolution

To create a dispute mechanism and bisect it, the RISC V employed by Neural conducts this action within an emulator that is: self contained - meaning it is run in a standalone format separate from any other external computational influences; it is reproducible - meaning that multiple virtual machines perform the same computation and must always achieve the same outcomes; and, it is transparent - meaning that each RISC V is capable of being inspected for validity and the quality of each outcome. With OPML, dispute resolution is a small percentage of the overall computation conducted by the RISC-V; in this way, deAI running on Neural can run both on and off-chain, in a manner that provides limited impact to the blockchain while preserving security guarantees as though it is running natively as a smart contract.

How Neural’s RISC-V Machines Work

Neural’s RISC V machines are fully emulated computers residing on Neural’s blockchain. Upon initialization, the RISC V loads ROM and RAM images and a root file system, running a program to establish a machine organization similar to a Linux kernel.

The RISC V emulator operates in two modes: the first focuses on initializing and running a specific application until the virtual machine stops. Inputs and outputs for these applications can be mapped to virtual flash drives, with outputs available upon completion. The second mode allows an application to run in a loop with different inputs and outputs after each iteration. Inputs and responses are then sent to special or rollup memory ranges, allowing the RISC V emulator to operate similarly to a server, facilitating interaction with external elements. This mode is referred to as a "Rolling RISC V."

Last updated