Statistical physicist Matthieu Wyart discusses why deep neural networks can discover abstractions that shallow models miss, arguing that the hidden hierarchical structure of data enables this capability. The conversation covers the physics-inspired framework for understanding learning landscapes, the curse of dimensionality, creativity in AI, and the advantages of predicting in latent space over token space for improved sample efficiency.
I am Matthew Wyatt. I'm a full professor at John Hopkins University in The US and at EPFL in Switzerland. Those machines that can build new images that we've never seen before or say new sentences that were never heard before.
Our brain seems to learn languages with 100,000 times less words than machines. Why is it so? Are we doing the wrong thing?
And I'm very interested in should we predict in token space at a very low level or more should we train machine to predict abstractions? And so what we've been doing over the years is trying to build a framework based on physics. That's really try to answer those different questions in a unified manner.
Chomsky gave this poverty of stimulus argument arguing that it was actually impossible to learn to become creative from example. But if you have a deep architecture, there is a huge implicit bias to build those coarse grain variables. And so if you think about LLMs or diffusion models, the way they breed concepts, they emerge from statistics alone, just abstraction, they emerge out there in the data, they emerge.
similar context around them. And this is very pertinent because you've got a paper out basically saying that we should predict in the latent space, not the token space.
those algorithms that are introspective that learn from their own latent are much more powerful in terms of sample complexity. They will eventually, they will learn the same abstraction, but much faster. Like if you never do mistakes, maybe it's a sign that you're staying a bit on the beaten path in science and some of us want to explore the jungle.
In the jungle, you can be wrong. Mean, yes. Quick pause.
Agents are getting smarter every day. But even the smartest agents get stuck without the right context and the right tools. That is where Notion comes in.
With the recent launch of Custom Agents, Notion became the collaborative AI workspace where teams and agents work side by side. And now their new development platform is turning that workspace into infrastructure developers can build on. Now this is exactly how I run MLST.
The whole show lives in Notion, my guests, the publishing calendar, the commercial side, everything is in there. But what's changed is that it's now agentic. I just talked to my agent, it can be Claude or any agentic harness, and then it then talks to notion via the MCP or the CLI, and it's just done.
And then I can access it on my phone. It's an absolute game changer.
I'm a physicist. Actually, I really really liked learning physics because you have to deal with, you know, nature at all possible scales. And I focused on one specific field in physics, which is called statistical physics.
And statistical physics is essentially the field where you try to understand how many entities, particles interact together to do collective phenomenon. And so a classical example is, you take water, you cool down the system and at some point, boom, it freezes completely changing its organization. And so I started to work on that initially on the stock market where you have interacting agents that influence the evolution of the price, which is a very interesting sort of random walk.
And then I went to study complex systems. So complex systems are physical system with a rough energy landscape. It means that if you're, you're flying above the Alps like you just did, if you are throwing a ball in those mountains, it could stop at many different points.
So the energy landscape has many metastable states. And those systems are really intriguing. Our physical system with memory.
I worked on several of those, for example, SAND. So what's beautiful about SAND is that it is a complex system. If you prepare 10,000 piles of SANDs, each of them is different, but it has intriguing again, phase transition.
So as you know, if you tilt a layer of sand at some point is going to flow. It means that the energy landscape was rough and you are in a metastable state, but you tilted this energy landscape, you had the phase transition and then the entire system flow, although it's very dense particle managed to avoid each other. And so I've been very interested in understanding geometrically those questions, but then like nine years ago, I'm a Go player, a pro Go player, but I enjoy playing.
And I was mesmerized by AlphaGo and so on. And so I started to think about machine learning and I started to think of it as a complex system. And it is because when you train a machine, build a function that is low if you fit well your data, it's called the loss function or cost function.
And so we are very intrigued by what is the geometry of this landscape? And so what we discover is actually that this landscape has exactly the same phase transition ascent. It means that when you're actually under parameterized, when you don't have enough parameters, you have a rough landscape with many metastable state.
And if you train your machine and you train it many times, it will end up in different position where it's actually stuck. But if you have enough parameters then suddenly the system can flow. I mean, your landscape has many flat valleys and you can, which have essentially zero energy.
So there is really a close analogy. We discovered that like nine years ago at the same time, others find a very similar, I mean the same phenomenon and called it double descent. So now that's name has stuck, but this double descent is peak of the double descent is really for physicists, a jamming transition.
So that brought me to machine learning and just maybe to finish with that. I mean, in the last four years, we've been very much interested in another landscape that I think is even more interesting. It's a landscape of data.
So if you think about an image, let's call X an image, it's a vector. You could ask what is the density of those images, row of X.
And this question relates to what is the structure of the world. And we think it's key to actually understand how machine work. Does it make sense to talk about, because obviously, you're a physicist and you're applying this lens of analysis to large language models.
And like naively, I'm looking at this and saying, well, there's, it doesn't feel like a material substrate. It doesn't feel like it has the same type of dynamics as things do in the real world. Indeed when we look at the training dynamics of LLMs and when we look at the types of representations they learn, we could adopt a physics lens and say there are course screenings and there are phase changes and whatnot.
Do you think it's coherent to make that analogy? Yes.
mesmerizing fact of science that some concepts can be applied in so diverse phenomena. I think, science is essentially built on those kinds of analogies. I mean, if you think about Regent who is one of the first to propose that light was a wave, how did he propose that?
I mean, he noticed that waves on the ocean could cross each other without interacting and he noticed it was the same foray of light. And so he made this analogy. I think it's even hard for me to talk about it because I think it's so fundamental that we are always building our understanding in terms of analogies.
So for the specific example I gave you about the sand and the loss landscape of machines, I think the analogy is very direct in this case because in both cases, what you have are essentially degrees of freedom. In one case was also part particular of sand. In the other case, there are the parameters of your large model.
And in both cases, the system are trying to satisfy constraints. So sand essentially the particles are just trying to avoid each other. But for the parameters, what they are trying to collectively do is to feed data.
So the more data you have, the more constraint you have. And at the end, the universality there is what we've argued from physics, applies there that if you have a problem of satisfiability of constraint and you have continuous degrees of freedom that can change continuously, then boom, you have a universality class. So in this sense, yes, there is something universal about those kinds of problems.
So, but that's a very specific example.
is very much the same. Yes. It's such a tantalizing idea because I think it is constraints all the way down.
And in evolution we have like naturally convergent patterns, reoccurring patterns like carcinization. And I guess the only critique to this is it feels like in neural networks or just in computers, we don't have the same kinds of physical constraints. We don't have two objects can't touch each other at the same time and the laws of physics and so on.
So the constraints are there by dint of statistical patterns in the data, but they still apply pressure on the training process. Are those still valid constraints?
Yeah, so here I was really not talking about any sort of constraint of the computer itself. I was really thinking some abstract way about the algorithm, what the algorithm is doing. And the algorithm is doing some sort of gradient descent flowing down an energy landscape in both cases.
And that's where the analogy is. The analogy is not really related to the material aspect of it. It's true that in one case, it's a material it's in the other case, it's an algorithm, But it is at some levels the same if you think about it correctly.
It's so interesting that you're thinking of the constraints as being the algorithm rather than the energy landscape itself. And I get it. I think you're leaning towards there being some kind of a universal learning algorithm, the way I intuit it is it's almost like the data and the world are more meaningful as constraints.
Is that legible? Okay.
but there will be in my way of thinking in another space. So I started to tell you, we are discussing loss landscape and the constraint here was just to feed data. And later on something I'm really interested to discuss is if you think about the world itself, sentences, the data itself, forget about the algorithms that's actually learning it.
So data itself is very constrained. All possible sentences are not valid in terms of syntax. So I think thinking of constraint is very useful in both cases, but I think of them as very different kinds of constraints.
And do you still think of yourself as a physicist first? I mean, because now we're talking about the physics of learning, we're talking about machine learning.
come across into this world? That's a very interesting question. We have to debate it all the time in physics departments because we need to hire people in what is physics.
And we always ask this question. It's right, initially when I started to think about machine learning, it was relate. It was more closely related to complex system and disordered solids and things like that.
And now I'm rethinking, now I'm organizing conferences with linguist and neuroscientists and so on. But I still think deep down it's physics. And I think we need to bring physics to this field and do the physics of linguistics.
Okay, that's a long discussion, but maybe I think what is very special about physicists, I mean, other fields, natural sciences do it too, but we're really trying to do that. I mean, first is to build a dialogue between theory and experiments. And so, for example, when there is a new technology, A new technology is asking a huge number of novel questions and we can start thinking about it, making theory.
And then the theories, we make simple models and then the theories have to be predictive on what's going on. So first of all, we are very good at building this dialogue, think. So building some empirical science.
I mean, second aspect is modeling. So the world is super complicated. If you try to make a map where one mile is one mile will never help you.
So you need to build caricature of the world. And it's an art that physicists have done. Mean, to paraphrase Einstein, a model should be the simplest, but not simpler than that.
So it means there's tension. It's really actually difficult to describe the problem. It's a good level of complexity.
And it depends also specifically what question you're asking. So I think physicists are also good to develop those sort of models. Mean, just to give you an example, I told you about phase transition.
I mean, one century ago, Pierre Curie was thinking about magnetism and the fact that when you change the temperature, suddenly those materials become magnet and they stick to your fridge, but at higher temperature they don't. So what's going on? If you think of it at the microscopic level, it's awfully complicated quantum mechanics, but the description that stuck and that made huge headways in terms of phase transition and led to Nobel Prizes, Medifields in math and so on is very simple models, the Ising model where you have essentially arrows on the lattice that are interacting with their neighbors to try to align.
So a very crude description of the phenomenon was a good one to essentially think about this problem. So I think that's also what we can try to bring to those questions. I mean, and lastly, I think what you are describing analogies like regans.
I mean, we physicists that try to think about problems at all scales and to do it fast, they had to build analogies between different fields.
what we can bring. I mean, when we spoke with Chomsky, he was quite disparaging about the enterprise of physics. He was talking about the original hard problem motion.
And he said that Newton exercised the machine, the mechanical universe view, but he left the ghost intact. So we still don't know how mind and consciousness works and all of that kind of stuff, but he was rather pointing to this notion that a lot of physics is idealization. And then there's an interesting question about whether our theories are really to actually understand how the universe works or are they more to help like to help us understand in terms that we can understand?
So are we intentionally leaving something out? Yes.
think both. I mean, both. I mean, certainly they are interacting with the world because those theories in physics are super useful to build technology.
I mean, think about the laser. I mean, half of the technologies are, I mean, a big fraction of them are coming from theory. But another big portion of it is coming from, I mean, it's the other way around technology is asking immense questions.
So yes, I think we need theory also to have a sort of highway, build your highway thinking super fast about problems. And then the difficult question is at which level of precision do you need your theory to be? And that depends the question you're asking.
And who were your mentors? Who inspired you? What books did you read?
How did you kind of land on your current trajectory as a physicist?
Well, that's a complex question for me because my two parents are physicists actually. And when I started to do my PhD, I tried to escape them by going to economic physics. I mean, doing more finance and economy.
And then already during my PhD, started to be fascinated again by physics and how sand flows and things like that. And then when I was a postdoc, actually I was always mesmerized by our brain, how we think. And I tried at that time to, I even spent one year in Germany, farm, a place where, a neuroscience institute and I met lots of fantastic people and I learned a lot.
But I felt at that stage that a lot of the theory, how you have many connected neurons, what their dynamics were a bit applied math and detached from really function. And then the question of how do you learn intelligence or rules, constraint language and so on. So it at the was level that I really wanted to operate.
And so I gave up, I went back to physics. And then, I mean, I think it's essentially the development of the technology it's facing us. So I think the analogy I like is the industrial revolution when actually heat engine emerged before.
Again, one case where technology was first and then you had to understand what's behind them, how efficient can they be, the limit to their efficiency. So then Carnot actually a French physicist came up and wrote a beautiful title. It reads like philosophies, essentially no math and interesting concept like entropy.
And it was the beginning of thermodynamics. I mean, very deep ideas coming from some technological facts. And here, I think it's the same.
I mean, it was those machines. It's amazing. They are creative.
You give them a bunch of images and those diffusion models suddenly like a painter, build new faces, they compose new faces. How can it be? All they create sentences that they have never heard before.
And Noam Chomsky and others said that it would be extremely hard to do. They do it. So how, why?
So yeah, it's being fascinated by questions. Yeah. That's what drives me.
Yeah. I mean, you know, I'm sorry to bring Chomsky back again, but he said that LLMs are like bulldozers. Know, he says, I love bulldozers.
They're great for clearing the snow, but they're not a contribution to science. And he said, you know, he's, I've got a theory. Anything goes, right?
It explores all the laws of nature, anything that can be. And he says that when you've got a scientific theory, you have to explain why are things this way? Why are things not that way?
But you were just saying, when we discovered the steam engine, I think you believe that that actually was the stepping stone to building theory. But for Chomsky, there's a huge difference between competence and performance. It's possible.
He had this wonderful expression about Deep Blue, the chess thing. And he said, that's a little bit like a bulldozer winning a weightlifting competition. So it's almost inconsequential, it's incoherent.
Yeah. So I respect him a lot. A lot of our work is actually inspired by him.
The way we model data is sort of part of the classification he built. But I think what he's saying is not wrong. It is not a theory, but it's obviously not wrong, but it's not the point.
I mean, to me, the point is that it's an amazing observation And this is raising a bunch of questions. You have a machine facing you that can learn to be creative. You can open it up.
You can look at its neurons, artificial neurons, and you can ask how is it encoding syntax semantic and so on. How is it doing it? Even if ultimately the brain doesn't work like that, I would argue in some sense, I would love to think about the brain and to have something to say about the brain, but I find intelligence in machine also extremely interesting in itself.
So, yeah, so it's just like at the time of Carnot, we're facing with new technology. It's asking many questions. We should, I think, I hope physicists are asking about physics.
invest in those directions. Yeah. Unfortunately, it is possible to make a system perform a function in many, many different ways.
So for example, LLMs, they apparently have linguistic competence, but it's different. And then you might just say, oh, it doesn't matter. If it does the thing I want it to do, it doesn't matter.
But I think we can be a little bit more rigid here. One thing that seems to be missing is the acquisition of abstractions. Now you've done some amazing work on this, but certainly when I use language models, what's abundantly clear to me, even when we do hill climbing and we solve these mathematical problems, they traverse the spaghetti monster and they get the right answer, but for the wrong reasons.
And they seem to be low down the abstraction mountain. And what we do is we have the ability to do this course graining or to use metaphor and work higher up the abstraction mountain. And it just feels to me that when we use stochastic gradient descent and we just learn from data, the models aren't acquiring these high level abstractions.
That's the opposite.
I think those questions are super interesting, super deep, and we are approaching them as physicists. And so, yes, so the way we were thinking about this question is that, yes, the world is very complicated. So let's stick to language maybe.
So I think to understand how machine work, we first need to understand very well. What are we talking about? What is the data that needs to be learned?
And on that, I would say the linguists have been one of the most impressive field in terms of characterizing the data they are dealing with. And in particular, Chomsky and others. I mean, it has been argued for centuries that underlying tags are trees, different level of obstruction.
I mean, it's also been argued for images. It's called pattern theory. We are very used to that in physics.
So in physics, let's say you take a liquid. I told you about liquid before you can describe it at the level of atoms, but if you have billions of billions of billions of atoms in your glass, it's not going to help you describe the glass so well. And so what we did as physicists is to build coarse grain variables, like pressure feed, velocity, density, things like that.
For this system, it's sort of simpler because there is a single, I mean, there are two level of description if you want essentially, this is a very microscopic and microscopic. Real data have layered multi scale level of description. I mean, if you think about an image, you can think of it at a pixel level at very low level and at very high level, could think of it as the caption that's describing what's on the image.
And you have very intermediary steps. I mean, low level, you could start to make from pixel edges and little geometrical figures. And at some point you could make eyes and nose and ears and understand that it makes a head that, so you have many different levels of description.
And so the question you are asking, so that's the one we wanted to understand. And the first thing was how do we model this? Because if you look at the most complicated context free grammar, so those are the sort of models where which are based on trees that Shamsky introduced.
Essentially the idea behind those models is that if you want to describe sort of linear objects that language text is, you can describe it by some underlying tree and you describe, you have hidden variables living on those tree and you describe the way whereby those hidden variables can give rise to strings of hidden variables. So essentially you're describing a generative way to make sentences in a recursive fashion. But again, if you want to sort of feed those models to English, it's lots of, it's very complicated.
And so what is a good model? And again, it depends on the question you're asking. It's not an absolute, there is no absolute answer to that.
But for the sort of question we're asking, like the one you're asking, which is in which sense do we build those cost grain variables? Well, we build context free grammar, some models of data where you have those trees underlying it, but like you, as a physicist, it's a synthetic world. We build it.
And then once we build it, the game we're playing is that we have to believe that it's rich enough. So in our case, we want it to capture the fact that there is some hierarchical hidden structure to the world. So this we capture, but we want to make it tractable.
So maybe it's a bit technical. In this case, we started the first models essentially at a tree that was frozen in geometry and production rules, which is how latent gives rise to a string were randomly chosen. Finally, randomness, although it's counterintuitive in physics often make things simpler, allowed us to compute any correlation in this model.
And from that, we could actually understand how they are learned by machines. And indeed, you have a poor machine, like a very shallow network, first of all, even those models would be essentially unlearnable. So there would be a lot to say.
And then maybe I can come back to that in high dimension. It's very hard to learn. But if you have a deep architecture, what we find is precisely the opposite of what you're saying.
The reason why deep architecture cancels those tasks is precisely because they understand just like the physicist understood about pressure, velocity, field. They understand from data, from the statistics of data, this hidden hierarchy. Otherwise they would never be able to do this job.
from it, they can perform the tasks that you want. Just to kind of play that back, just so that everyone understands that the idea is that there is, I mean, we're talking about grammar here, but more broadly, we think that there are structured generative processes in the world. So we can think of those as being some kind of a constrained generative model.
So we're talking about syntax here. And when we do machine learning, we look at the output of that generative model and the learning process ideally should be not to memorize the raw output, but it should be to understand abstractly the model which generated it. Because creativity is about respecting the deep structure and the constraints.
If you have the structure, you can go on and generate many, many more things and you obey the rules, you're creative and So all the rest of you're saying that you've done experiments. So you've created a mathematical generative model, which is parameterized. You can have as much depth as you want.
And you found on shallow networks that basically it wasn't really learning any of the abstract structure, but when you have deep networks, was. Yeah, exactly.
the context of creativity and this discussion we just had with Shamsky. So there is a question creativity. I will use this term in a very narrow sense of being able to generate new sentences that satisfy hard constraint syntactic rules that the child would never have heard before.
And Chomsky gave this poverty of stimulus argument arguing that it was actually impossible to learn to become creative from example. And essentially, okay, this would be a very crude way of summarizing his argument, but I described the fact that you have the sort of generative tree like rich context free grammars, assuming that really capturing the fact that the world has a hierarchy of abstract concepts. But you have other possible generative grammar.
Some are much simpler. One is called regular grammar. So this will be a caricature, but essentially the idea that maybe a group of words will fix the probability of the next word essentially.
And Chomsky's argument is to say that, well, even if you give me 1,000,000 sentences, okay, I can fit those sentences by a context free grammar, but I can also feed them by a much simpler, I mean, is a regular grammar simpler in this classification, but to feed those sentences, would have to be awfully complicated, many rules. And that nativism and not racism, big debates on this question. And again, we felt like we want to address those questions as physicists.
So idealized world where the true world is Yarky Kone and as is Yarky can machine learn to be creative or not? And what we find is that if you have a shallow network, what Chomsky worried about is completely true. You learn something, you don't learn this sort of interesting generative grammar.
You essentially memorize and you can't do anything. But if you have a deep architecture, there's a huge implicit bias to build those coarse grained variables. This hierarchical architecture leads very easily to some iterative calculation.
And so what we found is that indeed you can learn to be creative by having being exposed to a very small number of sentences. So let's say in our model, if D is the size of the sentence, the number of sentences is huge with D is exponential in D. But the number of sentences you need to see to be creative is only polynomial in D.
So these models are really a counter example to his argument. And ultimately it comes from the fact that machines have strong implicit bias. They are not comparing equally in an equal fashion all hypothesis.
And if you're deep, you learn hierarchies. So that's a counter example to that. So in some sense, I would argue that in terms of what needs to be innate, if you have deep architecture, that does lots of that.
This is not to say that, so I'm arguing against Chomsky's argument. It doesn't mean that what he inferred is incorrect. It's not because I think an argument is incorrect that the statement is incorrect.
I don't want to imply that our brain is just a deep net and that they are not much smarter mechanisms to learn much better. And actually the brain can learn with 100,000 times less exposition to words than those machines. So I think there are lots of questions about how the brain work and they are fascinating.
I think it's possible that you're both correct. So Chomsky even back in the fifties, and he wasn't the first to do this, but he came up with these very basic transformative rules that could be composed together. And that went on for quite a while, but they realized there were lots of problems and edge cases.
And then eventually the minimalist program came out and it was even more parsimonious. It was like move and merge. And that's very, very abstract because I agree with you.
These networks clearly have syntactic competence, which means they absolutely are creative because they absolutely can create novel grammatical sentences. But in a broad setting though, they're not creative because they don't understand many other abstractions in the world that we do, which is why we need to prompt them to be creative. That they can render an image of a dog, but they're not creative enough to know what an interesting and worldly coherent image of a dog is.
But another thing I wanted to get to is this is touching on the idea that networks, as we train them for longer and they get bigger and deeper, they start to factorize. So, because we have this notion that they have these fractured and tangled representations. They understand things at a shallow level.
They understand some things and not other things. I spoke with Tom McGrath at Goodfire, it's a big mechanistic interpretability company. And he's been studying networks for years And he says, as they get bigger and bigger, they become more factorized.
And he actually believes they're converging towards some kind of natural factorization. But at the moment, it's a bit weird that they have some factorization and then they have some fractionation in other areas. But you kind of see where I'm going with this because we know that a neural network is a finite state automata and language in Chomsky sense, it's somewhere between context free and context sensitive.
He wasn't super specific about that, but we know as a mathematical fact that it's not a generative grammar in the abstract way Chomsky was describing, but it is still a coherent generative grammar in some lower sense.
first of all, what we find is that as you train the machine more and more, those factorization or abstraction are created progressively. And if you have an immense machine and you give me more and more data, then you start to play with more and more abstract concepts. Those are the hardest to learn in this viewpoint.
So that's my take on the being of your question. So second question was, I think you're referring to the fact that Transformers have a finite depth. Finite depth.
And so, I mean, if you are thinking about sentences where you have 50 compliments of sentences and that are looping like that, it may be very hard to reproduce and so on. But I think those are more like academic. My take is that those are more academic problems that you never encountered in practice because sentences that loop for 50 times are extremely rare.
So I'm not sure it's really, I know that some people put a lot of attention on that, but I'm more, as someone who likes to do empirical studies and so on. I don't know if those worries are actually relevant in practice.
Would you agree though that there's a spectrum of abstraction? So yes, it's a different type of syntactic competence, but maybe it doesn't matter. There's the performance competence type thing.
But an interesting example is I feed my entire code base into Claude code. And isn't it interesting that it doesn't really understand what my intentions were. So if I put it in a loop, I put it in an agent and I say, just fix the bugs and just keep evolving this software.
It doesn't respect the deep constraints now are my mental constraints. Like what was I trying to achieve with this? What would I have done?
So it has the syntactic competence. It knows how to write the code. And are you saying this is just a matter of the networks aren't good enough yet?
When they do understand, when they have a theory of mind and they understand how the world works even more abstractly, eventually we could just autonomously create coding agents that will just make Microsoft Word or something. And there is a path to that level of competence.
Composition. So essentially what we're saying is that imagine that you have this diffusion model that learns to compose new faces. Essentially what it's doing is that when it has seen enough of low level features like nose, eyes and mouth, it understands the rules of the games and it composes them together.
And what we also liked about this description is that we can make non trivial predictions that we test with real images or with real text. And maybe we'll come back to that because I think it's really important part of physics. It's not creativity is not just putting pieces together that satisfy constraint.
Although when you have a new idea, often it's putting existing ideas together into a new hole. But I think creativity can be much more than that. I mean, if we think about what we discussed about what it means to be a physicist and how science proceeds, I mean, it's an example of creativity.
If you think about creativity like Newton understanding the motion of planets and things like that. I mean, we talked about dialogue between experiment and theory. We talked about building models at a good level of description.
We talked about analogies. And I don't think I agree with you that I, for example, all that, I don't think it's in the machine. I think there is no reason why we would not be able one day to build machines that can do that.
I'm not sure if just scanning up things will lead to that. I think maybe we need to do more introspection of how we function as scientists to come up with a good dataset and the good procedures to teach machines, to be good scientists. So just an example, like creativity in science requires a lot of abilities to create something really new and how to interact with the world around us that I don't think machines have and yet, I mean, so I think I agree with you that just getting up, I don't think will lead to total success.
develop other abilities in those machines. Yeah, think I'm just trying to understand what the gap is because it would be consistent with your argument. If you're saying that we can learn the abstract structure of the world and be generatively competent in one domain, why would we not?
Because for me, creativity is not just about coherence and respecting the constraints. I mean, transformative creativity in my mind is about discovering interesting new subspaces. So, we can traverse these constraints collectively and serendipitously, sometimes we happen upon these fascinating new subspaces and we go on to explore them.
And when we look back after discovering them, we think, oh, that was a very transformative, creative stepping stone.
Yes. I think if you look at the history of science was very creative. I mean, like think about mathematician inventing imaginary numbers or Newton describing the motion of planets or regains and something about waves and diffraction.
I mean humans forever, I've seen waves entering a port and being diffracted. So starting to make more circle like patterns. But okay, if you're just showing those patterns to machine, it would sort of stupidly predict the next frame because it's under, I mean, velocity will propagate.
But what do we do as physicists? We have to first time people are really good at observing that something is intriguing. Then you have to simplify the geometry.
So maybe you put it in a very simple geometry and then you have to then as an aspect of modeling that I was describing, how do we model this and so on. And so I think all that is very much needed. And I don't see how you could, it's our interaction with the world and simplifying the world and that requires an interaction.
So I don't think you can learn it just by looking at everything that was ever written without enforcing those interactions.
to recap, so we were contrasting before that Chomsky has this poverty of stimulus argument. So he was essentially saying that it's not really possible, realistically with the amount of data, sense data that children have for them to learn this grammar. And your paper demonstrated that actually it is because you created this generative function and deep networks could learn it.
But I want to understand how, so you said, for example, that the networks, they encounter ambiguity. And when there's a sufficient amount of data, which has a bias in it, then the network can suddenly grok it and it can learn this invariance.
Tell me about that. All right. So this is about how does the machine actually build those cause grain viable or abstractions?
And we looked at it in various cases, supervised learning, where you're trying to classify cats and dogs. And then we went to generative models like next token prediction or diffusion models. And very recently we went to maybe smarter algorithms that are trying to predict in more abstract spaces.
So maybe I can start this discussion in the middle. So think about models like diffusion models or LLMs that are trying to predict very low level tokens or pixels or low level features. So essentially what we argue is that maybe there's an analogy again with a simpler algorithm, which is word2vec introduced ten years ago and a beautiful idea.
And so the idea there was how can we build an interesting vectorial representation of world to each world I want to associate a vector. And that was a beautiful idea. What you can do is take this word, make a little machine, a one hidden layer.
So you have neurons, one layer of neurons and train this machine to predict the words nearby. So essentially it's a machine that's trained on co occurrence. How often two words co occur in the same sentence, let's say, to say it simply.
And what you realize here is that if two words are synonyms, they will have a similar context. And so this machine will represent those two guys with the same vectors. So this is, and so you will have instead of the incarnation of those diff, you will just have the meaning.
So this is for me an example of coarse grain variable. So, and essentially it's key because we talked about the fact that, okay, so learning in large dimension should be extremely hard. So essentially it's really important that those machine managed to in some sense, rid of a lot of things they don't care about.
And to do that, they have to bridge those core grain variables. So Word2Vec is doing that at one level of abstraction, at a low level of abstraction. So essentially what we're saying is that deep architecture diffusion models or large language models, they do exactly that, but in a recursive fashion.
So once they, let's say they have understood the meaning, they will group those meaning into supra meanings. So maybe let me give an example. So think about streets as a concept of streets.
So you have passerbys, you have cars, you have sidewalks. You have an immense number of possible streets It would be very useful to have a concept for that group, all those different configuration together and that's the concept of street. And so if you think about LLMs or diffusion models, the way they breed concepts, they emerge from statistics alone, just abstraction.
They emerge, they are there in the data. Emerge. And those concept emerge if you group together configuration that predict similar context around them.
So maybe if you have a street, typically you have houses nearby and maybe the houses have colors or edges and so on, you would predict color and edges. And with that, in those models at least you find that if you have enough data, you can learn all the abstractions. But as you get more and more abstract, you have a problem because you're always trying to build those abstraction by saying how they are predictive, but at a very low level.
And when you're very abstract, how you predict pixels or colors and so on is a super noisy signal. So essentially that's why in those models we find, and we have empirical evidence. And I'm happy to talk about empirical evidence that more abstract concept is the toughest to learn because essentially your signal as you get more and more abstract, your signal gets diluted.
So this is, yes. So this would be the mechanism whereby we think you build those latent variables or abstractions.
Yeah. It's such a tantalizing idea and we'll get to the latent stuff just in a minute, because that's also a great thing to talk about. But are you suggesting that there is some kind of natural factorization?
So do you think that different networks, perhaps with different architectures given the same data would almost converge towards the same logical factorization of the data, this hierarchical factorization?
So in our dream world that we invented mathematically, it's true as long as the network are deep. So shallow networks, don't do anything, but if you have a transformer or CNN and so on, they build essentially very similar abstraction. Actually those arguments also predict how many data you need to build them.
So this is a sort of evidence we make prediction and that's what we play as physicists. We make prediction and we test them. So we predict how many data you need to learn how many different level of abstraction.
And we find similar in terms of scaling similar number of data independently of the architecture. So I still do think that different architecture are going to lead to slight difference and so on different circuit. But the big picture I think is yes, those obstructions actually really exist.
And again, those are set of configurations that predict a similar surrounding. And if they have a strong signal, if they have a strong predictive power, they are formed earlier.
so tantalizing to think of them as being the one true abstractions. But we know, as we said earlier, it's not like the merge operator that Chomsky was talking about. When we do mechanistic interpretability and look at how networks do addition, for example, that it's super weird that they're composing trigonometric functions together.
They're not doing it the way we can. And maybe that's just a limitation of architecture. Maybe if we had proper learnable Turing machines, would converge higher up the abstraction tree.
But I suppose a tangential thing that we need to talk about is this curse of dimensionality. There's always been this statistical law essentially that when we have high dimensions, the number of data that you need to make it tractable increases exponentially. And there were all of these theories about why that's not the case.
There's the manifold hypothesis. So the intrinsic dimension is lower. We spoke with Randall Bellistriero about this.
He's got the spline theory of neural networks. And he said that, in high dimensions, all data is extrapolation. There's no manifold.
That's bullshit. It's actually doing this spline decomposition in an input sensitive way. Lots of people have different ideas about this.
But you're saying that this kind of emergent behavior is actually how it is tractable.
Exactly. So actually that's before we started thinking about creativity, our first work was really trying to understand what sort of data structure allow DeepNet to actually perform. So it's exactly as you said, maybe I can say it again.
So in physics, know that volume goes like a length to the exponent of the dimension. So in three d L cube in two d L square, if L is a length. So think about a large dimension.
So if you think about an image, D maybe is a number of pixels, at least naively. If you think about text, it may be the number of words in your sentence again naively. So those volumes are huge.
They're exponential, they're exponential in large in the dimension. So what it means is that even if you give me 1,000,000,000,000 points because the volume is so huge, they're extremely far away from each other, extremely far away. And so if you have a machine that's just interpolating and now you ask a question about a new test point and you can prove mathematically that if the data has little structure, like you're trying to learn to regress some functions that smooth, It's hopeless.
I mean, the only way you will extrapolate and have power to generalize is if you bring those points together, it means you have an exponentially large number of data. You have more data than atoms in the universe. So it's just impossible.
So to me, this is completely fundamental question. And it's true that sometimes in the literature it starts to side by saying, okay, it's super naive to say that the dimension is a number of pixel on an image. In fact, it should really be that the data lie in a lower dimension manifold.
And if you try to measure it, it's true that it lies in a lower dimension manifold, but this dimension is still large in dimension. And to me the big problem is that if this was the answer to this question, it will mean that very simple algorithm like kernel methods are ancestor of deep net or even shallow network. I mean, they do it perfectly.
And if you give them a low dimensional manifold, you don't need to have any interesting architecture. But if you use those on text, I can tell you it fails lament. I mean, it's complete, does nothing.
So the question is why do you need deep architectures? I mean, and some of the thing you said is it does not answer that question. So that's really the question we are looking after.
And so essentially the answer to that is that if the world is hierarchical, if it has hidden cause grain variables, those machines are super good to discover them. And they can discover them with generically with a number of data that's not huge, polynomial in the dimension once again. And once they discover them, it's a sort of summary of what the data is.
Instead of describing pixel by pixel, always a nose, ears and so on. So you're reducing the dimension of the problem essentially, and you can solve the curse of dimensionality. So I think this explanation has the advantage that it, I mean, whatever you explanation you come up with, it has to explain, it needs to explain why you need deep networks.
When I was speaking with Tom from Goodfire the other day, he was saying that so much of interpretability is going from essentially neural representations to text, to try and introspect about them. And he thinks we could have a new type of training method where we go from text to back to neural representation. So we discover these emerging modular structures and during training, we kind of encourage them to be even more pristine, even more evolved.
But there are other folks talking about similar ideas as well. So Yan LeCun, for example, he's got this idea called a joint embedding prediction architecture. And this is very pertinent because you've got a paper out basically saying that we should predict in the latent space, not the token space.
And his idea essentially is that if we actually predict in latent space, then we can be significantly more sample efficient than if we predict in the ambient space. Tell me about that.
Yes. So that's a question we've been fascinated by in the last year or two. As we just discussed the brain learns languages with much less data than machines.
So machines are amazing. They speak better English than me for sure. But in some definition of intelligence, they need many more data than us to do those tasks.
So why are we so different? And so something, I mean, there are many hypothesis, but one thing that's discussed in the field is the fact that those large language models at the end, they do something that seems a bit trivial. It's like you mask a token and you try to discover it.
Even to do that in our models, you find that you need to, if you want to do it well, you need to understand the full full year article abstraction of the world even to do that well. Actually, so that we started to work on next token prediction because I always had for at least one decade, this sort of question related to the cost of dimensionality, which was, how can when we produce speech, think about the end of a sentence, maybe I said 30 words before, the number of possible sentences is huge. How do need to memorize the 30 words to do that?
I mean, how is it possible? And actually Zeus models gave us sort of elegant answer to that because what happens when you try to plug the next token is that you will, if you said a long sentence, maybe you would have a coarse grain variables that describe a coarse meaning of the first half of the sentences. And as you approach what you're going to say, you have a finer and finer, more precise description.
So at least to me, this sort of way of thinking led to a possible solution for my paradox. But so in any event, even if you try to learn the next token, need to build those very abstraction. But I told you that one problem with doing this is that if you're very abstract, it needs a lot of data because you build those abstraction by bringing together configuration in the data that predict a similar surrounding, but at a low level, like similar peak sales around.
So going back, so what has been proposed in the literature, actually it's interesting also in neuroscience, there is this notion that maybe the brain is doing some sort of very interesting self supervised learning where instead of just predicting what's going to be the next frame on its eyes, it's trying to predict the next activity of its cortex. So predicting in some sort of abstract space. And this idea has also emerged in machine learning.
And you talked about Jan Leuchen and there are also other models and extremely interesting. And again, the idea is instead of predicting at the level of token, can I predict in more abstract space? And they developed this field, developed very interesting machines to do that.
I mean, you can think about twins. So you have one machine, you duplicate it and one machine is shown the entire data. It's a teacher and one machine is shown some occluded version of the data and your student has to predict not the tokens that were occluded but how those tokens were represented by the teachers that could see them.
It's beautiful, right? It's like those networks are doing some kind of introspection. And there has been a big debate.
Is it better or not? Because I've told those LLMs are doing fantastic things. And so we felt that, and there was essentially no theory on that on sample complexity.
So we felt we needed to think quantitatively about this question. And so again, with the same kind of model, so the game we're playing is to develop a framework where with a single viewpoint, you try to engage with many different problems. So curse of dimensionality, creativity, and now learning from your own latent.
I mean, also scanning those, maybe we'll talk about those. And so again, in those models, what we found is that those algorithms that are introspective that learn from their own latent are much more powerful in terms of sample complexity. And they will eventually, they will learn the same abstraction but much faster.
To build abstraction you need to bring configuration. Think again about the street. All this configuration you need to understand it's one entity, a street.
And what diffusion on next token prediction do is that the signal they have to bring those together has to do with peak sales around very low level features. And I told you that those correlation between abstract things and things that are not abstract, it's there, it exists, but it's very noisy. But imagine instead that when understood the concept of cars and passerby and you also understood the concept of houses.
Then essentially what those methods do is they can build the concept of street by predicting that those configuration have not pixeled the painting of the house but just the concept houses nearby. And then the signal is much larger And so you need much less data to extract the signal from noise.
in those simple models, it's much more efficient. Yeah. So I mean, many folks will know Lecun's work in the vision space.
So Barlow twins and all of these joint embedding prediction architectures, roughly speaking, where you have something like a Siamese network, and then you might do some kind of mass prediction. So you might include tiles from one side and you're learning this prediction function over the embeddings, the latents rather than the ambient space. But this also goes into his broader philosophy about energy based models as well.
So the rough idea is that you can imbue domain specific knowledge into a prediction architecture and energies are composable. So you could be ridiculously specific and actually have variables that represent things in the domain. But what we're talking about here is something which is quite generic.
It's a little bit like an inductive prior, which is not really domain specific. So it could work for any type of vision or it could work for any type of language model. And it's significantly more sample efficient, as you just said.
But do we still have this issue that it is learning really good general abstractions? It's more efficient, but is there still something missing? We have these galaxy brain abstractions, we can just select these meta relations between things from a seemingly infinite set of possible relations.
And is this just one step in that direction, but not all the way?
indicate a word of as physicists, what I've been discussing so far was the same sort of theoretical approach, but we could test it empirically and make non trivial prediction and test them. This last part, which is a paper that's one month old is a theory that we are now testing. And so when I talk about it, I talk about it with caution.
Think it's nice. That's what we want to do a theorist is to have theories that are predictive. They make non trivial prediction then being rigorous for us is not, doesn't mean having a theorem, it's us going back and testing those prediction.
So we're in the process of doing that. So I think that there's a very deep question there. What we find in those simple models is that indeed you learn this abstraction with much less data, but now there is a question of abstraction are there represented in your machine And what do you do with them?
And there are things like from those representation, you can do tasks like segmentation and images or classification. And now you can be competitive with supervised method and classification. So there is evidence that it's doing a very good job.
But for example, if you want to compare them to large language models, I mean, large language models, we'd like them also because they are generative. We can talk to them and then they So for example, that's a question we're working on and I still don't know the answer is, once I have discovered those variables, essentially I created some sort of encoder of the world. Can I create with not so many data as a decoder and build the generative models from them?
So can I really go back and say, I can compete with those next token prediction and build something generative? I don't know. So this is completely open to me.
So yes, so you can build this sort of very interesting representation of the world. Now it's in a sort of, in our model we know what should be there and we can check that it's there. But if you don't know where things are, how do you use this information to do specific tasks most efficiently?
field of study for the years to come. And in this recent paper that you just released about a month ago, the predict latents not tokens, you should explain figure one. We'll put it on the screen now, but you actually visualize and have a kind of analytical explanation for why it's more efficient using latents and not tokens.
Exactly. So, yeah, what we like to do as physicists is also to have models where we can vary parameters and then we make scanning prediction. And then it's very easy to test your prediction.
You plot it in the log log and you see. So we like to have those kinds of parameters to test our ideas. But in terms of the conceptual picture, this figure has I think three networks.
The first is supervised learning. So in our models, the data are tree like, there's a top route. If you think about images, this is maybe saying if your image is a cat or a dog or whatever, and you don't see anything, those are hidden fibers.
And then you see just what's the data, which is the input. And so one question would be how many data do you need from the input be able to classify the root of your tree? That supervised learning.
And then, and maybe I will skip that for reasons of time. I mean, the central figure is more like diffusion models or next token prediction. And what this figure is showing is really the concept I was trying to tell you.
It's this concept of streets and below streets you would have passerby, car, sidewalks. So the nodes below think of them as passerby and the node above is a concept of street. And really what matters in those models is how do you correlate this concept with very low level aspect of your data.
And what's in those models, something that's quite clear is that as you go away along these three, the correlation decrease. Because you have to make every time you have to make several choices and that leads to decreasing correlation. So what the middle panel would show is that when you try to approach the top route, so when you're trying to build abstract concept, you're correlating with very low level.
It's a long distance along the tree. And so we know that every time we move along this tree, we have to pay a cost, a multiplicative cost in number of data we need. And so that's why actually the sort of the number of data you need to learn your hidden hierarchy is exponential in the depth of the tree, which is still good because if you think about it, the dimension of the input is also exponentially in the depth of the tree.
Means you can learn that polynomial in the dimension of your problem, which is much better than exponential, which mean impossible. So next to a confliction works, but it's still exponential in the depth of the tree. Now, if you think about the last panel, what you would really see is that you can do something very different.
And again, when you try to build the concept of street, you would just predict what's nearby houses And you've already understood this concept of house. And now the correlate it's much closer on your graph. So it's much more correlated.
The correlation being much stronger, you always have a signal to noise, you need enough data to measure correlations, but if the signal is strong, you need much less data to measure it. And once you measure it, boom, you can build those abstraction. So this is essentially what this figure shows.
It's a summary of what we've been discussing in this example of street and houses.
It's so frustrating that we know so many things that could advance the frontier, but open AI and anthropic, they're still training old school transformers. And I spoke to a Cleon Jones at Sakana about this. He was one of the inventors of the transformer.
He said, any new method has to be crushingly better because we've invested so much time in hardware and optimizers and compilers. There's an entire ecosystem about this. It's actually very difficult just to steer the ship.
Lecun does have a couple of new startups but the read I'm getting is that it's he's focusing on vertical domains. We haven't yet done the moonshot where we try these new models on mass.
Yes. So I agree. I will still say a word of caution that those LLMs are generative models.
That's very important for them to be because you can interact with them and they produce reasoning and so on. And I still don't know even theoretically if even though I understood all this hierarchy hidden in the world, I can use it efficiently to bring, to go back to a prediction at a token level or not. If we can, then if we could, then even it would mean at least conceptually that we could do a much better alternative model.
But you see, so it's subtle, but there is a distinction between understanding the structure of the world, which is like building an encoder and then decoding it for a very low level aspect of the data.
You mentioned diffusion models and you had a great paper out about that, but just conceptually, how do you think they are different from something like a transformer?
Well, some often they are based on transformer architecture. So it's mostly objective, you mean, and in one case are masking the future, like you're predicting the next token was in diffusion models, you're actually masking randomly at random position. I think it's very similar and essentially in our theory, it's the same sample complexity for both.
It's not like one has a huge advantage on the other. In some sense, the only difference is the order in which you're filling up what is being masked.
Well, that's interesting. I mean, because intuitively I think of it as you'd, first of all, you have an arbitrary number of diffusion steps. And maybe you would say that's analogous to just doing more back passes during training on a normal network.
tightens up whereas Transformers and CNN seem to have a locality bias in that. I like to simplify the discussion by focusing on sample complexity. How many data do you need to learn?
That's where we find analogous quantities because you are going into sort of compute of going back with this forward and backward process. So I'm really talking about sample complexity. And then what we find in both cases is that as you increase the number of data, you learn those constraints, those grammatical rules bottom up.
So first low level and then higher level in both cases. And we could, okay. So actually we have some confidence on those statements also because they make a non trivial prediction.
So for example, you would predict that as you train a diffusion more and more to generate text that initially it would be random. If you don't have data, it's regenerating crap. As you increase the number of data, it should start to form coherent words.
Then later on with more data coherent group of words and then coherent full sentences. And this is a prediction of those models that coherence, the sort of coherence of the context should steadily increase as you increase the number of data that we could actually check for diffusion models and also check-in our theory of scaling laws of next token prediction. About a year ago, you had a paper about scaling laws as well.
Tell me about that. As you increase the number of data or you increase how much compute you put or you increase the number of parameters, your performance steadily improves. And this observation by Kaplan and others had a huge impact for all of us because it drove the tech companies to just invest more and build maybe nuclear plants.
So it has a huge technological impact, but it's a bit embarrassing for us theories that essentially it's not understood at all. Zoosk getting those quantitatively, they have exponents in them. For example, describing how well you perform better if you multiply the number of data by 10.
And there was very limited understanding on that question. And so, yeah, so just a few months back with Francisco Cagneta, Alain Raventos and Souya Gangudi, we proposed a theory for this problem inspired by those synthetic world I told you about, but detaching sort of essence of the lesson we learned from those models to really make quantitative prediction for natural languages. And essentially the theory predicts that there is a simple recipe to force those exponents to extract those exponents.
And essentially this is saying, again, what's underlying it is the fact that if you give me more data, I can learn more abstract concept and that's longer range leads to longer range correlation. But at the end of the day, the two quantities you need to measure is one, the fact that words or tokens are correlated and that this correlation it was well known before us that this correlation decreases as a Paulo of the distance between those two words. From that you can measure exponents and they depend on the language you look at as your dataset, you can measure them.
And then there is another key quantity we argue, which is related to the entropy of text. So entropy of text has been discussed already by Shannon in the fifties. It's a beautiful question.
So essentially it's the entropy is a log of the number of possible words that you would have at one location in average. What we argue is very important to look at and that we could finally measure with LLMs or other architecture and we find consistent result is what is the entropy left after a sentence of N token? If you see N token, the more token you see the least possibility you have there.
What is the entropy of that? And in the toy model of it's a parallel and in real life, it's also a parallel that is found. And so essentially what we argue that with those two exponents, you can combine them in a way that we specify to get the training curve exponent of LLMs acting on those natural languages.
And it works very well. So we got very excited with that. Also, I have to say that in addition, it's making non trivial prediction in terms of how the loss should depend on the context that you give it, so context and also the number of data.
So it's a function of two variables and we predict that it should bend in a very specific way and we could test it and we also observe it.
And can you give me some interest on that? I mean, it's often, when we speak about Shannon, there's a graph that people often see that during a sentence, every single word reduces entropy. And we're now talking almost at the population scale that when we have a huge corpus of text, entropy is going down and down.
What does that mean? Does that mean that the problem is getting easier over time? Does it mean that the models will just continue to get better or maybe there'll be some phase change?
What's gonna happen?
because we could test our theory at sort of academia range of So it means 1,000,000,000 of parameters, 1,000,000,000 of tokens. And I told you that as you increase the number of tokens, those machines starts to use a context that's larger and larger. And we can visualize this context.
So I can tell you for which context scale our theories was tested. And it's about 50 tokens or two or three sentences. I think it's great because there's old syntax and so on there.
So there's a lot of stuff, but that's where I'm confident that, I mean, I think we have a very robust that stories that I think will hold true. I mean, the field has to investigate further and decide, but what really we have not done because it's not possible with all means is to test this theory for much beyond three or four sentences. And so I don't know if the mechanism we put forward still applies there or if it's something completely different.
explain deep learning to any scientist dead or alive, who would it be?
Oh, if I could explain it to any scientist dead or alive, who would it be? Oh, that's I never thought about this question. I had a very strong bond to my dad was a physicist and with whom we discussed a lot about science.
And at the end of his life, he was actually very interested by neuroscience. He thought about olfaction and things like that. So it would be him.
Yes.
There any things in your career that you've been completely wrong about and you've changed your mind? I think it's completely fine to do mistakes in science.
But I think what's very important is that once you're convinced that you did a mistake, state it and it's obvious for everybody and you don't sort of encroach to your, even if you don't believe in it anymore, you don't encroach to it. So yes, happens for sure. The game we're playing as physicists is to propose model of the world and then make predictions.
Already that we feel is doing our job. Then it needs to be tested by us or by others. I mean, sometimes your prediction does not hold because it does not a good model, but that's how we build understanding hypothesis and so on.
So in this sense, yes, it often happens, but it should. I mean, that's how science should work in some sense. Like you're making hypothesis and then you really test them.
So, I think it's important to If you're creative, if you take risk, I think you should do mistake. If you never do mistakes, maybe it's a sign that you're staying a bit on the beaten path in science. And some of us want to explore the jungle.
In the jungle, you can be wrong. I mean, yes.
It's been an honor having you on the show. Thank you so much for joining Thank you so much. That's fun.
Thanks.
Shared via Hopper