英文原文
Hello everyone, my name is Sina Shahande. I quite my pleasure to present you this talk about uh running autonomous agents for scientific tasks. Um let's let's dive in. Um so here um I think everyone is quite familiar with the concept of auto researcher or auto research. 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 do a hill climb over model optimization. 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 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 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. 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. 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 um keep um keep coming coming up humans keep coming up.
英文原文
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 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 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 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 hypothesis good ideas for our 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 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. So here is what we're doing at Radicate. 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. Example of this you can see here um we have CT scans and of slices of scans of the of the of the of a patient. they might have a nodule in the the the lung and the question is is this cancerous or not? Um is it a lung cancer? 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 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. 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. 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. 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. So I'm going to focus on one of these particular ones right now and that is on training of a machine learning model. Uh so we have here you know decoder encoder type of situations and so encoding the CT and then decoding it into PET. Um so that's the typical GAN model which kind of generates the the image. 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 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. 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. 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 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 and we feed these as channel into the model. So initial problem initial model that was trained was 2 and a halfd. So treating each CT slice as a be the 2D convolutions but stack over channel. 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. uh for example to come up with a 3D idea convolutions or change the whole problem upside down.
科学实验的验证阶段往往面临复杂的定性评估难题。以医学图像处理中的图像配准(Image Registration: 在不同时间或不同设备获取的图像之间建立空间对应关系的配准技术)为例,由于呼吸运动、患者体位差异以及设备型号的不同,CT 图像与 PET 图像往往存在非线性形变和错位。传统的定量指标难以全面评估配准质量,通常需要人类科学家进行手动的定性质量控制(QC)。为了实现完全自主的闭环,我们可以通过多模态 API 引入具备多模态能力(Multimodal Capability)的视觉语言模型(如 Gemini),构建自动化的视觉质控评估工具(Skills),对掩膜裁剪、器官边界和对齐精度进行图像级别的智能审查。在生成新的批判性假设时,则可调用具备海量测试时计算(Test-time Compute: 模型在推理阶段利用额外的计算资源进行多路径搜索、验证与精炼的机制)的高级推理模型,并结合由 Peter Spinberger 编写的 Oracle CLI 工具打包代码和数据进行 API 交互。这套闭环系统能够使 AI 代理在“实现-多模态审查-深入批判-自适应调整”中不断逼近科学最优解,实现了测试时计算在科学发现场景下的规模化扩展。
展望未来,虽然现在的模型可以通过手动构建结构化问题层级来强行扩展测试时计算以提升推理能力,但通用的多模态模型目前仍然缺乏对专业科学图像中微小变化的精准识别能力(如医学CT中的微小肺部结节)。这意味着未来需要进行大量的垂直领域科学图像微调(Fine-tuning)。随着新一代原生支持问题拆解和模块化推理的先进模型的出现,这些工程层面的临时手段(Tricks)将逐渐隐退。但在当前阶段,通过明确的问题层级分解来放大模型的推理计算量,依然是引导 AI 代理持续优化、闭环进行科学发现的最有效方案。
英文原文
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 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 and it's very similar to that chain of thoughts step-by-step problem. First is to decompose the problem into its subcomponents but it's an explicit act um um action. 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 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 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. Now what we have here is this hierarchy of components of this model that's induced. So this itself can be induced very easily using a prompt. 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 documents that are linked to each other. 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 a a a change within those plateau. That's exactly what uh human researchers would do. Uh the question is look at what's important what's not important. So let me show you let me show you this graph here in obsidian. So the documents that's generated out of this hierarchy generation would looks like something like this, right? 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 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. So one of these pieces for example is the model architecture. There's all those kind of components I showed you in the graph that you can see it here. And each of these documents are very simple. We just ask them the model to to document different levels of um this hierarchy as it goes in um through the process. 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 um that is that is in our system. 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 and going forward uh for the actual uh implementation. 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 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 generation process that can work in an adversarial and collaborative way. 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. 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. 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 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. So basically creates a much more radical change that it's otherwise would have not come up or or would have missed. Now you can also review this of course um this plan uh with a with a with a adversarially and um or collaboratively with another agent or another model to basically loop in and uh and improve this for. Ultimately the idea would be um to go through this in in in in a loop like um similar to like this. 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 much faster and much better because here we create a better hypothesis. Um now let me give you another example uh where um we also in the parts that data preparation another way to improve this scientific loop um is around the concepts of um um so you can see an example of it as a registration. I want to show you how you can use this additional skills additional kind of collaborative and addial process within your loop. problem is that we have this case where we have to do um image registration. 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. 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. So you see liver is high and the lung is is black is not absorbing that radio trace there. Um now at the beginning these two scans are not aligned because they they're scanned at different times. Uh at the beginning they're look like this. Um it's off and through that process of optimization which we call image registration. We need to align these images together. This itself is has a goal to make a good registration. But there are many different components to it many metrics and sometimes the there's a very long process. it it would can fail in different aspects of this as this you know the bodies may not be the same well the body's not the same because because respiration 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 positioning. 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. Some of them not necessarily um a quantitative but qualitative and also hard to know which bug or which issue has has come across. 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. 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? So here you can see a long mask is the mask applied correctly on the lungs or not. 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. 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 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 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 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 with say with Gemini model and so on so as part of that loop you can kind of implement these these loops there. 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 API uh of the the GP 5.5 Pro and then we'll be able to kind of close the loop um on the outcome and you I've seen a much better improvements 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 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. 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 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 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 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 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 they can 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 not having a full you know scientist in a 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 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. 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 to compartmentalize the problems and break down the problems. Uh we probably get need less and less of these tricks down the road. 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 and then going through those hierarchies for for improvements in each component of it. 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. Well, thank you very much for this talk. Uh hope uh to see you around.