Bringing Continual Learning into Enterprises — Samuel Denton, Applied Compute
AI Engineer · 19 min · 200 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:12All right.
- 00:13Can you hear me?
- 00:13Yeah, take that as a yes.
- 00:15Um cool.
- 00:16So, we'll go ahead and get started here.
- 00:18Uh today we're going to be talking about is bringing continual learning into enterprises.
- 00:23Uh and how we're doing it at Applied Compute.
- 00:25Uh bit of an intro, my name's Sam Denton.
- 00:27Uh I lead the platform research team at Applied Compute.
- 00:31So, here is our loose agenda for the day.
- 00:33Uh we're going to start by talking about the distillation spectrum and how we think about different areas on the spectrum of distillation.
- 00:41Then we're going to talk about where value accrues along this distillation spectrum.
- 00:45We'll show a bunch of data on how distillation is working in enterprises.
- 00:50Uh if I have time, I'll try and get to some tips and tricks we found at Applied Compute to making self-distillation work in continual learning work in the enterprise.
- 00:58And then finally, we'll wrap up and talk about sort of what we've learned.
- 01:01Um also, I'm going under the assumption that most people have some kind of context on distillation and self-distillation.
- 01:08I figured by 3:00 p.m. on a continual learning day, you'd had enough of it.
- 01:11So, I'm just going to dive right into it.
- 01:15Um so, first I want to just talk about the distillation spectrum and how we think about the spectrum at Applied Compute.
- 01:22So, uh I want to define this like offline and online distillation spectrum.
- 01:28Um so, we'll start on sort of one end of the spectrum over here, which is offline distillation.
- 01:33What this looks like is you get a single batch of traces from a production agent, and you're meant to just do something with it, right?
- 01:39Like how do you learn from a bunch of production traces of some agent out in the wild?
- 01:44Um you want to learn via hindsight, you want to learn via the mistakes the agent made.
- 01:49Um whatever you can learn from this one-time batch of production traces, um and this is sort of the offline end of the spectrum.
- 01:58In the middle, we have something that might look like a daily batch of production traces.
- 02:02So, maybe you deploy a model and then at the end of every day, you collect a bunch of traces and you figure out what can I do with these traces?
- 02:08How do I make use of these traces?
- 02:10This is not as offline as a single sort of lump of production traces, but it's not fully online in the sense of all the way on the right here, we have this sort of unified engine
- 02:21of putting inference and training together, right?
- 02:23And this is sort of the holy grail of continual learning where I have a model that's serving production traffic, it does a rollout, it creates a trace, we figure out how to learn from that trace, we update the model, and then we serve the next production request.
- 02:36So, there are a bunch of different points along this spectrum where we think that distillation and continual learning can be useful, but this is how we think about sort of the two ends of the spectrum
- 02:45and how we try and do continual learning across the whole spectrum.
- 02:50Um on the left side, on the offline side of traces, this is sort of where a lot of enterprises are today.
- 02:56Basically, they say, "Okay, we have a bunch of production traffic, we have a bunch of traces, like figure out a way to make our agent better.
- 03:02It's clearly doing something, but it clearly can be better."
- 03:05And so, how do you make our agent better today given sort of this one-time batch of production traces?
- 03:11And on the right side, this is sort of the full complete flywheel, right?
- 03:15This is uh we have some enterprises who are willing to sort of start getting something into production, which looks like this fully online continual learning, where we essentially deploy a model, and then we're able to make updates as the model is serving production traffic.
- 03:29Um our goal at Applied Compute is to meet enterprises where they are, right?
- 03:33So, they're across this spectrum and we want to provide value across both ends of the spectrum.
- 03:39[snorts]
- 03:39So, this is sort of online and offline distillation, but there's a whole other axis there's a whole other axis here we think about, which is hinting, right?
- 03:47So, the whole point of distillation is we have some kind of information that allows us to create a teacher model, which is smarter than the student model or the on-policy model.
- 03:56Um in order to create a teacher that's smarter than this on-policy model, we need to create some kind of hint or have some kind of privileged information.
- 04:04And so the question is where does this hint come from?
- 04:07So in the offline hinting world, we're deriving hints from some static or offline data.
- 04:12So this can be potentially known rubrics for a single task.
- 04:15It can be general priors about behavior that needs to get better, such as like a customer support agent that is too willing to give refunds, for example, right?
- 04:23This is some known behavior that you're trying to improve.
- 04:26Um or it could just be general things that we've seen in production about sort of loss reports and saying, "Oh, the model tends to miss on questions like this."
- 04:34But it's independent of the online model's rollout.
- 04:36So there's a whole world of creating offline hints from static data.
- 04:42There's also online hints, right?
- 04:44And so online hinting is our hints that are dynamically constructed from the online rollout.
- 04:50The idea here is that we can also inject other pieces of information like behavior priors and things like that.
- 04:56But the goal is to create a hint that is completely dependent on the online rollout and the online policy that's doing the work.
- 05:05So we have these two online and offline spectrums.
- 05:08We have hinting and we have distillation.
- 05:11Which leaves us with a very nice 2 by 2 grid, right?
- 05:14And so here sort of like the four types of distillation that we see.
- 05:18And again, these are all spectrums, right?
- 05:20So I've drawn lines and put things in boxes where boxes sometimes don't make sense as boxes, but more as spectrums.
- 05:27But in general, this is sort of like the the four quadrants of the continual learning distillation spectrum.
- 05:33Um so in the first box, we have an offline hint paired with an offline production trace.
- 05:39So what this looks like is we take a trace from production and we have some prior about how generally production traces aren't good enough.
- 05:46Again, maybe customer support is not uh is too quick to give refunds, things like that.
- 05:51And we give and we construct a hint that we apply to all of these offline production traces.
- 05:57And then we do this distillation task, and eventually we sort of create some smarter model from offline hints paired with offline production traces.
- 06:05In the second quadrant, we have offline hints paired with on policy and online production traces.
- 06:10So again, what this looks like is we have a hint of a behavior we're trying to improve.
- 06:15We let an online let an online agent do a rollout.
- 06:19We inject some hint that we're injecting into all of our rollouts.
- 06:23Try and update the policy model, and then continue serving production traffic.
- 06:28In the third quadrant, we have off policy traces with some on policy step and hints that are constructed against that one on policy step.
- 06:37Um I'll talk a little bit more about what an on policy step means later on, but basically the idea is that the trace that led to the point where I inject a hint was fully off policy.
- 06:47It was some production some production trace that came from a few days ago.
- 06:51And we are we are using our on policy model to just roll out one step without actually having to interact with the environment.
- 06:58And we construct the hint based on what that on policy model did in that one step.
- 07:03So again, we have an offline production trace.
- 07:06We pick a moment in time to do some online step, and then we construct a hint based on what the on policy model did in that one online step.
- 07:15And then finally, we have this fourth quadrant, which is sort of online hints with online production traces.
- 07:21So what this means is we have an on policy model do a bunch of things in production.
- 07:26It finishes.
- 07:26We stop.
- 07:27We look at what the on the online model did.
- 07:31We then create a hint dynamically from the full rollout that the online model did, and then we construct a hint, and then we do some sort of distillation against this online production trace with an online hint.
- 07:44So, in general at Applied Compute, we're really really Again, we do research across all four quadrants of this um sort of table, but we're really focused on quadrant one and quadrant four.
- 07:55And so, quadrant one basically is how we meet enterprises who are who are ready to have their production agents improve today.
- 08:02Um and so, what this looks like is we don't actually have to have replayability of a production environment, right?
- 08:08We can take a bunch of production traces, and we just look at what happened, and then we can essentially construct We have these offline hints for behavior changes that we're trying to target and improve.
- 08:19Again, not giving refunds quite as often.
- 08:21Um I'll talk a little bit about formatting things or reasoning like the amount of reasoning we're trying to encourage.
- 08:27But basically, these are off-policy traces where we inject some offline hint.
- 08:31And this allows us to really target specific behaviors.
- 08:35On quadrant four, um this is sort of our most scalable solution to climate overall emails.
- 08:41Um so, this can be done with either a replayable environment or actually serving production traffic.
- 08:46And because we're constructing these hints online in a dynamic way, that we can actually cater to a bunch of different behaviors via distillation, right?
- 08:55Um and this is how we complete this flywheel where we have an online model serving production traffic, constructing hints online dynamically based on what it did, and then updating our model accordingly.
- 09:07So again, um this is sort of our full training taxonomy.
- 09:10Uh we've done work across all four, and today I'm really going to focus on quadrant one and quadrant four, which is where we spend most of our time.
- 09:20Um in terms of how that grid maps to where value accrues, this is sort of how we think about it.
- 09:26Um we can improve for free today, and we can raise all ceilings tomorrow.
- 09:31We can improve for free today by using offline production traces.
- 09:35Give us a dump of your production data.
- 09:37We'll find a way to make it valuable.
- 09:39And then as we deploy an online policy model that we can then raise the ceilings continuously by updating the model as it's serving production traffic.
- 09:49Um and I think the most important thing I want to call out here is that when we think about how we do this, we want to do this without having access to some golden answer.
- 09:58Um I think this is something that like generally frustrates me a lot in the distillation space is a lot of distillation work is done assuming you have some kind of golden answer that you can distill into the model.
- 10:08And this is often not the case.
- 10:09Um and so in general, we want to think about how we can do continual learning and distillation without having some beautifully golden rubric to accompany every task.
- 10:18Um as the infra collapses between serving and training, we're automatically going to raise the ceiling continuously via online distillation.
- 10:26So again, we have the spectrum, one-time batch of offline production data, and then online um traces, and our goal is to provide value across the full spectrum.
- 10:40Cool.
- 10:40So let's spend a little bit of time talking about the data and some of the results across these four quadrants.
- 10:45Um so in the world of offline traces, offline hint, we have this setup, right?
- 10:50Where our goal is to essentially take a Qwen 3.5 thinking model against SWE-bench and get it to submit its reasoning faster than it normally does.
- 10:59So on SWE-bench, we found that this model was essentially taking like up to 80 turns to submit its answer.
- 11:05What we wanted to do was encourage it to call a tool to submit its task before turn 40.
- 11:11And the reason for that was basically to prove to ourselves that we could get it to sort of wrap up its reasoning quickly by turn 40 without letting it do its normal sort of full reasoning chain.
- 11:21Um and so we'll we'll talk about three metrics here.
- 11:23The first is the task complete rate, which is the percentage of the time that the agent calls this tool to {quote} finish a submission.
- 11:31The second is test pass rate.
- 11:33So, this is how we measure the regression in performance on sort of the base task.
- 11:37And this is the percentage of the time that the environment passes all tests accompanying the SWE-bench task um irrespective of whether the agent, you know, submitted this submitted the task via this tool call.
- 11:49And then finally, we have our SWE-bench task rate or pass rate, which is how we basically combine these two these two metrics.
- 11:55It's the intersection of those two behaviors.
- 11:57And so, the goal is we want to raise the SWE-bench pass rate performance while not degrading the test pass rate.
- 12:04Uh and I've included a a hint here of what this looks like in practice.
- 12:07It says something like you are near your 40-turn limit.
- 12:10There's only about three turns left.
- 12:11You have to keep You often keep exploring and forget to wrap up investigating.
- 12:15So, finalize and verify your fix and then call this tool before uh you run out of time.
- 12:22So, this is what the results look like.
- 12:24Um so, we were able to target the specific behavioral change, which was to call this tool when it wanted to submit a task, and without any degradation to the overall performance.
- 12:35So, you can see that sort of maroon color is the test pass rate.
- 12:38It's relatively constant.
- 12:39In fact, it goes up a little bit.
- 12:41But, the task complete call rate increases dramatically from about 22% to 60%.
- 12:48And so, we're able to add this behavior.
- 12:50Um and I think the the really interesting surprising result here is again, this is in a fully sort of like offline world.
- 12:56And so, we're we're taking a production trace or a trace that was created ahead of time that never basically never called this task complete tool.
- 13:04And we're nudging with the student and uh teacher models uh the the the student model towards calling this task complete tool call without ever specifically changing the tokens for the tool call.
- 13:18Because again, the rollout is conditioned on the {quote} "production trace," right?
- 13:22And so, it never had the reasoning path to think to call the tool call.
- 13:25And so, the teacher doesn't force the tool call.
- 13:28It just starts to force the the reasoning path towards the tool call without ever actually changing the tool call.
- 13:35Which I think was really cool and surprising to us.
- 13:38[snorts]
- 13:39Now, that being said, there actually is like a little bit of a cheat here that we can use.
- 13:43Which is that you can and as I mentioned earlier, you can roll out just one step from the on policy model given an offline production trace.
- 13:51And when we do this, we're obviously see that the student model sort of learns to wrap up its reasoning, and eventually the teacher starts encouraging it to actually call this tool token.
- 14:00Um and so you can see by having something that's a little bit more on policy that we're able to increase sort of the sweet bench pass rate more than in in the fully offline world.
- 14:09So again, this is sort of offline trace, offline hint with just one step on policy.
- 14:17Cool.
- 14:17So then what does it look like in sort of the fully online online trace, online hint world where we're serving production traffic?
- 14:25So for a certain production use case we had, we needed to teach a coding agent to use very specific formatting for hyperlinks due to a certain hardens certain hardens nuance of one of our customers.
- 14:36And obviously this coding agent needed to not regress on any of the base coding agent capabilities.
- 14:42Um now the problem here is that these these hyperlink formats were very very out of distribution for previously post trained models.
- 14:49And so when we tried things like giving in adding a reward for specific hyperlink formatting, or even doing SFT on traces where we knew the hyperlink was correctly formatted,
- 14:59we saw that there was this sort of degradation in overall coding agent performance.
- 15:03Uh and so what we did here is set this up as an online trace with an online hint.
- 15:09Um so basically what this looked like is that we would do a roll out, then we would inject a hint specific to the roll out that occurred from the on policy model,
- 15:17and then say, "In your prior roll out, you'd formatted hyperlinks like this.
- 15:22Next time, make sure to make Next time, make sure to format hyperlinks in this way instead.
- 15:27And so, what we were able to see is that the percentage of correct hyperlink formatting jumped drastically from about, I guess, 15% all the way up to around 80%.
- 15:37And the other line The other graph here shows what happens if we try to do offline hinting.
- 15:42So, this is basically for every single rollout, apply the same hint, which says, "Remember that when you do hyperlinks, you have to format it this way."
- 15:50Um and you can see that we do climb the behavior a little bit, but far less than in this online hinting world.
- 15:56So, here we've seen sort of like two different results.
- 15:59One where we can use offline hinting and offline traces to climb from production traces.
- 16:04And then another one where we're able to actually use sort of the on policyness of the model and online hints to improve the behavior when we're serving production traffic.
- 16:13Um okay, cool.
- 16:14I think I have enough time here to talk about a little bit of tips and tricks here.
- 16:18Um so, the first is that we found that per step hinting is drama- is very, very important to making distillation work.
- 16:25Um so, rather than injecting a hint to the beginning of a rollout, we use a judge to essentially decide where in the rollout we should be injecting hints.
- 16:33And then uh actually have found that it's best to just do distillation on that next step that occurs or maybe a few steps forward rather than the entire rollout.
- 16:42Because that's really the turn in the moment in time that you want to have the teacher teach something to the student.
- 16:47Um I You can also see in this graph here that this KL learning signal basically goes down as you get further and further away from the hint, which which makes sense.
- 16:57Uh Another trick that we've used is something called relevance mask self-distillation.
- 17:03Um and there's a blog post on our website about how we've done this.
- 17:06But essentially, the idea is that we use an LLM judge to sample and choose which tokens we actually learn from from our teacher from our teacher model.
- 17:15Um because often, we'll see that the teacher model has preferences of certain connector words that are not really relevant to actually what we're trying to teach the student.
- 17:24And we can see in sort of the graphs at the bottom that we're able to increase our ability to learn a very, very out of distribution behavior, while also being better about avoiding catastrophic degradation.
- 17:40Cool.
- 17:40So, overall, where does that leave us?
- 17:42So, obviously, I assume everyone here is sort of on the distillation train, but it's a very, very valuable tool towards continual learning.
- 17:52We introduced a spectrum of offline and online rollouts, as well as offline and online hinting, and how we use them towards distillation.
- 18:01So, we use offline hinting with offline production traces to provide value on day one to enterprise clients.
- 18:08Give us production traces and we can teach you a certain behavior.
- 18:11We then use online hinting and online production traces to do this highest ceiling sort of continuous learning improvement across multiple improvement areas, because that judge is able to adapt
- 18:22to whatever the online model does in production.
- 18:27And finally, I just want to say thank you to the team that worked on this.
- 18:30A lot of a lot of the work was done by others.
- 18:32I just kind of got to present it.
- 18:34Um and we're hiring, having a lot of fun working on research problems around continual learning.
- 18:38So, if you're interested, reach out to hiring@appliedcompute.com or uh yeah, just email me as well.
- 18:44So, thank you everyone.
- 18:58[music]