Scaling up Continual Learning — Ronak Malde, Trajectory
AI Engineer · 23 min · 223 sentences · from YouTube's caption track
Each timecode opens YouTube at the start of that sentence. Line anchors (#s42) are the cue ids in the WebVTT, and every line carries its start and end seconds. All transcripts has every talk, and the whole corpus as one file.
- 00:01[music]
- 00:13All right.
- 00:13Hey everyone.
- 00:14Uh, thanks for coming by over here.
- 00:16Hope you enjoyed the chat by part on uh, how to measure continual learning.
- 00:21Now I'm here to talk about how we scale it up.
- 00:23So a bit of background about me.
- 00:25I uh went to this company called WinSurf where I was growing the research team over there.
- 00:30Uh we trained this model called sui 1 that ended up leading to the two billion acquisition at deep mind and then I ended up giving up all the acquisition money to start trajectory
- 00:39where we're building the platform for continual learning.
- 00:42So uh right to dive in I think it's useful to talk a little bit about what AI progress uh has looked like for the past couple years.
- 00:51So we've been in this mode where we've been rapidly scaling up benchmarks that have saturated within first years and then months and that has continued on for the past couple years and and will continue to grow as well.
- 01:05The problem is it's becoming more time consuming and more expensive.
- 01:09Uh we're seeing domains where it takes 4 hours, 6 hours, 24 hours or even several days in order to scale up benchmarks.
- 01:18And obviously you guys have seen the massive amount of money that the labs are pouring into scaling up RL environments and data.
- 01:26Now the thing is uh we are left with a bunch of benchmarks that are getting more time consuming uh more and more expensive and and perhaps more concerningly uh they're not
- 01:38tied to real world use cases where people are using AI.
- 01:42Now the uh trillion uh token problem here is that we are actually spending hundreds of trillions of tokens every single day on inference uh and we're generating great amounts of data on how models in the real world are are failing, how they're doing well.
- 01:58And that should be signal that we should be capturing and training on.
- 02:02Uh and this is actually how humans learn, right?
- 02:05We're continuously updating in the real world and getting smarter every single day.
- 02:09And uh we're seeing now the entire field talking about continual learning from AI experts like Ilia Carpathi Schol and Demis to also many industry leaders as well.
- 02:22Satya talking about how it helps companies and there was actually a great video by Daresh a couple days ago talking a lot about the intricacies of scaling up continual learning
- 02:33and obviously the goal is we started with more data training on internet skill pre-training scaling up to benchmarks but the real unlock moving forward will be continual learning so what's the problem why aren't we here yet
- 02:46the main thing is uh there's several problems right now with our current algorithms so first is we have a task distribution mismatch.
- 02:55We're scaling up these benchmarks which might not even be tied to reality of what people are training on.
- 03:00And second, uh oftent times some of these methods aren't even sampling truly on policy with what what's happening online.
- 03:09Third is uh we have a paradigm right now where we're sending out multiple rollouts and this requires huge amounts of infrastructure to make sure our environments are onetoone copies of the real world.
- 03:21uh and it ends up being a bias that we're adding to our training paradigm.
- 03:26And then finally, third is we are shoving every single reward into one scaler in order to train on when the real world is messy.
- 03:33It's noisy and it has rich amounts of data uh that should be per token signal.
- 03:38So we have all of these kind of broken criteria uh and we're training on it.
- 03:43And I want to take a little bit of a step through memory lane to to see how we've been dealing with algorithms in the past.
- 03:50Um so the first part you know we started with SFT these were the the days of instruction fine-tuning GPT 3.5 chat GBT and uh if you take a look at these four criteria
- 04:00I mean we had parallelism solved back then it was just one roll or one uh use case or example that we needed to train on so that was a solved problem
- 04:10and then the reward for SFT is per token which is great but we are not sampling on policy and the task distribution is just some sort of benchmark that we've cured or some sort of data set.
- 04:21Then we moved on to the DPO, RLHF age.
- 04:25Uh this is when Chad GBT really started taking off and we finally got online task distributions that we were able to train on.
- 04:33Uh but sampling it was a little bit better because we were actually sampling from a model, but it was still off policy.
- 04:40But then we ended up losing some of the uh the key infrastructure, easy infrastructure that we had with SFT.
- 04:46Now we suddenly had pairs that we were training on.
- 04:49Uh and then the reward went back to sequence level.
- 04:53Then we moved on to GRPO which is kind of the mode that we're in right now.
- 04:57Uh we basically took a Fouian bargain and wanted to max on on policy rollouts which is extremely powerful right we now have models that are capable of amazing things uh because they are on policy and able to grow and and not have all of the catastrophic forgetting problems that we've had with previous methods.
- 05:15But on the other hand, we're working with off policy task distributions.
- 05:20Uh our parallelism is now exploded, meaning that we need really robust environment infrastructure.
- 05:25And then finally, for rewards, uh we're back to this paradigm of training on the entire sequence.
- 05:31So can we get to a world where all of these are true where we have an online task distribution where sampling on policy we have one parallelism so we don't need any of this crazy infrastructure
- 05:45and then finally our reward is actually token level well this is what I'm excited to share and and see how we can scale this up so first let's just go through what our best algorithm of post training is today hopefully you guys are all familiar with how gpo
- 06:01works high level.
- 06:02Uh you start off with some sort of task as an input.
- 06:05You do a bunch of parallel rollouts.
- 06:07So we'll call these 01 through 04.
- 06:09And then you have some sort of endstate reward.
- 06:12So you classify these, let's say, as a couple numbers.
- 06:16And then GRPO works on advantage.
- 06:18The idea that you have some sort of mean that you're calculating over and you're trying to shift the distribution of the model to be uh better on the ones that you're better on uh and then obviously move away from the ones that were worse than the mean.
- 06:29So this is how GRPO works.
- 06:31Now let's take a look at a new continual learning algorithm called self-distillation policy optimization or sorry first we'll we'll talk through why GRPO actually is uh still not enough.
- 06:44So um the first part is uh if you remember the tasks so these benchmarks are obviously very different.
- 06:51Uh it requires a bunch of parallelism and then it's almost like you're drinking through a straw in order to get the reward.
- 06:57The way to think about it is imagine you were trying to write an essay and your teacher just gave you a score of 87 out of 100.
- 07:04You would have to run through so many different examples to get to the idea of what a good essay is and it's very simple and efficient.
- 07:10And so these are the fundamental problems with RL.
- 07:14Now uh we're we're going to go through a new algorithm uh called on policy self-distillation.
- 07:20So you guys are probably familiar with distillation in general.
- 07:24Uh there's been obviously a lot of talk about mythos and and blocking that from happening for a lot of open source models.
- 07:29Uh the high level here is that you start with some sort of data set.
- 07:34Uh it's usually uh off policy and not actually tied to reality but some sort of fixed data set.
- 07:40And what you have is a student model and then a smarter teacher model.
- 07:44So usually a bigger model uh and you're trying to basically fit the log probs of the student to the teacher and both of these are passed in with the same data.
- 07:53All right.
- 07:54So this is normal distillation.
- 07:56Now there's a new innovation called on policy distillation.
- 08:00The only thing we're doing is actually swapping out the fixed data for instead a roll out of what the student would have rolled out.
- 08:07All right.
- 08:08So we take a a now roll out of the student that is our trajectory and then we're trying to fit the log props again of a smarter teacher model to the student.
- 08:16Great.
- 08:17Now the problem is when we're trying to push the frontier we don't magically have some smarter model, right?
- 08:23uh like a teacher.
- 08:25And so now what do we do if we're we're already at the smartest model?
- 08:28Well, here's the final algorithm.
- 08:30Uh and this is where the self distillation part comes in.
- 08:34If you basically take the the student model and give it some sort of what we call privileged information, a hint about the world and put that into the prompt.
- 08:44Well, suddenly that student is a little bit smarter.
- 08:47And that's essentially the key idea of on policy self-distillation.
- 08:51You take what's called this hint, put it into the beginning of the prompt, and now you match the log props of the student without that hint to the teacher with that hint.
- 08:59And this is an extremely powerful algorithm.
- 09:02To visualize it a little bit more, let's say you have this student prompt, right?
- 09:06Uh find the derivative of this function.
- 09:08What a hint would be is if you had some sort of environment information or or some sort of guidance on how you should actually solve the problem.
- 09:16The simplest form of this is is literally just a example of a golden solution.
- 09:20You put that into the teacher prompt and then say here is guidance on how you would solve the problem.
- 09:25And you can imagine now that solving that problem from the teacher's perspective becomes a little bit easier and we're we're trying to shift to those log problems had it known the answer in the first place.
- 09:35Um and so by doing this we've solved several key problems that existed with RL.
- 09:41Uh so if you remember uh the task distribution now we can suddenly take something that is truly from online without needing to have sort of benchmarks that are created.
- 09:51Uh the second part is we're still on policy sampling which is great.
- 09:54Uh but now there's no parallel rollouts.
- 09:57We don't need a group of eight in order to roll out but just from a single example we're able to get information.
- 10:02So that takes away the environment bottleneck and all of these other infrastructures.
- 10:06And then finally the most exciting part is we're matching every single log problem of every token.
- 10:10So there's massively rich feedback about what this algorithm is doing.
- 10:14Uh to see it a little more in action.
- 10:17And this is a really exciting part of self-distillation is it's actually not just the top token that you sampled uh that you're actually making better, but instead the entire vocabulary.
- 10:28So for every single token, there's a vocabulary of let's say 65k tokens that you're optimizing over.
- 10:34And let's say the model generated some sort of uh for loop or range in Python.
- 10:39And essentially what we're doing is saying, hey, the teacher for some of these areas where it's blue, it wasn't the top sample token of the student, but instead we're pushing that distribution to sample a brand new token.
- 10:52And this is really exciting because we're not just taking now a distribution like RL and slightly sharpening it, but we're instead actually shifting entire distributions.
- 11:02So this is a really exciting part about opsd.
- 11:05Now we might be saying uh you know opsd is is awesome and and we've solved this problem.
- 11:11So I mean for short horizon tasks it works incredibly well.
- 11:14If you take a look at live codebench uh actually we found that gpo saturates around sonnet level performance and and doesn't really push the frontier but because we're actually shifting distributions we're able to get to brand new territory
- 11:28of results with a lot of data sets.
- 11:30And then the really cool part is um with RL a fundamental limitation and if you guys have ever trained RL models is the models like to think a lot right the more tokens that you expend it's it's just going to do better
- 11:43but with opsd you don't have that problem and so the actual tokens to solve some of these really difficult challenges actually collapses which is really exciting for token efficiency
- 11:54and uh for some of these short horizon tasks you can actually plugandplay opsd right now with several open source projects So uh open claw is a really good example of this open claw rl
- 12:04uh and you can actually use it to do simple chat bots learn from your behaviors with unstructured data uh which is super super awesome.
- 12:11All right so we might be thinking okay continual learning is solved we can all go home and and be super happy.
- 12:17Uh the thing is this works really well for small models short horizon tasks like something like a chatbot.
- 12:23Uh but this is where academic papers kind of end uh and where you really need to scale things up to start to to see the limitations.
- 12:32Uh so at trajectory we've been scaling up this algorithm to 120bs to 500 bs to one trillion parameter models.
- 12:40And as soon as you get to the 120B range with not just one or two tool calls but 50 or 100 well things start to break apart a little bit.
- 12:50So uh first of all eval accuracy is all over the place right the range is going really high uh run-to-run variance is extremely high and then also we start to see a lot of tool call errors
- 13:02uh the model is not behaving accordingly to the format that it was trained on in the first place with the instruction fine-tuning all right so what are the problems that we started to see with this algorithm as we were scaling it up
- 13:15so the first part is actually really funny and what I call it the buttweight problem.
- 13:20So on shorter tasks, you're fitting to a distribution.
- 13:23Everything's great.
- 13:24But when you move on to longer tasks, what you get is is basically this student model.
- 13:30It's going off and doing whatever it thinks is on policy.
- 13:34And then at some point, because you're so divergent in a long task, the teacher is going to try to course correct every single time it gets a chance.
- 13:42And so what you end up with is the teacher model just uh continuously trying to improve this token of wait or uh maybe or some of these kind of hedging words.
- 13:52And there's this really interesting wordle in the the uh bottom left that you can see or wordcloud uh that as steps go on with opsd and you really scale it up uh you start to see some of these words like wait and then but
- 14:05uh start to appear.
- 14:06And then you actually end up in this really interesting local suboptimal position where everything just turns into maybe.
- 14:14And on the right here you can kind of see some visualization of this.
- 14:17As the task goes on you get two different distributions that are really divergent.
- 14:21And what you end up with is the model trying to be in the middle of both of those.
- 14:25Uh which is obviously really suboptimal.
- 14:27All right.
- 14:28So there's a couple ways to solve this.
- 14:30Uh one potential solution is to define step level divergence.
- 14:35So uh in a tool calling trajectory, let's say you have a 100 tool calls going on.
- 14:40Well, what we can do is start to look at the KL divergence of the student model and the teacher model as time goes on.
- 14:48And now we can use this as a waiting factor.
- 14:51So not just like normal KL where we use that as a KL penalty, but instead we're actually multiplying the token weight uh of every single step based on this divergence property.
- 15:03And now the cool part of this uh is that so on the left side we have a normal trajectory that is like pretty in distribution and everything's fine, right?
- 15:12It's everything is a weight of one.
- 15:14On the second part, we have a trajectory that diverges pretty heavily.
- 15:19And so in here, we're only going to modify W1 as the first step.
- 15:24Uh and and so that we can train that, get that right, and then move on, which is awesome.
- 15:28And then finally, on the third part, and this is really cool, by having independent waiting for every step is we can actually have a scenario where uh the model might go off tracks.
- 15:37We don't want to heavily weight that in, but then later on in the trajectory, it might get back on track again.
- 15:43and and we're fine with that and we'll mildly shift the distribution.
- 15:48So this is one way that we've been able to overcome this for a long horizon tool calling.
- 15:53The second part and this is actually really nefarious with uh ops.
- 15:57So with RL the number one problem that people face is reward hacking as you guys are are all aware of uh and that's a game that continuously RL researchers have had to play.
- 16:06Well there is an equivalent for OPSD as well and that is hint leakage.
- 16:11The way you can think about it is we're we're taking this hint, right?
- 16:13Putting it in the the beginning of a prompt.
- 16:16Well, if the student had no way of knowing what that hint would be, uh then you're going to end up with some weird scenarios and and kind of skipping some steps along the way.
- 16:25So, the way this manifests u is let's take this example here where you're trying to find the last three digits of of this formula.
- 16:33uh and a normal hint might be uh actually giving the correct steps and then maybe a final answer and saying, "Hey, actually hint, the last three digits are all zeros."
- 16:43Well, you can see on the right here that when you actually roll out the model, uh you end up with something that's says, "Oh, actually, I know what the solution is.
- 16:51It's 00 0. So, let me go back and put that into my reasoning trace and then figure out what's going on."
- 16:57Well, you can imagine that this is not going to occur whatsoever in the real world.
- 17:00And so we've ended up in this really strange position.
- 17:03Uh and so there's a lot of care that you have to put into how you design these hints and making sure there's not leakage of information.
- 17:10So uh there's one kind of trivial solution to this that you can imagine and this is just literally using an LLM to filter out these hints.
- 17:18So an example of this is uh you know let's say a user can't log in.
- 17:22you have some sort of problem like this uh and there might be some sort of information like exactly the solution right you'll find their SSO token that is expired
- 17:32and you can have an LLM basically translate that into what is something reasonable that they should have known and that's the process of looking through the logs but not actually giving it the solution that it would shortcut some of its vital reasoning.
- 17:43So this is one trivial uh solution and it works decently well but there's some more satisfying algorithmic approaches too.
- 17:50One of these is called residual guidance.
- 17:53The general idea is in a hint uh most of the time you need to actually get through the entire hint in order to get the full information.
- 18:01So what if you let's say cut it in half then you have a partial hint and then you basically say okay this is the partial teacher we're able to get the log props of a slightly smart teacher
- 18:14and then we have the full teacher as well and that's with the full hint.
- 18:17Now what we can do is actually take the linear combination of both of these and this gives us a good idea of how strong the hint is and how out of distribution
- 18:27it is for the original model.
- 18:30And what you end up with here is so on the left you have normal OPD uh where you might be entirely shifting distributions and there's almost no overlap between your model and the original solution.
- 18:40uh to this kind of cool world where uh let's say half the hint is actually quite close to your distribution but the full hint is very off and you take a linear combination and so then you're not shifting the model into unknown territory.
- 18:52So these are just some of the solutions to uh a lot of the challenges that we've had with scaling up opsd.
- 18:59Uh but it is a very very powerful algorithm and uh with a lot of these combinations together we're actually able to scale this up to uh a 12b model on mercur apex agents uh which often requires
- 19:11100 and or plus tool calls in order to achieve and it's a really powerful algorithm that has even surpassed RL as well.
- 19:20So now we've finally arrived at a algorithm.
- 19:23It's not necessarily the algorithm to solve continual learning, but uh definitely one that is a huge step forward that keeps the on policy nature that makes RL so powerful.
- 19:33But then it also has uh finally the task distribution that is online.
- 19:37Uh it has parallelism uh that is singular.
- 19:40So we don't need all of this infrastructure.
- 19:42And then finally it is per token dense reward.
- 19:46So the uh the really exciting part for us and and what we're really focused on now trajectory is uh this just gives you one taste of the entire continual learning loop
- 19:56and there is a really exciting world that is about to come where software in general just gets smarter every single time it's used and that is the most exciting unlock that's going to happen in 2026
- 20:082027 and as we scale up.
- 20:11So a little bit about trajectory.
- 20:13We are uh building the platform that turns every interaction into model improvement, harness improvement, uh and the entire agentic loop just getting smarter over time.
- 20:23Um and we're we're building this platform where we take in agent traces data from production.
- 20:28We're able to optimize that uh as a self-s served loop and then deploy that uh as a continually learning system.
- 20:36And uh we have a control plane that goes over all of that.
- 20:39Um, so very quickly, our team is super awesome.
- 20:41We're from DeepMind, Meta Super Intelligence, OpenAI, uh, and a lot of great product builders as well.
- 20:46Um, and we we've given early access to a lot of companies.
- 20:50So, Harvey, Dakagon, Rogo, um, and they're super excited about what we're doing.
- 20:54Uh, if you're interested in any of the research that we're doing, uh, or any of the product that we're building, uh, definitely let me know.
- 21:01Keep in touch and, uh, happy to answer any questions.
- 21:06[applause]
- 21:16Is it in the sense of like very little latency so that you can learn time or is this something that
- 21:24Yeah, that's a great question.
- 21:26Uh so what I would say is as a research community right now we're in this zone of what I call pseudo continual learning.
- 21:34uh where there's some still level of like batch updates offline uh and then re-uploading the model.
- 21:40I think it's partly an infrastructure question.
- 21:42It's partly still an algorithmic question as well of how do you truly get when you have 10,000 rollouts going out in a product merging those together the infrastructure to pull all of those together.
- 21:51So those are some of the problems that we are solving at trajectory.
- 21:54Uh but I wouldn't say we're anywhere close to the the end solution.
- 22:01Question about hardness.
- 22:04studies in terms of effectiveness.
- 22:11Totally.
- 22:12I I think that's actually one of the most underexplored and most exciting questions is not only just harness improvement, right?
- 22:18And I think there's some literature out there now starting to explore that.
- 22:22But the really exciting part is how does the model and the harness interplay with each other as you're both updating them.
- 22:27That's some of the stuff that we're now exploring with our current customers and and really doing those things online.
- 22:32Uh, but it's completely unexplored territory and there's some really exciting innovations to be made there as well.
- 22:41Cool.
- 22:42All right.
- 22:42Thanks so much, guys.