Chapter 7.1: The World’s 1st On-Chain AI Artist

Modulus Labs
6 min readJul 31, 2023

--

This is Part 1 of a 2-part series on how we are using Ethereum to verify generative AI art models, thereby creating the world’s first zkGAN NFTs.

7.1 explores why this might be valuable, while 7.2 chronicles how we constructed the model and corresponding ZK circuits. Special thanks to Peiyuan Liao and the Polychain Monsters team.

They say an image is worth a thousand words.

Turns out, it’s actually worth ~1,500 lines of code, ~300,000 constraints, 300,000 gas, as well as… hm. I see… saying all that would probably use up most of the thousand words.

But yes, it’s finally here — we’re excited to announce that we’re bringing generative models to the chain!

Meet “zkMon”: the world’s 1st “zero-knowledge proven Generative Adversarial Network” NFT collection

Bring home your very own “cryptographically authenticated AI monster”!

You read that right. The zkMon model was carefully crafted with the Polychain Monsters team to bring you 8 adorable animal types — pixelated squirrels, maine coons, dragons, and more!!

Behind the scenes, the artist hard at work on their magnum opus is a highly modified SN-GAN that’s been hand-tuned and zk-circuitized to pixelart perfection. Which begs the question… why?

After all, people have been turning generative AI art into NFTs for ages — why go through the trouble of verifying the underlying model itself?

zkMon completes the promise of NFTs by extending blockchain provenance to the art generation process itself

It’s a good question. And one that touches the very core of what makes NFTs valuable in the first place.

TLDR: NFTs rely on the cryptographic security of public blockchain networks for properties like traceable provenance and ownership. This is what gives us the ability to “own” digital data, and by extension, gives them value.

When it comes to AI generated art, however, the full extent of the provenance paradigm is currently unfulfilled. Until zkMon, AI art must have been created fully off-chain, then brought on-chain manually — despite the art generation process being digitally native. This means that, until now, outputs generated from an AI artist could never have been cryptographically linked to that original art model.

zkMon completes the NFT promise for AI art by “bringing the AI artist on-chain,” thereby giving the creation process itself cryptographic traceability, auditability, and as a consequence, complete provenance (of both ownership and asset). Using ZKPs, the zkMon AI model is now able to sign and authenticate every single piece of the collection directly on Ethereum! This gives owners a cryptographic guarantee that the zkMon they purchased must’ve come from the original Polychain Monsters art model.

Last note before we get into the protein — we’re gonna save all the glorious technical details of zkMon for part 2 (Chapter 7.2, releasing soon). Today, we are laser-focused on the potential value-add of verifiable compute for AI art alone.

Spot the Difference: Authenticity Unpacked

Let’s play a quick game — spot the difference:

The real “Girl With A Pearl Earring” is on the right. Or is it ;)

If your answer is that the one on the right is the priceless original, while the other, a counterfeit… well… we should go to Vegas.

And yet, they look nearly identical. What’s to prove that one was actually Johannes’s OG painting of his high school crush?

Thankfully, in the real world, we have forgery detectives. These diligent investigators carbon date paint-strokes and examine signatures under UV. It’s honestly very cool.

But what if the artist didn’t use paint strokes? And what if their signatures are easy to fake?

Hard to argue against mathematical guarantees!

Those in the NFT world already know where we’re headed. NFTs are the answer to digital authenticity.

Using public blockchain and its underlying cryptographic architecture as the ultimate record-keeper, we’re able to trace otherwise arbitrary packets of bytes through time. This gives the previously ethereal realm of digital information the crucial properties of uniqueness and traceable ownership provenance. That, in turn, enables the notion of scarcity, since digital goods are now distinct (both in digital ID and ownership provenance) and verifiably genuine.

It’s subtle but really, really important. This scarcity and our common confidence in a digital ground truth is precisely what allows us to “own” digital assets (curious to learn more? Jesse at Variant knocks it out of the park here).

Your move, girly with the pearly.

Scarcity, Meet Infinite Expressivity

Here’s a potentially obvious detail: traceable provenance only pertains to transactions on blockchains. In other words, each time NFTs have to rely on off-chain input or dependencies, those portions are suspect to manipulation or failure.

For many types of assets, there currently exists no robust way to address this issue (see: the oracle problem). After all, a conventional drawing ought to be created “off-chain”, before being manually brought into the blockchain environment through the minting process.

But the AI generation process is… digitally native. From training to inference, there is no conceptual reason that the AI model itself cannot enjoy the benefits of having every one of its operations run on-chain — including superpowers like verifiable asset provenance (i.e. this output actually came from that model) or provable attribution and ownership.

This opens the door to truly decentralized, autonomous artists, as well as more egalitarian structures for acknowledgment/attribution and compensation for AI-generated results. From prompting to auditing, powering DAOs to building AI-native economies, the experiment is really only just beginning.

Using ZK, we’re giving the AI process all the attributes we love about the chain

To be clear, this is a capability that has never existed before — the computational overhead of using blockchain networks has previously rendered “on-chain” AI all but impossible. The AI artist may as well be printing out their creations on canvas, relying on us to manually scan and mint the outputs on-chain.

Dot. Dot. Dot.

Does This Matter?

Maybe.

Seriously! In some sense, it seems obvious that asset provenance for AI outputs should be valuable. After all, it would make AI management, ownership, and distribution far more elegant, egalitarian, and most crucial of all, more robust + autonomous (anyone can now participate and support the zkMon ecosystem — it has all the essential ingredients to run/fork/extend eternally).

And yet, do people care? The NFT paradigm seems to work just fine with compromises to the cryptographic promise of blockchains (e.g. IPFS image storage). Will the fact that AI art is now verifiably authentic actually move the needle?

Will people care that the AI artists are now “on-chain”?

Early epochs of the zkMon StyleGAN during training

We’ll see. Regardless of whether zkMon engenders any interest in the broader market, however, the fact remains that we are nonetheless opening the doors to a new world. A world where, thanks to blockchain-based accountability, AI models can power robust new engines of creativity and organization.

For the Modulus team, it’s well worth the experiment. And we’re so thrilled that we’ve found like-minded collaborators in the Polychain Monsters team.

If that world seems interesting to you, feel free to support our journey by checking out the collection (dropping soon! Follow along on Twitter). And if you’re curious how we were able to bring SN-GAN and 1,000 AI outputs to Ethereum, make sure to check out “Chapter 7.2: The World’s 1st zkGAN NFTs” releasing soon.

--

--