ZKML (part 2): How ZKML fit into theAIGC ownership issues

ZKML use case: ZKML AIGC-NFTs EIP-7007

Rootz Labs
Rootz Official Pub Hub
4 min readJul 5, 2023

--

This articles introduce the ZKML AIGC-NFTs EIP-7007 and its potential use cases. We also estimate its business values and some key gaps here.

Why we need the ZK-enabled AIGC NFTs?

We all know how AIGC is trending right now. Thousands of prompt and AIGC works are generated on a daily basis. We would expect a world of AIGC creation in the near future. At the current stage, most creation ownership is not a big things. However, with more valuable digital creators and their creation (writing, picture, 3D, videos…. all kinds of creation, even physical items combined with AI :P) appear with actual business values, we would face some challenges on ownership and privacy.

  • Since it’s easier to copy digital creation, how could the creator demonstrate their ownership? Especially for business users this is even more critical.
  • We hope to protect the privacy of the our prompt and don’t leak it to any individuals or entities. As long as people have our prompt, it would be easier to copy our creations.

Solutions from ZKML AIGC-NFTs EIP-7007

ZKML AIGC-NFTs EIP-7007 standard is an extension of the ERC-721 token standard for AI Generated Content.

The key idea here is to encourage users to propose novel prompts that can generate valuable AIGC, by issuing NFTs for each <prompt, aigc> pair to the user as an ownership claim.

The zkML AIGC-NFTs standard is an extension of the ERC-721 token standard for AI Generated Content.The standard includes a new mint event and a JSON schema for AIGC-NFT metadata. Additionally, it incorporates zkML capabilities to enable verification of AIGC-NFT ownership. In this standard, the tokenId is indexed by the prompt.

EIP-7007:

  • mint event and a mint function for minting AIGC-NFTs.
  • verify function to check the validity of a combination of prompt and proof using zkML techniques
  • The enumeration extension is OPTIONAL for EIP-7007 smart contracts. This allows your contract to publish its full list of mapping between tokenId and prompt and make them discoverable.

Components

  • Model owner/project owner: model owner would create the pre-trained model and ZKML prover. The owner also deploy ****verifier contract and AIGC-NFT Smart contract.
  • Users: Users would provide prompt to the ML model and get generated AIGC output. Users would get an NFT for their <prompt, aigc> pair to claim ownership.
  • ERC 7007 AIGC-NFT Smart Contract: Generate the nft for <prompt, aigc> pair
  • Verifier Smart Contract: contains ZK-proof verification logic. Given an inference task & its zk proof, return the verification bool result.

Workflow

Model Owner:

  1. Model owner/project owner create ML model and train it off-chain.
  2. Publish ML model and ZKML prover (created based on the model). Deploy the verifier contract
  3. Deploy ERC7007 compliant AIGC-NFT contract

Users:

  1. user propose the prompt of AIGC generating.
  2. user call AIGC-NFT Smart Contract to claim the prompt. This steps could be ignored but would bring risks to leak the prompt to model owner. The user sends to AIGC-NFT Smart Contract to claim the ownership of the prompt, and the model owner could only upload the aigc output and mint NFT for the user.
  3. Prompt is put in ML model to generate the output — AIGC File.
  4. ZKML Prover takes the output and generate zk-proof which contains prompt + AIGC output.
  5. User/model owner call AIGC-NFT Smart contract with prompt, AIGC output and Proof (If step 2 is token, the model owner could not upload prompt), to mint NFT after verifying the proof. The verification logic is implemented in verifier smart contract with view interface and is called to verify during the process.

Future potentials and key questions

Overall, this is a great proposal to protect user’s ownership and privacy. With the model trained and tested offline, it’s not as computation-heavy as other ZKML projects. When thinking about its future potentials from investment perspectives, we proposed some key questions to assess its future potentials —

  1. When the EIP could get passed and how’s the community’s reactions
  2. if there are any technical difficulties in deployment and implementation
  3. We need the actual project to work on it and gain support from the community
  4. Would AIGC becomes the mainstream in NFT art creation? Would AIGC have more use cases (especially business use cases) that cares about ownership and privacy?

--

--