WEBVTT

NOTE Sentence-level transcript of https://www.youtube.com/watch?v=XLEYtv3cMlw

NOTE One cue per sentence. Cue ids are the line anchors on /transcripts/XLEYtv3cMlw.html. A cue ends where the next begins, or 2 s after its last word.

s1
00:00:00.719 --> 00:00:04.240
Hello everyone, my name is Sina Shahande.

s2
00:00:04.240 --> 00:00:12.320
I quite my pleasure to present you this talk about uh running autonomous agents for scientific tasks.

s3
00:00:12.320 --> 00:00:14.559
Um let's let's dive in.

s4
00:00:14.559 --> 00:00:23.279
Um so here um I think everyone is quite familiar with the concept of auto researcher or auto research.

s5
00:00:23.279 --> 00:00:40.719
This is the original Andre carpat is um GitHub repo where we have a ML model and we ask a coding agent to uh find def find a particular metrics and then optimize the code in order to minimize the error basically

s6
00:00:40.719 --> 00:00:45.440
do a hill climb over model optimization.

s7
00:00:45.440 --> 00:01:00.000
Now for many of these coding tasks um this works very well but when the problems become very much open-ended and um sometimes a long horizon like most of the scientific task

s8
00:01:00.000 --> 00:01:12.560
you have this case where AI agents uh usually kind of saturate to a certain level um simply they they are very good at implementation of the of the code or changing the or running the experiments

s9
00:01:12.560 --> 00:01:20.479
over lots of data and so on but the problem is they ran out of ideas uh or you know what people call them research taste.

s10
00:01:20.479 --> 00:01:32.079
Now you can see that in this situations uh you know good humans keep going uh higher and the top 1% humans you know they keep even improving better and better over time.

s11
00:01:32.079 --> 00:01:46.000
Um now um the the the really the difference um from here is the way that uh good ideas uh can or good hypothesis on how the model could be improved or how the the problem could be solved

s12
00:01:46.000 --> 00:01:50.479
um keep um keep coming coming up humans keep coming up.

s13
00:01:50.479 --> 00:02:03.200
So in the scientific task uh you you know you you have this um scientific method um where you know we observe a situation we make a questions we come up with a good hypothesis and

s14
00:02:03.200 --> 00:02:15.440
come up with a hypothesis how to solve this problem and then we do experiments and implement and do the experiment um do the loop um and we as each of the iterations we learn something and we improve now

s15
00:02:15.440 --> 00:02:28.160
the components of the learning component uh I think those are all questions of memory and implementation from learning the mistakes but which is one of the bottlenecks of using coding agents but I think this quite solved by just simply

s16
00:02:28.160 --> 00:02:38.400
organizing patterns activity I think what is much more difficult is it coming up with a hypothesis so how can we come up with a good hypothesis good ideas for our

s17
00:02:38.400 --> 00:02:50.239
uh coding agents to keep improving better uh the process and this is something core things that I would like to kind of um um focus on this talk and plus a little bonus at the

s18
00:02:50.239 --> 00:02:56.879
Um so let's look at the problem here we're trying to achieve as an example so you have a good a good idea of what we're trying to do.

s19
00:02:56.879 --> 00:02:58.959
So here is what we're doing at Radicate.

s20
00:02:58.959 --> 00:03:10.400
We're building uh insilicopet meaning you have a CT and we want to generate um a PET PET image um a PET scan from the CT scan.

s21
00:03:10.400 --> 00:03:18.480
Example of this you can see here um we have CT scans and of slices of scans of the of the of a patient.

s22
00:03:18.480 --> 00:03:22.879
they might have a nodule in the the lung and the question is is this cancerous or not?

s23
00:03:22.879 --> 00:03:24.319
Um is it a lung cancer?

s24
00:03:24.319 --> 00:03:34.000
So they do a PET scan which is a difficult process and very timeconuming and uh to do um but here we do an ML through ML model image translation

s25
00:03:34.000 --> 00:03:44.000
one can kind of change the modality learn the structure of the body and infer what would happen in a PET scan if the hyper the activity of the tissues.

s26
00:03:44.000 --> 00:03:54.080
So you know certain tissues absorb more radioactive tracer and they shine up in this PET scan um and the the tumors usually that's the case.

s27
00:03:54.080 --> 00:04:05.439
Now to generate this relationship uh we need um we need a model uh to um to do the translation but the problem itself has many components.

s28
00:04:05.439 --> 00:04:21.040
So really uh this like any other scientific task the problem is decomposing the problem entire long-term horizon two years 10 years research process into steps and each of those steps is really fundamentally are the goal are a loop.

s29
00:04:21.040 --> 00:04:26.800
So I'm going to focus on one of these particular ones right now and that is on training of a machine learning model.

