OpML uses a multi-phase fault-proof to ensure the accuracy of machine learning results onchain. This mechanism is similar to experimental Canon Fault Proofs from the OP stack. Both technologies use a Fault Dispute Game to allow verifiers to resolve challenges on a game tree. Within this process, we aim to expand the merklized data on the OP stack FPVM to include the state transition in the opML Multi-Phase dispute game. By doing this, we aim to potentially achieve a unified framework capable of natively processing machine learning inferences onchain. By digging a bit deeper, we intend to find out if this framework’s implementation can help with the current specs or be an alternative version to the existing specs of FPVM.
The FPVM functions as a state transition system where a function maps a pre-state to a post-state () based on an executed instruction:
)
For integration:
Proposed Framework Modification: Introduce an additional layer that handles complex decision trees or neural network outputs, which adjusts how the state transitions are computed, especially in handling error states or exceptions.
Consider a modified state transition function where represents data or decisions derived from opML processes, impacting the transition to .
State Expansion: Define a new state component that includes neural network inference results, which influences the transition process, particularly in how exceptions are handled.
Given the detailed memory specifications:
Heap and Memory Operations: Analyze the implications of integrating a mechanism for handling large datasets required by machine learning models directly within the memory structure of FPVM.
Suppose is the memory utilization state function. Introduce to handle additional data structures or caching mechanisms to optimize ML data handling.
Quantify changes in memory access complexity and potential performance improvements using (Big O) notation or similar complexity measures.
The proposed framework could potentially extend the syscall
and I/O functionalities to better support ML-driven data processing:
syscalls
specific to ML operations, such as data batching or model loading.Given the complexity of ML integrations and the critical role of fault proofing:
Develop simulations that mimic real-world operational conditions to evaluate the effectiveness of the proposed modifications:
Will be sharing more low-level implementation details and arhcitecture has find out more on it.
Note: This is a High level overview of how opML's multi-phase fault-proof Mechanism can be potentially leveraged to implement fault-proof framework for Op chain or Optimistic rollups that use fault-proofs. Implementing this framework would give us possible trade-offs and performance gains compared to existing OP's canon fault-proof VM. This could potentially also be a turning point where something from ML world can actually help solving a Web3 world problem and not just another quest to find a problem for an existing solution.