Machine Learning Street Talk (MLST) - AI Is Learning at the Wrong Level of Abstraction _ Matthieu Wyart
Summary
本期访谈中,物理学家 Matthew Wyart 以统计物理和复杂系统为视角,探讨深度学习为何能够从海量而高维的数据中形成抽象概念。Wyart 将神经网络的损失景观与沙粒系统的堵塞相变相类比,认为过参数化会让粗糙、易陷入亚稳态的景观转变为可流动的平坦谷地。他强调,真实世界的数据具有多层级、树状的隐藏结构,而深层架构的关键优势正是能够逐级发现这些粗粒化变量,从而克服维数灾难。针对乔姆斯基的“刺激贫乏”论证,他的合成模型表明,浅层网络倾向于记忆,但深层网络具有学习层级语法的强隐式偏置,因而能用多项式规模的样本获得有限意义上的创造力。访谈同时区分了遵守约束、重组已有部件的生成能力与科学发现所需的变革性创造力,后者还依赖观察、建模、简化世界并与环境互动。Wyart 最新的理论主张,与其始终预测像素或词元,不如让模型预测教师网络的潜在表示,因为抽象概念之间的相关信号更强,样本效率也可能显著提高。不过他谨慎指出,学到优秀的世界表征并不等于已经拥有高效的生成式解码器,这仍是一个开放问题。最后,他把可检验的简化模型、理论与实验的往返以及勇于承认错误视为物理学能够贡献给人工智能研究的核心方法。
Highlights
-
Should we predict in token space at a very low level, or more should we train machines to predict abstractions? If you have a deep architecture, there is a huge implicit bias to build those coarse-grained variables.
我们应该在非常低层的词元空间中进行预测,还是更应该训练机器去预测抽象概念?如果采用深层架构,它会具有一种构建粗粒化变量的强大隐式偏置。
Matthieu Wyart Frames the episode's central question -
When you're actually underparameterized, when you don't have enough parameters, you have a rough landscape with many metastable states. But if you have enough parameters, then suddenly the system can flow; your landscape has many flat valleys which have essentially zero energy.
当模型参数不足时,损失景观十分粗糙,并存在许多亚稳态。但当参数足够多时,系统突然就能流动起来;景观中会出现许多能量近乎为零的平坦谷地。
Matthieu Wyart Connects overparameterization to a physical phase transition -
If you try to make a map where one mile is one mile, it will never help you. You need to build caricatures of the world. To paraphrase Einstein, a model should be the simplest, but not simpler than that.
如果你试图制作一张一英里对应一英里的地图,它永远不会有帮助。你需要构建对世界的简化刻画。借用爱因斯坦的话说,模型应当尽可能简单,但不能简单过头。
Matthieu Wyart A memorable statement of scientific modeling -
The heat engine emerged before you had to understand what's behind it, how efficient can it be, the limit to its efficiency. Here, I think it's the same: with those machines, it's amazing—they are creative, and they create sentences they have never heard before.
热机先出现,随后人们才需要理解它背后的原理、它能有多高的效率以及效率的极限。我认为今天的情况也是如此:这些机器令人惊叹,它们具有创造性,能生成从未听过的句子。
Matthieu Wyart Recasts AI as a pre-theoretical technological revolution -
If you have a shallow network, what Chomsky worried about is completely true: you essentially memorize, and you can't do anything. But if you have a deep architecture, there is a huge implicit bias to build those coarse-grained variables, and you can learn to be creative after be ...
如果使用浅层网络,乔姆斯基所担心的情况完全成立:模型基本只是在记忆,无法举一反三。但如果采用深层架构,它就会强烈偏向于构建粗粒化变量,并能在只接触很少句子后学会创造。
Matthieu Wyart Offers a concrete counterexample to poverty of stimulus -
Even if you give me one trillion points, because the volume is so huge, they're extremely far away from each other. The answer is that if the world is hierarchical, if it has those hidden coarse-grained variables, deep machines are super good at discovering them.
即使给我一万亿个数据点,由于高维空间的体积如此巨大,它们彼此之间仍然极其遥远。解决之道在于:如果世界具有层级结构和隐藏的粗粒化变量,深度模型就非常擅长发现它们。
Matthieu Wyart Explains how hierarchy defeats the curse of dimensionality -
Instead of just predicting what's going to be the next frame on its eyes, maybe the brain is trying to predict the next activity of its cortex—predicting in some sort of abstract space. Those algorithms that are introspective, that learn from their own latent, are much more power ...
大脑或许并非只预测眼睛将看到的下一帧,而是在预测大脑皮层接下来的活动,也就是在某种抽象空间中进行预测。那些具有内省性、从自身潜在表示中学习的算法,在样本复杂度方面强大得多。
Matthieu Wyart Motivates latent prediction through brain-like introspection -
Once you're convinced that you did the mistake, you state it and it's obvious for everybody; you don't cling to it even if you don't believe in it anymore. The game we're playing as physicists is to propose models of the world and then make predictions. Sometimes your prediction ...
一旦你确信自己犯了错,就应当明确说出来,让所有人都知道;不要在自己已经不再相信时仍抓住它不放。物理学家的工作是提出世界模型并作出预测;有时预测不成立,是因为模型不够好,但理解正是以这种方式建立起来的。
Matthieu Wyart A candid philosophy of error and scientific progress
Full transcript
Matthieu WyartI am Matthew Wyatt. I'm a full professor at John Hopkins University in the US and at EPFL in Switzerland. You know, 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, you know, 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, you know, should we predict in token space at a very low level?
Matthieu Wyartor 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 tried to answer those different questions in a unified manner. Chomsky gave this poverty of stimulus argument, you know, 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-grained variables. And so if you think about LLMs or diffusion models, the way they build concepts, they emerge from statistics alone, those abstractions, they emerge, they are there in the data, they emerge, and those concepts emerge if you group together configurations that predict similar contexts around them.
Matthieu WyartAnd 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. 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. They will eventually, they will learn the same abstraction, but much faster. If you never do mistakes, maybe it's a sign that you're staying a bit on the beaten path in science and
Tim ScarfeSome of us want to explore the jungle. In the jungle, you can be wrong. I 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.
Tim Scarfedevelopers can build on. Now, this is exactly how I run MLST. The whole show lives in motion. 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.
Matthieu WyartIt can be Claude or any eugenic 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. So yeah, I'm a physicist. Actually, I really liked learning physics because you have to deal with nature at all possible scales. And I focused on one specific field in physics, which is called statistical physics.
Matthieu WyartAnd 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 know, you take water, you cool down the system, and at some point, boom, it freezes, completely changing its organization.
Matthieu WyartAnd 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 systems with the...
Matthieu Wyartrough energy landscape. It means that it's a bit like if you're flying above the Elbs like you just did. If you're 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. They're physical systems with memory. I worked on several of those, for example sand.
Matthieu WyartSo what's beautiful about sand is that it is a complex system. If you prepare 10,000 piles of sand, 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 it's going to flow. It means that the energy landscape was rough when you were in a metastable state, but you tilted this energy landscape, you had a phase transition, and then the entire system flow, although it's very dense, particles managed to avoid each other.
Matthieu WyartAnd so I've been very interested in understanding geometrically those questions. But then like nine years ago, I'm 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.
Matthieu WyartI started to think of it as a complex system. And it is because when you train a machine, you 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 as sand. It means that when you're actually underparameterized, when you don't have enough parameters, you have a rough landscape with many metastable states. And if you train your machine, and you train it many times, it will end up in different positions 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,
Matthieu Wyartothers 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, this 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.
Matthieu WyartIt's a landscape of data. So if you think about an image that's called x and 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 a machine works. 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, that there's
Tim ScarfeIt 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. But 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 coarse grainings and there are phase changes and whatnot. Do you think it's coherent to make that analogy? Yes. I think it's a sort of mesmerizing fact of science that some concepts can be
Matthieu Wyartapplied in so diverse phenomena. I think, I mean, science is essentially built on those kind of analogies. I mean, if you think about Regents, 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 form 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 lost landscape of machines, I think the analogies is very direct in this case. Because in both cases, what you have are essentially degrees of freedom. In one case, those are the particle of sand. In the other case, there are the parameters of your large model.
Matthieu WyartAnd in both cases, the system are trying to satisfy constraints. So for force-send, 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.
Matthieu Wyartis what we've argued from physics, but 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 kind of problems. But that's a very specific example. I don't want to say that everything is always the same.
Tim ScarfeBut this specific problem of jamming of sand and the one of, you know, lost landscape of machines 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 carcinisation. 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. You know, we don't have, you know, 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, you know, statistical patterns in the data, but they still apply pressure on the training process. Are those still valid constraints?
Matthieu WyartYes, 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 related to the material aspect of it. It's true that in one case it's a material. In the other case, it's an algorithm.
Tim ScarfeBut it is at some levels the same if you think about it correctly. Yeah. 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. But the way I intuit it is it's almost like the data and the world are more meaningful as constraints. Is that legible? Okay, so...
Matthieu WyartI think we will be talking about creativity and then we will also be discussing a lot about constraints but they will be in my way of thinking in another space. So I started to tell you we were discussing lost landscape and the constraint here was just to fit data and later on something I'm really interested to discuss is you know if you think about the world itself You know, sentences, the data itself, forget about the algorithm that's actually learning it. So data itself is very constrained. You know, 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 kind of constraints. And do you still think of yourself as a physicist first?
Matthieu WyartI mean, because now we're talking about the physics of learning, we're talking about machine learning. I mean, how does your instinct as a physicist come across into this world? That's a very interesting question. We have to debate it all the time in physics departments because, you know, we need to hire people and what is physics. And we always ask this question.
Matthieu WyartInitially, when I started to think about machine learning, it was more closely related to complex systems and disordered solids and things like that. And now I'm rethinking, now I'm organizing conferences with linguists 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. And OK, that's a long discussion, but maybe I think what What is very special about physics? I mean, other field 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, Wednesday is a new technology. A new technology is asking a huge number of novel questions.
Matthieu WyartAnd 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, I think. So building some empirical science. I mean, the 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.
Matthieu WyartAnd it's an art that physicists have done. I 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 at the 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. I mean...
Matthieu WyartJust 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, you know, 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 you know the description that stuck and that made huge headways in terms of phase transition and led to Nobel prizes, medai fields in math and so on. It's a very simple model, the icing 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 that.
Matthieu Wyartto those questions. And lastly, I think what you are describing analogies, like Wiggins. Physicists that try to think about problems at all scales and to do it fast, they have to build analogies between different fields. So I think that's what we can bring.
Tim ScarfeI mean, when we spoke with Chomsky, he was quite disparaging about the enterprise of physics. He was talking about, you know, the original hard problem motion, and he said that Newton exercised the machine, you know, the mechanical universe view, but he left the ghost intact. So, you know, 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
Matthieu Wyartunderstand how the universe works, or are they more to help us understand in terms that we can understand? So are we intentionally leaving something out? Yes. I 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, I mean, a big fraction of them are coming from theory.
Matthieu WyartBut 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 of thinking super fast about problems. And then, I mean, then the difficult question is at which level of precision do you need your theory to be?
Matthieu WyartAnd 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 I have my two parents are physicists, actually. And when I started to do my PhD, I tried to escape them by going to econophysics. I mean, doing more finance and economy. And then Already during my PhD, I 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, you know, I even spent one year in Genelia Farm, a place where, you know, Neuroscience Institute. And I met lots of fantastic people and I learned a lot.
Matthieu WyartBut I felt at that stage that a lot of the theory, you know, how, you know, you have many connected neurons, what they're dynamics was a bit applied math and detached from really function and the question of how do you learn intelligence or rules, constraint language and so on. And so I was not, I was not at the, it was not at the level that I really wanted to operate. And so I gave up, I went back to physics.
Matthieu WyartAnd 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, you know, the industrial revolution when actually heat engine emerged before. Again, in one case, what technology was first. And then you had to understand, you know, what's behind them, how efficient can they be, the limit to their efficiency.
Matthieu WyartAnd so then, Carnot, actually, a French physicist, came up and wrote a beautiful text. It reads like philosophies, essentially no math, an 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, with those machines, it's amazing. They are creative. You give them a bunch of images and those diffusion models suddenly, like a painter, they 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 why? So yeah, it's being fascinated by questions. That's what drives me. I'm sorry to bring Chomsky back again, but he said that...
Tim ScarfeLLMs are like bulldozers. He says, I love bulldozers. They're great for clearing the snow, but they're not a contribution to science. And he said, I've got a theory. Anything goes. 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 believed 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, you know, the chest thing. And he said, that's a little bit like a bulldozer winning a weightlifting competition. So it's almost inconsequential, it's incoherent.
Matthieu WyartYes, 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.
Matthieu Wyartyou 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? You know, 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 intelligences machines also extremely interesting, you know, in itself.
Matthieu WyartSo, yeah, so it's just like at the time of Carnot, okay? And, you know, we're facing with new technology. It's asking many questions, which I think, I hope physicists are asking about physics. So we're pushing physics departments to also, you know, invest in those directions. So, yeah. Unfortunately, it is possible to make a system perform a function in many, many different ways.
Tim ScarfeRight, 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 wanted 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 coarse 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.
Matthieu WyartJust the opposite. So essentially, 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. And so I think to understand how a machine works, we first need to understand very well. 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, Shamsky and others. I mean, it has been argued for centuries that underlying texts are trees, different level of abstraction. I mean, it has also been argued for images. It's called pattern theory.
Matthieu WyartWe 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-grained variables, like pressure field, velocity, density, things like that. For this system, it's sort of simpler because there is a single I mean, there are two levels of description, if you want, essentially. It's very microscopic and macroscopic. 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, you could think of it as, you know, the caption that's describing what's on the image. And you have very intermediary steps. I mean, at low level, you could start to make from pixel edges and little geometrical figures.
Matthieu WyartAnd at some point, you could make eyes and nose and ears and understand that it makes a head. 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 so 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 you, which are based on trees that Shomsky introduced.
Matthieu WyartEssentially, 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 know, you have hidden variables living on those three. 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.
Matthieu WyartBut again, if you want to sort of feed those models to English, it's very complicated. And so what is a good model? And again, it depends on the question you're asking. 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 cosmic variables? Well, we build context free grammar, so models of data where you have those trees underlying it.
Matthieu WyartBut 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.
Matthieu WyartAnd production rules, which is how a 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, if you have a poor machine, like a very shallow network, first of all, even those models would be essentially Unlearnable. OK, so there will be a lot to say and 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 can solve this task is precisely because they understand just like the physicists understood about pressure velocity fields. They understand from data, from the statistics of data, this hidden hierarchy.
Matthieu WyartOtherwise, they would never be able to do this job. So they understand that there is this idonyarchy. And from it, they can perform the task that you want. Just to kind of play that back, just so that everyone understands. The idea is that there is... I mean, we're talking about grammar here, but more broadly, we think that there are...
Tim Scarfestructured 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 all the rest of it. So 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, it was. Yeah, exactly. So maybe I can put it into the
Matthieu Wyartthe context of creativity and this discussion we just had with Tromsky. 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-constrained syntactic rules that the child would never have heard before. And Tromsky gave this poverty of stimulus argument.
Matthieu Wyartyou know, arguing that it was actually impossible to learn to become creative from example. And essentially, okay, this will be a very crude way of summarizing his argument, but I describe the fact that you have this sort of generative tree-like rich context free grammars, you know, assuming that really capturing the fact that the world has a hierarchy of abstract concepts.
Matthieu WyartBut you have other possible generative grammar. Some are much simpler. One is called regular grammar. So this would be a caricature, but essentially the idea that maybe a group of words will fix the probability of the next word, essentially. And Tromsky's argument is to say that, well, even if you give me one million sentences, OK, I can fit those sentences by a context-free grammar. But I can also fit them by a much simpler, I mean, a regular grammar, simpler in its classification, but to fit those sentences, it would have to be awfully complicated, you know, many, many, many rules. And, and that, you know, nativism and empiricism, big debates on this question. And again, we felt like we want to address those questions as physicists. So, you know, idealized world, whereas the true world is Iaki Koen and has this Idon Iaki, CAD machine,
Matthieu Wyartlearn to be creative or not. And what we find is that if you have a shallow network, what Shamsky worried about is completely true. 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 is a huge implicit bias.
Matthieu Wyartto 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 been exposed to a very small number of sentences. So let's say in our model, if...
Matthieu WyartD is the size of the sentence. The number of sentences is huge with D, it's 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 hierarchy. 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...
Matthieu WyartShomsky's argument, it doesn't mean that what he inferred is incorrect, right? 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 there 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 works and they are fascinating.
Tim ScarfeI think it's possible that you're both correct. So, you know, Chomsky, even back in the 50s, and he wasn't the first to do this, but he came up with these very basic, you know, 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.
Tim Scarfewhich 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. 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.
Tim ScarfeBut 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.
Tim ScarfeSo, 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 McGraff 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.
Tim Scarfeareas, 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's 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. In those models, first of all, what we find is that as you train the machine more and more,
Matthieu Wyartthose 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. The second question was, yeah, I think you're referring to the fact that transformers have a finite depth.
Matthieu Wyartthe finite depth and so I mean if you are thinking about sentences where you have 50 complements 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 encounter in practice because you know sentences that loop for 50 times are extremely rare so I'm not sure it's really you know I know that some people
Tim Scarfebut a lot of attention on that. But I'm more, you know, 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 is 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?
Tim ScarfeSo if I if I put it in a loop I put it in an agent and I say just just fix the bugs and just keep evolving this software And it doesn't respect that you know the deep constraints now are my mental constraints like what was I trying to achieve with this right? 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.
Matthieu Wyartcomposition. 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 you know we test with real images or with real text and maybe we'll come back to that because I think it's a really important part of physics.
Matthieu WyartCreativity 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 whole. But I think creativity can be...
Matthieu Wyartmuch 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 you know if you think about creativity like Newton understanding the motion of planets and things like that I mean we talked about dialogue between experiments and theory we talked about building models at the good level of description we talked about you know 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 data set and the good procedures to teach machines to be good scientists. So just an example like creativity in science requires
Matthieu Wyarta lot of abilities to create something really new and how to interact with the world around us that I don't think machines have yet. So I think I agree with you that just scanning up, I don't think will lead to total success. We need to develop other abilities in those machines. I think I'm just trying to understand what the gap is because it would be consistent with your argument.
Tim Scarfeif 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, you know, 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,
Matthieu WyartWe think, oh, that was a very transformatively creative stepping-style. Yes. I think if you look at the history of science, it was very creative. I mean, think about mathematicians inventing imaginary numbers or Newton describing the motion of planets or regents and something about waves and diffraction. I mean, humans forever have seen waves entering a port and being diffracted. So you know, starting to make more circle-like patterns.
Matthieu WyartBut if you're just showing those patterns to a machine, it would stupidly predict the next frame because velocity will propagate. But what do we do as physicists? First, some 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.
Matthieu WyartAnd then you have an aspect of modeling that I was describing, how do we model this and so on. So I think all that is very much needed and I don't see how you could, you know, 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
Tim ScarfeThose interactions and 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 You know realistically with with the amount of data sense data that children have for them to learn this grammar and 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 that 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 in variance. Tell me about that. All right. So this is about how does the machine actually build those course grain viable abstractions.
Matthieu WyartAnd 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.
Matthieu Wyartpixels or low-level features. So essentially what we argue is that maybe there is an analogy again with a simpler algorithm which is the word2vec introduced 10 years ago and a beautiful idea. And so the idea there was how can we build an interesting vectorial representation of word to each word I want to associate a vector.
Matthieu WyartAnd there 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 you know 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 you will just have the meaning so this is for me an example of coarse grain variable right so and essentially it's key because we talked about the fact that
Matthieu WyartOK, so learning in large dimensions should be extremely hard. So essentially, it's really important that this machine manage to in some sense get rid of a lot of things they don't care about. And to do that, they have to build those core environments. So Word2Vec is doing that at one level, at one level of abstraction, at a low level of abstraction.
Matthieu WyartSo 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, have understood the meaning, they will group this meaning into super meanings. So maybe let me give an example. So think about streets, the concept of streets. So you have, you have passerbys, you have cars, you have sidewalks. You have an immense number of possible streets.
Matthieu Wyartit would be very useful to have a concept for that group, all those different configurations together, and that's the concept of street. And so if you think about LLMs or diffusion models, the way they build concepts, they emerge from statistics alone, those abstractions, they emerge, they are there in the data, they emerge. And those concepts emerge if you group together configurations that predict similar context around them. So maybe if you have a street, typically you have houses nearby and maybe the houses of 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 abstractions
Matthieu Wyartby 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 the more abstract concept is the toughest to learn. Because essentially, your signal, as you get more and more abstract, your signal gets diluted.
Tim ScarfeSo 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,
Matthieu Wyartwould 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, they don't do anything, but if you have a transformer or a 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 levels of abstraction. And we find similar in terms of scaling, similar number of data independently of the architecture.
Matthieu WyartI 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 abstractions actually really exist. And again, there are a 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.
Tim ScarfeIt's 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, 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 the architecture. Maybe if we had proper learnable Turing machines, they would converge higher up the abstraction tree.
Tim ScarfeBut 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.
Tim Scarfedimension is lower. We spoke with Randall Bellastriero 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. Yes. But you're saying that this kind of emergent behavior is actually how it is tractable. Exactly. So actually that's
Matthieu WyartBefore we started thinking about creativity, our first work was really trying to understand what sort of data structure allows DeepNet to actually perform. So it's exactly as you said, maybe I can say it again. So in physics, we know that a volume goes like a length.
Matthieu Wyartto the exponent of the dimension. So in 3D, L cubed, in 2D, L squared, L is the length. So think about a large dimension. So if you think about an image, D maybe is the 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, large in the dimension. So what it means is that even if you give me 1 trillion 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, you know, power to...
Matthieu Wyartto generalize, is if, you know, you bring those points together, it means you have an exponentially larger number of data, you have more data than atoms in the universe. So it's just impossible. So to me, this is a completely fundamental question. And it's true that sometimes in the literature it starts to decide by saying, OK, it's super naive to say that the dimension is a number of pixels in an image. In fact, it should really be that the data lie in a lower dimensional manifold.
Matthieu WyartAnd 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 would mean that very simple algorithm, like kernel methods are an ancestor of deep net or even shallow network.
Matthieu WyartI mean, they do it perfectly. And if you give them, you know, 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. It does nothing. So the question is, why do you need deep architectures? You know, I mean, and some of the things you said 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 those hidden coarse-grained variables, those machines are super good to discover them. And they can discover them 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.
Matthieu WyartYou know, instead of describing pixel by pixel, it's always a nose, ears, and so on. So you're reducing the dimension of the problem, essentially, and you can solve the cursor of dimensionality. So I think this explanation, as the advantage that it explained, I mean, whatever you explanation you come up with, it has to explain, it needs to explain why you need deep networks. Yes, yes. You know, when I was speaking with Tom from Good Fire the other day, he was saying that so much of interpretability is going from
Tim Scarfeessentially 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 Jan Lacan.
Tim ScarfeFor 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.
Matthieu WyartAs 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 hypotheses, 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 if you want to do it well, you need to understand the full hierarchical abstraction of the world, even to do that well. Actually, so that we started to work on next token prediction, because I always had,
Matthieu Wyartat least one decade, this sort of question related to the course of dimensionality, which was, you know, 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 I need to memorize the 30 words to do that? I mean, how is it possible? And actually, those models gave a sort of elegant answer to that, because what happens when you try to break the next token is that you will if you said a long sentence, maybe you would have a coarse-grain variable that describes 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, you need to build
Matthieu Wyartthose very abstractions, 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 abstractions by bringing together configuration in the data that predicts a similar surrounding, but at a low level, like similar pixels 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 Yanlequin, and there are also other models. And they're extremely interesting. And again, the idea is instead of predicting at the level of token,
Matthieu Wyartpredicting 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.
Matthieu WyartBut 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 after all, those LLMs are doing fantastic things. And so we felt that, and there was essentially no theory on that, on sample complexity. And so we felt we needed to think quantitatively about this question.
Matthieu WyartAgain 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 laws, 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 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 or next token prediction do is that they...
Matthieu Wyartthe signal they have to bring those together has to do with pixels around very low level features. And I told you that this correlation between abstract things and things that are not abstract, it's there, it exists, but it's very noisy. But imagine instead that you, when you 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 configurations have not pixels, 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. So yes, we do find that to understand the hierarchical structure of the world, at least in those simple models, it's much more efficient.
Tim ScarfeYes, I mean, many folks will know Lacan's work in the vision space, so Barlow Twins and, you know, 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, you know, occlude tiles from one side and you're learning this prediction function over the, you know, the embeddings, the latents rather than the ambient space. But You know, this also goes into his broader philosophy about energy based models as well. So the rough idea is that you can imbue.
Tim Scarfedomain 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? You know, like 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? Maybe I should indicate a word of, as physicists, what I've been discussing so far was the same sort of theoretical approach.
Matthieu Wyartbut 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. You know, I 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 predictions. So we're in the process of doing that.
Matthieu WyartSo I think that there is a very deep question there. What we find in those simple models is that, indeed, you learn the abstraction with much less data. But now there is a question of, so those abstractions are there represented in your machine? And what do you do with them?
Matthieu WyartAnd 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 methods 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 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.
Matthieu WyartAnd I still don't know the answer. 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 a generative model 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.
Matthieu WyartSo yes, 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? So I think to me it's a fascinating, you know, field of study for the years to come. And in this recent paper that you just released about a month ago, the, you know, the predict latency not tokens.
Matthieu WyartYou 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 that to test your prediction you plot it in the log log and you see so so we like to have those kind of parameters to test our ideas. But in terms of the conceptual picture, this figure, as I think three networks, the first is supervised learning. So in all models, the data are tree-like. There is 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.
Matthieu WyartAnd so one question would be how many data do you need to, 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.
Matthieu WyartAnd what this figure is showing is really the concept I was trying to tell you. It's, you know, this concept of streets and below streets you would have pass or buy car sidewalks. So the nodes below, think of them as pass or buy, you know. 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.
Matthieu Wyartaspect 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 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, when you're trying to build you know abstract concept you're coordinating 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 the number of data you need to learn your hidden hierarchy is exponential in the depth of the tree
Matthieu WyartWhich is still good, because if you think about it, the dimension of the input is also exponentially in the depth of the tree. It means you can learn that polynomially in the dimension of your problem, which is much better than exponential, which means impossible. Okay, so next, our contradiction works, but it's still exponentially 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.
Matthieu WyartAnd again, when you try to build the concept of street, you just predict what's nearby houses. And you've already understood this concept of house. And now the correlation, 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 the abstraction.
Tim ScarfeSo 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 OpenAI and Anthropic, they're still training old school transformers. And I spoke to Cleon Jones at Sakana about this. He was one of the inventors of the transformer. And he said, any new method has to be crushingly better.
Tim Scarfebecause we've invested so much time in hardware and optimizers and compilers. There's an entire ecosystem about this, and it's actually very difficult to steer the ship. Lacan does have a couple of new startups, but the read I'm getting is that 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
Matthieu WyartThose 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 no, if we could, if we could.
Matthieu Wyartthen it would mean, at least conceptually, that we could do a much better generative model. But you see, 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?
Matthieu WyartWell, often they are based on transformer architecture. So it's mostly objective, you mean. And in one case, you are masking the future, like you're predicting the next token. Whereas 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.
Matthieu WyartSo 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, first of all, you have an arbitrary number of diffusion steps.
Tim ScarfeAnd maybe you would say that's analogous to just doing more back passes during training on a normal network. And there might be some difference in terms of the diffusion model seems to learn global relationships first and then tightens up, whereas transformers and CNNs seem to have a locality bias. I like to simplify the discussion by focusing on simple complexity. How many data do you need to learn? That's where...
Matthieu Wyartwe find analogous quantities because you are going into sort of compute of going back with those forward and backward processes. 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.
Matthieu WyartAnd we could, okay, so actually we have some confidence on those statements also because they make non-trivial predictions. 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 have data, it's regenerating crap. As you increase the number of data, it should start to form coherent words.
Matthieu Wyartlater 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, you know, a theory of scaling laws of next token prediction. About a year ago, you had a paper about scaling laws as well. Yes. Tell me about that.
Matthieu Wyartas 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 theorists that Essentially, it's not understood at all. You know, those scaling laws, 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 Francesco Cagnetta, Alan Raventos, and Suya Ganguly, we proposed a theory for this problem.
Matthieu Wyartinspired by this synthetic world I told you about, but detaching the 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 for 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 concepts and that 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 polo of the distance between those two words. From that, you can measure
Matthieu Wyartexponents, and they depend on the language you look at. With your data set, you can measure them. And then there is another key quantity, we argue, which is related to the entropy of text. Entropy of text has been discussed already by Shannon in the 50s. It's a beautiful question. So essentially, 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.
Matthieu Wyartand that we could finally measure with LLMs or other architecture and we find consistent results, is what is the entropy left after a sentence of end token? If you see end 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 polo, and in real life it's also a polo that is found. And so essentially, What we argue is 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 it's making non-trivial prediction in terms of how the loss should depend on the context that you give it, the context and also the number of data.
Tim ScarfeSo 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. Can you give me some interest on that? I mean, it's often, you know, when we speak about Shannon, there's a graph that people often see that, you know, 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 just going down and down. What does that mean?
Matthieu WyartDoes 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 going to happen? I should be extremely careful first of all because we could test our theory at the academia range. So it means one billion of parameters, one billion of tokens.
Matthieu WyartI told you that as you increase the number of tokens, this machine 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 or theories was tested. And it's about 50 tokens or two or three sentences. I think it's great because there's all syntax and so on there. So there's a lot of stuff. But that's where I'm confident that I mean, confident. I think we have a very robust story that I think will hold true. I mean, you know, the field has to investigate further and decide. But what really we have not done, because it's not possible with our means, is to test this theory for, you know, 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.
Matthieu Wyartexplain deep learning to any scientist dead or alive, who would it be? Or if I could explain it to any scientist dead or alive, who would it be? 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.
Matthieu WyartAnd 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. Are 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...
Matthieu WyartOnce you're convinced that you did the mistake you you 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. I mean I so So yes, I mean it it happens for sure You know the game we're playing as physicists to propose model of the world and then make predictions Already that we feel is doing our job then we it needs to be tested by us or by others. I mean sometimes your prediction does not hold because it was 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 a hypothesis and then you really test them. So yeah, I think it's important to, if you're
Matthieu Wyartcreative. If you take risk, I think you should do mistakes. 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. Matthew has been an honor having you on the show. Thank you so much for joining us. Thank you so much. That's fine. Thanks.