Trusted Off-Chain Machine Learning Scheme Based on ZK -SNARK and Oracle
Abstract
Decentralized applications (Dapps), based on smart contract technology, have been increasingly applied in various fields such as healthcare, industrial IoT, agriculture, financial services, supply chain management, and insurance. In certain complex business scenarios, blockchain may require machine learning models to assist contract business. However, on-chain computations are often costly and slow, and there are limitations on contract size. Due to the transparency of on-chain data, there are also privacy concerns regarding user data during model training and inference. To address these challenges, we propose a trusted off-chain machine learning solution that integrates ZK-SNARK and Oracle technologies. Following the principle of “off-chain computation, on-chain verification”,our approach leverages ZK-SNARK to delegate the computation tasks of machine learning models to a trusted environment under the Oracle off-chain server. This solution significantly reduces the computational costs of the blockchain. User data and models are executed off-chain, effectively safeguarding user privacy. The execution results generate zero-knowledge proofs returned for on-chain verification. We have implemented TOMLS-ZKSO and conducted relevant experiments on insurance contract business on the Chainmaker. Experimental results demonstrate the effectiveness of our approach, with model proof generation taking approximately 0.4 seconds and Dapp response time around 0.52 seconds.
Community
0 commentsNo discussion yet
Be the first to share a question or observation.