ep 27 – AI & Crypto
10 Sept 2023 · 1:02:43
Stanford cryptography professor Dan Boneh, a senior research advisor at a16z crypto, joins a16z general partner Ali Yahya and host Sonal Chokshi to discuss where artificial intelligence and blockchains intersect. The conversation covers deepfakes and proof-of-humanity, large language models, zero-knowledge proofs and zkML, and how AI and crypto could offset each other's centralization risks. It closes with MEV and how AI might reshape media and on-chain art.
Speakers
Topics
Transcript
[Music] welcome to web 3 with A6 and z a show about building the next generation of the internet from the team at Asics and Z crypto that includes me your host sonal choxie 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 binay Stanford professor and Senior research advisor at Asics and C crypto he's a cryptographer who's been working on blockchains for over a decade and 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 Asics and Z 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 involve training a single neural network that contribute 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 and actually Dan and Ali go back since Ali was an undergrad and master student at Stanford so this conversation is really more of a hallway jam between them that I asked to join and 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 and 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 asicsnz.com disclosures for more important information including a link to a list of our investments especially since we are investors and companies mentioned in this episode but first we begin with how the Two Worlds intersect with the quick sharing of areas or visions that they're excited about the first voice you'll hear is Alice there is a really good Sci-Fi novel called The Diamond age by Neil Stevenson in which there is this device known as The Illustrated primer that is a kind of artificially intelligent device that
acts as your mentor and your teacher throughout life and so 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 so there's like 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 solve these clan of questions of privacy and sovereignty and you'd want to have kind of control over it and then 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 very long time and
could get to know you over the course of a lifetime but have that really be yours and so there is this Vision in which you could do that with a blockchain you could embed an AI within a smart contract and with the power of zero knowledge proofs you could also keep your data private and then over the course of decades to say I can become smarter and can help you and then you have the option to do whatever you want with it or change it in whichever way you want or shut it down and so that's kind of an interesting vision for long-running AIS that are continually evolving and continually becoming better it'd be better if it were the case that 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 with 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 well I love Ali's Vision there I love it too especially given that quote I think it was Asimov that today's science fiction is tomorrow's science fact 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 yeah there is this broader narrative that has existed for quite some time now that's only becoming much more accentuated now with the development of things like llms actually if I met really quickly just for listeners who aren't already
familiar just as context so another stands for large language model and 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 and it outlined what are now known as Transformers that said the basis basically of some of the new models that people have been training these days including catchy PT and so on all of these are large language models or L alums there was that famous I think 2018 line from Peter Thiel that AI is communist and crypto is libertarian that line is like very on point actually because Ai and crypto in many ways are natural counterweights for one another and maybe we can go deep over the course of the podcast into each one of these as
we go through examples but 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 and in many ways actually 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 really any central point of control and so that's one natural way in which these two technologies are counterweight 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 and the best example
of this 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 whereas crypto is actually a fundamentally disruptive innovation in that it has a business model that's fundamentally at odds with the business models of big tech companies and so as a result it's a movement that is spearheaded by rebels by the fringes as opposed to being led by the incumbents so that's the second a third one is that AI will probably relate and interplay a lot with all of the trends towards privacy because AI as a technology has built in all sorts of incentives that move us towards less individual privacy because we will have
companies that want access to all of our data and AI models that are trained on more and more data will become more and more effective and so I think that that leads us down a path of the AI panopticon where there's just Collective aggregation of everyone's data into the training of these enormous models in order to make these models as good as possible whereas crypto moves us towards the opposite direction which is a direction of increasing individual privacy it's a direction of increasing sovereignty where users have control over their own data and those two Trends I think will be very important and this is just another important way in which crypto is the counterweight for AI and 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 is now a creative tool that will lead us to infinite abundance of media infinite creativity in many ways and crypto is a counterweight to that because it helps us cut through all of the abundance and helping us distinguish what's created by humans versus what's created by Ai and cryptography will be an essential part of maintaining and preserving what actually is human in a world where a thousand X more of the content is actually artificially generated so these are all things that we can talk about but I think that there is this important meta-narrative and these two technologies are very much diametrically opposing in many respects effects so immediately to add to that this is a
wonderful summary and I would say also that there's 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 but there are many points of intersection I guess we'll talk about applications of zero knowledge for machine learning in just a minute but I also want to touch on all these applications where machine learning itself can be used to write code so for example machine learning can be used to write solar decode that goes into contract it can be used to find maybe errors and codes and so on there's points of intersection where machine learning can be used to generate deep fakes and blockchains can actually help to protect against deep fakes and so I
guess we're going to touch on all these points but the interesting thing is that there's really quite a lot of intersection between blockchains and machine learning yeah before we dive into those one question I have for you Dan is do you agree with that like I mean I definitely here Ali's point that Ai and crypto are very natural compliments actually or counterweights really for each other you know they can be different forces that can kind of 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 or the way things are done right now what parts might you agree or disagree with yeah so I would say that if you look at it from far away the techniques that are used in AI they seem very different from the techniques that
are used in blockchains right so blockchains is about cryptography decentralization finance and economics and so on whereas AI is you know about the statistics the mathematics of machine learning and so on so about big data right the techniques actually look quite different but they're actually a lot of places where one side can help the other and and vice versa so maybe the first one to start with is kind of the obvious one that's been on a lot of people's minds which is What's called the applications of zero knowledge for machine learning this is kind of an emerging area it's called the zkml and the reason this is 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 you know something that we don't see very often this idea of zero knowledge proofs and proof systems in general they were considered very theoretical a decade ago and 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 and as a result there's been tremendous progress as our listeners know that now these things are actually deployed and used to protect real systems so the question then is can zero knowledge techniques be used to help machine learning and there are a couple examples honestly we could spend the whole podcast just on zkml but maybe I can just give a taste one or two examples where ZK is useful for machine learning and so imagine Alice has a secret model that she spent a lot of time training and that model is actually
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 right so Bob would like to send share 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 on the model right maybe he paid for a certain model and you want to make sure that Alice is really using that model right maybe he paid for gpt4 and he wants to make sure Alice is really using gpt4 and not gpt3 well it turns out DK techniques can help here a lot so what Alice would do she would commit to her model make the commitment publicly available and then whenever Bob submits a piece of data Alice could run the model on that data sends the results
back to Bob along with a proof that the model was evaluated correctly so Bob now would have a guarantee that in fact the model that was committed to is the one that was run on Bob's data yeah so that's an example where ZK techniques can be useful in the ml case and I want to kind of stress why this is so important yeah so let's look at let's look at one example so suppose we have a function a model that's actually used to affect people's lives like imagine you know maybe we use a model to decide whether we Grant a loan or Grant a mortgage you know a financial institution might want to use a model like that well you want to make sure that the same models being applied to everyone right that it's not the case that you know one model is being applied
to me in a different model yeah being applied to you well by basically having the bank commit to the model right 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 and I have to say that there's a wonderful open problem here which is that even though zero knowledge techniques can make sure that the same model is being applied to everyone there is this question you know is the model Fair models can have biases could lead to unfair results and so there's a whole area of research it's called algorithmic fairness there are many many papers on algorithmic fairness and it's really interesting to ask well 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 like how do we make sure that the training process ran correctly well everything that you said about zkml is extremely exciting and as a technology I think it'll play a role at making machine learning and AI sort of generally more transparent and more trustworthy both within the context of crypto and outside of it I think an even crazier and maybe 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 because as we were talking about before AI is a technology that is almost inherently centralizing
in that it very much thrives from things like scale effects because having things within a data center makes things more efficient and so scaling things in a centralized way makes for things to become more powerful and more centralized as a result then also data is usually controlled by a small number of tech companies in the middle and as a result also kind of leads to additional centralization and then finally machine learning models and machine learning Talent also kind of controlled by a small number of players and so crypto can again help on this front by Building Technology using things like zkml that can help us decentralize AI so there are three main things that go into AI there's the compute aspect and that
requires sort of 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's the machine learning models themselves yeah and the easiest one might be the prong of compute like can you actually decentralize the compute for the training and the inference of machine learning models and this is where some of the techniques that Dan was talking about things like zero knowledge proofs that you can use to prove that the process of actually conducting inference or training a model was actually done correctly so that you can Outsource that process to a large community and you can have a distributed process by which anyone who has a GPU can contribute computation to the
network and have a model be trained in that way without necessarily having to rely on a massive data center with all of the gpus in a centralized Manner and there's a big question still of whether or not that economically ends up making sense but at the very least through the right incentives you can actually 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 it 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 in order for that to be possible there's actually a company in the space that is
called Jensen which is building exactly this they are building a decentralized Marketplace for GPU compute very much for the purpose of training machine learning models and it's a marketplace where anyone could contribute their GPU compute whether it be in their kind of personal computer under their desk or whether it be idle inside of some data center and then on the other side anyone can leverage whatever compute exists in the network to train their large machine learning models and this would be an alternative to the very centralized sort of open AI slash Google slash meta slash you know insert your favorite big tech company your alternative that currently you would necessarily have to go with so
before we go into more of the decentralization framework work because Ellie you were breaking down like compute and I think you were going to share the other two of those three prongs but before we do both of you guys talked a little bit about all the technical challenges here so what are some of the technical challenges that need to be overcome here and 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 yeah so maybe I can mention too that I think would be interesting to folks so one is basically imagine you have a situation where Alice actually has a model that she wants to protect she wants to send
the model an encrypted form to some other party let's say to Bob so Bob now receives an encrypted model and it needs to be able to run its data on this encrypted model well 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 and that is something that we would use what's called fully homomorphic encryption for yeah it's a philomorphic encryption is this where remarkable tool that allows you to compute and encrypted data this is kind of mind-boggling that this is possible but you can have an encrypted model and you might have some clear Text data and you can actually run the encrypted model on the clear Text data and receive and obtain 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 so this is actually something that's already there's actually quite a bit of demand for this and 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 would run the encrypted model on their data send you back the results you can decrypt and learn something about the data that was given as input to the encrypted model the question of course is how do we scale that up right now this works well for medium-sized models and the question is can we scale it up to much larger models so this is quite a challenge a couple of startups in the space and again very
very interesting technology it's kind of amazing that this is possible at all yeah and we're probably going to see much more of that in the future the other area is actually what Ali mentioned another very important area which is how do we know that the model was trained correctly so 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 right they might send me a model back but how do I know that the model doesn't have back doors in it there's actually a fair amount of work on 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 back door meaning that it would
fail catastrophically on one particular input this is possible if your training process is not verified and again this is an area where zkml comes in we can prove to you that the training ran correctly or maybe there's some other techniques that might be possible to prove that the training was done correctly but then this is another area and a very active area of research and I would encourage many of the listeners this is like 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 so that that actually is a wonderful area to get into if people are looking to do more work in the space fantastic Ali is there anything you'd add to that yeah definitely well I guess if we continue
down the path of talking about what it would take to help decentralize the AI stack I think that in order to decentralize the compute prong and there are the three important prongs if we wanted to decentralize the compute aspect there are two very important open technical challenges the first is the problem of verification which then just mentioned which you could use zkml for and 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 and 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 so the models today like sort of the llms that
we all kind of know and love now like Chad GPT would not be provable using the current state of the art of zkml and so there's a lot of work that's being done towards improving the performance chance of the proving process so that you can prove larger and larger workloads efficiently but that's an open problem and something that a lot of people are working on and in the meantime companies like Jensen are using other techniques that are not just cryptographic and instead are game theoretic in nature where they just 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 and that is a more more of a game theoretic optimistic approach that is not relying on
cryptography but it's still aligned with this greater goal of decentralizing AI or helping create an ecosystem for AI that is much more organic Community owned and bottom-up as opposed to the top down that's being sort of put forth by companies like open AI so that's the first problem the first big problem is the problem of verification and the second big one is the problem of distributed systems like how do you actually coordinate a large community of people who are contributing gpus to a network yeah such that it all feels like an integrated unified substrate for computation and there will be lots of interesting challenges along the lines of we're breaking up a machine learning workload in a way that makes sense and
shipping off different pieces of it to different nodes in the network figuring out how to do all of that efficiently and then also when nodes fail figure out how to recover and assign new nodes to then take over whatever work was being done by the node that failed so 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 yeah yeah it totally that's definitely true that the ziki 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 the ZK techniques but you
know they're constantly getting better the hardware is getting better and so hopefully they'll catch up yeah before we go on can we just do a really clear pulse check then on where we are exactly and that so obviously 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 that whole area we've been covering a ton of it ourselves if you look at our ZK Cannon 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 because you guys talked a lot about what they can't do yet and what the opportunity is which is exciting but where are we right now like what can they actually do yeah so right
now they can basically do classification for medium-sized models so not something as big as GB 53 or four but medium-sized models it is possible to prove that classification was done correctly training is probably beyond what can be done right now just because training is so compute intensive right 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 yeah so that now their game theory incentives for people not to cheat if somebody cheats somebody else might be able to complain that they computed the training incorrectly and then whoever cheated will not be paid for their effort right right so there's an incentive for people to actually run
the training the way it was supposed to run right and so basically that sort of not like a hybrid phase but it's basically like alt approaches until more of this comes to scale and performance is scale to a point where we can get there yeah 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 yeah great so Ali you mentioned compute is one of the the three prongs and you also mentioned that data and then the models for machine learning themselves do you want to tackle now data and sort of the opportunities and challenges there where it comes to the crypto slash AI intersection 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 and this could work by creating a kind of marketplace it's similar to the one that 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 that people are contributing is actually good data and that it's not either duplicate data or Garbage data that was just sort of randomly generated or not real in some
way and to also make sure that the data doesn't somehow subvert the model in some kind of poisoning attack where the model actually becomes either backdoored or just sort of less good or less performant than it used to be and so there's the question of how do you verify that that is the case and that's maybe an open heart problem for the community to solve it may be impossible to solve completely and 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 are able to 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 that you can now truly
cover the very very long tail of the data distribution and one of the things that's very challenging in the world of machine learning is that your model is really only as good as the coverage of the distribution that you're training data set can achieve and if there are inputs that are far far out of the distribution of the training data then your model might actually behave in a way that's completely unpredictable and in order to actually get the model to perform well in the edge cases and the sort of Black Swan data points or data inputs that you might experience in the real world you do want to have your data set be as comprehensive as possible and so 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 very unique data out in the world contribute that data to the network which is a better way to do this because if you try to do this as a central company you have no way of knowing who has that data and so if you flip it around and create an incentive for those people to come forward and provide that data on their own accord then I think you can actually get significantly better coverage of the long tail and 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 in the data set grows and so this can actually supercharge the performance of our machine learning models to an even greater degree we're able to get even more comprehensive data sets that over the whole distribution 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 yeah so they can get paid yeah so we have to have some sort of a mechanism to make sure that the data you're contributing is authentic exactly and you can imagine a couple of ways of doing this right I mean one way is actually by relying on trusted Hardware right 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 completely agree that'd be the biggest open problem to solve and I think that as benchmarking for machine learning models gets better I think
there's two important Trends in machine learning at the moment there's improving the measurement of the performance of a machine learning model and for llms that's still very much in its early stages and that it's actually quite hard to know how good another lamb is because it's not as if it were like a classifier where what the performance of a model is is very clearly defined with an llm it's almost as if you're testing the intelligence of a human right and coming up with the right way of testing how intelligent an llm like chat GPT is is an open area of research but over time I think that'll become better and better and then the other trend is that we're getting better at being able to explain how it is that a model works and so 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 yeah and 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 we can create the incentive for that Marketplace to exist 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 that's being contributed and the models that are 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 it's not quite explainable but the idea is 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 well the final thing is that you could do the same thing for the third prong which is models I can imagine if you could create an Open Marketplace for people to contribute a trained model that is able to solve the particular kind of problem so imagine if on ethereum you created a smart contract that embedded some kind of test be it like a cognitive test that an llm could solve or some classification test that a classifier machine learning model that is a classifier could solve and if using zkml someone could provide a model alongside
a proof that that model can solve that test then again you now have the tools that you need to create a Marketplace that incentivizes people to contribute machine learning models that can solve certain problems so many of the problems that we've discussed the open problems that 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 that it's claiming that it's done doing and then also we need to be able to have good tests of how good a model is right so being able to embed a test inside of a smart contract that then you can subject a machine learning model to to evaluate how good it is this 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 do have these very open bottom-up transparent marketplaces that allow people to contribute and Source compute data and machine learning models for machine learning that essentially act again as a counterweight to the very very centralized enormous tech companies that are driving all of the AI work today I really love Alia you mentioned that because it's been a long-standing problem in AI in practice that it can solve a lot of things for like the bell curve the middle of the norm but not the tail ends and That's a classic example of this is like self-driving cars right like 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 and I know you talked about some of the incentive alignment and incentives for providing accurate and quality data and even incentives are just even contributing anything in the long tail of data overall but on the long tail side the quick question that popped up for me when you were talking like it sort of begs the question of then who makes money where in this system I couldn't help but wondered where does the business model kind of come in then in terms of making money for companies because I always understood that in the long tail of AI in a world of this kind of available data sets that your proprietary data is actually your unique domain knowledge and kind of the thing that only you know in that long tail so do you guys have
any quick responses to that so 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 and so then 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 such that better machine learning models can be trained and bigger more important problems can be solved the other people that would be making money at the same
time are the people who on the other side are 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 Chad GPT and then that then goes on to make its way into a bunch of different applications like say Enterprise applications or whatever it is that those models may be used for and those models Drive value capture in their own right because those companies will have a business model of their own and then finally the people who might also make money are the people who build this network right so for example create a token for the network that token will be distributed to the community and 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 of the economic activity that goes through this network so you can imagine any payment for compute or any payment for data or any payment for models could have some fee imparted on it you might just go do some treasury that's controlled by this decentralized network that all token holders that are part of this network have Collective ownership and access too as well as the creators and owners of the marketplace and that fee might just go to the network so you can imagine that every transaction that goes through this network every form of payment that pays for compute or pays for data or pays for models might have
some fee that's imparted on it that goes to some treasury that's controlled by the whole network and by the token holders that collectively own the network and so that's essentially a business model for the network itself great okay so so far we've been talking a lot about the way that crypto can help AI I mean to be clear it's not like unidirectional these things are kind of reinforcing and bi-directional and more interactive than one way but for the purpose of this discussion we're really talking about it being like here's how crypto can help AI let's now kind of turn it on its head and talk a little bit more about ways that AI can help crypto yeah so there are a couple of interesting touch points there so one that's actually worth bringing up is
this idea of a machine learning models that are used to generate code so many of the listeners have probably heard of copilots which is a tool that's used to generate code and what's interesting is you could try to use these code generation tools to write solidity contracts or to write cryptography code and I want to stress that this is actually a very dangerous thing to do oh do not do this at home okay yeah do not do not try this at home because what happens is very often these systems actually will generate code that works you know when you try to run it you know encryption is the opposite of decryption and so on so the code actually works but it will actually be insecure we've actually written a paper about this recently that shows that if you try to get a copilot to just write something as
simple as just an encryption function it will give you something that does encryption correctly but it uses an incorrect mode of operation yeah so that 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 so you might wonder why does that happen and one of the reasons is because these models are basically trained on code that's out there right they're trained on GitHub repositories well you know a lot of the GitHub repositories actually are vulnerable to all sorts of attacks and so these models learn about code that works but not code that is secure it's almost like garbage in garbage outs yeah and so I do want to make sure people are very careful when they use these generative models to
generate code that they very very carefully check that the code actually does what it's supposed to do and it does it securely one idea on that front I'm curious what you think about this is that you can use AI models like llms or like chatgpt to generate code in conjunction with other tools to try to make the process less error prone and so one example one idea would be to use an llm to generate a spec for a formal verification system so 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 and then
you use a formal verification tool to see whether the program actually meets the spec and if there are errors that tool will catch the errors those errors can then be used as feedback back to the llm and then ideally hopefully the llm can then revise its work and then produce another version of the code that is correct and eventually 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 this back and because this spec is maybe readable by a human you can maybe go through this pack and see like yes this is the program that I intended to write and that could be an actual pretty good way to use llms to write code that also isn't as prone to errors as it might be
if you were to just ask chatgpt to generate a smart contract for you clever yeah this is great and actually this leads into another topic that is worth discussing which is basically using llms to find bugs right so suppose a programmer actually writes some solidity code and now you want to test is that code correct is it secure and like Ali said you can actually try to use the llm to find vulnerabilities in that code and there's been actually quite a bit of work on trying to assess how good llms are at finding bugs in software in solidity smart contracts and CNC plus plus there's one paper that came out recently that's actually very relevant it's a paper from the University of Manchester which says that you would run a standard static analysis tool to find bugs in your code and it would find all
sorts of memory management bugs or potential bugs just the standard static analysis tool no machine learning whatsoever but then you would use an llm to try and fix the code yeah so yes propose a proposal fixed to the debug automatically and then you would run the static analyzer again on the fixed mode and the static analyzer would say oh the bug is still there or the bug is not there and you would keep iterating until the static analyzer says yeah now the bug has been fixed and there's no more issues there so that was kind of an interesting paper this paper literally came out like two weeks ago so for both of these papers you just referenced Dan the one from the University of Manchester and also the one that you guys recently wrote on llms not being trusted to write correct code it could
be working code but not necessarily secure I'll link to those papers in the show notes so that listeners can find them just one quick question before we move on from this so 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 like way far off that's a difficult question to answer you know these models are improving by Leaps and Bounds every week right yeah so it's possible that you know by next year these issues will already be addressed and that they could be trusted to write more secure code I guess we're saying that right now the current model is that we have gpt4 gpt3 and so on if you use them to generate code you have to be
very very careful and verify that the code that they wrote actually does what it's supposed to do and is is it secure got it well then 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 and maybe that's the more important question right because in the same way that you can never say that a self-driving car will never crash the real question that actually matters is is it less likely to crash than if it were a human driver that's exactly because the truth is that it's probably impossible to guarantee that there will never be a car crash that is caused by a self-driving car or that they will never be a bug that's generated by an llm that you've asked to write any code and I think this will
only by the way get more and more powerful the more you integrate it to into existing tool chains so as we discussed you can integrate this into formal verification tool chains you can integrate this into other tools like the one that then 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 and I think that through the combination of machine learning models that are extremely big trained with all the data in the world combined with these other tools might actually make for programmers that are quite a bit Superior than human programmers and even if they might still make mistakes they might just be superhuman and that'll be
a big moment for the portal of software engineering generally yeah that's a great framing Ollie so what are some of the other trends that come in for where I can help crypto and vice versa yeah one exciting possibility in the 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 actually fully on chain and it's almost like a public good that anyone can build on top of and you 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 and 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 Tick Tock or whatever else they may want to build but it's all on top of this same social graph that nobody owns that there's no billion dollar tech company in the middle that has complete control over it and that can decide what happens on it and so in that world like that's an exciting world because it means that it can be much more Dynamic and there can be this whole ecosystem of people building things and there's much more control by each of the users 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 and there's there's for example the need to come up with sensible recommendation algorithms that filter all of the content and show you a news feed that you actually want to see
and this will open the door to a whole Marketplace a competitive environment of participants who provide you maybe with algorithms with AI based algorithms that curate content for you and you as a user might have a choice you can decide whether to go with one particular algorithm maybe the algorithm that was built by Twitter or you can also go with one that's built by someone completely different and 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 to help 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 what's interesting about what you said too is like it's not even about choosing
between it goes back to this idea you mentioned earlier and you mentioned this briefly about just having giving users the options to pick from marketplaces of free ideas and approaches that they can decide but it's also interesting because it's not even only at a company to company level it's really just like what approach works for you like you might be a person who's maybe more interested in the collaborative filtering algorithm that was in the original form of original recommendation systems which is like 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 and therefore I might be much more interesting people who just have similar interests to me and I might pick that approach versus say something else that's sort of like hey this is the
hybrid approach your only thing it's going to do is X Y and Z just even being able to pick and choose that is already tremendously empowering like that's just simply not possible right now and it can only be possible crypto and AI so that's a great example oh yeah was there anything else to say on how AI can help it trust and security so I think that kind of 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 maybe trying to game the system or hack the system or do something malicious and so there's much more of a need for tools that help you filter the honest participants from the dishonest ones and machine learning and
AI as an intelligence tool can actually be very helpful on that front so for example there's a project called stello which uses machine learning to identify suspicious transactions that are submitted to a wallet and that Flags those transactions for the user before those transactions are submitted to the blockchain and that could be a good way to prevent the user from accidentally sending all of their funds to an attacker or from doing something that they will regret later and that company basically sells to Wallace the companies like metamask such that then metamask can use the Intel out and then do whatever it wants with it either block the transaction or warn the user or sort of reframe the transaction so that it's no longer dangerous and so that's one example there are other examples as well
in the context of Mev which stands for minor extractable value or maximum extractable value depending on who you ask yeah which is the value that can be extracted by the people who have control over the ordering of transactions on a blockchain and that's often the miners or the validators of a blockchain and AI here I mean can cut both ways and that those participants 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 background transactions you can sandwich orders on unit swap is a lot a lot of transactions that you could craft such that you can
profit from this ability of ordering transactions and machine learning and AI might supercharge that ability because it can search for four opportunities to capture more and more Meb but then on the other hand machine learning may help in the other way in that it 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 and so then maybe 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 so this is a way again 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 so I'm actually one other example like that yeah so just like ml models can be used to detect fake data or maybe malicious activity there's the flip side where ml models can actually be used to generate fake data yeah in the classic example of that is deep fakes right where you can create a video of someone saying things they never said then that video looks fairly realistic and the interesting thing is that actually blockchains can help to alleviate the problem and so let me just walk you through one possible approach where blockchains might be useful imagine it's a solution that
might be only applicable to well-known figures like politicians or maybe movie stars and such but imagine basically a politician would wear a camera on their chest and kind of record what they do all day long yeah and then create a Merkle tree out of that recording and push the Merkel tree commitment onto the blockchain so now on the blockchain there's a time stamp saying you know on this and this date you said such and such and this and that date you said such and such and now if somebody creates a deep fake video of this politician saying things they never said well 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 and the fact that all this data the real data the real authentic it has recorded on a blockchain can be used
to prove that the Deep fake really is fake and not real data yeah so 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 kind of an interesting example where blockchains might actually be helpful in combating deep fix is there also a way to solve that problem and show other time stamps or provenance where you can do that sort of verification of what's true what's not true without having to make a politician walk around with like a camera on their chest yes absolutely we can also rely on trusted hardware for this so imagine you know our cameras you know the cameras and our phones and such they would actually sign the images and video that they take yeah there's a standard it's called the c2pa that specifies how cameras will sign data in fact there's a
camera by Sony that now will actually take pictures and take videos and then produce c2pa signatures on those videos so now you basically have authentic data you can actually kind of prove that the data really came from a c2pa camera and also now if you maybe read a newspaper article and there's a picture in a newspaper article and it claims to be from one place but in fact it's taken from a different place the signature could actually be verified by the fact that it's c2pa signed there's a lot of nuances there c2pa is a fairly complicated topic that there's a lot of nuances to discuss that maybe we won't get into here yeah and I remember you talking about this work with me previously thinkers that are offsite but I also remember from that that it doesn't stand up to editing and 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 like uploads things purely Raleigh as they're originally created like everyone edits them yeah typically when newspapers will publish pictures in a newspaper they don't publish the picture from the camera as is they will crop it there's like a couple of authorized things they're allowed to do to the pictures maybe they grayscale it definitely they down sample it so that they don't take a lot of bandwidth the minute you start editing the picture that means that 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 right 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 down sampling and grayscaling to a properly signed larger image yeah and so instead of a c2pa signature we would have aziki 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 the ZK techniques can be used to fight this information it's a bit of an unexpected application 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 and so 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 proves to protect the privacy of the people who are using those Biometrics to prove their Humanity it's a one project in this category is called World coin yeah it's also a project in our portfolio and they use this orb people may have seen this like shiny silver orb that uses retinal scans as biometric information
to verify that you're actually a real human and 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 and it's the system that has secure hardware and is very difficult to tamper with such that the proof that emerges on the other end which is a zero knowledge proof that obscures your actual biometric information is very very difficult to forge in 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 they're actually human what's really interesting about what you said Ali that's a great follow-up to what Dan was saying about ways to verify like authentic media versus like fake or deep fake media and
this world of infinite media as you would say 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 Broad oddly too going back we're kind of flipping back and forth here but that's okay because we're just talking about really interesting applications period so it's fine oh well that's a really good question 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 oh yeah and I think maybe maybe a reshaped form of that saying is that on the internet nobody knows you're a bot so then I guess this is exactly where
proof of humanity projects become very important because 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 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 and 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 and are pretending to be ten thousand
different people and so today you actually kind of have to just use amount of money as a proxy for voting power which leads to plutocratic governments exactly 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 actually 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 and can be based more on each individual's preferences rather than on the preference of the largest amount of money that's locked up in some smart contract actually just to give an example of that today we're forced to use one token one votes because we don't have proof of humanity maybe we'd like
to do when human one votes but if you can pretend to be five humans then of course that doesn't work and so one example what this comes up is something called quadratic voting so in quadratic voting basically if you want to vote five times for something you have to kind of put 25 chits down to do that but of course you can do the same thing you can just pretend to be five different people each voting once and that would kind of defeat the mechanism of quadratic voting so 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 symbol of entities and that's exactly where proof of humanity would play an important role generally identity on chain is actually becoming quite important for governance
totally that by the way reminded me of an episode that you and I did Ali years ago with Phil Dan member of dark Dows that was such an interesting discussion that totally relevant there totally by the way is it phrase proof of personhood or proof of humanity what's the difference is it the same thing uh yeah people use them interchangeably proof of human proof of humanity proof of personhood yeah yeah okay so keep going on this theme then of media and this kind of infinite abundance of media like what are other examples and we're 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 completely I mean another implication of these generative models is that we're
going to live in a world of infinite abundance of media and 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's two good examples here sound dot XYZ just building a decentralized music streaming platform enabling artists musicians essentially to upload music and to then connect directly with our communities by selling them and of teas that give people in those communities certain privileges like 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 like 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 and they are as a side effect they're supporting the artist and helping the artist be sustainable and be able to create more music but the beauty of all of this is that actually gives an artist a forum to really interact with their community and the artist is a human artist and 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 that's devoid of any human element right that that doesn't have a community around it and so I think again in a world where a lot of the music that 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 sort of distinguishing media that we really care about and really 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's media that was just generated by AI with less of a human element yeah and it may be by the way that there's some Synergy between
the two like it could be that a lot of the music will be AI enhanced or AI generated but if there's also a human element like 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 and they have a following then now you have like 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 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 that's being enhanced by tools like co-pilot 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 kind of moving into in terms of content generation basically there's going to be a lot of spam that's generated by Machine generated Arts which yeah people might not value as much as they value artists generated by an actual human maybe another way to say it is 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 yeah and so and so yeah so
it's a question of how do we distinguish how to differentiate human generated art that needs support versus machine generated Arts well this is a philosophical discussion for over drinks maybe but I would maybe go so far as to say that the prompter is also an artist of sorts and yeah in fact I would make the case that that person is an artist and the same thing has come about with as this is a discussion and debate as old as time and it just simply new technologies old behaviors it's the same thing that's been playing out for eons and same thing's playing out the writing Etc totally very true 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 actually already projects that are 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 Dali will be then you have Dali use that prompt to generate a work of art maybe you generate not one work of art but like ten thousand and 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 right and so then now you have a work of art that was generated from the inputs of the community that was also sort of pruned and selected from a set of 10 000 variants of that work of art yeah also through a machine learning model that's trained by the community to then generate one work of art that is kind of
the product of this Collective collaboration 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 Asics and Z thanks sonal thank you so much thank you for listening to web3 with A6 and Z you can find show notes with links to resources books or papers discussed transcripts and more at asicsncrypto.com this episode was produced and edited by sonal toxy 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 Asics and Z crypto to
follow more of our work and get updates resources from us and from others be sure to subscribe to our web 3 Weekly Newsletter you can find it on our website at asicsnzcrypto.com thank you for listening and for subscribing let's go [Music]