s30
00:04:26.800 --> 00:04:37.680
Uh so we have here you know decoder encoder type of situations and so encoding the CT and then decoding it into PET.

s31
00:04:37.680 --> 00:04:41.840
Um so that's the typical GAN model which kind of generates the the image.

s32
00:04:41.840 --> 00:04:53.919
Now for this we can kind of define this kind of you know the architecture and we try it capture data and do all the 80% of work to basically bringing the good data set and here

s33
00:04:53.919 --> 00:05:03.840
uh we create the metrics and so on and um around the image you know fidelity of synthetic pet to to real pet and so so on.

s34
00:05:03.840 --> 00:05:16.400
But the challenge is how can we improve the situation given a certain um initial point and we'll go back to our idea of uh hill climb around this optimization.

s35
00:05:16.400 --> 00:05:30.639
So you can see an example of iterations coming from a real run in codeex where you know we improve the data and so on and then we the model goes around and tries to do the optimization and you can see there's a range of possibilities

s36
00:05:30.639 --> 00:05:44.960
and some of them become dead end some of them not don't improve anything but um we kind of desaturate at a certain point and then you need really need a good idea a good idea has to come up so in this case we have a slices of CT

s37
00:05:44.960 --> 00:05:47.600
and we feed these as channel into the model.

s38
00:05:47.600 --> 00:05:52.080
So initial problem initial model that was trained was 2 and a halfd.

s39
00:05:52.080 --> 00:05:58.160
So treating each CT slice as a be the 2D convolutions but stack over channel.

s40
00:05:58.160 --> 00:06:12.800
Now if you give this to a typical ML model they would not think about it as you know go through hyperparameters or you know some sort of you know playing around with problems that it knows but it wouldn't do a very radical change.

s41
00:06:12.800 --> 00:06:20.560
uh for example to come up with a 3D idea convolutions or change the whole problem upside down.

s42
00:06:20.560 --> 00:06:38.880
So to create those ideas um for for for the for the model to try um I had to kind of in the midst of the codeex loop say oh what about what about this idea what about that idea or go read papers out there and see what the papers are are are saying what's other people are trying

s43
00:06:38.880 --> 00:06:54.080
um so to induce uh that hypothesis generation we need to do something about about about our our ML model LLM models so this is a trick um that I found that working very efficiently

s44
00:06:54.080 --> 00:06:58.000
and it's very similar to that chain of thoughts step-by-step problem.

s45
00:06:58.000 --> 00:07:05.919
First is to decompose the problem into its subcomponents but it's an explicit act um um action.

s46
00:07:05.919 --> 00:07:18.960
So you know you could ask actually go through your problem here in this case you know create a translated polymer nodule CT patches into equivalent pet um that's our top problem that I just explained to you

s47
00:07:18.960 --> 00:07:31.039
and then it has components into it so different domain in this case you can see um you know the the the data component the actual core the learning the architecture

s48
00:07:31.039 --> 00:07:45.599
the training loss the you know the operational part of the the ML modeling the metrics and evidence and um you know the peripheral scripts that kind of run the model and data preparation itself is very important pieces.

s49
00:07:45.599 --> 00:07:52.080
Now what we have here is this hierarchy of components of this model that's induced.

s50
00:07:52.080 --> 00:07:56.160
So this itself can be induced very easily using a prompt.

s51
00:07:56.160 --> 00:08:10.639
Uh so basically you know coding agents can itself go in with this prompt of go in through this codebase and create this series of hyper um documents that are linked to each other.

s52
00:08:10.639 --> 00:08:25.360
Now what we're trying to do is is to give our um our coding agent ability to look at this problem in this component uh where it might not do so and then induce

s53
00:08:25.360 --> 00:08:28.479
a a a change within those plateau.

s54
00:08:28.479 --> 00:08:31.680
That's exactly what uh human researchers would do.

s55
00:08:31.680 --> 00:08:34.560
Uh the question is look at what's important what's not important.

s56
00:08:34.560 --> 00:08:38.080
So let me show you let me show you this graph here in obsidian.

s57
00:08:38.080 --> 00:08:43.120
So the documents that's generated out of this hierarchy generation would looks like something like this, right?

s58
00:08:43.120 --> 00:08:55.440
So there's there's an initial readme says here's a problem statement the level one and here is our you know the documentation and then when we go to a next level

s59
00:08:55.440 --> 00:09:06.320
uh of the of the problem you see here um the level two level two itself goes in and have other level three components going on.

s60
00:09:06.320 --> 00:09:09.519
So one of these pieces for example is the model architecture.

s61
00:09:09.519 --> 00:09:12.640
There's all those kind of components I showed you in the graph that you can see it here.

s62
00:09:12.640 --> 00:09:14.080
And each of these documents are very simple.

