Y Combinator Startup Podcast - Beyond Bigger Models: Recursion As The Next Scaling Law In AI

Episode Date: May 1, 2026

A 7-million parameter model outperforming models a thousand times its size on tasks like ARC Prize. That's what recursive reasoning unlocks.In this episode of Decoded, YC's Ankit Gupta and Fra...ncois Chaubard break down two recent papers on recursive AI models, HRMs and TRMs, that are achieving state-of-the-art results with a fraction of the parameters of today's largest models.They explain why standard LLMs hit a fundamental ceiling on certain reasoning tasks, how recursion at inference time gives small models the compute depth to break through it, and what happens when you combine these ideas with the power of large-scale foundation models.

Transcript
Discussion (0)
Starting point is 00:00:00 Welcome back to another episode of Decoded. Today, I'm back with YC visiting partner, Francois Chauvard, to talk about one of the most interesting recent trends in AI research, recursion. Specifically, we're going to talk about how we can improve a model's reasoning performance by using recursion at inference time rather than by just making the model bigger and bigger. There were two papers that made the power of this approach really clear in 2025, one on hierarchical reasoning models, or HRM, and another on tiny recursive models, TRM. Francois, thanks for joining us.
Starting point is 00:00:38 Can you tell us a little bit about these two models and what was so interesting about them? Sure. I guess to set up a little bit of a foundation, you already did an amazing lecture on R&Ns and LMs in one of the previous videos, so I won't overdo it, but just to give the Cliff Notes, an R&N is just a model that you recursively call again and again and again on itself. And we were very much in the belief that this was required to get to AGI peak R&N use was probably until 2016 with Alex Graves, Nurep's keynote, which is just fantastic and all his adaptive compute time work.
Starting point is 00:01:15 So this is about 10 years ago people were working on these models. This was in the era of LSTMs and LSTM's with attention. Yeah, and depending which professors you talked to before attention was invented. Yes, yes, totally. And I think what really was the limiting step on RNNs in general was this thing called back through time where you have to you roll out the model and then to update the weights you need to approximate the gradient and you step back back back and you keep rolling out and as the model gets bigger and bigger and as you roll out for more
Starting point is 00:01:47 and more steps then you have all these accumulation of errors and the gradient gets noise you're noisier and then it just kind of stops to work so you have these like vanishing or exploding gradient problem and it's because if you have an input with 20 steps you're like multiplying these matrices 20 times and that causes training about doing context length of like a million or like a billion and But it's not even just 20, it's like a billion. And even worse, you have to retain the activations at every single step.
Starting point is 00:02:11 And so, like, if this were happening in your brain, you would need like a million copies of your brain at every single activation so that I can back prop through it. There's tricks around this that you can do and you can do a gradient checkpointing and things like that to reduce that issue, but then you're just trading off memory for wall clock time and compute.
Starting point is 00:02:29 Right, so now if you could cross that with LLMs, the ones that people are widely using, These, while at face value, they appear to be similar. At training time, they're doing basically this one shot feed forward process for every input, right? The LLM, the transformer block, can take all of the inputs in parallel. It's not actually iteratively going over them
Starting point is 00:02:48 one at a time, a train time. So you don't have this needing to store tons of activations problem or this giant vanishing gradients problem with them. Yeah, exactly. It's actually all happening in time in one shot magically. And that was like the trill or lower triangle trick that kind of happens, this causal mask that occurs. And so you actually do all time steps in one shot,
Starting point is 00:03:09 and you forward pass a feed forward model on all time steps in one shot, and you're backwards in one shot, and it's amazing for train time in terms of like a wall clock. It requires a lot of flops, and it still requires a lot of the memory. You still need it there, but you don't have the vanishing gradient issue. And what you actually paid for that you have to give up is this latent reasoning thing, and this compression in the time direct.
Starting point is 00:03:33 There is no compression in LMs. Every single decode that I do, I still have to retain the entire Shakespeare novel just to decode a little bit. And in R&Ns, you don't have to do that. It's all compressed in this hidden state that you kind of roll out. Okay, so let's talk about that a little bit more detail. Like, you refer to this inherent reasoning ability. You know, many people think about LLMs as doing reasoning, and we're going to talk about that a little bit later.
Starting point is 00:03:59 But help me understand where you see the biggest limitations in LLM's right. reasonability is in terms of what the model does in an actual forward pass. Yeah, and so I guess we go back to chat GPT 2. GPT2 was this landmark architecture and paper that basically was just next token, next token, next token, and it kind of worked and like we just watched vowel loss go down, perplexity goes down, like the model just is more performant, it looks better, starts to make some Shakespeare that actually sounds somewhat plausible, and then we have to get these things to reason
Starting point is 00:04:33 and to actually solve some really hard problems. And I've done extensive experiments on this, but if you take, for example, sort, you have infinite amounts of unsorted lists and you give it sorted lists. You keep feeding it to the model. It should work, right? It's actually impossible for the model
Starting point is 00:04:52 to map from unsorted list to sorted lists. If I have a... In a one-shot basis. In a one-shot basis. It's like literally that we know a theoretical lower bound that for comparison sort, you can't do better than M-Ly. log n steps and if I have a list that's 31 characters or elements long and my
Starting point is 00:05:12 transformer is 30 I run out of steps to do comparisons it's not possible for me to like do all the steps that is needed to be done in HRM and TRM they use Sudoku as an incompressible problem similarly and so are mazes those are incompressible problems rolling sum incompressible problem so when you mention the sorting algorithm when I think back to my algorithms class from college the one way you could get faster than n-log n in a sorting algorithm is if you had some access to an external memory cache. If you had some tape you could write to, then you can actually do faster than n-log n-n by basically selectively putting things onto this memory.
Starting point is 00:05:46 And I suspect that's a key limitation of these LOMs in that because there's no external memory tape in built into the model, you lose certain performance possibilities in terms of how fast you can go. That's right. And so I guess like, rate-exort would be like the most common one. depending on the number of buckets that you have, you can kind of get from n-log-n to order n. You can't get less than n, you have to touch all the elements. Sorry, you have to do that. And if you run out of layers and transformer layers in your neural network, then you ran out of chances to do that. Yeah, so this is just like a turn, this is like going back to like Alan Turing now and like a Turing machine, right? So what's the analogy there exactly that we should think about in terms of LMs, I guess, not quite satisfying how you think about a Turing machine?
Starting point is 00:06:30 Yeah, so if we, let's just talk about like chat GBT 2, GBT 2, the original like no bells and whistles. It's just a feed forward model. And so it's just forward passing one step and taking an input, creating a bunch of outputs. And the Sudoku case, if I have 50 different squares and it's provable that I can only do one given this information, then and I have this many layers, then that's all I can do. And the cheat is the chain of thought. And so it's completely true that at test time, they are turned complete. And you can simulate all turn computable functions at test time. But how do you get it to learn it? You need to train it.
Starting point is 00:07:11 And that's where, unless you're training it on human labeled traces, for which there's a lot of problems like the millennial prize problem, we don't have the trace for it. So we'd love to have the trace for it. Totally. Okay. So with that context in mind now, talk about these two papers because I think that sets up a lot of the contrast we're
Starting point is 00:07:32 going to draw between these papers and the models that people are maybe more used to. So let's talk about HRMs first. Walk me through a little bit about how this model works and some of the intuition behind it. Sure. So this is directly in the lineage of RNNs. There's not that much novel from like the RNN standpoint, at least in my opinion they do have this idea of you know from inspired by the brain where I have like there's different parts of the brain that operate at different frequencies there's some that operate at a really high frequency which is then the low level of the hierarchy some that operate in a really low frequency which is the higher level
Starting point is 00:08:10 of the hierarchy and the interplay between those things is really interesting so this is like literally in the human brain there's some like bio inspiration here which is that like you have like different waves running at different frequencies a different parts of the brain or something like cool and and and And I guess that's one interpretation of it, of the way that they're talking about classifying these hierarchies of frequencies. And the most interesting part, at least for me,
Starting point is 00:08:35 is the way that they train the neural network. You take in some X, some input, whether it's an incomplete Sudoku puzzle, a maze or an Art Prize challenge. You do TL steps with the lower level module, then you do go to go to H, you do that TH times, and then you have ends up outer refinement steps. Yeah, so you basically are like running through the input with a given matrix, with
Starting point is 00:09:08 a given transformation repeatedly on it, and you're doing that through two levels of refinement and then basically running that process several times. Yes, so there's exactly three levels of recursion occurring here. There's the low level, there's a high level, and then there's the outer refinement steps. And we're calling it recursion because it's the same weights that are being applied repeatedly. We're not changing the weights in between these steps. Exactly right. You get to recourse on the L-Net, TL times.
Starting point is 00:09:32 You recourse on the T-H and the T-L, this looped recursion, TH times. And then you do NSUP, you do this whole out-of-refinement step, N-Sup times. Cool. And so what's the basic intuition for why that works? Like, why does that produce an effective paper result? And what even were the results that this paper showed? Yeah. And so, I mean, this got state-of-the-art,
Starting point is 00:09:52 of the art on Arc Prize one and two. This was only a 27 million parameter model that was only trained on Arc Prize. So it's like a thousand inputs or something like that, like puzzles basically from the price. Literally a thousand tasks, which is extremely small. There is no pre-training at all. This starts from like literally Togularasa weights.
Starting point is 00:10:14 And it can outperform at that time if we go back, you know, we had 03, if you remember back, way back when. And 03 gets zero, literally zero. And this got something like 70% on ArkPrize 1 at least at the time, which was just a huge breakthrough. And so kind of the way you can kind of think this is like variable scoping. And so like if I have like three nested functions,
Starting point is 00:10:40 I guess the first, the lowest level function has scoped variables, which they'll call ZL, which is the carry that inits the zero. A latent variable basically. Latent variable. And like traditional, R&N literature, they would call this the hidden state, the low-level hidden state. And I get to recurs, recurs, recurs, recurs, and then I pass back that ZL back to the outer
Starting point is 00:11:01 scoped function, the higher level one. I let that one do one iter. It goes back and calls the lower level again. It does this whole thing in a third outer loop, which is called Adder Fine instead. But when you describe it like that, it seems like it would have the same back-prop through time problem that you would have at RNs. And I think they came up with a clever trick to basically get around that. So what was that trick? And this is really the crux of the paper that differentiates it, in my opinion, in the literature, is they, instead of doing what Alex Graves did in all of his papers from neural turning machines to adaptive compute time to differential in our computers, is he always backpropped through
Starting point is 00:11:42 all of the recursion steps. And he was limited by backpropped through time. So you can only make the model so big. You have all these issues, vanishing gradients, etc., etc., And what they do is they kind of have this DEQ method of doing fixed point iteration. Sounds like deep equilibrium models. Yeah, deep equilibrium learning, where if I take a batch, and this is completely counterintuitive as a computer vision person, because you'd never do this, but it actually does make sense. And I'll explain why. If I take a batch like ImageNet or SIFR10, and I forward pass through the model,
Starting point is 00:12:17 and I get some loss and I back prop and I update the weights, I would go get a different patch for the next one. But what they do instead is they actually do that 16 times. And as you do that, you actually can see the change in your residuals get less and less and less. And why it actually makes sense is because when, in the RNN case, the ZL and the ZH, which are the carry, the task carry, start out-h-hidden states.
Starting point is 00:12:41 The hidden states, start out at zeros. Those are zeros. Then we go through this whole loopy recursion, at least the two loops, the two lower loops, the TL and TH steps, and then I back prop just through the two modules, just once, and I don't recurs all the way back. I do a stop grad, and I stop right there. And then there's a huge residual, and then I don't reset ZL and ZH.
Starting point is 00:13:06 I do it again at a different point in the carry or hidden variable space. And so one can actually look at it as like a different batch every time, even though it's the same exact exits. Yeah, like the way I kind of think about it is like the 16 or whatever that you're rehearsing over, it's like constructing a mini-batch, not from different inputs, but from like different memory states basically. It's like across this hidden or carry memory access basically. And that math holds and it works. It follows DEQ directly in the event that the ZL and the Delta and ZH go to zero, which it actually doesn't do. And so we'll get to TRM, but Alexia basically shows
Starting point is 00:13:56 that this is just not the case, and you can't actually apply this math. And that's why it's working, that's not sufficient support for why it's working. We actually don't know why it's really working, and she figures out that you actually can back prop through all the way to the deep recruitment, which we're gonna get into TRM in a second,
Starting point is 00:14:15 and that actually improves performance much, much more. Interesting. Okay, so before we, in the TRM, yeah, on this paper, you know, I think there's a bunch of different ways people have looked at this, right, in terms of how they came up with it and then why this may or may not be working. One, it's a sort of bioplausibility argument. As you know, I'm usually not super keen on these. You know, I think machine learning tends to have a long history of people starting with biopausible arguments and then realizing that there's some variant of them that seems highly
Starting point is 00:14:42 bio-inplausible that actually works better. I think you have an example. Yeah, a classic, the first deep learning paper that started this. whole craziness is AlexNet. And AlexNet, there's actually this funny little thing called like local receptive activation or depression or something like that where like once this activation fires, then I have this like a factory region or something like that. It actually doesn't work at all. And like it didn't work and you didn't need that.
Starting point is 00:15:07 And then VG came out and say, get rid of all that, just go deeper and three by three com and actually just like outperforms dramatically. And so like this is like, always the, maybe you need to do it to get accepted into NERPS. Sure, totally, totally, yeah. You're definitely the expert here, but what do you consider to be biopausible and what's not? Well, I think that a lot of machine learning literature has overlapped a lot with people working in neuroscience. I think it is very natural for us to ask questions about how does our brain work,
Starting point is 00:15:33 because our brain is like an incredible instrument that does a ton of computing, obviously, and does it in a very shockingly efficient manner, it seems like. And so a lot of machine learning resource has for a long time sought analog from how we think to understand our brain to work, and try to encode that in various machine learning systems. So from the very basic concept of what a neural network is, it's called a neural network because we think it's some basic model for what a neuron is, how certain activation functions work
Starting point is 00:16:00 are meant to be inspired by certain biological premises. Do you think that's a misnomer? The thing about them is that often we use bioplausibility to inspire us to come up with ideas, but we end up veering away from the biopausible to something adjacent to them that is likely bioimplausible, but that seems to work better. It's something that runs better on a GPU.
Starting point is 00:16:20 Exactly. It runs better in a GPU. It's more efficient in some capacity that is relevant to how we actually encoded in a computational system. So I find thinking about bioplausibility fun and interesting, and it's definitely a great way to inspire us to think about new things. But I tend to not be bounded by bioplausibility as when I think about what machine learning systems we should prioritize working on or think as particularly exciting, other than as an
Starting point is 00:16:42 interesting scientific launching point for a deeper exploration. I think the version of this that I find more compelling is actually that original discussion we were having around automata theory, basically. And honestly, just actually like fundamental data structures and algorithms theory, which is that if you're running a complex algorithm, having access to sort of a memory cache is actually very useful for being able to run that algorithm efficiently. And I kind of think of this set of hidden states or carry as akin to a Turing machine tape or akin to the radixort memory bank where you can basically try.
Starting point is 00:17:17 train a model to use this memory cache in an intelligent way in a single forward pass so that you can get a more efficient time operation that would otherwise require some sort of more complicated reasoning. Yeah, I think a point I wanted to make earlier is that like we did this COT stuff and this tool use thing as ways to get beyond the limitations of GPD 2. And so the way that we get, you can actually, I've done this experiment, you can actually, If you give me infinite amounts of unsorted list and sorted lists, if I can do chain of thought and I can do every single step and teach it to do every single step, then I can
Starting point is 00:17:56 actually get it to do sort and become a Turing machine at test time. And similarly, an even cheaper one that is much easier to do is you teach it and you say, hey, there's this Python function called sort. Just call the function. Just call the function. And like, that's the easiest thing to do and you don't need backprop at all. And so those are the two hacks. Now, well, Francois, this is salt.
Starting point is 00:18:18 Like, we're done, right? No, because I needed to know what sort was. What happens if we didn't know would merge sort? The chain of thought is not going to inherently discover sorting from first principles. It's finding it from our historical knowledge of everything it's trained on. Yeah, I mean, this is like the Demis had this whole thing
Starting point is 00:18:35 about the ultimate test is the Einstein test. Like go back to 1911 and then have it rebuild all the physics up until now. Similarly, let's just pretend that we only had bubble sort. We knew no other sort system. If you chain of thought it on all the bubble sort input and output, it will only do bubble sort. In fact, it won't even do bubble sort that well.
Starting point is 00:18:54 So this is the best situation, and then the tool use, of course, it can only know bubble sort. I want to get to merge sort. How do I discover a merge sort? And I think the interesting thing just to emphasize here, because it may not have been extremely clear, is there already exists some type of recursion that people are used to in LOMs,
Starting point is 00:19:12 which is chained of thought we mentioned earlier. But that is a recursion that's happening in the token space of the model's outputs, not inherent to the model itself. And that's sort of the fundamental limitation, is that the model can only do a feed-forward one-shot output. And then we basically just have this hack that if you keep letting it output things, then it can read its outputs and do somewhat intelligent seeming things with it.
Starting point is 00:19:37 But it seems to be upper bounded by the data that we feed it, that the labs are very hungrily buying right now, and not this sort of. of like inherent underlying recursive reasoning. Yeah, so in both cases, both hacks to solve this in COT and tool use, you're bounded by the bounds of human knowledge. In the event it's outside the set of human knowledge, then like you're kind of S.O.L. And so that's one.
Starting point is 00:20:01 The other, you make a great point about discrete versus latent space. Reasoning in a discrete, it can only output the carry in the case of LLMs has to be snapped back to some discrete token space. And in the case of R&Ns in general, they remain in this continuous latent space, which is much higher dimensional. If you give me a tape that's this long and you cut it up into 10 buckets,
Starting point is 00:20:28 versus all the possible values in between. It's much more expressive to be in continuous space. But we can't train it that way because you're inhibited by backrop through time largely. And this is why this paper so exciting. Okay, so before we then go over to the TRM paper, Let's just summarize here. What matters most from the HRM paper that we should take away before we transition and contrast
Starting point is 00:20:50 with the TRM paper? Yeah, I think that the number one piece to take away is this outer refinement loop. The outer refinement loop scales and there's a great breakdown. Basically the Sapien authors, which is huge kudos for this paper because there's so many innovations in this paper, didn't really do like scaling ablations on every single one of the inputs, but this guy, Constantine at Frantz deil's company, Endia, actually did. And it's this amazing breakdown that he posted on YouTube that you can go check out. But basically the main takeaway is that the outer refinement loops is the main beneficiary,
Starting point is 00:21:35 is the main reason why these things work so well, which Alexia basically takes the, she found I think in parallel and scales up and shows that you can get rid of a lot of all this other stuff. Okay so like a lot of machine learning, the follow-on paper is basically delete 75% of the first paper as we've often done in videos here and keep the magic basically. Yeah. So okay, so what's the magic then? Like what's the part that actually matters in terms of what stays in the TORM paper and
Starting point is 00:22:01 let's not contrast the core architectural differences between these two papers? Yeah. So I think that I guess if I break it down into two major things is this out of refinement loop thing is really great and works really well and that this like truncated back prop through time, which is back propped through time except I truncate at some time. Some earlier point called T, T back, T equals one is actually completely sufficient. And so truncated backp of the time T equals one completely sufficient. And that's very counterintuitive.
Starting point is 00:22:33 Which is what HRM found. Which was HRM found and TRM does a little bit further rather than going through just one call to the H-net and the L-net it actually goes through one full recursion loop so if I do it 16 times I just go back through one time and that is is kind of sufficient and if you do it with this like fixed-point iteration thing pseudo fixed-point iteration thing where you keep hitting it with gradient at every single step it like weirdly works and this batch size across the carry space right like actually works so that part is also kept between these two models
Starting point is 00:23:10 It seemed like another thing that changed was having this sort of double layer of like, you know, higher order thinking and lower order thinking. It seems like it collapsed it down into just a single one. What's the intuition there? And how does that actually work in the TRM paper? Yeah, so it's interesting. She actually ablates having two separate networks versus just having one. I guess the more important space is the variable scope, is that you should have low-level features and high-level features, but the same network. And so the best performance model.
Starting point is 00:23:37 The same network can extract both, basically. Yeah, you weight share between the L-Net and the H-Net, and it's just called net, and you do just one transformer layer versus the four like they do in Sapien, and just whittle it down to one and do more of aursion. But you keep ZL and Z-H to be distinct and separate. And she calls it X and Y, which I found very confusing. X, Y, which is very confusing, and it's just like Z-H and Z-L is just cleaner. So if you read the paper, Y is actually like latent space.
Starting point is 00:24:07 It's like Z, basically. not a label. Yeah, okay. Which really threw me through. Whatever, yeah. But anyway, so I will go through some code here and I'll walk you through it. So I replaced all of her nomenclature and used the sapient notation, which is much cleaner and more straightforward to me at least.
Starting point is 00:24:23 Okay, cool. And now before we dive into the code for a sec, like in terms of how these TRMs actually work, you know, it's pretty interesting because this recursion advantage now gives you a bunch of advantages over transformers. Or rather than having, you know, 500 or 1,000 or a million. or whatever transformer layers and having tons and tons of parameters, you get compute depth basically without this parameter depth. And the optimization process looks like more of like an iterative,
Starting point is 00:24:52 kind of like expectation maximization algorithm. You want to talk about how that worked in the TRM paper? Because I thought that was also pretty interesting. So both of them kind of had the same kind of EME feeling thing, where like we update ZL, condition upon the input X and ZH. Yep. The last ZH, ZH, T minus 1, let's say. And then we keep updating ZL, ZL, ZL, ZL, Z, ZL,
Starting point is 00:25:16 and we keep updating it. And then we go holding, we update ZH, condition upon ZL and actually it's just ZL, it's not even X, and then we just update ZH. And the way to think about ZL and ZH is ZL is like your local scoped variables that are just being overwritten and updating, updating, updating,
Starting point is 00:25:37 and then ZH, and ZH, And Azalea makes this point, sorry, Alexia makes this point that is a candidate answer, a proposed latent answer that is just an embedding space away, one MOP look up away from the true answer. So you're kind of like EMing just to like zoom out a little bit. You're kind of maximizing the probability of the correct information stored in your memory
Starting point is 00:26:05 conditioned on a given output. and maximizing the right output conditioned on the information stored in your memory, quote unquote, in parallel. And like that optimization algorithm leads to you ultimately learning a recursive method that stores the right information to this local memory basically, and then outputs the right thing. It really, like, if we actually think of Sudoku,
Starting point is 00:26:28 is actually a really natural way to think about what's actually happening under the hood, where Sudoku is an incomplete puzzle. You can't guess every cell at any one time. you can, actually it's designed where you can only guess one or two cells based on the available information. So it's not, it's an incompersible problem. You actually can't do it unless you're just randomly guessing and guessing and guessing, which
Starting point is 00:26:46 is a very high commentatorial space. And so what the ZL is doing is some type of, let me try this, try that, do some computation, think about little things, and then it proposes, and then we go to condition upon like something that it may have found, it sends it to ZH, ZH fills it in, and now we have a little bit more of a filled-in Sudoku puzzle. And the training process is training the algorithm to know to do that. It's maximizing that it's like, oh, this strategy for what you save tends to lead to correct outputs.
Starting point is 00:27:18 Without chain of thought. Without chain of thought. That's the most important part. If we had Sudoku and we know how to solve Sudoku because like we were just, you know, dumb homo sapiens that didn't know how to solve Sudoku, like it would just have solved it. And that's why it's cool because it actually is able to discover things without being teacher forced via chain of thought. Right.
Starting point is 00:27:37 Interesting. Should we look at some code? Let's do it. Okay, let's dive in, and I would love to see what these papers or bottles look like, just distilled down to their core essence. I know there's lots of details on how you train them, but kind of the core training algorithm, and it'd be great to contrast the two methods. Yeah.
Starting point is 00:27:53 So, I mean, they're remarkably similar, and so largely one, and learning one is learning the other, but basically you start out with some ZH and ZL that are just zeros. Yep. you have some input embedding space. We go from X raw to X, which is the maze state or whatever it is, initial maze state. And then with Nograd, you don't pass any gradients back through this.
Starting point is 00:28:16 So this is the trick, basically. This is the trick. This is the track. Here are two of the three recursion levels. So yeah, this is like the, they do this just for simplicity. But I hit ZL, T low times, and then once for modulo, modulo, T-low, then I hit the ZH, and I do it again, again. And like you said, I'm updating ZL, condition upon ZH and X.
Starting point is 00:28:42 Right. And then I update ZH condition upon ZL. Right. So this is the like expectation maximization style approach. Yeah. And then you don't really need this. This is like just for cleanliness to show clearly that there's no gradients occurring above this line. Just get freezing the weights past that.
Starting point is 00:28:58 Exactly. And then I hit L-Net and H-net one more time. Which is the same thing as up above. So this is just, okay, it's literally just, It's literally just the no grad thing running one more time. Exactly. Cool. Yeah.
Starting point is 00:29:08 And just make it really clear. And then there you go. And that's your HRM model. Cool. And they use two and two is completely sufficient. If you actually go much higher, Constantine showed very clearly that it doesn't actually help. So that's two of the three recursions. The third happens in the train loop.
Starting point is 00:29:26 The third is in the train loop and at the test loop. They both have this M test or N supervision, which a, a like, It's actually called deep supervision, they call it at a refinement steps, it's just whatever you want to call it, call it NSUP. And so you do this end-up times during training, and then during test time, there's a different hyperparameter for how many times it recurses over each model, which is M-10 basically. They're actually the same. And so this and this, we can probably just call this the same.
Starting point is 00:29:54 Yeah. And but it's the same. And if you actually, Constantine does a good job of this. If you actually train on 16 and you test on only one, you get like seven-eighths of the performance or almost all the performance. So it's actually quite interesting that this is just redundant, too much compute and it doesn't actually help you all that much. So setting this to one is actually like...
Starting point is 00:30:21 But presumably for like more complicated problems, having more test time compute is still useful. It's like the reason you would start it up this way. Yeah. We call our HRM, we get some loss, we back prop through just those two little parts here, and then we step, we zero out the gradient, but we do not update ZH and ZL. These are still the same in it, so that's the really important detail there. And as we go back, we pass in the ZH and the ZL from the previous one, so now this is actually
Starting point is 00:30:52 not the same batch because we have updated ZH and ZL. So it's in a different part of the latent space. Cool, yeah, and that's the key like mini-batch construction through memory space concept. Yeah, cool. And then at test time, it's simply the three loops. So there's your outer refinement loop, which turns out like just at train time was important. Train time recursion was important, but test time recursion was actually not that important, which is kind of kind of intuitive.
Starting point is 00:31:19 And then the HRM inside that has your two other loops. Makes sense. And that's it. So pretty simple. And now the TRIM. The only two changes, the main two changes, the main two changes, changes here is that they collapse LNet and HNet into just net. Great.
Starting point is 00:31:34 They, and it's important detail. These are four transformer layers. This is four transformer layers. And this is just one transformer layer. And Alexi actually shows that going deeper actually didn't help. Yeah, and actually on some tasks, it was just the feed forward net actually worked just as well as a transformer there, right? It was like on Sudoku.
Starting point is 00:31:50 Yeah, at Sudoku. And at Sudoku, MLP actually outperformed the attention. It was, it scored zero on the maze. The MLP scored zero on the maze. And so there's, it's not. clear, it's not obvious that the transformer is always better. So there's the weight sharing, and then instead of going back just the one, two, the H, this, back propping through just these two, you actually back propped through one latent
Starting point is 00:32:15 recursion step, all the way through one latent recursion step. Let me just walk through this a little bit. So we have the same thing here. Same starting point, yeah. It's mainly the same thing here. We're doing this six times. And then we go, well, we go. one more time here and then we do our deep recursion.
Starting point is 00:32:32 This is the outer loop ends up times. And so again, we have the Nograd, we have the detach, and then this is where it's different. So I am calling this latent recursion after the detach. Yeah. So it's one full recursive loop is happening. Versus here. And so that's the main difference in the optimization.
Starting point is 00:32:52 Otherwise it's effectively the same. And then it outputs and then you're good to go and you train it exactly as the same. same way before, and then at test time, it's the same thing again. And so largely the same. Cool. And so in many ways it's sort of a simplification, right? You're collapsing certain parts of it, you're simplifying this net architecture.
Starting point is 00:33:13 It's slightly more complicated along this back-prop-through-time part, because you're actually back-propping through more than you did before. But it's like taking a bunch of lessons from the first one and basically simplifying most of it. Which is actually why she, I think, is why she needs to make the model smaller. And so it's a 28 million parameter model for HRM. Now she brings it down to a 7 million perimeter model. It actually gets from 70% to 87% on Art Prize 1 and does actually quite well on ArtPrize 2 as well. And so, yeah, so she makes the model three, four times smaller, but because it has that recursion, it actually outperforms.
Starting point is 00:33:53 And there is one, there's this researcher named Melanie Mitchell that raised. it's this book talking about this very phenomenon, which is like it is sufficient, not necessary, to go bigger and get better performance, and it is sufficient and not necessary to add more recursion. And so where I'm really excited is what happens if you do both. And you're still limited by backprap through time.
Starting point is 00:34:19 Even Alexia is limited by that last step from a memory perspective for sure. And so if you can make the model really big and you have lots of recursion and we do something else other than back proper time then we can get exact all the benefits of this and all the benefits of the giant LLMs and then you can get some crazy stuff. So now to wrap up, why don't we talk a little bit about bigger picture? What does this mean for the field of AI research? How should people think about where these models fit into the
Starting point is 00:34:48 current span of research happening, especially given that it seems like a bit of a departure from a lot of the methods that people are used to hearing about and increasingly seeing products that people use? Well I think for one, one, from the arguments that Schmidt-Huber makes, and we've talked about today, recursion is important. And it's not going away. And clearly the benefit is here of adding recursion into models.
Starting point is 00:35:09 And you've seen things like the recursion language models out of Google that are pretty powerful and cool. And so that's definitely one piece that's, I don't think, going away any time soon. The next one is this add a refinement loop, like back T-B-T-T-E-E-E- equals one, truncated back wrap through time, t equals one. I think that that is a really powerful idea
Starting point is 00:35:29 and the fact that that works so well, we have yet to really explore that extremely, really understand what's happening there. And then the third is that idea of like, okay, we know that recursion works, we have these tiny recursive models that are seven million parameters, it can solve what a 100 million,
Starting point is 00:35:50 100 billion, a trillion, a trillion parameter model can't solve, trained on the entire internet, and a seven million parameters wins. Like the right answer is to like take the amazingness here and take the amazingness here which probably is already in Gemini already or some of these these it might be at least in some part but when you when you take the benefit of both these TRMs and these giant models and you actually slam it together I
Starting point is 00:36:16 think that it's just going to take off and it's gonna be really huge. Yeah one of the things that's really interesting about these TRMs and HRMs is they're not general purpose models right these were past specific models right the model trained to do Sudoku cannot do Arkprize inherently has to be trained on the ARF price set to do so. Versus the ELLMs that are used on these tasks are general purpose models that maybe get some additional fine-tuning data or in-context learning data
Starting point is 00:36:39 on those tasks. And so I think that's where the interesting overlap might come, is if you can make these more general purpose agents that can somehow be general purpose in the way that the sort of next token prediction algorithm has given us and do more complex reasoning to achieve that, seems like you can have really efficient architectures to do scale up research.
Starting point is 00:36:57 Right. A lot of the view of what these elements are doing is finding really amazing embedding representation spaces. Yes. But reasoning inside that space is actually not done all that much. Yeah, it's always through the token space. It's always through the token space. And so like what you can imagine is we found mapping from token space or from vision
Starting point is 00:37:17 from pixels some really cool latent space where like things are just nicely semantically separated and we can, you know, makes it really easy for downstream tasks to do. Now in that space, use this, like tiny reasoning models, use some type of recursion inside that and train that model on that, a little small model, on that reasoning space. I think that's really gonna work. Francois, thanks so much for breaking it all down for us.
Starting point is 00:37:42 See you all in the next episode of Decoded. Thank you.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.