Main Topic: The intersection of AI and crypto, exploring how these two emerging technologies oppose and augment each other.
Key Points:
Participants:
Takeaways:
Key Takeaways for Builders:
with @alive_eth @danboneh @smc90
This week's all-new episode covers the convergence of two important, very top-of-mind trends: AI (artificial intelligence) & blockchains/ crypto. These domains together have major implications for how we all live our lives everyday; so this episode is for anyone just curious about, or already building in the space.
The conversation covers topics ranging from deep fakes, bots, and the need for proof-of-humanity in a world of AI; to big data, large language models like ChatGPT, user control, governance, privacy and security, zero knowledge and zkML; to MEV, media, art, and much more. Our expert guests (in conversation with host Sonal Chokshi) include:
The first half of the hallway-style conversation between Ali & Dan (who go back together as student and professor at Stanford) is all about how AI could benefit from crypto, and the second half on how crypto could benefit from AI... the thread throughout is the tension between centralization vs. decentralization. So we also discuss where the intersection of crypto and AI can bring about things that aren't possible by either one of them alone...
pieces referenced in this episode/ related reading:
As a reminder: none of the following should be taken as investment, legal, business, or tax advice; please see a16z.com/disclosures for more important information -- including to a link to a list of our investments – especially since we are investors in companies mentioned in this episode.
Stay Updated:
Find a16z on Twitter: https://twitter.com/a16z
Find a16z on LinkedIn: https://www.linkedin.com/company/a16z
Subscribe on your favorite podcast app: https://a16z.simplecast.com/
Follow our host: https://twitter.com/stephsmithio
Please note that the content here is for informational purposes only; should NOT be taken as legal, business, tax, or investment advice or be used to evaluate any investment or security; and is not directed at any investors or potential investors in any a16z fund. a16z and its affiliates may maintain investments in the companies discussed. For more details please see a16z.com/disclosures.
Stay Updated:
Find a16z on X
Find a16z on LinkedIn
Listen to the a16z Podcast on Spotify
Listen to the a16z Podcast on Apple Podcasts
Follow our host: https://twitter.com/eriktorenberg
Please note that the content here is for informational purposes only; should NOT be taken as legal, business, tax, or investment advice or be used to evaluate any investment or security; and is not directed at any investors or potential investors in any a16z fund. a16z and its affiliates may maintain investments in the companies discussed. For more details please see a16z.com/disclosures.
Hosted by Simplecast, an AdsWizz company. See pcm.adswizz.com for information about our collection and use of personal data for advertising.
Ali Yaya
AI is very much a technology that thrives and enables top-down centralized control, whereas crypto is a technology that's all about bottom-up decentralized cooperation.
Dan Boneh
One of the points of NFTs was to support the artists. Yes. But if the artists themselves are now machine learning models, then who exactly are we supporting?
Ali Yaya
One of the things that will become important in a world where anyone can participate online is to be able to prove that you are human for various different purposes.
Dan Boneh
If we're going to incentivize people to contribute data, basically we're going to incentivize people to create fake data so they can get paid. So we have to have some sort of a mechanism to make sure that the data you're contributing is authentic.
Steph Smith
Hello everyone and welcome back to the A16Z podcast. This is your host Steph Smith, but today I'm passing the baton back to longtime host Sonal Choksi. This, of course, is also a crossover episode from our sister podcast, Web3 with A16Z, which Sonal now hosts. There are few technologies over the last few years that have quite captured the zeitgeist like crypto and AI. So in today's episode, Sonal sits down with guests Ali Yaya and Dan Boneh to explore the ways in which these two emerging technologies oppose, yet also beautifully augment one another. They attack this from both directions: how crypto can help AI, like how crypto acts as a decentralizing counterweight to the somewhat centralizing force where AI models with more data, more compute, and more complex models do tend to win. But also how AI can help crypto. For example, are we at the point where LLMs should be writing smart contract code? And what about all these deepfakes we keep hearing about? Let's find out.
Sonal Choksi
Welcome to Web3 with A16Z, a show about building the next generation of the internet from the team at A16Z Crypto. That includes me, your host, Sonal Choksi. Today's all-new episode covers the convergence of two important top-of-mind trends: AI, artificial intelligence, and crypto. This has major implications for how we all live our lives every day, so this episode is for anyone just curious about or already building in the space.
Our special guests today are Dan Boneh, Stanford professor and senior research advisor at A16Z Crypto. He's a cryptographer who's been working on blockchains for over a decade. The topics have a strong intersection between cryptography, computer security, and machine learning, all of which are his areas of expertise. And then we also have Ali Yaya, general partner at A16Z Crypto, who also worked at Google previously, where he not only worked on a distributed system for robotics — more specifically, a sort of collective reinforcement learning, which involved training a single neural network that contributed to the actions of an entire fleet of robots — but also worked on Google Brain, where he was one of the core contributors to the machine learning library TensorFlow.
Dan and Ali go back since Ali was an undergrad and master's student at Stanford. So this conversation is really more of a hallway jam between them that I asked to join. We cover everything from deep fakes and bots to proof of humanity in a world of AI and much, much more. The first half is all about how AI could benefit from crypto and the second half on how crypto could benefit from AI. The thread throughout is the tension between centralization versus decentralization.
As a reminder, none of the following should be taken as investment, legal, business, or tax advice. Please see A16Z.com slash disclosures for more important information, including a link to a list of our investments, especially since we are investors in companies mentioned in this episode. But first, we begin with how the two worlds intersect with a quick sharing of areas or visions that they're excited about. The first voice you'll hear is Ali's.
Ali Yaya
There is a really good sci-fi novel called *The Diamond Age* by Neal Stephenson, in which there is this device known as the Illustrated Primer — a kind of artificially intelligent device that acts as your mentor and your teacher throughout life. When you're born, you're paired to an AI essentially that knows you really well, learns your preferences, follows you throughout life, and helps you make decisions and steers you in the right direction.
There's a sci-fi future in which you could build such an AI, but you very much wouldn't want that AI to be controlled by a monopolistic tech giant in the middle, because that position would provide that company with a great deal of control and raise questions of privacy and sovereignty. You'd want to have control over it. Also, what if the company goes away, or they change the rules, or they change the pricing? It would be great if you could build an AI that could run for a very long time, get to know you over the course of a lifetime, but have that really be yours.
There is this vision in which you could do that with a blockchain. You could embed an AI within a smart contract. With the power of zero-knowledge proofs, you could also keep your data private. Over the course of decades, this AI can become smarter and can help you. You have the option to do whatever you want with it, change it in whichever way you want, or shut it down. That's an interesting vision for long-running AIs that are continually evolving and continually becoming better. It would be better if they weren't just controlled by a single centralized company.
Of course, it's a very science fiction idea because there are lots of problems, including the problems of verification and the problems of keeping data private using cryptography and still being able to compute on top of that data, maybe with fully homomorphic encryption. All of these problems continue to be outstanding, but it's not something that's inconceivable.
Sonal Choksi
Well, I love Ali's vision there.
Dan Boneh
I love it too, especially given that quote. I think it was Asimov that said today's science fiction is tomorrow's science fact.
Sonal Choksi
Ali, I know you have a meta framework for thinking about all this stuff that I've heard you share before. Can you share that now too?
Ali Yaya
Yeah, there is this broader narrative that has existed for quite some time now that's only becoming much more accentuated with the development of things like LLMs.
Sonal Choksi
Define that really quickly, just for listeners who aren't already familiar, just as context.
Ali Yaya
LLM stands for large language model. It uses some of the technology that was developed at Google back in 2017. There's this famous paper known as "Attention is All You Need" — that was the title of the paper. It outlined what are now known as transformers. That's the basis of some of the new models that people have been training these days, including ChatGPT and so on. All of these are large language models or LLMs.
There was that famous 2018 line from Peter Thiel that "AI is communist and crypto is libertarian." That line is very on point, actually, because AI and crypto in many ways are natural counterweights for one another. Maybe we can go deep over the course of the podcast into each one of these as we go through examples. There are four major ways in which that's true.
The first is that AI is very much a technology that thrives and enables top-down centralized control, whereas crypto is a technology that's all about bottom-up decentralized cooperation. In many ways, you can think of crypto as the study of building systems that are decentralized, that enable large-scale cooperation of humans, where there isn't any central point of control. That's one natural way in which these two technologies are counterweights for one another.
Another one is that AI is a sustaining innovation in that it reinforces the business models of existing technology companies because it helps them make top-down decisions. The best example would be Google being able to decide exactly what ad to display for each of their users across billions of users and billions of page views. Crypto is a fundamentally disruptive innovation in that it has a business model that's fundamentally at odds with the business models of big tech companies. As a result, it's a movement spearheaded by rebels, by the fringes, as opposed to being led by the incumbents. That's the second.
A third one is that AI will probably relate and interplay a lot with all of the trends towards privacy. AI as a technology has built-in incentives that move us towards less individual privacy. Companies will want access to all of our data. AI models trained on more and more data will become more and more effective. I think that leads us down a path of the AI panopticon, where there's collective aggregation of everyone's data into the training of enormous models to make these models as good as possible. Crypto moves us towards the opposite direction — a direction of increasing individual privacy, increasing sovereignty where users have control over their own data. Those two trends will be very important. This is just another important way in which crypto is the counterweight for AI.
Maybe the final one has to do with this latest trend in AI: the fact that AI is now very clearly a powerful technology for generating new art. It's a creative tool that will lead us to infinite abundance of media, infinite creativity in many ways. Crypto is a counterweight to that because it helps us cut through all of the abundance and distinguish what's created by humans versus what's created by AI. Cryptography will be an essential part of maintaining and preserving what actually is human in a world where a thousand times more of the content is artificially generated. These are all things we can talk about. There is this important meta narrative, and these two technologies are very much diametrically opposing in many respects.
Dan Boneh
Ali, to add to that, this is a wonderful summary. I would say there are also a lot of areas where techniques from AI are having an impact in blockchains, and vice versa, where techniques from blockchains are having an impact in AI. I'll give a brief answer here because we're going to dive into the details in just a minute. There are many points of intersection. We'll talk about applications of zero knowledge from machine learning in just a minute. I also want to touch on all these applications where machine learning itself can be used to write code. For example, machine learning can be used to write Solidity code that goes into a contract. It can be used to find errors in codes and so on. There are points of intersection where machine learning can be used to generate deepfakes, and blockchains can actually help to protect against deepfakes. We're going to touch on all these points. The interesting thing is that there's really quite a lot of intersection between blockchains and machine learning.
Sonal Choksi
Before we dive into those, one question I have for you, Dan: Do you agree with that? I definitely hear Ali's point that AI and crypto are very natural complements, or counterweights really, for each other. They can be different forces that can check and balance each other almost. But is this an inherent quality to AI and crypto, in your opinion? Or is this just an artifact of the way things are done right now? What parts might you agree or disagree with?
Dan Boneh
If you look at it from far away, the techniques that are used in AI seem very different from the techniques that are used in blockchains. Blockchains are about cryptography, decentralization, finance and economics, and so on. AI is about the statistics, the mathematics of machine learning, and so on. It's about big data. The techniques actually look quite different. But there are actually a lot of places where one side can help the other and vice versa.
Maybe the first one to start with is the obvious one that's been on a lot of people's minds: what's called the applications of zero knowledge for machine learning. This is an emerging area called ZKML. The reason this has become interesting is because ZK techniques have improved dramatically because of their application in blockchains. What's happened over the last 10 years is sort of unbelievable. It's something that we don't see very often. This idea of zero-knowledge proofs and proof systems in general were considered very theoretical a decade ago. Because of all of their applications in blockchains, all of a sudden there was a lot of effort in making them more practical and real world. As a result, there's been tremendous progress. As our listeners know, these things are now actually deployed and used to protect real systems.
The question then is: can zero-knowledge techniques be used to help machine learning? There are a couple of examples. Honestly, we could spend the whole podcast just on ZKML. But maybe I can give a taste, one or two examples where ZK is useful for machine learning. Imagine Alice has a secret model that she spent a lot of time training. That model is very important to her. It's very important that people don't know how the model works. But she still wants to be able to service requests from Bob. Bob would like to send her some data. She would apply the model to the data, send the result back to Bob. Bob has no idea whether he's getting the correct results from the model. Maybe he paid for a certain model and he wants to make sure Alice is really using that model. Maybe he paid for GPT-4 and he wants to make sure Alice is really using GPT-4 and not GPT-3.
It turns out ZK techniques can help here a lot. What Alice would do: she would commit to her model, make the commitment publicly available. Then whenever Bob submits a piece of data, Alice could run the model on that data, send the results back to Bob, along with a proof that the model was evaluated correctly. Bob would have a guarantee that the model that was committed to is the one that was run on Bob's data. That's an example where ZK techniques can be useful in the ML case.
I want to stress why this is so important. Let's look at one example. Suppose we have a function, a model that's actually used to affect people's lives. Imagine we use a model to decide whether we grant a loan or grant a mortgage. A financial institution might want to use a model like that. You want to make sure that the same model is being applied to everyone — that it's not the case that one model is being applied to me and a different model is being applied to you. By having the bank commit to the model, and then everyone can verify that their data is being assessed by the same committed model, we can make sure that the same model is being applied to everyone.
I have to say there's a wonderful open problem here. Even though zero-knowledge techniques can make sure that the same model is being applied to everyone, there is this question: is the model fair? Models can have biases, could lead to unfair results. There's a whole area of research called algorithmic fairness with many, many papers. It's really interesting to ask: now that we have a committed model, can we prove in zero knowledge that the model satisfies some fairness definition from the area of algorithmic fairness? And how do we make sure that the training process ran correctly?
Ali Yaya
Everything that you said about ZKML is extremely exciting. As a technology, I think it'll play a role in making machine learning and AI generally more transparent and more trustworthy, both within the context of crypto and outside of it. I think an even crazier, longer-term, and more ambitious application of ZKML and some of the other verification techniques that the crypto community has been working on is just generally decentralizing AI.
As we were talking about before, AI is a technology that is almost inherently centralizing. It very much thrives from scale effects because having things within a data center makes things more efficient. Scaling things in a centralized way makes things more powerful and more centralized as a result. Data is usually controlled by a small number of tech companies in the middle, which also leads to additional centralization. Machine learning models and machine learning talent are also controlled by a small number of players. Crypto can help on this front by building technology using things like ZKML that can help us decentralize AI.
There are three main things that go into AI. There's the compute aspect, which requires large-scale use of GPUs, usually in data centers. There's the data piece, which again most of the centralized companies control. And then there are the machine learning models themselves. The easiest one might be the prong of compute. Can you actually decentralize the compute for the training and the inference of machine learning models? This is where some of the techniques Dan was talking about come in — things like zero-knowledge proofs that you can use to prove that the process of conducting inference or training a model was actually done correctly. You can outsource that process to a large community and have a distributed process by which anyone who has a GPU can contribute computation to the network. A model can be trained in that way without necessarily having to rely on a massive data center with all of the GPUs in a centralized manner.
There's a big question of whether or not that economically ends up making sense. But at the very least, through the right incentives, you can tap into the long tail. You can tap into all of the idle GPU capacity that might exist, have all of those people contribute that computation to the training of a model or to the running of inference, and provide an alternative to what otherwise would be just the big tech companies in the middle that currently control everything.
There are all sorts of important technical problems that would have to be solved for that to be possible. There's actually a company in the space called Gensyn, which is building exactly this. They are building a decentralized marketplace for GPU compute, very much for the purpose of training machine learning models. It's a marketplace where anyone can contribute their GPU compute, whether it be in their personal computer under their desk or idle inside of some data center. On the other side, anyone can leverage whatever compute exists in the network to train their large machine learning models. This would be an alternative to the very centralized OpenAI, Google, Meta, or insert your favorite big tech company alternative that you would necessarily have to go with.
Sonal Choksi
Before we go into more of the decentralization framework — because Ali, you were breaking down compute, and I think you were going to share the other two of the three prongs — both of you talked a little bit about all the technical challenges here. What are some of the technical challenges that need to be overcome here that people may or may not already be solving? I definitely want builders who listen to this episode to also think about what the opportunities are in this space and address existing challenges, or what are some of the challenges they're going to face in building solutions here.
Dan Boneh
Maybe I can mention two that I think would be interesting to folks. One is: imagine you have a situation where Alice has a model that she wants to protect. She wants to send the model in an encrypted form to some other party, let's say to Bob. Bob now receives an encrypted model and needs to be able to run his data on this encrypted model. How do you do that? If you have a piece of data that you want to run on a model, but you only have the encryption of the model, how do you make that possible? That is something we would use what's called fully homomorphic encryption for.
Fully homomorphic encryption is this remarkable tool that allows you to compute on encrypted data. This is mind-boggling that this is possible. You can have an encrypted model and you might have some cleartext data, and you can actually run the encrypted model on the cleartext data and receive an encrypted result. You would send the encrypted results back to Alice, and she would be able to decrypt and see the results in the clear. This is something that's already in demand in practice. It doesn't take much effort to see that the DoD is interested in this. There are many other applications where you can send an encrypted model to a third party, the third party runs the encrypted model on data, sends you back the results, and you can decrypt and learn something about the data that was given as input to the encrypted model.
The question is how do we scale that up? Right now, this works well for medium-sized models. The question is: can we scale it up to much larger models? This is quite a challenge. A couple of startups in the space. It's kind of amazing that this is possible at all. We're probably going to see much more of that in the future.
The other area is what Ali mentioned: how do we know that the model was trained correctly? If I send my data to someone and I ask them to train a model on their data, maybe fine-tune the model on that data, how do I know that they did that correctly? They might send me a model back, but how do I know that the model doesn't have backdoors in it? There's a fair amount of work showing that if the training is done incorrectly, I could send you back a model that would work correctly on all your test data, but it has a backdoor — meaning it would fail catastrophically on one particular input. This is possible if your training process is not verified.
Again, this is an area where ZKML comes in. We can prove to you that the training ran correctly, or maybe there are some other techniques that might be possible to prove that the training was done correctly. This is another area and a very active area of research. I would encourage many of the listeners — this is a very, very difficult problem: proving that training was done correctly, proving that the training data even was collected correctly and was filtered correctly, and so on. That is a wonderful area to get into if people are looking to do more work in the space.
Sonal Choksi
Fantastic. Ali, is there anything you'd add to that?
Ali Yaya
Definitely. If we continue down the path of talking about what it would take to help decentralize the AI stack — if we wanted to decentralize the compute aspect — there are two very important open technical challenges. The first is the problem of verification, which Dan just mentioned, which you could use ZKML for. You can ideally over time use zero-knowledge proofs to prove that the actual work that the people who are contributing to this network was actually done correctly. The challenge there is that the performance of these cryptographic primitives is nowhere near where it needs to be to be able to do either training or inference of the very, very large models.
The models today, like the LLMs that we all kind of know and love now, like ChatGPT, would not be provable using the current state of the art of ZKML. There's a lot of work being done towards improving the performance of the proving process so that you can prove larger and larger workloads efficiently. That's an open problem that a lot of people are working on. In the meantime, companies like Gensyn are using other techniques that are not just cryptographic and instead are game theoretic in nature. They get a larger number of people who are independent from one another to do the work and compare their work with one another to make sure that the work is done correctly. That is more of a game-theoretic optimistic approach that is not relying on cryptography but is still aligned with this greater goal of decentralizing AI — helping create an ecosystem for AI that is much more organic, community-owned, and bottom-up, as opposed to the top-down approach being put forth by companies like OpenAI.
That's the first problem: the problem of verification. The second big one is the problem of distributed systems. How do you actually coordinate a large community of people who are contributing GPUs to a network such that it all feels like an integrated, unified substrate for computation? There will be lots of interesting challenges: breaking up a machine learning workload in a way that makes sense, shipping off different pieces of it to different nodes in the network, figuring out how to do all of that efficiently. When nodes fail, figuring out how to recover and assign new nodes to take over whatever work was being done by the node that failed. There are lots of messy details at the distributed systems level that companies will have to solve in order to give us this decentralized network that can perform machine learning workloads in a way that's perhaps even cheaper than just using the cloud.
Dan Boneh
It's definitely true that the ZK techniques today will handle the smaller models that are being used, but definitely the LLMs are probably too big for these techniques to handle today. But they're constantly getting better. The hardware is getting better. Hopefully they'll catch up.
Sonal Choksi
Before we go on, can we do a really clear pulse check on where we are exactly? What I'm hearing you guys say is that there are tremendous applications at the intersection of general verifiable computing, which blockchains and crypto have definitely been significantly advancing and accelerating. We've been covering a ton of it ourselves. If you look at our ZK Canon and zero-knowledge category, you'll see so much of this covered there. But where are we exactly right now in terms of what they can do? You talked a lot about what they can't do yet and what the opportunity is, which is exciting. But where are we right now? What can they actually do?
Dan Boneh
Right now, they can basically do classification for medium-sized models. Not something as big as GPT-3 or 4, but medium-sized models. It is possible to prove that the classification was done correctly. Training is probably beyond what can be done right now, just because training is so compute-intensive that for proof systems, we're not there yet. But like Ali said, we have other ways to do it. For example, we can have multiple people do the training and then compare the results. There are game theoretic incentives for people not to cheat. If somebody cheats, somebody else might be able to complain that they computed the training incorrectly. Whoever cheated will not be paid for their effort. There's an incentive for people to actually run the training the way it was supposed to run.
Sonal Choksi
So that's sort of not like a hybrid phase, but it's basically alt approaches until more of this comes to scale and performance is scaled to a point where we can get there.
Dan Boneh
I would say that for some models, classification can be proved in zero knowledge today. For training right now, we have to rely on optimistic techniques.
Sonal Choksi
Great. So Ali, you mentioned compute is one of the three prongs. You also mentioned data and then the models for machine learning themselves. Do you want to tackle now data and the opportunities and challenges there when it comes to the crypto and AI intersection?
Ali Yaya
Yeah, absolutely. So I think that there is an opportunity, even though the problems involved are very difficult, to both decentralize the process of sourcing data for training of large machine learning models from a broader community. Again, instead of having a single centralized player just collect all of the data and then train the models themselves.
This could work by creating a kind of marketplace that's similar to the one we just described for compute, but instead incentivize people to contribute new data to some big data set that then gets used to train a model. The difficulty with this is similar in that there's a verification challenge. You have to somehow verify that the data people are contributing is actually good data and that it's not either duplicate data or garbage data that was just randomly generated or not real in some way.
You also have to make sure the data doesn't somehow subvert the model in some kind of poisoning attack where the model becomes either backdoored or just less performant than it used to be. So there's the question of how do you verify that? That's maybe an open hard problem for the community to solve. It may be impossible to solve completely. You might have to rely on a combination of technological solutions with social solutions, where you also have some kind of reputation metric that members in the community can earn to build up credibility, such that when they contribute data, the data can then be trusted a little bit more than it would be otherwise.
But what this might allow you to do is truly cover the very, very long tail of the data distribution. One of the things that's very challenging in machine learning is that your model is really only as good as the coverage of the distribution that your training data set can achieve. If there are inputs that are far, far out of the distribution of the training data, then your model might behave in a way that's completely unpredictable.
In order to get the model to perform well in the edge cases and the black swan data points you might experience in the real world, you do want your data set to be as comprehensive as possible. If you had this kind of open decentralized marketplace for the contribution of data to a data set, you could have anyone who has very unique data out in the world contribute that data to the network. This is a better way to do it because if you try to do this as a central company, you have no way of knowing who has that data. If you flip it around and create an incentive for those people to come forward and provide that data on their own accord, then you can actually get significantly better coverage of the long tail.
As we've seen, the performance of machine learning models continues to improve as the data set grows and as the diversity of the data points grows. This can actually supercharge the performance of our machine learning models to an even greater degree, allowing us to get even more comprehensive data sets that cover the whole distribution.
Sonal Choksi
So let me turn this on its head. If we're going to incentivize people to contribute data, basically we're going to incentivize people to create fake data so they can get paid. So we have to have some sort of a mechanism to make sure that the data you're contributing is authentic.
Ali Yaya
Exactly. You can imagine a couple of ways of doing this. One way is actually by relying on trusted hardware. Maybe the sensors themselves are embedded in some trusted hardware that we would only trust data that's properly signed by the hardware. That's one way to do things. Otherwise, we would have to have some other mechanism by which we can tell whether the data is authentic or not.
Dan Boneh
Completely agree. That'd be the biggest open problem to solve. I think that as benchmarking for machine learning models gets better, there are two important trends in machine learning at the moment. There's improving the measurement of the performance of a machine learning model. For LLMs, that's still very much in its early stages. It's actually quite hard to know how good an LLM is because it's not like a classifier where the performance is very clearly defined. With an LLM, it's almost as if you're testing the intelligence of a human. Coming up with the right way of testing how intelligent an LLM like ChatGPT is, is an open area of research. But over time, I think that'll become better and better.
The other trend is that we're getting better at being able to explain how a model works. With both of those things, at some point, it might become feasible to understand the effect that a data set has on a machine learning model's performance. If we can have a good understanding of whether or not a data set that was contributed by a third party helped the machine learning model's performance, then we can reward that contribution and create the incentive for that marketplace to exist.
Sonal Choksi
So just to summarize so far, what I heard you guys say is that there's trusted hardware that can help check the accuracy of the data being contributed and the models being contributed. Ali, you mentioned briefly reputation metrics and that type of thing can help. You also mentioned that there might be a way, not necessarily now, but sometime in the near future, to check how the data is influencing the outcomes in a particular model so that you can actually attribute that this data set caused this particular effect. So there's a range of various techniques you guys have shared so far.
Ali Yaya
Well, the final thing is that you could do the same thing for the third prong, which is models. Imagine if you could create an open marketplace for people to contribute a trained model that is able to solve a particular kind of problem. Imagine if on Ethereum, you created a smart contract that embedded some kind of test, be it a cognitive test that an LLM could solve or some classification test that a classifier model could solve. If using ZKML someone could provide a model alongside a proof that that model can solve that test, then you again have the tools you need to create a marketplace that incentivizes people to contribute machine learning models that can solve certain problems.
Many of the open problems we've discussed on how to do that are also present here. In particular, there's a ZKML piece where you have to be able to prove that the model is actually doing the work it's claiming to do. We also need to be able to have good tests of how good a model is. Being able to embed a test inside of a smart contract that you can then subject a machine learning model to, to evaluate how good it is, is another very nascent part of this whole technology trend.
But in theory, it'd be great if we eventually get to a world where we have these very open, bottom-up, transparent marketplaces that allow people to contribute and source compute, data, and machine learning models. These would essentially act as a counterweight to the very centralized, enormous tech companies that are driving all of the AI work today.
Sonal Choksi
I really love that you mentioned that, Ali, because it's been a longstanding problem in AI in practice that it can solve a lot of things for the bell curve, the middle of the norm, but not the tail ends. A classic example of this is self-driving cars. You can do everything with a certain amount of standard behaviors, but it's the edge cases where the real accidents and catastrophic things can happen. So that was super helpful.
I know you talked about some of the incentive alignment and incentives for providing accurate and quality data, and even incentives for just contributing anything in the long tail of data overall. But on the long tail side, a quick question popped up for me when you were talking. It sort of begs the question of who makes money where in this system? I could not help but wonder, where does the business model come in for companies? Because I always understood that in the long tail of AI, in a world of available data sets, your proprietary data is actually your unique domain knowledge and the thing that only you know in that long tail. Do you guys have any quick responses to that?
Ali Yaya
I think that the vision behind crypto intersecting with AI is that you could create a set of protocols that distributes the value that will eventually be captured by this new technology, by AI, amongst a much larger group of people. Essentially a community of people, all of whom can contribute and all of whom can take part of the upside of this new technology. The people who would be making money would be the people who are contributing compute, or the people who are contributing data, or the people who are contributing new machine learning models to the network so that better machine learning models can be trained and bigger, more important problems can be solved.
The other people making money at the same time are the people on the demand side of this network. People who are using this as infrastructure for training their own machine learning models. Maybe their model does something interesting in the world. Maybe it's the next generation of ChatGPT. That then goes on to make its way into a bunch of different applications, like enterprise applications or whatever those models may be used for. Those models drive value capture in their own right because those companies will have a business model of their own.
Finally, the people who might also make money are the people who build this network. For example, create a token for the network. That token will be distributed to the community. All of those people will have collective ownership over this decentralized network for compute, data, and models that may also capture some value of all the economic activity that goes through this network. You can imagine any payment for compute, data, or models could have some fee imparted on it. That fee might go to some treasury controlled by this decentralized network that all token holders have collective ownership and access to, as well as the creators and owners of the marketplace.
So you can imagine that every transaction that goes through this network, every form of payment that pays for compute, data, or models, might have some fee imparted on it that goes to some treasury controlled by the whole network and by the token holders that collectively own the network. That's essentially a business model for the network itself.
Sonal Choksi
Great. So far we've been talking a lot about the way that crypto can help AI. To be clear, it's not unidirectional. These things are reinforcing and bidirectional and more interactive than one way. But for the purpose of this discussion, we've been talking about how crypto can help AI. Let's now turn it on its head and talk a little bit more about ways that AI can help crypto.
Dan Boneh
Yeah, so there are a couple of interesting touch points there. One that's worth bringing up is this idea of machine learning models used to generate code. Many listeners have probably heard of Copilot, which is a tool used to generate code. What's interesting is you can try to use these code generation tools to write Solidity contracts or to write cryptography code. I want to stress that this is actually a very dangerous thing to do.
Sonal Choksi
Oh, do not do this at home.
Dan Boneh
Yeah, do not try this at home. What happens is very often these systems will generate code that works. When you try to run it, encryption is the opposite of decryption and so on. The code will actually work, but it will actually be insecure. We've written a paper about this recently that shows that if you try to get a co-pilot to write something as simple as an encryption function, it will give you something that does encryption correctly, but it uses an incorrect mode of operation. You'll end up with an insecure encryption mode.
Similarly, if you try to get it to generate Solidity code, you might end up with Solidity code that works, but it will have vulnerabilities in it. You might wonder why that happens. One of the reasons is because these models are basically trained on code that's out there. They're trained on GitHub repositories. A lot of the GitHub repositories actually are vulnerable to all sorts of attacks. These models learn about code that works, but not code that is secure. It's almost like garbage in, garbage out. I do want to make sure people are very careful when they use these generative models to generate code, that they very carefully check that the code actually does what it's supposed to do and that it does it securely.
Ali Yaya
One idea on that front, I'm curious what you think about this, is that you can use AI models like LLMs or ChatGPT to generate code in conjunction with other tools to try to make the process less error prone. One idea would be to use an LLM to generate a spec for a formal verification system. Basically you describe your program in English and you ask the LLM to generate a spec for a formal verification tool. Then you ask the same instance of the LLM to generate the program that meets that spec. Then you use a formal verification tool to see whether the program actually meets the spec.
If there are errors, that tool will catch the errors. Those errors can then be used as feedback back to the LLM. Then hopefully the LLM can revise its work and produce another version of the code that is correct. If you do this again and again, you end up with a piece of code that ideally fully meets the spec and is formally verified to meet the spec. Because the spec is maybe readable by a human, you can go through the spec and see, yes, this is the program I intended to write. That could be a pretty good way to use LLMs to write code that isn't as prone to errors as it might be if you were to just ask ChatGPT to generate a smart contract for you.
Dan Boneh
Clever. This is great. This leads into another topic worth discussing, which is basically using LLMs to find bugs. Suppose a programmer actually writes some Solidity code, and now you want to test if that code is correct and secure. Like Ali said, you can actually try to use the LLM to find vulnerabilities in that code. There's been quite a bit of work on trying to assess how good LLMs are at finding bugs in software, in Solidity smart contracts, in C and C++.
There's one paper that came out recently that's very relevant, from the University of Manchester. It says you would run a standard static analysis tool to find bugs in your code. It would find all sorts of memory management bugs or potential bugs, just a standard static analysis tool, no machine learning whatsoever. But then you would use an LLM to try and fix the code. It would propose a fix to the bug automatically. Then you would run the static analyzer again on the fixed code. The static analyzer would say, "Oh, the bug is still there" or "The bug is not there." You would keep iterating until the static analyzer says, "Yeah, now the bug has been fixed and there are no more issues." That was kind of an interesting paper. This paper literally came out like two weeks ago.
Sonal Choksi
For both of these papers you just referenced, Dan, the one from the University of Manchester and the one you guys recently wrote on LLMs not being trusted to write correct code, I'll link to those papers in the show notes so listeners can find them. Just one quick question before we move on from this. This is about the current state. Is this a temporary situation, or do you think there will be a time when LLMs can be trusted to write correct, not just working, but secure smart contract code? Is that possible, or is that just way far off?
Dan Boneh
That's a difficult question to answer. These models are improving by leaps and bounds every week. It's possible that by next year, these issues will already be addressed and they could be trusted to write more secure code. I guess we're saying that right now, with the current models we have, GPT-4, GPT-3, and so on, if you use them to generate code, you have to be very, very careful and verify that the code they wrote actually does what it's supposed to do and is secure.
Ali Yaya
By the way, will we get to a point where the code that LLMs generate is less likely to contain bugs than the code that a human generates? Maybe that's the more important question. In the same way that you can never say that a self-driving car will never crash, the real question that matters is, is it less likely to crash than if it were a human driver?
Dan Boneh
That's exactly right. The truth is that it's probably impossible to guarantee that there will never be a car crash caused by a self-driving car, or that there will never be a bug generated by an LLM that you've asked to write code.
Ali Yaya
I think this will only get more and more powerful the more you integrate it into existing tool chains. As we discussed, you can integrate this into formal verification tool chains. You can integrate this into other tools like the one Dan described, where you have a tool that checks for memory management issues. You can also integrate it into unit testing and integration testing tool chains so that the LLM is not just acting in a vacuum. It is getting real-time feedback from other tools that are connecting it to the ground truth.
Through the combination of machine learning models that are extremely big, trained with all of the data in the world, combined with these other tools, might actually make for programmers that are quite a bit superior than human programmers. Even if they might still make mistakes, they might just be superhuman. That'll be a big moment for the world of software engineering generally.
Sonal Choksi
Yeah, that's a great framing, Ali. So where are some of the other trends where AI can help crypto and vice versa?
Ali Yaya
One exciting possibility in this space is that we may be able to build decentralized social networks that actually behave a lot like Twitter might, but where the social graph is fully on chain and it's almost like a public good that anyone can build on top of. As a user, you control your own identity on the social graph. You control your own data. You control who you follow and who can follow you.
Then there's a whole ecosystem of companies that build portals into the social graph that provide users experiences that are maybe somewhat like Twitter, or somewhat like Instagram, or somewhat like TikTok, or whatever else they may want to build. But it's all on top of this same social graph that nobody owns. There's no billion dollar tech company in the middle that has complete control over it and can decide what happens on it.
That's an exciting world because it means it can be much more dynamic. There can be a whole ecosystem of people building things, and there's much more control by each user over what they see and what they get to do on the platform. But there's also the need to filter the signal from the noise. There's the need to come up with sensible recommendation algorithms that filter all of the content and show you a news feed you actually want to see.
This will open the door to a whole marketplace, a competitive environment of participants who provide you with algorithms, AI-based algorithms that curate content for you. As a user, you might have a choice. You can decide whether to go with one particular algorithm, maybe the algorithm built by Twitter, or you can go with one built by someone completely different. That kind of autonomy will be great. But again, you're going to need tools like machine learning and AI to help you sift through the noise and parse through all of the spam that inevitably will exist in a world where generative models can create all of the spam in the world.
Sonal Choksi
What's interesting about what you said is it's not even about choosing between companies. It goes back to this idea you mentioned earlier about giving users the options to pick from marketplaces of free ideas and approaches. It's also interesting because it's not even only at a company-to-company level. It's really just about what approach works for you.
You might be a person who's more interested in the collaborative filtering algorithm that was in the original form of recommendation systems, which is collaborative filtering across people. So your friends' recommendations are the things you follow. When in fact, I personally am very different and much more interested in an interest graph. I might be much more interested in people who just have similar interests to me. I might pick that approach versus something else that's a hybrid approach. Just being able to pick and choose that is already tremendously empowering. That's simply not possible right now, and it can only be possible with crypto and AI. So that's a great example.
Dan Boneh
Was there anything else to say on how AI can help with trust and security?
Ali Yaya
I think the meta picture is that crypto is the wild west. Because it's completely permissionless, because anyone can participate, you kind of have to assume that whomever is participating might be an adversary and may be trying to game the system or hack the system or do something malicious. There's much more of a need for tools that help you filter the honest participants from the dishonest ones. Machine learning and AI as an intelligence tool can actually be very helpful on that front.
For example, there's a project called Stelo, which uses machine learning to identify suspicious transactions submitted to a wallet and flags those transactions for the user before those transactions are submitted to the blockchain. That could be a good way to prevent the user from accidentally sending all of their funds to an attacker or doing something they will regret later. That company basically sells to wallets, companies like MetaMask, so that MetaMask can use the intel and then do whatever it wants with it, either block the transaction, warn the user, or reframe the transaction so it's no longer dangerous.
There are other examples as well in the context of MEV, which stands for Miner Extractable Value or Maximum Extractable Value, depending on who you ask. That's the value that can be extracted by the people who have control over the ordering of transactions on a blockchain. That's often the miners or the validators of a blockchain. AI here can cut both ways. If you're a validator on a blockchain and you have control over ordering of transactions, you can do all sorts of clever things to order those transactions in such a way that you profit.
You can, for example, front run transactions, you can back run transactions, you can sandwich orders on Uniswap. There are a lot of transactions you could craft such that you can profit from this ability of ordering transactions. Machine learning and AI might supercharge that ability because it can search for opportunities to capture more and more MEV. But on the other hand, machine learning may help as a defensive tool. You may be aware before you submit a transaction that there is MEV that might be extractable from that transaction. Then you will either split up your transaction into multiple transactions so that there isn't a single validator that can completely control it, or do something as a way of protecting yourself from an MEV extractor at some point in the transaction pipeline.
This is a way where crypto plays a big role when it comes to security, when it comes to trust, when it comes to making the space more trustworthy to the end user. That's an example of AI making things difficult in crypto and then crypto coming back and making things better for it.
Dan Boneh
I actually have another example like that. Just like ML models can be used to detect fake data or malicious activity, there's the flip side where ML models can actually be used to generate fake data. The classic example of that is deepfakes, where you can create a video of someone saying things they never said, and that video looks fairly realistic. The interesting thing is that blockchains can actually help to alleviate the problem.
Let me walk you through one possible approach where blockchains might be useful. Imagine a solution that might be only applicable to well-known figures like politicians or movie stars. Imagine a politician would wear a camera on their chest and record what they do all day long. Then create a Merkle tree out of that recording and push the Merkle tree commitment onto the blockchain. Now on the blockchain, there's a timestamp saying, on this date, you said such and such. On that date, you said such and such.
Now if somebody creates a deepfake video of this politician saying things they never said, the politician can say, "Look, at this time where the video said I said this and that, I was actually somewhere completely different doing something unrelated." The fact that all this real, authentic data is recorded on a blockchain can be used to prove that the deepfake really is fake and not real data. This is not something that exists yet. It would be kind of fun for someone to build something like this. But I thought it's an interesting example where blockchains might actually be helpful in combating deepfakes.
Sonal Choksi
Is there also a way to solve that problem and show other timestamps or provenance where you can do that sort of verification of what's true and what's not true, without having to make a politician walk around with a camera on their chest?
Dan Boneh
Yes, absolutely. We can also rely on trusted hardware for this. Imagine our cameras, the cameras in our phones and such, would actually sign the images and video they take. There's a standard called C2PA that specifies how cameras will sign data. In fact, there's a camera by Sony that now will actually take pictures and videos and produce C2PA signatures on those videos. So now you basically have authentic data. You can prove that the data really came from a C2PA camera.
If you read a newspaper article and there's a picture in it that claims to be from one place, but in fact it's taken from a different place, the signature could be verified by the fact that it's C2PA signed. There are a lot of nuances there. C2PA is a fairly complicated topic with a lot of nuances to discuss that maybe we won't get into here.
Sonal Choksi
I remember you talking about this work with me previously. I think it was at our offsite. But I also remember from that conversation that it doesn't stand up to editing. As you know, editorial people like me and other content creators, and honestly just about anyone who uses Instagram or any online posting, no one uploads things purely rawly as they were originally created. Everyone edits them.
Dan Boneh
Yeah. Typically when newspapers publish pictures, they don't publish the picture from the camera as is. They will crop it. There are a couple of authorized things they're allowed to do to the pictures. Maybe they grayscale it. Definitely they downsample it so they don't take a lot of bandwidth. The minute you start editing the picture, the recipient, the end reader, the user on the browser who's reading the article, can no longer verify the C2PA signature because they don't have the original image. So the question is, how do you let the user verify that the image they're looking at really was properly signed by a C2PA camera?
Well, as usual, this is exactly where zero knowledge techniques come in, where you can prove that the edited image actually is the result of applying just downsampling and grayscaling to a properly signed larger image.
Ali Yaya
Yeah.
Dan Boneh
And so instead of a C2PA signature, we would have a ZK proof, a short ZK proof associated with each one of these images. And now the readers can still verify that they're looking at authentic images. So it's very interesting that ZK techniques can be used to fight disinformation. It's a bit of an unexpected application.
Ali Yaya
That's fantastic. A very related problem, by the way, is proving that you're actually human in a world where all of the deep fakes creating the appearance of humanity will generally outnumber humans a thousand to one or a million to one. And most things on the internet might actually be generated by AI. One potential solution, which is related to what you're saying, is to use biometrics to be able to establish that someone is actually human, but to then use zero knowledge proofs to protect the privacy of the people who are using those biometrics to prove their humanity.
One project in this category is called WorldCoin. It's also a project in our portfolio. They use this orb — people may have seen this shiny silver orb — that uses retinal scans as biometric information to verify that you're actually a real human. It also has all sorts of other sensors to make sure that you're actually alive and that it can't actually be a picture of an eye. It's a system that has secure hardware and is very difficult to tamper with, such that the proof that emerges on the other end — a zero knowledge proof that obscures your actual biometric information — is very, very difficult to forge. This way, politicians could, for example, prove that their video stream, or that a signature of theirs, or that a participation of theirs on some online forum is actually their own and that they're actually human.
Sonal Choksi
What's really interesting about what you said, Ali — that's a great follow-up to what Dan was saying about ways to verify authentic media versus fake or deep fake media in this world of infinite media that we live in. But what are the other applications for proof of personhood type technologies like that? I think it's important because this is actually another example of how crypto can help AI more broadly too.
Ali Yaya
Going back — we're kind of flipping back and forth here, but that's okay because we're just talking about really interesting applications. So it's fine.
Sonal Choksi
Oh, well, that's a really good question.
Ali Yaya
One of the things that will become important in a world where anyone can participate online is to be able to prove that you are human for various different purposes. There's that famous saying from the 90s that on the internet, nobody knows you're a dog.
Sonal Choksi
Oh, yeah.
Ali Yaya
And I think a reshaped form of that saying is that on the internet, nobody knows you're a bot. So this is exactly where proof of humanity projects become very important. It will become important to know whether you're interacting with a bot or with a human.
For example, in the world of crypto, there's this whole question of governance. How do you govern systems that are decentralized, that don't have any single point of control, and that are bottom up and community owned? You would want some kind of governance system that allows you to control the evolution of those systems. The problem today is that if you don't have proof of humanity, then you can't tell whether one address belongs to a single human or whether it belongs to a bunch of humans, or whether 10,000 addresses actually belong to a single human pretending to be 10,000 different people. Today you kind of have to just use amount of money as a proxy for voting power, which leads to plutocratic governance.
Dan Boneh
Exactly.
Ali Yaya
But if every participant in a governance system could prove that they're actually human, and they could do so in a way that's unique — such that they can't pretend to be more than one human because they only have a single set of eyeballs — then the governance system could be much more fair and less plutocratic. It can be based more on each individual's preferences rather than on the preference of the largest amount of money locked up in some smart contract.
Dan Boneh
Actually, just to give an example of that, today we're forced to use one token, one vote because we don't have proof of humanity. Maybe we'd like to do one human, one vote. But if you can pretend to be five humans, then of course that doesn't work. One example where this comes up is something called quadratic voting. In quadratic voting, if you want to vote five times for something, you have to put 25 chits down to do that. But you can do the same thing by pretending to be five different people, each voting once, and that would defeat the mechanism of quadratic voting. The only way to prevent you from doing that is this exact proof of humanity, where in order to vote, you have to prove that you're a single entity rather than a collection of entities. That's exactly where proof of humanity would play an important role. Generally, identity on chain is becoming quite important for governance.
Sonal Choksi
Totally. That, by the way, reminded me of an episode that you and I did, Ali, years ago with Phil DeHaan, member of Dark Daos. That was such an interesting discussion, totally relevant there.
Ali Yaya
Totally.
Sonal Choksi
By the way, is it phrase proof of personhood or proof of humanity? What's the difference? Is it the same thing?
Ali Yaya
Yeah, people use them interchangeably. Proof of human, proof of humanity, proof of personhood.
Sonal Choksi
Yeah, yeah. Okay, so keep going on this theme then of media and this kind of infinite abundance of media. What are other examples? And again, we're talking about crypto helping AI, AI helping crypto. Are there any other examples that we haven't covered here where the intersection of crypto and AI can bring about things that aren't possible by either one of them alone?
Ali Yaya
Completely. Another implication of these generative models is that we're going to live in a world of infinite abundance of media. In such a world, things like community around any one particular piece of media, or the narrative around a particular piece of media, will become ever more important.
Just to make this very concrete, there are two good examples here. Sound.xyz is building a decentralized music streaming platform, enabling artists and musicians to upload music and to then connect directly with their communities by selling them NFTs that give people in those communities certain privileges. For example, the ability to post a comment on the sound.xyz website on the track, such that anyone else who plays the song can also see the comment. This is similar to the old SoundCloud feature that people might remember, where you could have this whole social experience on the music itself as it played on the website.
It's this ability to allow people to engage with the media and to engage with each other, often in a way that's economic because they're essentially buying this NFT from the artist as a way of being able to do this. As a side effect, they're supporting the artist and helping the artist be sustainable and able to create more music. The beauty of all of this is that it actually gives an artist a forum to really interact with their community. And the artist is a human artist. As a result of crypto being in the loop here, you can create a community around a piece of music that wouldn't automatically exist around a piece of music that was just created by a machine learning model devoid of any human element — that doesn't have a community around it.
I think, again, in a world where a lot of the music we're going to be exposed to will be fully generated by AI, the tools to build community and to tell a story around art, around music, around other kinds of media will be very important as a way of distinguishing media that we really care about and want to invest in and spend time with from media that may also be very good, but it's just a different kind of media — media that was just generated by AI with less of a human element.
It may be, by the way, that there's some synergy between the two. It could be that a lot of the music will be AI enhanced or AI generated. But if there's also a human element — say, for example, a creator leveraged AI tools to create a new piece of music, but they also have a personality on Sound, they have an artist page, they have built a community for themselves, they have a following — then now you have this kind of synergy between the two worlds where you both have the best music because it's augmented by the superpowers that AI gives you, but you also have a human element and a story that was coordinated and made real by this crypto aspect, which lets you bring all of those people together into one platform.
Dan Boneh
It's really quite amazing that even in the world of music, just like we talked about in the world of coding where you have a human coder being enhanced by tools like Copilot that generate code, we are seeing things like this where an artist is being enhanced by ML systems that help write — or at least parts of the music are being written and generated by an ML system. So it's definitely a new world that we're moving into in terms of content generation. There's going to be a lot of spam generated by machine-generated arts, which people might not value as much as they value art generated by an actual human.
Maybe another way to say it is that one of the points of NFTs was to support the artists. But if the artists themselves are now machine learning models, then who exactly are we supporting? It's a question of how do we distinguish, how do we differentiate human generated art that needs support versus machine generated art? This is a philosophical discussion for over drinks, maybe.
Ali Yaya
I would maybe go so far as to say that the prompter is also an artist of sorts. In fact, I would make the case that that person is an artist. The same thing has come about — this is a discussion and debate as old as time. It's simply new technologies, old behaviors. It's the same thing that's been playing out for eons, the same things playing out in writing, et cetera.
Dan Boneh
Totally. Very true.
Ali Yaya
Well, that actually opens up the door for collective art, for art that's generated through the creative process of a whole community as opposed to a single artist. There are already projects doing this where you have a process by which a community influences through some voting process on chain what the prompt for a machine learning model like DALL-E will be. Then you have DALL-E use that prompt to generate a work of art. Maybe you generate not one work of art, but like 10,000. Then you use another machine learning model that's also trained from feedback by the community to pick from those 10,000 the best one. Now you have a work of art that was generated from the input of the community, that was also pruned and selected from a set of 10,000 variants of that work of art through a machine learning model trained by the community, to then generate one work of art that is the product of this collective collaboration.
Sonal Choksi
That's incredible. I love it. Well, you guys, that's a great note to end on. Thank you both for sharing all that with the listeners of Web3 with a16z.
Ali Yaya
Thanks, Anel.
Dan Boneh
Thank you so much.
Sonal Choksi
Thank you for listening to Web3 with a16z. You can find show notes with links to resources, books, or papers discussed, transcripts, and more at a16zcrypto.com. This episode was produced and edited by Sonal Choksi. That's me. The episode was technically edited by our audio editor, Justin Golden. Credit also to Moonshot Design for the art, and all thanks to support from a16z Crypto. To follow more of our work and get updates, resources from us and from others, be sure to subscribe to our Web3 weekly newsletter. You can find it on our website at a16zcrypto.com. Thank you for listening and for subscribing. Let's f*** go.