Optimistic Machine Learning (OPML)
Last updated
Last updated
The Optimistic Machine Learning (OPML) framework connects off-chain machine learning computations with smart contracts. Results are provably correct and can be disputed on-chain to ensure trust and accountability, enabling efficient AI-driven decision-making in decentralized applications. OPML is a core component of the AI Oracle, playing a critical role in validating inference results.
Initiate Request: The user contract sends an inference request to AI Oracle by calling the requestCallback
function.
opML Request: AI Oracle creates an opML request based on the user contract request.
Event Emission: AI Oracle emits a requestCallback
event collected by the opML node.
ML Inference: The opML node performs the AI model computation.
Result Submission: The opML node uploads the result on-chain.
Callback Execution: The result is dispatched to the user's smart contract via a callback function.
Challenge Window: Begins after the result is submitted on-chain (step 5 above).
Verification: opML validators or any network participant can check the results and challenge the output if it is incorrect.
Result Update: If a challenge is successful, the incorrect result is updated on-chain.
Finality: After the challenge period, the result is finalized onchain and made immutable.