s63
00:09:14.080 --> 00:09:22.800
We just ask them the model to to document different levels of um this hierarchy as it goes in um through the process.

s64
00:09:22.800 --> 00:09:33.440
So here you can see the generator now it says it's a 2 and a halfd generator and so on and we go shows the details and at the end of these hierarchy components is the actual code

s65
00:09:33.440 --> 00:09:36.399
um that is that is in our system.

s66
00:09:36.399 --> 00:09:50.560
Now what we do during before we actually start the loop the question becomes okay now that you have this hierarchy and now the our model can start thinking uh step by step through the hierarchy

s67
00:09:50.560 --> 00:09:55.839
and going forward uh for the actual uh implementation.

s68
00:09:55.839 --> 00:10:07.760
So we ask um then the task is given this hierarchy that you have come up with ideas that can improve improve this problem and you can see here before

s69
00:10:07.839 --> 00:10:25.680
if I just say say here's our code base and here's my objective Google optimized this process similar to what originally Carpathy's readme file in this program MD it would not it would not generate it would saturate after a while but now that we have this hypothesis

s70
00:10:25.680 --> 00:10:30.000
generation process that can work in an adversarial and collaborative way.

s71
00:10:30.000 --> 00:10:47.200
Um now you have a process where you can create say you know um you you basically create 100 um you can create um 100 different solutions.

s72
00:10:47.200 --> 00:10:55.519
So this goes in and because we have all the components we actually have a have a process in which going and modify every component of it.

s73
00:10:55.519 --> 00:11:08.240
So it becomes a very much more comprehensive search because you have a scaffold that are reasoning LLM can go in and make a decision around improving each of these and

s74
00:11:08.240 --> 00:11:16.800
very much you can see here that you can come up with the idea around uh you know creating a three-dimensional um uh structure rather than 2D.

s75
00:11:16.800 --> 00:11:25.519
So basically creates a much more radical change that it's otherwise would have not come up or or would have missed.

s76
00:11:25.519 --> 00:11:40.959
Now you can also review this of course um this plan uh with a with a adversarially and um or collaboratively with another agent or another model to basically loop in and uh and improve this

s77
00:11:40.959 --> 00:11:41.440
for.

s78
00:11:41.440 --> 00:11:49.600
Ultimately the idea would be um to go through this in in in in a loop like um similar to like this.

s79
00:11:49.600 --> 00:12:01.279
So we have basically um you know a codebase a metrics um goal achieved no then you hypothesize a required change and then kind of go in and implement and this loop can go

s80
00:12:01.279 --> 00:12:06.480
much faster and much better because here we create a better hypothesis.

s81
00:12:06.480 --> 00:12:22.639
Um now let me give you another example uh where um we also in the parts that data preparation another way to kind of improve this scientific loop um is around the concepts of um um

s82
00:12:22.639 --> 00:12:24.959
so you can see an example of it as a registration.

s83
00:12:24.959 --> 00:12:34.880
I want to show you how you can use this additional skills additional kind of collaborative and addial process within your loop.

s84
00:12:34.880 --> 00:12:40.880
problem is that we have this case where we have to do um image registration.

s85
00:12:40.880 --> 00:12:49.760
It's another type of optimization loop in a sense that you you the idea here is so you can see two process two two two scans are overlapped here.

s86
00:12:49.760 --> 00:12:56.480
So the CT scan the gray and then the PET scan is the color one that shows the metabolic activity of the of the tissue.

s87
00:12:56.480 --> 00:13:04.079
So you see liver is high and the lung is is black is not absorbing that radio trace there.

s88
00:13:04.079 --> 00:13:10.320
Um now at the beginning these two scans are not aligned because they they're scanned at different times.

s89
00:13:10.320 --> 00:13:12.800
Uh at the beginning they're look like this.

s90
00:13:12.800 --> 00:13:18.639
Um it's off and through that process of optimization which we call image registration.

s91
00:13:18.639 --> 00:13:21.279
We need to align these images together.

s92
00:13:21.279 --> 00:13:24.800
This itself is has a goal to make a good registration.

s93
00:13:24.800 --> 00:13:30.639
But there are many different components to it many metrics and sometimes the there's a very long process.

s94
00:13:30.639 --> 00:13:39.839
it it would can fail in different aspects of this as this you know the bodies may not be the same well the the body's not the same because the because respiration

s95
00:13:39.839 --> 00:13:52.639
because changes in the system they they're not always aligned and the patients moving and coming in the next next day or next week do the same scan uh with a different scanner would be very different um

s96
00:13:52.639 --> 00:13:53.680
positioning.

s97
00:13:53.680 --> 00:14:05.760
So to do so um we have to kind of align these and we go through the same loop here but we have many different um type of metrics here.

