Oriol Vinyals: Deep Learning and Artificial General Intelligence | Lex Fridman Podcast #306

Oriol Vinyals from DeepMind discusses deep learning and progress toward general AI agents. They explore Gato, a multimodal model trained on language, vision, and actions together, and how scaling, tokenization, and imitation learning shape systems that can handle diverse tasks without task-specific engineering.
Chapters
At which point is the neural network a being versus a tool? The following is a conversation with Oriel Vinales, his second time in the podcast. Ariel is the research director and deep learning lead at DeepMind and one of the most brilliant thinkers and researchers in the history of artificial intelligence. This is the Lex Friedman podcast. To support it, please check out our sponsors in the description. And now, dear friends, here's Ariel Vinniales. You are one of the most brilliant researchers in the history of AI, working across all kinds of modalities. Probably the one common theme is it's always sequences of data, so that we're talking about languages, images, even biology and games as we talked about last time. So you're a good person to ask this in your lifetime. Will we be able to build an AI system that's able to replace me as the interviewer in this conversation in terms of ability to ask questions that are compelling to somebody listening? And then further question is, are we close? Will we be able to build a system that replaces you as the interviewee in order to create a compelling conversation? How far away are we?
Do you think it's a good question? I think partly I would say do we want that? I really like when we start now with very powerful models, interacting with them and thinking of them more closer to us. The question is, if you remove the human side of the conversation, is that an interesting, you know, is that an interesting artifact? And I would say probably not. I've seen, for instance, last time we spoke we were talking about Starcraft and creating agents that play games involves self play. But ultimately what people care about was how does this agent behave when the opposite side is a human. So without a doubt we will probably be more empowered by AI. Maybe you can source some questions from an AI system. I mean that even today I would say it's quite plausible that with your creativity you might actually find very interesting questions that you can filter. We call this cherry picking sometimes in the field of language. And likewise, if I had now the tools on my side, I could say look, you're asking this interesting question from this answer, I like the words chosen by this particular system that created a few words completely replacing it feels not exactly exciting to me. Although in my lifetime I think way, I mean given the trajectory, I think it's possible that perhaps there could be interesting maybe self play interviews as you're suggesting that would look or sound quite interesting and probably would educate or you could learn a topic through listening to one of these interviews at a basic level at least.
So you said it doesn't seem exciting to you, but what if exciting is part of the objective function the thing is optimized over? So there's probably a huge amount of data of humans, if you look correctly, of humans communicating online. And there's probably ways to measure the degree of, you know, as they talk about engagement. So you can probably optimize the question that's most created an engaging conversation in the past. So actually if you strictly use the word exciting, there is probably a way to create a optimally exciting conversations that involve AI systems. At least one side is AI.
Yeah, that makes sense. I think maybe looping back a bit to games and the game industry, when you design algorithms, you're thinking about winning as the objective, right? Or the reward function. But in fact, when we discussed this with Blizzard, the creators of Starcraft in this case, I think what's exciting fun, if you could measure that and optimize for that, that's probably why we play video games or why we interact or listen or look at cat videos or whatever on the Internet. So it's true that modeling reward beyond the obvious reward functions we've used to in reinforcement learning is definitely very exciting. And again there is some progress actually into a particular aspect of AI which is quite critical, which is for instance, is a conversation or is the information truthful? Right. So you could start trying to evaluate these from excepts from the Internet, right, that has lots of information. And then if you can learn a function automated ideally so you can also optimize it more easily, then you could actually have conversations that optimize for non obvious things such as excitement. So yeah, that's quite possible. And then I would say in that case it would definitely be a fun exercise and quite unique to have at least one site that is fully driven by an excitement reward function. But obviously there would be still quite a lot of humanity in the system, both from who is building the system, of course, and also ultimately if we think of labeling for excitement, that those labels must come from us because it's just hard to have a computational measure of excitement. As far as I understand, there's no such thing.
Well, you mentioned truth also. I would actually venture to say that excitement is easier to label than truth or perhaps has lower consequences of failure. But there is perhaps the humanness that you mentioned that's perhaps part of a thing that could be labeled and that could mean an AI system that's doing dialogue, that's doing conversations should be flawed, for example, like that's the thing you optimize for, which is have Inherent contradictions by design have flaws by design. Maybe it also needs to have a strong sense of identity. So it has a backstory. It told itself that it sticks to. It has memories. Not in terms of how the system is designed, but it's able to tell stories about its past. It's able to have mortality and fear of mortality in the following way that it has an identity. And if it says something stupid and gets canceled on Twitter, that's the end of that system. So it's not like you get to rebrand yourself. That system is. That's it. So maybe the high stakes nature of it because you can't say anything stupid now or because you'd be canceled on Twitter. And there's stakes to that. And that I think part of the reason that makes it interesting. And then you have a perspective like you've built up over time that you stick with and then people can disagree with you. So holding that perspective strongly, holding sort of a. Maybe a controversial, at least a strong opinion, all of those elements, it feels like they can be learned because it feels like there's a lot of data on the Internet of people having an opinion. And then combine that with a metric of excitement, you can start to create something that, as opposed to trying to optimize for sort of grammatical clarity and truthfulness, the. The factual consistency over many sentences, you optimize for the humanness. And there's obviously data for humanness on the Internet. So I wonder, I wonder if there's a future where that's part or. I mean, I sometimes wonder that about myself. I'm a huge fan of podcasts and I listen to Pod, some podcasts and I think, like, what is interesting about this? What is compelling? The same way you watch other games, like you said watch play Starcraft or have Magnus Carlsen play chess. So I'm not a chess player, so. But it's still interesting to me. What is that? That's the. The stakes of it. Maybe the end of a domination of a series of wins. I don't know. There's all those elements somehow connect to a compelling conversation. And I wonder how hard is that to replace? Because ultimately all of that connects the initial proposition of how to test whether an AI is intelligent or not with the Turing Test, which I guess my question comes from a place of the spirit of that test.
Yes. I actually recall, I was just listening to our first podcast where we discussed Turing Test. So I would say from a neural network, you know, AI builder perspective, there's usually you try to map many of these Interesting topics you discussed to benchmarks and then also to actual architectures on how these systems are currently built, how they learn, what data they learn from, what are they learning? Right. We're talking about weights of a mathematical function. And then looking at the current state of the game, maybe what do we need leaps forward to get to the ultimate stage of all these experiences, lifetime experience, fears like words that currently barely we're seeing progress. Just because what's happening today is you take all these human interactions, it's a large, vast variety of human interactions online, and then you're distilling these sequences, going back to my passion, like sequences of words, letters, images, sound. There's more modalities here to be at play. And then you're trying to just learn a function that will be happy, that maximizes the likelihood of seeing all these through a neural network. Now, I think there's a few places where the way currently we train these models would clearly like to be able to develop the kinds of capabilities you say. I'll tell you, maybe a couple. One is the lifetime of an agent or a model. So you learn from this data offline, right? So you're just passively observing and maximizing this. You know, it's almost like a landscape of mountains. And then everywhere there's data that humans interacted in this way. You're trying to make that higher and then interact with lower where there's no data. And then these models generally don't then experience themselves. They just are observers. Right. They're passive observers of the data. And then we're putting them to then generate data when we interact with them. But that's very limiting the experience they actually experience when they could maybe be optimizing or further optimizing the weights. We're not even doing that. So to be clear, and again, mapping to AlphaGo, AlphaStar, we train the model and when we deploy it to play against humans, or in this case interact with humans like language models, they don't even keep training. They're not learning in the sense of the weights that you've learned from the data. They don't keep changing. Now there's something a bit more. Feels magical, but it's understandable if you're into neural net, which is. Well, they might not learn in the strict sense of the words the way it's changing. Maybe that's mapping to how neurons interconnect and how we learn over our lifetime. But it's true that the context of the conversation that takes place when you talk to these systems, it's held in their working memory. Right. It's almost like you start a computer, it has a hard drive that has a lot of information. You have access to the Internet, which has probably all the information. But there's also a working memory where these agents, as we call them or start calling them, build upon. Now this memory is very limited. Right now we're talking to be concrete about 2,000 words that we hold. And then beyond that we start forgetting what we've seen. So you can see that there's some short term coherence already. Right, with when you said, I mean, it's a very interesting topic having sort of a mapping, an agent to like have consistency. Then you know, if, if, if you say, oh, what's your name? It could remember that. But then it might forget beyond 2,000 words, which is not that long of context if we think even of this podcast books are much longer. So technically speaking, there's a limitation there. Super exciting from people that work on deep learning to be working on. But I would say we lack maybe benchmarks and the technology to have this lifetime like experience of memory that keeps building up. However, the way it learns offline is clearly very powerful. Right. So you asked me three years ago, I would say, oh, we're very far. I think we've seen the power of this imitation again on the Internet scale that has enabled these to feel like at least the knowledge, the basic knowledge about the world now is incorporated into the weights. But then this experience is lacking. And in fact, as I said, we don't even train them when we're talking to them other than their working memory of course is affected. So that's the dynamic part. But they don't learn in the same way that you and I have learned right from basically when we were born and probably before. So lots of fascinating, interesting questions you asked there. I think the one I mentioned is this idea of memory and experience versus just kind of observe the world and learn its knowledge. Which I think for that I would argue lots of recent advancements that make me very excited about the field. And then the second maybe issue that I see is all these models, we train them from scratch. That's something I would have complained three years ago or six years ago or 10 years ago. And it feels if we take inspiration from how we got here, how the universe evolved us and we keep evolving, it feels that it's a missing piece, that we should not be training models from scratch every few months, that there should be some sort of way in which we can grow models. Much like as a Species and many other elements in the universe is building from the previous sort of iterations. And that from a just purely neural network perspective, even though we would like to make it work, it's proven very hard to not throw away the previous weights. Right. This landscape we learn from the data and refresh it with a brand new set of weights, given maybe a recent snapshot of these data sets we train on, etc. Or even a new game we're learning. So that's. That feels like something is missing. Fundamentally we might find it, but it's not very clear how it will look like there's many ideas and it's super exciting as well.
Yes. Just for people who don't know. When you approach a new problem in machine learning, you're going to come up with an architecture that has a bunch of weights and then you initialize them somehow, which in most cases is some version of random. So that's what you mean by starting from scratch. And it seems like it's a waste every time you solve the game of Go and chess StarCraft protein folding. Surely there's some way to reuse the weights as we grow this giant database of neural networks that has solved some of the toughest problems in the world. And so some of that is. What is that? Methods, how to reuse weights, how to learn extract was generalizable or at least has a chance to be and throw away the other stuff. And maybe the neural network itself should be able to tell you that. Like what? Yeah, how do you, what. What ideas do you have for better initialization of weights?
Maybe stepping back, if we look at the field of machine learning, but especially deep learning, at the core of deep learning there's this beautiful idea that is a single algorithm can solve any task. So it's been proven over and over with more increasing set of benchmarks and things that were thought impossible that are being cracked by this basic principle. That is you take a neural network of uninitialized ways, so like a blank computational brain, then you give it, in the case of supervised learning, a lot ideally of examples of hey, here is what the input looks like and the desired output should look like this. I mean image classification is very clear example images to maybe one of a thousand categories. That's what ImageNet is like. But many, many if not all problems can be mapped this way. And then there's a generic recipe that you can use and this recipe with very little change. And I think that's the core of deep learning research that what is the recipe that is universal, that for any new given task, I'll be able to use without thinking, without having to work very hard on the problem at stake. We have not found this recipe, but I think the field is excited to find less tweaks or tricks that people find when they work on important problems specific to those and more of a general algorithm. Right. So at an algorithmic level, I would say we have something general ready, which is this formula of training a very powerful model, a neural network on a lot of data. And in many cases you need some specificity to the actual problem you're solving. Protein folding being such an important problem, has some basic recipe that is learned from before, right? Like transformer models, graph neural networks, ideas coming from nlp, like something called bert. That is a kind of loss that you can in place to help the model. Knowledge distillation is another technique, Right. So this is the formula we still had to find some particular things that were specific to AlphaFold, right? That's very important because protein folding is such a high value problem that as humans we should solve it no matter if we need to be a bit specific. And it's possible that some of these learnings will apply then to the next iteration of this recipe that deep learners are about. But it is true that so far the recipe is what's common, but the weights you generally throw away, which feels very sad, although maybe especially in the last two, three years and when we last spoke, I mentioned this area of meta learning, which is the idea of learning to learn that idea. And some progress has been had starting, I would say mostly from GPT3 on the language domain only in which you could conceive a model that is trained once. And then this model is not narrow in that it only knows how to translate a pair of languages, or it only knows how to assign sentiment to a sentence. You could teach it via prompting, it's called, and this prompting is essentially just showing it a few more examples, almost like you do show examples, input output examples, algorithmically speaking, to the process of creating this model. But now you're doing it through language, which is very natural way for us to learn from one another. I tell you, hey, you should do this new task, I'll tell you a bit more, maybe you ask me some questions and now you know the task, right? You didn't need to retrain it from scratch. And we've seen these magical moments almost in this way to do few shot prompting through language on language only domain. And then in the last two years we've seen these expanded to beyond language, adding Vision adding actions and games, lots of progress to be had. But this is maybe, if you ask me about how are we going to crack this problem? This is perhaps one way in which you have a single model. The problem of this model is it's hard to grow in weights or capacity. But the model is certainly so powerful that you can teach it some tasks in this way that I could teach you a new task now if we were, oh, let's a text based task or a classification, a vision style task. But it still feels like more breakthroughs should be had. But it's a great beginning. Right. We have a good baseline. We have an idea that this maybe is the way we want to benchmark progress towards AGI. And I think in my view that's critical to always have a way to benchmark the community sort of converging to this overall, which is good to see. And then this is actually what excites me in terms of also next steps for deep learning is how to make these models more powerful. How do you train them, how to grow them if they must grow, should they change their weights as you teach it, task or not? There's some interesting questions, many to be answered.
Yeah, you've opened the door to a bunch of questions I want to ask, but let's first return to the, to your tweet and read it like a Shakespeare. You wrote gado is not the end, it's the beginning. And then you wrote meow and then an emoji of a cat. So first two questions. First, can you explain the meow and the cat emoji? And second, can you explain what gato is and how it works?
Right, Indeed. I mean, thanks for reminding me that we're all exposing on Twitter and.
Permanently there.
Yes, permanently there.
One of the greatest AI researchers of all time. Meow and cat emoji. Yes, there you go.
Right.
So can you imagine like touring tweeting meow and cat? Probably. He would. Probably would.
Probably. So, yeah, the tweet is important. Actually, you know, I put thought on the tweets. I hope people. Which part?
Okay, so there's three sentences. Ghetto is not the end. Ghetto is the beginning. Meow, cat emoji. Okay, which, which is the important part?
The meow. No, no, definitely that it is the beginning. I mean, I probably was just explaining a bit where the field is going. But let me tell you about Gatto. So first, the name Gatto comes from maybe a sequence of releases that DeepMind had that used animal names to name some of their models that are based on this idea of large sequence models, initially they're only language, but we are expanding to other modalities. So we had gopher, chinchilla. These were language only. And then more recently, we released Flamingo, which adds vision to the equation. And then gato, which adds vision and then also actions in the mix. Right. As we discussed, actually actions, especially discrete actions like up, down, left, Right. I just told you the actions, but they're words. So you can kind of see how actions naturally map to sequence modeling of words, to which these models are very powerful. So gato was named after. I believe I can only from memory. Right. These, you know, these things always happen with an amazing team of researchers behind. So before the release, yeah. We had a discussion about which animal would we pick. Right. And I think because of the word general agent. Right. And this is a property quite unique to gato. We kind of were playing with the ga words, and then, you know, gato, rhymes of cat. Yes. And gato is obviously a Spanish version of cat. I had nothing to do with it, although I'm from Spain.
Oh, how do you. Wait, sorry, how do you say cat in Spanish?
Gato.
Oh, gato.
Yeah. Now, okay, okay, I see, I see, I see you.
Now it all makes sense. Okay, so how do you say meow in Spanish? No, that's.
I think you. You say it the same way, but you write it is M, I, A, U.
It's universal.
Yeah.
All right, so then how does the thing work? So you said general is. So you said language, vision, and action. Action. How does this. Can you explain what kind of neural networks are involved? What does the training look like? And maybe what do you. Are some beautiful ideas within the system.
Yeah. So. So maybe the basics of GATO are not that dissimilar from many, many work that come. So here is where the recipe hasn't changed too much. There is a transformer model that's the kind of recurrent neural network that essentially takes a sequence of modalities, observations that could be words, could be vision, or could be actions. And then its own objective that you train it to do when you train it is to predict what the next anything is. And anything means what's the next action. If this sequence that I'm showing you to train is a sequence of actions and observations, then you're predicting what's the next action and the next observation. Right. So you think of this really as a sequence of bytes. Right. So take any sequence of words, a sequence of interleaved words and images, a sequence of maybe observations that are images and moves in Atari, up, down, left, right. And these, you just think of them as bytes. And you're modeling what's the next byte going to be like. And you might interpret that as an action and then play it in a game, or you could interpret it as a word and then write it down if you're chatting with the system and so on. So Gato basically can be thought as inputs, images, text, video, actions. It also actually inputs some sort of proprioception sensors from robotics, because robotics is one of the tasks that it's been trained to do. And then at the output, similarly, it outputs words, actions, it does not output images. That's just by design. We decided not to go that way for now. That's also, in part why it's the beginning, because there's more to do, clearly. But that's kind of what Galto is. It's this brain that essentially you give it any sequence of these observations and modalities and it outputs the next step, and then off you go, you feed the next step into and predict the next one and so on. Now, it is more than a language model, because even though you can chat with Gato, you can chat with Chinchilla or Flamingo, it also is an agent, Right? So that's why we call it a of Kato, the letter A. And also it's general. It's not an agent that's been trained to be good at only Starcraft, or only Atari, or only Go. It's been trained on a vast variety of data sets.
So what makes an agent, if I may interrupt? The fact that it can generate actions.
Yes. So when we call it, I mean, it's a good question, right? When do we call a model? I mean, everything is a model. But what is an agent, in my view is indeed the capacity to take actions in an environment that you then send to it, and then the environment might return with a new observation, and then you generate the next action.
And this reminds me of the question from the side of biology, what is life? Which is actually a very difficult question as well. What is living? What is living? When you think about life here on this planet Earth, and a question interesting to me about aliens. What is life? When we visit another planet, would we be able to recognize it? And this feels like it sounds perhaps silly, but I don't think it is. At which point is the neural network a being versus a tool? And it feels like action, ability to modify its environment, is that fundamental leap.
Yeah, I think it certainly feels like action is a necessary condition to be more alive. But probably not sufficient either.
Consciousness thing, whatever.
Yeah, we can get back to that later. But anyways, going back to the meow and the tweet and the gato, right. So one of the leaps forward and what took the team a lot of effort and time was as you were asking, how has GATO been trained? So I told you, GATO is this transformer neural network models actions, sequences of actions, words, et cetera. And then the way we train it is by essentially pulling data sets of observations. So it's a massive imitation learning algorithm that it imitates obviously to what is the next word that comes next from the usual data sets we used before. Right. So these are these web scale style data sets of people writing on webs or chatting or whatnot. Right. So that's an obvious source that we use on all language work. But then we also took a lot of agents that we have at DeepMind. I mean, as you know, DeepMind, we're quite, you know, we're quite interested in learning, reinforcement learning and learning agents that play in different environments. So we kind of created a data set of these trajectories, as we call them, or agent experiences. So in a way there are other agents we trained for a single mind purpose to let's say, control a 3D game environment and navigate a maze. So we had all the experience that was created through one agent interacting with that environment. And we added this to the data set. Right. And as I said, we just see all the data, all these sequences of words or sequences of this agent interacting with that environment, or agents playing Atari and so on. We see this as the same kind of data. And so we mix these data sets together and we train gato. That's the G part, right. It's general because it really has mixed. It doesn't have different brains for each modality or each narrow task. It has a single brain. It's not that big of a brain compared to most of the neural networks we see these days. It has 1 billion parameters. Some models we're seeing get in the trillions these days. And certainly 100 billion feels like a size that is very common when you train these jobs. So the actual agent is relatively small, but it's been trained on a very challenging, diverse data set, not only containing all of Internet, but containing all these agent experience playing very different distinct environments. So this brings us to the part of the tweet of this is not the end, it's the beginning. It feels very cool to see GATO in principle is able to control any sort of Environments, especially the ones that it's been trained to do, these 3D games, Atari games, all sorts of robotics tasks and so on. But obviously it's not as proficient as the teachers it learned from on these environments.
Not obvious. It's not obvious that it wouldn't be more proficient. It's just the current beginning part, right, Is that the performance is such that it's not as good as if it's specialized to that task.
Right? So it's not as good. Although I would argue size matters here. So the fact that I would argue.
Size always matters, that's a different conversation.
But for neural networks, certainly size does matter. So it's the beginning because it's relatively small. So obviously scaling this idea up might make the connections that exist between text on the Internet and playing Atari and so on more synergistic with one another. And you might gain. And that moment we didn't quite see. But obviously that's why it's the beginning.
That synergy might emerge with scale, right?
Might emerge with scale. And also I believe there's some new research or ways in which you prepare the data that might. You might need to sort of make it more clear to the model that you're not only playing Atari and it's just, you start from a screen and here is up and a screen and down. Maybe you can think of playing Atari as there's some sort of context that is needed for the agent before it starts seeing, oh, this is an Atari screen, I'm going to start playing. You might require, for instance, to be told in words, hey, in this sequence that I'm showing, you're going to be playing an Atari game. So text might actually be a good driver to enhance the data. Right. So then these connections might be made more easily. Right? That's an idea that we start seeing in language. But, you know, obviously beyond this is going to be effective, right. It's not like I don't show you a screen and, and you from. From scratch, you. You're supposed to learn a game. There is a lot of context we. We might set. So there are. There might be some work needed as well to set that context. But anyways, there's a lot of work. Yeah.
So that context puts all the different modalities on the same level ground to provide the context best. So maybe on that point. Point. So there's this task, which may not seem trivial, of tokenizing the data, of converting the data into pieces, into basic atomic elements that then could cross modality somehow. So what's tokenization? How do you tokenize text? How do you tokenize images? How do you tokenize images, games and actions and robotics tasks?
Yeah, that's a great question. So tokenization is the entry point to actually make all the data look like a sequence. Because tokens then are just kind of these little puzzle pieces. We break down anything into these puzzle pieces and then we just model what's this puzzle look like. Right. When you make it lay down in a line, so to speak, in a sequence. So in gato, the text, there's a lot of work. You tokenize text usually by looking at commonly used substrings. Right. So there's, you know, ing in English is a very common substring. So that becomes a token. There's quite well studied problem on tokenizing text. And Gato just used the standard techniques that have been developed from many years, even starting from N gram models in the 1950s and so on.
Just for context, how many tokens, like what order, magnitude, number of tokens is required for a word, usually? What are we talking about?
Yeah, for a word in English. Right. I mean, every language is very different. The current level or granularity of tokenization generally means it's maybe 2 to 5. I mean, I don't know the statistics exactly, but to give you an idea, we don't tokenize at the level of letters. Then it would probably be like, I don't know what the average length of a word is in English, but that would be the minimum set of tokens you could use.
It was bigger than letters, smaller than words.
Yes, yes. And you could think of very, very common words like V. I mean, that would be a single token, but very quickly you're talking 2, 3, 4 tokens or so.
Have you ever tried to tokenize emojis?
Emojis are actually just sequences of letters.
Maybe to you, but to me they mean so much more.
Yeah, you can render the emoji, but if you actually just.
Yeah, this is a philosophical question. Is emojis an image or a text?
The way we do these things. These things is they're actually mapped to small sequences of characters. So you can actually play with these models and input emojis. It will output emojis back, which is actually quite a fun exercise. You probably can find other tweets about these out there. But yeah, so anyways, text, there's like, it's very clear how this is done. And then in gatto, what we did for images is we map images to essentially we compressed images, so to speak, into something that looks more like less like every pixel with every intensity. That would mean we have a very long sequence. Right. Like if we're talking about 100 by hundred pixel images, that would make the sequences far too long. So what was done there is you just use a technique that essentially compresses an image into maybe 16 by 16 patches of pixels and then that is map again, tokenized. You just essentially quantize this space into a special word that actually maps to this little sequence of pixels. And then you put the pixels together in some raster order and then that's how you get out or in the image that you're processing.
But there's no semantic aspect to that. So you're doing some kind of. You don't need to understand anything about the image in order to tokenize it?
Currently, no. You're only using this notion of compression. So you're trying to find common. It's like JPG or all these algorithms. It's actually very similar at the tokenization level. All we're doing is finding common patterns and then making sure in a lossy way we compress these images, given the statistics of the images that are contained in all the data we deal with.
Although you could probably argue that JPEG does have some understanding of images. Like, because visual information, maybe color compressing based, crudely based on color, does capture some. Something important about an image that's about its meaning, not just about some statistics.
Yeah, I mean jp, as I said, the algorithms look actually very similar to. They use the cosine transform in jpg. The approach we usually do in machine learning when we deal with images and we do this quantization step is a bit more data driven. So rather than have some sort of Fourier basis for how frequencies appear in the natural world, we actually just use the statistics of the images and then quantize them based on the statistics, much like you do in words. Right. So common subscript substrings are allocated. A token in images is very similar, but there's no connection. The token space, if you think of, oh like the tokens are an integer and in the end of the day, so now like we work on maybe we have about, let's say, I don't know the exact numbers, but let's say 10,000 tokens for text, right. Certainly more than characters because we have groups of characters and so on. So from 1 to 10,000, those are representing all the language and the words we'll see. And then images occupy the next set of integers. So they're completely independent. Right. So from 10,001 to 20,000. Those are the tokens that represent these other modality images. And that is an interesting aspect that makes it orthogonal. So what connects these concepts is the data, right? Once you have a data set, for instance, that captions images, that tells you, oh, this is someone playing a Frisbee on a green field. Now the model will need to predict the tokens from the text green field to then the pixels. And that will start making the connections between the tokens. So these connections happen as the algorithm learns. And then the last, if we think of these integers, the first few are words, the next few are images. In gato, we also allocated the highest order of integers to actions, right? Which we discretize. And actions are very diverse, right. In Atari, there's I don't know if 17 discrete actions. In robotics, actions might be torques and forces that we apply. So we just use kind of similar ideas to compress these actions into tokens. And then that's how we map now all the space to this sequence of integers, but they occupy different space. And what connects them is then the learning algorithm. That's where the magic happens.
So the modalities are orthogonal to each other in token space.
Right?
So in the input, everything you add, you add extra tokens.
Right?
And then you're shoving all of that into one place.
Yes, the transformer.
And that transformer, that transformer tries, looks at this gigantic token space and tries to form some kind of representation, some kind of unique wisdom about all of these different modalities. How's that possible? If you were to sort of like put your psychoanalysis hat on and try to psychoanalyze this neural network, Is it schizophrenic? Does it try to, given this very few weights represent multiple disjoint things and somehow have them not interfere with each other? Or is this a more building on the, on the joint strength, on whatever is common to all the different modalities? Like what if you were to ask a question, is it schizophrenic or is it of one mind?
I mean, it is one mind and it's actually the simplest algorithm, which that's kind of in a way how it feels like the field hasn't changed since backpropagation and gradient descent was purpose for learning neural networks. So there is obviously details on the architecture this has evolved. The current iteration is still the transformer, which is a powerful sequence modeling architecture. But then the goal of setting these weights to predict the data is essentially the same as basically I could describe, I mean, we described a few years ago AlphaStar language modeling and so on, right? We take, let's say, an Atari game, we map it to a string of numbers that will all be probably image space and action space interleaved. And all we're gonna do is say, okay, Given the numbers 10,001, 10,004, 10,005, the next number that comes is 20,006, which is in the action space. And you're just optimizing these weights via very simple gradient, like mathematical is almost the most boring algorithm you could imagine. We settle the weights so that given this particular instance, these weights are set to maximize the probability of having seen this particular sequence of integers for this particular game. And then the algorithm does this for many, many, many iterations, looking at different modalities, different games, right? That's the mixture of the data set we discuss. So in a way, it's a very simple algorithm. And the weights, right, they're all shared, right? So in terms of is it focusing on one modality or not? The intermediate weights that are converting from this input of integers to the target integer you're predicting next? Those weights certainly are common. And then the way the tokenization happens, there is a special place in the neural network, which is we map this integer, like number 10,001, to a vector of real numbers. Like real numbers, we can optimize them with gradient descent, right? The functions we learn are actually surprisingly differentiable. That's why we compute gradients. So this step is the only one that this orthogonality you mentioned applies. So mapping a certain token for text or image or actions, each of these tokens gets its own little vector of real numbers that represents this. If you look at the field back many years ago, people were talking about word vectors or word embeddings. These are the same. We have word vectors or embeddings, we have image vector or embeddings, and action vector of embeddings. And the beauty here is that as you train this model, if you visualize these little vectors, it might be that they start aligning even though they're independent parameters. There could be anything. But then it might be that you take the word gato or cat, which maybe is common enough that actually has its own token. And then you take pixels that have a cat, and you might start seeing that these vectors look like they align. So by learning from this vast amount of data, the model is realizing the potential connections between these modalities. Now, I will say there will be another way, at least in part, to not have these different vectors for each different modality. For instance, when I Tell you about actions in certain space. I'm defining actions by words. So you could imagine a world in which I'm not learning that the action app in Atari is its own number. The action app in Atari maybe is literally the word or the sentence app in Atari. Right. And that would mean we now leverage much more from the language. This is not what we did here. But certainly it might make these connections much easier to learn and also to teach the model to correct its own actions and so on. Right. So. So all this to say that Gatto is indeed the beginning, that it is a radical idea to do this this way, but there's probably a lot more to be done and the results to be more impressive not only through scale, but also through some new research that will come hopefully in the years to come.
So just to elaborate quickly, you mean one possible next step or one of the paths that you might take next is doing the tokenization, fundamentally as a kind of linguistic communication. So, like, you convert even images into language. So doing something like a crude semantic segmentation, trying to just assign a bunch of words to an image that, like, have almost like a dumb entity explaining as much as it can about the. The image. And so you convert that into words and then you convert games into words and. And you provide the context and words and all of it eventually getting to a point where everybody agrees with Noam Chomsky that language is actually at the core of everything. That's. It's. It's the base layer of intelligence and consciousness and all that kind of stuff. Okay, you mentioned early on, like, s. It's hard to grow. What did you mean by that? Because we're talking about scale. My change there might be. And we'll talk about this too, like, there's a emergent. There's certain things about these neural networks that are emergent. So certain like performance we can see only with scale. And there's some kind of threshold of scale. So why is it hard to grow something like this Meow network?
So the meow network, it's not hard to grow if you retrain it. What's hard is, well, we have now 1 billion parameters. We trained them for a while. We spend some amount of work towards building these weights that are an amazing initial brain for doing these kind of tasks we care about. Could we reuse the weights and expand to a larger brain? And that is extraordinarily hard, but also exciting from a research perspective and a practical perspective point of view. Right. So there's this notion of modularity in software engineering and we're starting to see some examples and work that leverages modularity. In fact, if we go back one step from Gato to a work that I would say trained, much larger, much more capable network called Flamingo. Flamingo did not deal with actions, but it definitely dealt with images. Images in an interesting way. Kind of akin to what Agato did, but slightly different technique for tokenizing, but we don't need to go into that detail. But what Flamingo also did, which Gato didn't do, and that just happens because these projects, you know, they're different. You know, it's a bit of like the exploratory nature of research, which is great.
The research behind these projects is also modular.
Yes, exactly. And it has to be, right? We need to have creativity and sometimes you need to protect pockets of, you know, people, researchers and so on.
By we humans.
Yes, okay. And also in particular researchers and Maybe even further DeepMind or other such labs.
And then the neural networks themselves. So it's modularity all the way down.
All the way down. So the way that we did modularity very beautifully in Flamingo is we took chinchilla, which is a language only model, not an agent, if we think of actions being necessary for agency. So we took chinchilla, we took the weights of chinchilla and then we froze them. We said, these don't change. We trained them to be very good at predicting the next word is a very good language model, state of the art at the time you release it, et cetera, et cetera. We're going to add a capability to see, right? We are gonna add the ability to see to this language model. So we're going to attach small pieces of neural networks at the right places in the model. It's almost like injecting the network with some weights and some substructures in a good way. Right. So you need the research to say what is effective, how do you add this capability without destroying others, et cetera. So we created a small subnetwork initialized not from random, but actually from self supervised learning, a model that understands vision in general. And then we took data sets that connect the two modalities, vision and language. And then we froze the main part, the largest portion of the network, which was chinchilla, that is 70 billion parameters. And then we added a few more parameters on top train from scratch, and then some others that were pre trained with the capacity to see. It was not tokenization in the way I described for Gatto, but it's a similar idea. And then we trained the whole system, parts of it were frozen, parts of it were new. And all of a sudden we developed Flamingo, which is an amazing model that is essentially, I mean, describing it is a chatbot where you can also upload images and start conversing about images, but it's also kind of a dialogue style chatbot.
So the input is images and text and the output is text.
Exactly.
How many parameters you said? 70 billion.
70 billion for chinchilla? Yeah, chinchilla is 70 billion. And then the ones we add on top, which kind of almost is almost like a way to overwrite its little activations so that when it sees vision, it does kind of, kind of a correct computation of what it's seeing, mapping it back towards, so to speak, that adds an extra 10 billion parameters. Right. So it's total 80 billion, the largest one we released. And then you train it on a few data sets that contain vision and language. And once you interact with the model, you start seeing that you can upload an image and start sort of having a dialogue about the image, which is actually not something. It's very similar and akin to what we saw in language. Only this prompting abilities that it has, you can teach it a new vision task. It does things beyond the capabilities that in theory, the datasets provided in themselves. But because it leverages a lot of the language knowledge acquired from Chinchilla, it actually has this few shot learning ability and these emerging abilities that we didn't even measure once we were developing the model. But once developed, then as you play with the interface, you can start seeing. Wow, okay. Yeah, it's cool. We can upload. I think one of the tweets talking about Twitter was this image from Obama that is placing a weight and someone is kind of weighting themselves. And it's kind of a joke style image. And it's notable because I think Andre Karpathi a few years ago said no computer vision system can understand the subtlety of this joke in this image. All the things that go on. And so what we try to do, and it's very anecdotally, I mean, this is not a proof that we solved this issue, but it just shows that you can upload now this image and start conversing with the model, trying to make out if it gets that there's a joke, because the person weighting themselves doesn't see that someone behind is making the weight higher and so on and so forth. So it's a fascinating capability. And it comes from this key idea of modularity where we took a frozen Brain and we just added a new capability. So the question is, should we? So in a way you can see even from DeepMind, we have Flamingo that this model approach and thus could leverage the scale a bit more reasonably because we didn't need to retrain a system from scratch. And on the other hand we had Gato, which used the same datasets, but then it trained it from scratch. And so I guess big question for the community is should we train from scratch or should we embrace modularity? And this goes back to modularity as a way to grow. But reuse seems natural and it was very effective.
Certainly the next question is, if you go the way of modularity, is there a systematic way of freezing weights and joining different modalities across, you know, not just two or three or four networks, but hundreds of networks from all different kinds of places. Maybe open source network that looks at weather patterns and you shove that in somehow and then you have networks that, I don't know, do all kinds of stuff. Play Starcraft and play all the other video games and they. You can keep adding them in without significant effort. Like that's maybe the effort scales linearly or something like that, as opposed to the more network you add, the more you have to worry about the instabilities created.
Yeah. So that vision is beautiful. I think there's still the question about within single modalities, like Chinchilla was reused, but now if we train a next iteration of language models, are we going to use Chinchilla or not? Yeah.
How do you swap out Chinchilla?
Right. So there's still big questions, but that idea is actually really akin to software engineering, which we're not reimplementing libraries from scratch, we're reusing and then building ever more amazing things, including neural networks with software that we're reusing. So I think this idea of modularity, I like it, I think it's here to stay. And that's also why I mentioned it's just the beginning, not the end.
You mentioned meta learning. So given this promise of gatto, can we try to redefine this term that's almost akin to consciousness because it means different things to different people throughout the history of artificial intelligence. But what do you think meta learning is and looks like now in the five years, 10 years, will it look like system I gotta but scaled? What's your sense of what does meta learning look like, do you think?
Great.
With all the wisdom we've learned so far?
Yeah, great question. Maybe it's good to give another data point. Looking backwards rather than forward. So when We Talk. In 2019, meta learning meant something that has changed mostly through the revolution of GPT3 and beyond. So what meta learning meant at the time was driven by what benchmarks people care about in meta learning. And the benchmarks were about a capability to learn about object identities. So it was very much overfitted to vision and object classification. And the part that was met about that was that, oh, we're not just learning a thousand categories that imagenet tells us to learn, we're going to learn object categories that can be defined when we interact with the model. So it's interesting to see the evolution, right? The way this started was we have a special language that was a data set, a small data set that we prompted the model with saying, hey, here is a new classification task. I'll give you one image and the name, which was an integer at the time of the image and a different image and so on. So you have a small prompt in the form of a data set, a machine learning dataset, and then you got then a system that could then predict or classify these objects that you just defined kind of on the fly. So fast forward, it was revealed that language models are few shot learners. That's the title of the paper, so very good title. Sometimes titles are really good. So this one is really, really good because that's the point of GPT3 that showed that, look, sure, we can focus on object classification and what meta learning means within the space of learning object categories. This goes beyond or before, rather to also omniglot before imagenet and so on. So there's a few benchmarks to. Now all of a sudden we're a bit unlocked from benchmarks and through language we can define tasks. Right? So we're literally telling the model some logical task or little thing that we wanted to do. We prompt it much like we did before, but now we prompt it through natural language. And then not perfectly. I mean, these models have failure modes and that's fine. But these models then are now doing a new task, so they meta learn these new capabilities. Now that's where we are. Now. Flamingo expanded this to visual and language, but it basically has the same abilities. You can teach it. For instance, an emergent property was that you can take pictures of numbers and then do arithmetic with the numbers just by teaching it. Oh, when I show you three plus six, I want you to output nine and you show it a few examples. And now it does that. So it went way beyond this imagenet sort of categorization of images that we were a bit stuck, maybe before this revelation moment that happened in 2000, I believe it was 19, but it was after we chat.
In that way, it has solved meta learning as was previously defined.
Yes, it expanded what it meant. So that's what you say. What does it mean? So it's an evolving term. But here is maybe now looking forward, looking at what's happening obviously in the community with more modalities, what we can expect. And I would certainly hope to see the following, and this is a pretty drastic hope, but in five years, maybe we chat again and we have a system, right, A set of weights that we can teach it to play StarCraft. Maybe not at the level of AlphaStar, but play StarCraft, a complex game. We teach it through interactions to prompting. You can certainly prompt a system, that's what Gato shows, to play some simple Atari games. So imagine if you start talking to a system, teaching it a new game, showing it examples of, in this particular game, this user did something good. Maybe the system can even play and ask you questions, say, hey, I played this game, I just played this game. Did I do well? Can you teach me more? So five, maybe to 10 years, these capabilities or what meta learning means will be much more interactive, much more rich and through domains that we were specializing, right? So you see the difference, right? We built AlphaStar Specialized to play StarCraft. The algorithms were general, but the weights were specialized. And what we're hoping is that we can teach a network to play games, to play any game, just using games as an example, through interacting with it, teaching it, uploading the Wikipedia page of starcraft, like this is in the horizon and obviously there are details need to be filled and research need to be done. But that's how I see meta learning above, which is going to be beyond prompting. It's going to be a bit more interactive. The system might tell us to give it feedback after it maybe makes mistakes or it loses a game. But it's nonetheless very exciting because if you think about this this way, the benchmarks are already there. We just repurpose the benchmarks, right? So in a way, I like to map the space of what maybe AGI means to say, okay, like we went 101% performance in Go in Chess, in StarCraft. The next iteration might be 20% performance across, quote, unquote, all tasks, right? And even if it's not as good, it's fine. We have ways to also measure progress because we have those sponsors, special agents, specialized agents and so on. So this is to me, very exciting. And these Next iteration models are definitely hinting at that direction of progress, which hopefully we can have. There are obviously some things that could go wrong in terms of we might not have the tools, maybe transformers are not enough. Then there's some breakthroughs to come, which makes the field more exciting to people like me as well, of course. But that's, if you ask me, five to 10 years, you might see these models that start to look more like weights that are already trained and then it's more about teaching or they meta learn what you're trying to induce in terms of tasks and so on. Well beyond the simple now tasks we're starting to see emerge, like small arithmetic tasks and so on.
So a few questions around that. This is fascinating. So that kind of teaching interactive not so it's beyond prompting. So interacting with the neural network, that's different than the training process. So it's different than the optimization over differentiable functions. This is already trained and now you're teaching. I mean it's almost like akin to the brain, the neurons already set with their connections. On top of that, you're not using that infrastructure to build up further knowledge. Okay, so that's a really interesting distinction that's actually not obvious from a software engineering perspective that there's a line to be drawn because you always think for a neural network to learn, it has to be retrained, trained and retrained. But maybe and prompting is a way of teaching and you'll now work a little bit of context about whatever the heck you're trying it to do. So you can maybe expand this prompting capability by making it interact.
That's really, really by the way, this is not if you look at way back at different ways to tackle even classification tasks. So this comes from long standing literature in machine learning. What I'm suggesting could sound to some a bit like nearest neighbor. So nearest neighbor is almost the simplest algorithm that does not require learning. So it has this interesting like you don't need to compute gradients and what nearest neighbor does is you quote unquote, have a data set or upload a data set and then all you need to do is a way to measure distance between points and then to classify a new point. You're just sitting simply computing what's the closest point in this massive amount of data. And that's my answer. So you can think of prompting in a way as you're uploading not just simple points and the metric is not the distance between the images or something simple, it's something that you compute that's Much more advanced, but in a way it's very similar. Right. You simply are uploading some knowledge to this pre trained system. In nearest neighbor, maybe the metric is learned or not, but you don't need to further train it. And then now you immediately get a classifier out of this. Right now it's just an evolution of that concept, very classical concept in machine learning, which is just learning through what's the closest point closest by some distance. And that's it. It's an evolution of that. And I will say how I saw meta learning when we worked on a few ideas in 2016 was precisely through the lens of nearest neighbor, which is very common in computer vision community. Right. There's a very active area of research about how do you compute the distance between two images? But if you have a good distance metric, you also have a good classifier. Right? All I'm saying is now these distances and the points are not just images, they're like words or something. Sequences of words and images and actions that teach you something new. But it might be that technique wise, those come back and I will say that it's not necessarily true that you might not ever train the weights a bit further. Some aspect of meta learning. Some techniques in meta learning do actually do a bit of fine tuning, as it's called. They train the weights a little bit when they get a new task. So as I call the how or how we're going to achieve this as a deep learner, I'm very skeptic. We're going to try a few things, whether it's a bit of training, adding a few parameters, thinking of these as nearest neighbor, or just simply thinking of there's a sequence of words, it's a prefix, and that's the new classifier. We'll see. Right. There's the beauty of research. But what's important is what that is a good goal in itself that I see as very worthwhile pursuing for the next stages of not only meta learning. I think this is basically what's exciting about machine learning, period to me.
Well, the interactive aspect of that is also very interesting. The interactive version of nearest neighbor to help you pull out the classifier from this giant thing. Okay, is this the way we can go in 5, 10 plus years from any task. Sorry, from many tasks to any task. So and what does that mean? Like what does it need to be actually trained? On which point is the network had enough? So what, what does a network need to learn about this world in order to be able to perform any task? Is it just as simple as language, image and action? Or do you need some set of representative images? Like if you only see land images, will you know anything about underwater? Is that some fundamentally different.
I don't know those. I mean, those are open questions, I would say. I mean the way you put, let me maybe further your example, right? If, if all you see is land images, but you're reading all about land and water worlds, but in books, right. Imagine. Would that be enough? Good question. We don't know. But I guess maybe you can join us if you want in our quest to find this. That's precisely water world.
Yeah.
Yes, that's precisely. I mean the beauty of research, and that's the research business we're in, I guess, is to figure this out and ask the right questions and then iterate with the whole community publishing findings and so on. But yeah, this is a question. It's not the only question. But it's certainly, as you ask, is on my mind constantly. Right. And so we'll need to wait for maybe the, let's say five years, let's hope it's not 10, to see what are the answers. Some people will largely believe in unsupervised or self supervised learning of single modalities and then crossing them. Some people might think end to end learning is the answer. Modularity is maybe the answer. So we don't know, but we're just definitely excited to find out.
But it feels like this is the right time and we're at the beginning of this journey. We're finally ready to do these kind of general big models and agents. What do you sort of specific technical thing about Garo, flamingo, chinchilla, gopher? Any of these? That is especially beautiful. That was surprising, maybe. Is there something that just jumps out at you? Of course there's the general thing of like you didn't think it was possible and then you realize it's possible in terms of the generalizability across modalities and all that kind of stuff, or maybe how small of a network, relatively speaking, GATO is, all that kind of stuff. But is there some weird little things that were surprising?
Look, I, I'll give you an answer that's very important because maybe people don't quite realize this, but the teams behind these efforts, the actual humans. Yeah, that's maybe the surprising in a obviously positive way. So anytime you see these breakthroughs, I mean, it's easy to map it to a few people, there's people that are great at explaining things and so on. That's very nice. But maybe the learnings or the meta learnings that I get as a human about this is sure we can move forward. But the surprising bit is how important are all the pieces of these projects? How do they come together? So I'll give you maybe some of the ingredients of success that are common across these, but not the obvious ones. And machine learning, I can also give you those. But basically there is. Engineering is critical. So very good engineering, because ultimately we're collecting data sets. So the engineering of data and then of deploying the models at scale into some compute cluster that cannot go understated, that is a huge factor of success. And it's hard to believe that details matter so much. We would like to believe that it's true that there is more and more of a standard formula, as I was saying, like this recipe that works for everything. But then when you zoom into this age of these projects, then you realize the devil is indeed in the details. And then the teams have to work kind of together towards these goals. So engineering of data and obviously clusters and large scale is very important. And then one that is often not, maybe nowadays it is more clear, is benchmark progress. Right. So we're talking here about multiple months of tens of researchers and people that are trying to organize the research and so on working together, and you don't know that you can get there. I mean, this is the beauty. If you're not risking trying to do something that feels impossible, you're not going to get there. But you need a way to measure progress. So the benchmarks that you build are critical. I've seen this beautifully play out in many projects. I mean, maybe the one I've seen it more consistently, which means we established the metric, actually the community did, and then we leveraged that massively is alphafold. This is a project where the data, the metrics were all there and all it took was, and it's easier said than done, an amazing team working not to try to find some incremental improvement and publish, which. Which is one way to do research that is valid, but aim very high and work literally for years to iterate over that process. And working for years with a team, I mean, it is tricky. That also happened to happen partly during a pandemic and so on. So I think my meta learning from all this is the teams are critical to the success. And then if now going to the machine learning, the part that's surprising is so we like architectures, like neural networks, and I would say this was a very rapidly evolving field until the transformer came. So attention Might indeed be all you need, which is the title. Also a good title. Although in hindsight it's good. I don't think at the time I thought this is a great title for a paper. But that architecture is proving that the dream of modeling sequences of any bytes, there is something there that will stick. And I think this advance in architectures in kind of how neural networks are architectured to do what they do, it's been hard to find one that has been so stable and relatively has changed very little since it was invented five or so years ago. So. So that is a surprising keeps is a surprise that keeps recurring into all the projects.
Try to on a philosophical or technical level. Introspect. What is the magic of attention?
What is.
What is attention? That's attention in people that study cognition. So human attention. I think there's giant wars over what attention means, how it works in the human mind. So what there's very simple looks at what attention is in neural network from the days of attention is all you need. But do you think there's a general principle that's really powerful here?
Yeah. So a distinction between transformers and LSTMs, which were what came before. And there was a transitional period where you could use both. In fact, when we talked about Alphasta, we used transformers and LSTMs. So it was still the beginning of transformers. They were very powerful. But LSTMs were still very. Also very powerful sequence models. So the power of the transformer is that it has built in what we call an inductive bias of attention that makes the model. When you think of a sequence of integers, like we discussed this before, right. This is a sequence of words. When you have to do very hard tasks over these words. This could be we're going to translate a whole paragraph or we're going to predict the next paragraph given 10 paragraphs before. There's some loose intuition from how we do it as a human that is very nicely mimicked and replicated, structurally speaking, in the transformer, which is this idea of you're looking for something, right? So you're sort of, when you just read a piece of text now you're thinking what comes next? You might want to relook at the text or look it from scratch. I mean literally, because there's no recurrence. You're just thinking what comes next. And it's almost hypothesis driven. Right. So if I'm thinking the next word that I'll write is cat or dog. Okay. The way the transformer works almost philosophically is it has these two hypotheses is it going to be cat or is it going to be dog? And then it says, okay, if it's cat, I'm going to look for certain words, not necessarily cat, although cat is an obvious word. You would look in the past to see whether it makes more sense to output cat or dog. And then it does some very deep computation over the words and beyond. Right. So it combines the words, but it has the query, as we call it, that is cat. And then similarly for doc. And so it's a very computational way to think about. Look, if I'm thinking deeply about text, I need to go back to look at all of the text attend over it. But it's not just attention. What is guiding the attention, and that was the key insight from an earlier paper, is not how far away is it? I mean, how far away is it is important. What did I just write about? That's critical. But what you wrote about 10 pages ago might also be critical. So you're looking not positionally, but content wise. Right. And Transformers have this beautiful way to query for certain content and pull it out in a compressed way so then you can make a more informed decision. I mean, that's one way to explain Transformers, but I think it's a very powerful inductive bias. There might be some details that might change over time, but I think that is what makes Transformers so much more powerful than the recurrent networks that were more recency bias based, which obviously works in some tasks, but it has major flaws. Transformer itself has flaws. And I think the main one, the main challenge is these prompts that we just were talking about. They can be a thousand words long. But if I'm teaching you Starcraft, I mean, I'll have to show you videos, I'll have to point you to whole Wikipedia articles about the game. We'll have to interact probably as you play, you'll ask me questions. The context required for us to achieve. Me being a good teacher to you on the game, as you would want to do it with a model, I think goes well beyond the current capabilities. So the question is how do we benchmark this and then how do we change the structure of the architectures? I think there's ideas on both sides, but we'll have to see empirically. Right. Obviously what ends up working in the.
And as you talked about, some of the ideas could be keeping the constraint of that length in place, but then forming like hierarchical representations to where you can start being much cleverer in how you use those thousand tokens in the. Yeah, that's really interesting. But it also is possible that this attentional mechanism where you basically, you don't have a recency bias, but you, you, you look more generally you, you make it learnable. The mechanism in which way you look back into the past, you make that learnable. It's also possible we're at the very beginning of that because that you might become smarter and smarter in the way you query the past. So recent past and distant past and maybe very, very distant past. So almost like the attention mechanism will have to improve and evolve as good as the tokenization mechanism. So you can represent long term memory somehow.
Yes. And I mean hierarchies are very. I mean it's a very nice word that sounds appealing. There's lots of work adding hierarchy to the memories. In practice, it does seem like we keep coming back to the main formula or main architecture that sometimes tells us something. There's such a sentence that a friend of mine told me whether it wants to work or not. So Transformer was clearly an idea that wanted to work. And then I think there's some principles we believe will be needed. But finding the exact details. Details matter so much. Right. That's going to be tricky.
I love the idea that there's like you as a human being, you want some ideas to work and then there's the model that wants some ideas to work. And you get to have a conversation to see which more likely the model will win in the end because it's the one, you don't have to do any work. The model is the one that has to do the work. So you should listen to the model. And I really love this idea that you talked about the humans in this picture. If I could just briefly ask one, is you're saying the benchmarks about the modular humans working on this. The benchmarks providing a sturdy ground of a wish to do these things that seem impossible. They give you in the darkest of times, give you hope because little signs of improvement. You could.
Yes.
Like you're not, you're somehow. You're not lost if you have metrics to measure your, your improvement. And then there's other aspect you said elsewhere and here today, like titles matter. I wonder how much humans matter in the evolution of all this meaning individual humans, you know something about their interaction, something about their ideas, how much they change the direction of all of this. Like if you change the humans in this picture, like is, is it that the model is sitting there and it wants you, it wants some idea to work? Or is it the humans? Or maybe the model is providing you 20 ideas that could work and depending on the humans you pick, they're, they're going to be able to hear some of those ideas. Like in, in all the. Because you're now directing all of deep learning at DeepMind, you get to interact with a lot of projects, a lot of brilliant researchers. How much variability is created by the humans in all of this?
Yeah, I mean, I do believe humans matter a lot. At the very least at the timescale of years on when things are happening and what's the sequencing of it, right. So you get to interact with people that. I mean, you mentioned this. Some people really want some idea to work and they'll persist. And then some other people might be more practical, like I don't care what idea works, I care about cracking protein folding. And at least these two kind of seem opposite sides. We need both and we've clearly had both historically and that made certain things happen earlier or later. So definitely humans involved in all of these endeavor have had, I would say, years of change or of ordering how things have happened, which breakthroughs came before, which other breakthroughs and so on. So certainly that does happen. And so maybe one other axis of distinction is what I called, and this is most commonly used in reinforcement learning is the exploration, exploitation, trade off as well. It's not exactly what I meant, although quite related. So when you start trying to help others, right, like you become a bit more of a mentor to a large group of people, be it a project or the deep learning team or something, or even in the community, when you interact with people in conferences and so on, you're identifying quickly, right. Some things that are explorative or exploitative. And it's tempting to try to guide people, obviously. I mean, that's what makes our experience. We bring it and we try to shape things sometimes wrongly. And there's many times that I've been wrong in the past, that's great. But it would be wrong to dismiss any sort of the research styles that I'm observing. And I often get asked, well, you're in industry, right? So we do have access to large compute scale and so on. So there's certain kinds of research I almost feel like we need to do responsibly and so on. But it is, we have the particle accelerator here, so to speak, in physics, so we need to use it, we need to answer the questions that we should be answering right now for the scientific progress. But then at the same time I look at many advances, including attention, which was discovered in Montreal initially Because of lack of compute. Right. So we were working on sequence to sequence with my friends over at Google Brain at the time and we were using I think eight GPUs which was somehow a lot at the time. And then I think Montreal was a bit more limited in the scale. But then they discovered this content based attention concept that then has obviously triggered things like transformer. Not everything obviously starts transformer. There's always a history that is important to recognize because then you can make sure that then those who might feel now, well we don't have so much compute, you need to then help them optimize that kind of research that might actually produce amazing change. Perhaps it's not as short term as some of these advancements, or perhaps it's a different timescale, but the people and the diversity of the field is quite critical that we maintain it. And at times especially mixed a bit with hype or other things. It's a bit tricky to be observing, maybe too much of the same thinking across the board. But the humans definitely are critical and I can think of quite a few personal examples where also someone told me something that had a huge effect onto some idea and then that's why I'm saying, at least in terms of ears, probably some things do happen.
Yeah, it's fascinating.
Different. Yeah.
And it's also fascinating how constraints somehow are essential for innovation. And the other thing you mentioned about engineering, I have a sneaking suspicion maybe I over, you know, my, my love is with engineering. So I have a sneaking suspicion that all the genius, a large percentage of the genius is in the tiny details of engineering. So like I think we like to think our genius, our, the genius is in the big ideas. There's. I have a sneaking suspicion that like, because I've seen the genius of details of engineering details make like make the night and day difference and I wonder if those kind of have a ripple effect over time. So that, that too, so that's, that's sort of taking the engineering perspective that sometimes that quiet innovation at the level of an individual engineer or maybe at the small scale of a few engineers can make all the difference that scales because we're doing, we're working on computers that are scaled across large groups, that one engineering decision can lead to ripple effects.
Yes.
Which is interesting to think about.
Yeah. I mean engineering, there's also kind of a historical. It might be a bit random because if you think of the history of how especially deep learning and neural networks took off, feels like a bit random because GPUs happen to be There at the right time for a different purpose, which was to play video games. So even the engineering that goes into the hardware and it might have a time like the time frame might be very different. I mean the GPUs were evolved throughout many years where we didn't even were looking at that. So even at that level, that revolution, so to speak, the ripples are like we'll see when they stop. Right. But in terms of thinking of why is this happening, I think that when I try to categorize it in sort of things that might not be so obvious. I mean, clearly there's a hardware revolution. We are surfing thanks to that data centers as well. I mean, data centers are where like, I mean, at Google for instance. Obviously they're serving Google, but there's also now thanks to that and to have built such amazing data centers, we can train these models. Software is an important one. I think if I look at the state of how I had to implement things to implement my ideas, how I discarded ideas because they were too hard to implement. Yeah, clearly the times have changed and thankfully we are in a much better software position as well. And then I mean, obviously there's research that happens at scale and more people enter the field. That's great to see, but it's almost enabled by these other things. And last but not least is also data, right? Curating data sets, labeling data sets. These benchmarks. We think about maybe we'll want to have all the benchmarks in one system, but it's still still very valuable that someone put the thought and time and the vision to build certain benchmarks. We've seen progress thanks to but we're going to repurpose the benchmarks. That's the beauty of Atari is like we solved it in a way, but we used it in Gato. It was critical and I'm sure there's still a lot more to do thanks to that amazing benchmark that someone took the time to put. Even though at the time maybe, oh, you have to think what's the next iteration of architectures? That's what maybe the field recognizes. But we need to. That's another thing we need to balance in terms of a human's behind. We need to recognize all these aspects because they're all critical and we tend to think of the genius, the scientist and so on. But I'm glad you're. I know you have a strong engineering.
Background, but also I'm a lover of data. And there's a pushback on the engineering comment. Ultimately could be the creatives of Benchmarks who have the most impact. Andre Karpathi, who you mentioned, has recently been talking a lot of trash about imagenet, which he has the right to do because of how critical he is about image, how essential he is to the development and the success of deep learning around ImageNet. And you're saying that actually that benchmark is holding back the field because especially in his context on Tesla Autopilot, that's looking at real world behavior of a system. There's something fundamentally missing about imagenet that doesn't capture the real worldness of things that we need to have data sets, benchmarks that have the unpredictability, the edge cases, the whatever the heck it is that makes the real world so difficult to operate in. We need to have benchmarks with that. So, but just to think about the impact of ImageNet as a benchmark, and that really puts a lot of emphasis on the importance of a benchmark, both sort of internally a DeepMind and as a community. So one is coming in from within, like how do I create a benchmark for me to mark and make progress and how do I make benchmark for the community to mark and push progress? You have this amazing paper, you co authored a survey paper called Emergent abilities of Large Language Models. It has again the philosophy here that I'd love to ask you about. What's the intuition about the phenomena of emergence in neural networks, transformers, language models? Is there a magic threshold beyond which we start to see certain performance and is that different from task to task? Is that us humans just being poetic and romantic or is there literally some level at which we start to see breakthrough performance?
Yeah, I mean this is a property that we start seeing in systems that actually tend to be so in machine learning, traditionally, again going to benchmarks, I mean, if you have some input output, right? Like that is just a single input and a single output, you generally, when you train these systems, you see reasonably smooth curves. When you analyze how much the data set size affects the performance, or how the model size affect the performance, or how long you train the system for affects the performance. So if we think of imagenet, the training curves look fairly smooth and predictable in a way. And I would say that's probably because of the, it's kind of a one hop reasoning task, right? It's like here is an input and you think for a few milliseconds or 100 milliseconds, 300 as a human, and then you tell me, yeah, there's an alpaca in this image. So in language we are seeing benchmarks that require more pondering and more thought. In a way, right? This is just kind of you need to look for some subtleties that it involves inputs that you might think of. Even if the input is a sentence describing a mathematical problem, there is a bit more processing required as a human and more introspection. So I think how these benchmarks work means that there is actually a threshold. Just going back to how transformers work in this way of querying for the right questions to get the right answers. That might mean that performance becomes random until the right question is asked by the querying system of a transformer or of a language model like a transformer. And then.