s98
00:14:05.760 --> 00:14:17.920
Some of them not necessarily um a quantitative but qualitative and also hard to know which bug or which issue has has come across.

s99
00:14:17.920 --> 00:14:27.920
So as part of that loop process um one of the idea is that as a as a scientist I would be come here and look at this images one by one myself.

s100
00:14:27.920 --> 00:14:34.160
I could have tried to say oh is this kind of quality control metric type story where you look at this image say does this make sense?

s101
00:14:34.160 --> 00:14:40.959
So here you can see a long mask is the mask applied correctly on the lungs or not.

s102
00:14:40.959 --> 00:14:55.519
If this process next steps is going is it scans properly truncated or cropped but each of these processes there's a loop in itself and could be this con adversarial could also be collaborative.

s103
00:14:55.519 --> 00:15:10.000
So as part of the metrics uh you can kind of call in another model that has a better multimodal capability uh to review the image uh and what's the opinion about this image does it scans

s104
00:15:10.000 --> 00:15:23.839
correctly aligned um and then as part of the hypothesis generations or critique of the changes that has happened you can invoke the another model such as that is much more better at reasoning

s105
00:15:23.839 --> 00:15:37.760
545 uh to generate the hypothesis because they have much bigger um test time compute than and in first time compute to do so you need to equip your loop with additional skills

s106
00:15:37.760 --> 00:15:48.000
to do these these processes by themselves and it's very easy now in the coding agent of course so here I build a skill for review of that image generated

s107
00:15:48.000 --> 00:15:54.399
with say with Gemini model and so on so as part of that loop you can kind of implement these these loops there.

s108
00:15:54.399 --> 00:16:06.399
Uh, and of course to use GP5 and pro that's something we really like is Peter Spinberger's Oracle CLI which packages the code and package the data and send them to

s109
00:16:06.399 --> 00:16:19.839
API uh of the the GP 5.5 Pro and then we'll be able to kind of close the loop um on the on the outcome and you I've seen a much better improvements

s110
00:16:19.839 --> 00:16:33.279
during the especially the hypothesis improve generation uh but also So the critique of is this implementation was really effective because every loop that goes in the loop basically asks say this is what we implemented this is the outcome of it

s111
00:16:33.279 --> 00:16:42.800
does this make sense what would you do next so the process of the loop is very important uh to kind of keep going and improving the model out of this story

s112
00:16:42.800 --> 00:16:56.959
I think what you see as this um back to the concept of autonomous researcher is that you have the ability to go through this loop of scientific discovery with much more rigor in terms of hypothesis

s113
00:16:56.959 --> 00:17:08.799
and and I think implementation is already quite a bit solved especially if your problem is um you know b you know in in a basic can be done in a basic simulated environment

s114
00:17:08.799 --> 00:17:23.600
uh in in a box of course the big thing in science is um better observations the multimodal model currently they lack very much understanding of these components so for example here most

s115
00:17:23.600 --> 00:17:34.880
um understanding of this tin tiny changes for example the existence of this nodule no LLM today is able to identify these very well because they're just not simply trained

s116
00:17:34.880 --> 00:17:45.919
on scientific images and scientific data so there's a big space for future work for people who build these models to be able to fine-tune them or be able to adjust them so they can

s117
00:17:45.919 --> 00:17:58.720
the model themselves can close the loop by observing the same way as a trained scientist would be able to observe that particular uh issue and then um so that's I think one of the biggest bottlenecks for uh for

s118
00:17:58.720 --> 00:18:11.440
not having a full you know scientist in a in a in a data center and then the next thing would be this strength hypothesis but I feel the same way as the chain of thoughts

s119
00:18:11.440 --> 00:18:25.280
came on top of the a basic um [clears throat] base model like you know 40 GP 4.0 know and allowed it to do much more better reasoning.

s120
00:18:25.280 --> 00:18:38.080
This type of trick with this type of um hierarchal structures is the same trick basically applied on the current model and I think going forward with the newer models that are much better post-trained

s121
00:18:38.080 --> 00:18:41.520
to compartmentalize the problems and break down the problems.

s122
00:18:41.520 --> 00:18:46.080
Uh we probably get need less and less of these tricks down the road.

s123
00:18:46.080 --> 00:18:58.400
But in the meantime and in the absence of a very good models I think you you can do something like this or manually well in a different explicit step steps decompose a problem into hierarchies

s124
00:18:58.400 --> 00:19:03.679
and then going through those hierarchies for for improvements in each component of it.

s125
00:19:03.679 --> 00:19:16.320
And basically that allows a very uh structured way to scale the test time compute to to generate more and more tokens on this problem and uh close and continue the loop.

s126
00:19:16.320 --> 00:19:18.080
Well, thank you very much for this talk.

s127
00:19:18.080 --> 00:19:21.840
Uh hope uh to see you around.
