# Workshop 23976

- Kind: Workshop
- Talk page and recording: https://iclr.cc/virtual/2025/workshop/23976

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Bye.





I'm Zheng Wang and it's my pleasure to welcome you to the search deep learning for code workshop at Iclear twenty to five. Um our workshop this time will be titled as emergent possibilities and challenges in deep learning for code. And I'm ecstatic to share what I have planned for the workshop. First, um let me introduce uh this is not full screen.
Sounds good. Okay, let's continue. Yeah, uh first let uh I like to introduce over our organiser team. Um along with myself we have Gabriel Oleski, um David Joy, um Zora Wong, Wen Ting Li, um Joelle Isabella and Chen Liu. Um so Wen Ting right there, um Giovanni and Chen who is going to come here um in a bit. Um are you with us today? So if you have any questions, um please feel free to talk to us.
Let me briefly introduce um the history of our workshop. Um the very first deep learning for code workshop was held at ICLR 2022, um but it was virtual due to COVID. Um the second one was at ICLR 2023, um which uh which was also virtual um due to the same reason. And this third deep learning for code workshop marks our first in-person gathering which gives us all a good chance to connect face to face.
Uh for this year's workshop we have selected several key focus areas that reflect current trends and also challenges in the field. Um this include for example, um agent matters for programming tasks, um post-training alignment for code, develop like productivity and HCI, open science and responsible AI, and also benchmarking and evaluation for code. Um and of course we have also welcomed many other relevant topics. Um
with the deep learning for code space. I'd like to share some stats about this year's workshop. We received a total of six, seven submissions, and I want to sincerely thank everyone who contributed your work to the workshop. And after a careful double-blind review, we accepted 43 papers. And congrats once again to all the authors whose paper were accepted. We are very pleased with the quantity and quality of the papers.
Okay, um to give you some perspective on our growth, um our previous run had um twenty three papers accepted out of thirty four uh which forty five reviewers and this year we have um grown to um forty three accepted papers out of sixty seven uh with ninety five reviewers helping us evaluate the works and that's um two times growth in just two years.
And the wood class you see represents a key topics from the past on the left and the current run on the right. And this shows how our research focus have evolved over time. And for example, you can see that benchmarking has been a consistent focus of the workshop and we're seeing emerging topics like agents coming up.
And among all the accepted papers, we have selected two outstanding papers for spotlight presentations today. Um the first one is adaptive self-improvement large language model agentic system for machine learning library um development and this is done by Gonghan Wei-Xun Olivia um Olivia and uh Kunlun. And the second one is kernel bench can large language models read efficient GPU kernels um this was done by Annie Semen, Alex William, Christopher and Azalea.
uh Birmingham them presenting their work older today. And I don't say that none of this is possible um without of our dedicated reviewers, and please join me thanking them for their um invaluable service to our community. And we're also very honoured to um host six invited speakers today um

Six United Speakers today, um including Daniel sitting first floor uh first row and we also have Tao, Xinyu, Alex, Stefania and Baptiste. Um our philosophy is to have United Speakers um of topic, um including both the trending ones and also the ones that we believe requires more attention um from the community. And we'll introduce each of them um in detail before Derek's morning talk.
And here is the um agenda um of the day. Um after this opening remark, we'll have three invited talks, um to spotlight and one break in the middle uh for the morning session. Um and after lunch break we have the rest of invited talks and also our poster session.
And this workshop won't be possible without generous support from our sponsors and we extend our sincere gratitude to M-Cube developer, Bedance and JetBrains for their contributions. Their support has enabled us to organise this event and bring together researchers through a generous travel grants.
And I hope you will have a fantastic experience at Deep Learning for Code today. Don't forget to grab now the already exclusive Deep Learning for Code shirts, next to the sponsorship are both designed specifically for the workshop, featuring our logo, and also very comfortable cooling material, and I'm sure that you don't want to miss that out. That's all for the opening remark and with thoughts on the future of Deep Learning.
Further ado, um let me introduce our first new mighty speaker, um Professor Daniel Fried. Um Daniel is a assistant professor uh in the language technologies institute at CMU and a research scientist at Meta AI. His research focuses on language grounding, interaction and applied pragmatics with a particular focus on language inf interfaces such as grounded instruction following and co-generation.
Previously he was a Post-doc at META-N and the University of Washington, um and completed a P_H_D_ at Berkeley. His research has been supported by a Ockawa Research Award, a Google P_H_D_ Fellowship and a Churchill Fellowship. Today his talk is about um inducing functions to improve the large language model agents. And let's welcome Danny.
Okay.
Great. Thanks, Zhezhong, for the intro. And thanks to you and to all the organizers for putting together what looks like it's going to be a really great workshop. So I'm excited to get to talk with you guys today. It's part of the talk, but also I'd love to, workshops are great. I'd love to get to check out the posters and find out about all the work that's going on. So really excited that we're able to be in person. So I'm Daniel Freed. As Zhezhong said, I'm a...
a system professor at CMU where I do work on agents and pragmatics and also working on code evaluations at Meta currently and a little bit on agents there too. But in the work that I'll be talking about today, I'd like to talk about some work that we've been doing to put together code generation and agents in real world settings.
So I'd like to motivate some of this work by talking about language interfaces and the goals that people have had for language interfaces over the years. So I've been using this example for a while, actually. I think you can take a look at sci-fi and see what the goals that people have had for what we can do with computers using language. And there's a nice example from the movie Her from a little over 10 years ago where it's an interaction between an agent and a
and a person and the agent starts off by saying let's start with your emails you have several thousand emails regarding LA Weekly but it looks like you haven't worked there in many years and the the user says oh yeah I guess I was saving those because in some of them I thought I might have written some funny stuff and the agent says yeah there are some funny ones I think there are about 86 that we could save we can delete the rest
So this is kind of the dream for NLP and for agents, right? It's a system that seamlessly interacts with you and there's some social reasoning going on here. It's figuring out your goals. But crucially, it's also going to be able to help you carry out these goals in the world. And this is kind of the goal that we have and code is one way to get there.
So I've been using this example for a while and we've been pretty far off from this goal for a while, but we're getting a lot closer. So here's an example of an interaction that I had with ChatGPT last week where I tried to do this. So I say, please help me organize my emails. Absolutely. I can help you get your inbox in shape. To tailor the advice a bit, could you tell me? And then it asks all these questions about, you know, email provider. But really, I want the system to do this for me.
And it wishes it could jump in and drag those emails into folders, but it'll guide me step by step and my inbox will be whipped into shape fast.
So the system's kind of almost there. It's able to like outline the steps that it needs to take, but in this case, it's not able to actually act in the environment to do this for me. So of course, some tools and LLM agents are going to be one way to do this. But the tasks that we want systems to be able to act on our behalf to do are going to be complex. And they're also potentially going to have real world consequences, whether that's, you know, potentially deleting our emails or sending.
Sending things that we don't want them to so we'll want the systems to be verifiable by people and part of the hypothesis of this talk is going to be that code will give us a way to have system actions that are more verifiable
So, of course, the way to get an LLM-based agent to be able to act for us is by using tools, and you're all familiar with various varieties of tools, for example, ones that can access knowledge about the outside world to get the weather in Singapore and return that for the agent to condition on to produce a response.
But there are a lot of different sources of tools. Some of them are application specific. So for example if you have like a system for helping you find restaurants, it may be able to do a search over restaurants in the area, return those and then produce natural language responses from them.
There's a variety of real world APIs that are available to language models. For example, here are some for translation and getting stats about sports games and so on. But these APIs are all constructed by people. And you can see some of the disadvantages of this when you get to expert domains that might require some expert knowledge. For example, a little bit later in the talk, we'll show systems.
systems that can answer questions about images and we could define some like very low-level primitives about you know pulling out the location of particular detected objects in those images but it could be difficult for a person to write down a set of higher-level tools that combine these primitives together.
So the core idea in this talk is going to be we'll have agents that try to act in the world using fairly low level primitives like the ones that we see in this final example. But when they when we predict that they've gotten the task correct, then we're going to try to pull out reusable tools from the experiences that the agents have had so that they can more efficiently and more accurately and more verifiably carry out similar tasks in the future.
So most of the work that I'll be talking about today was carried out by my PhD student Zora Wong. A lot of the slides are thanks to her too, but I'll start by talking about her paper Trove, which appeared at ICML this past year.
So TROV's going to be mostly about question answering and the ideas that we introduce in it will build on to do more agentive tasks where an agent's actually like acting in an environment later on. But we'll start with question answering to kind of like, you know, walk through the ideas of the methods that we use and and also show how this can work on realistic questions.
So we're going to be dealing with a variety of question types, but for illustration purposes, I'll be talking about ones that are question answering on tables. So there's a number of different data sets for this. Some involve like hierarchical tables, some involve multiple.

practical tables. Some involve multiple tables that need to be joined together. This is an example of a very simple question that just asks what is the mean of vacation days for a very simple table with two rows and two columns.
But the approach that we'll take to answer questions like these on tables is to use programmatic representations of the tables. So we'll use the Pandas library from Python. And we'll rely on the fact that language models are really good at predicting code based on natural language input. So they're sort of like, you know, really good modern instantiations of semantic parsers from the past. So we'll prompt a large language model to
to take in a just linearized representation of this table and just the text of the question and then we'll output a little code snippet which will execute a query on the Pandas version of this table and return an answer which in this case is really simple it just you know finds the vacation days column or yeah column within this table and then computes the mean for it.
So this is a really simple example, but hopefully kind of shows the idea. A more complex example might be one like this. So the table shows how many days of vacation Austin had taken in each year. What was the rate of change between 2015 and 2016?
And I should mention, by the way, that these programmatic code -based approaches are some of the state -of-the-art methods for these data sets now. There was some work that Zora did with student Ehan Kao a few years ago that showed that this is a pretty, you know, it's pretty unified across data sets, but it's a way that you can get state -of-the-art performance consistently. So for a more complex question like this, you might need to pull out, you'll need to deal with a couple different columns.
columns of the table so you'll need the year column in order to do the indexing and figure out the data points corresponding to those years. But then you also need to pull out the rows from the vacation days column and we can see that kind of you know as you know from other code generation settings that you've looked at the longer the outputs get the easier it is for the system to make a mistake and it does in this case so it for this value from 2016 it actually does a look up from the wrong row.
So we see that this could be error prone. But more than this, we might want to execute similar queries on other questions like this that we'd get in the future. And if we were able to get a correct solution here, it would be really great if we could reuse some aspects of that correct solution. Just like when a person writes code to carry out repeated tasks, they would try to write functions that could help them do it.
So this will motivate us to have the agent create functions from examples, things like calculate rate of change, which takes in the column that specifies the values that you are going to be computing the change between, as well as what specifies the years and the years that you want to get the change between. And so you can think of this as having the agent create tools on the fly that are useful for the task at hand without having to design too much upfront.
So to do this, the actual tool induction methods that we'll use throughout this talk are extremely simple. I think there's a lot of interesting follow-up work that could be done on applying some of the methods from program induction from the past to come up with more sophisticated ways of generating tools. But we're just going to rely on the fact that code LLMs are really good at generating code and also refactoring code to pull out reusable functions from it.
So, the standard kind of building block that we're going to use is we'll prompt the LLM with a question and the environment, which is going to be, you know, like the question at hand, but also potentially other tools that have been induced in the past. And we're going to ask the LLM to generate a function that is potentially reusable, generalizable across multiple questions like this one, as well as a solution that uses this question.
So the basic setup that we're going to deal with is a streaming setup where we'll have instances from our data set come in one by one and as the questions come in we'll be producing solutions to them just like you would in you know the standard IID prediction setting but we're also going to be building up a toolbox of induced functions that will help us to answer future questions in a more efficient and accurate way. So this is you know this is a difference from the standard kind of like
of like treat a data set in an IID way make each prediction without any memory but I think that this is really well motivated for the tasks that we're going to be doing in the future where we'll want the agent to learn continually and adapt to new settings and adapt to individuals
But the basic components of our approach are we have it operate in a couple different modes. So one mode is creating a tool. So we'll have the example come in and we'll show it to the code LLM and we'll prompt it to induce a function that could potentially be reused, which would be like the one that we've been looking at so far, as well as a solution that uses that function.
Now, we want to make sure that our functions, you know, just like you would do in standard code generation where you might generate a bunch of solutions and compute consensus in order to have better signal about which one might be correct. We're going to be doing that here, too, but we're going to also be using that signal to help us determine whether the function is correct.
So we're going to be sampling multiple outputs on both functions and the solutions that use the function from our code to OLM. And we'll do the same sort of clustering that you might have seen in like, you know, a min base risk type approach or just a consensus at K approach where we'll execute the functions on the input, get the output of each generated function and solution on the input cluster according to those outputs and then just
just choose the biggest cluster as the one that's most likely to be correct. And so in that case, we'll pull out the program and solution from that and we'll save the program and put it in a toolbox that we're accumulating over time. And the code LLM is going to have access to that toolbox when it's generating solutions for new problems.
And we don't get explicit signal about whether this passed or failed. This isn't an RL setting. We're just treating this in an online way, accumulating the solutions based on whether we predict that they're correct or not.
So that's the creation mode. We also allow the model to just use existing tools without creating new tools. So the motivation here is we don't want the toolbox to kind of grow in an unbounded way. We want it to grow in a way that's like actually, we're not going to have to create a new function every time. So this is really simple. We just tell the LLM that it should not create a new tool, but it should use an existing tool from the toolbox.
And you would see a solution that looks like this. And we're feeding in sort of all the function signatures from the generated tools to the LLM to give it a way to choose one that's relevant for the problem. We do the same sort of consensus-based choosing here and use that to choose a solution.
So I've described these two different modes. We also have a third mode which is don't use functions at all but just generate kind of the raw code, in this case pandas code, and we'll run all three of those modes in parallel to each other and decide which mode seemed to give us the best solution for the problem by using the same sort of grouping criteria but also a tie-breaking criteria that chooses the shortest solution.
solutions. Because when we have a solution that we think is correct, which uses a generated program, that's going to be one that we want to prefer.
And for more details about this, I'll refer you to the paper. But we found that this sort of parallel generation was helpful to get us to get accurate results with a library that wasn't growing too much. We also do some periodic trimming of the library. And we do just a really simple usage-based method for this. We look to see how often has a function been used and if it's below a threshold.
which is dependent on the number of total examples we've seen so far, we remove that function. Because we want to not confuse the language model with tools that haven't been used so far. And we have some ablation results that show that this is successful.
Okay, so in this work, we evaluate on three different data sets, all of which are question answering. Many of you are probably familiar with the math data set. For that, we use just built-in functions from the pandas, or sorry, from the Python math library. We also look at table question answering, which has examples like the ones that I've shown so far. But the one that I think is the most interesting is answering questions about images. And for this, we'll use primitives from the Python image library.
ring hill but we'll also use a few we primitive functions which are actually kind of complex they're backed by off-the-shelf visual question answering models and object detection models but they do very simple things semantically like locating the objects that match a particular string answering a question about a region of the image or cropping the image to a region
But here's an example of the way that our system solves an example from this domain. So the question is on which side of the picture is the leather bag? And for this example, our parallel tracks will end up choosing to generate a new function. And the function that is going to be created is get object side. And here's the description that the system writes for it. Get the side of the image where the object is located. And the solution that uses that is a really simple...
simple call to that function that just like gets the object side of the web

gets the object side of the leather bag. So of course the implementation of this function is also important and here's what that generated implementation looks like and you can see here it's actually using a function that we previously generated and stored in our toolbox which is locate objects which I believe iterates over all the detected objects in the image and finds one that matched the string that you put in and you can see here it's written some code which just checks to see like
like which part of the image based on the spatial coordinates is that available in. But rather than having to write all of this code from scratch each time you have a question about which side of the image is this object on, you can now use this function.
So we'll evaluate this method and the other methods that we talk about in a little bit using a combination of answer correctness and solution complexity. So answer correctness is just in the streaming setting, what is your cumulative accuracy at getting the correct answer? And solution complexity is how many tokens does the language model need to predict in its final solution?
So this is going to include any function that is generated that's new, but it's also going to include any like non-function code that calls that function, or if it chooses to not use a function just the length of the code that is generated.
And we find that across our data sets, we generally get improvements both in accuracy, so accuracy is higher, and the number of operations needed is typically lower than a primitive method that doesn't use any function generation or use that just produces code.
And we did most of our experiments in the paper with code LLAMA. So I think it's nice that these approaches also work decently well on some domains with open source code models. But to do our comparison to state of the art and to get the best results, we of course use the best code model available at the time, which was GPT-4. And we find that in comparison to other function generation.
methods which don't reuse functions which just generate them fresh for each example. As you might expect we have a much smaller toolbox size but our accuracy is also is also higher with this base model fixed to be GPT-4.
And one thing that's interesting is we actually get similar performance on the GQA domain with the code llama model and the GPT -4 model, which I think is probably because, you know, GPT -4 in particular is really good at generating Pandas code and code that uses the standard Python libraries. But these image primitives are a little bit more out of domain. And so even an open source model is able to, you know, induce functions from.
the sequences of code that we believe are correct and then reuse those effectively.
So just kind of briefly, I won't go into this too much because we've seen some examples of the functions that it induces. But in like a table QA setting, it induces something like get match after conditions. So like find a location in a table, get the row, pull out values from it, the row afterwards, pull out values from it. And in visual QA, like getting a region of the image that matches a particular object. And we see that the functions that are induced are very data set.
that depended. So we looked at three different table QA data sets. They all have different properties. And the tables are structured in different ways, like whether they're hierarchical or whether they have multiple tables. The one function, primitive function, an induced function that is in common across all of them is PANDA's, kind of this base representation. But in each domain, it's induced something that's sort of appropriate to the structure of those tables.
One thing that I think is really exciting is we, Zora also did some human verification experiments in this paper. So we want to, especially for agentive systems, we want to be able to predict whether it's doing the right thing, right? You don't want the system to delete your emails, you want it to, you want to have the person be able to sign off on the code or the actions that are generated before they're executed.
in many cases. Now, if a system's just, you know, generating code without any reusable functions, that takes a while to read and understand the code. But if you have functions that are reused across multiple examples, you probably only need to check the function once and then you can trust that it's correct when it's reused later on. So we compared the setup here is we have a person predict whether the code is going to give the correct
or incorrect solution and we compute we say that that human verification is correct if it matches the correctness of the system
Okay. And we do this across three different settings. Primitive is you're not using functions at all. You're just generating code. Instance is you're generating a new function for each example, which is similar to what previous approaches have done. And Trove is our method which reuses the functions. And if a function was reused, we allow the person to, you know, only look at, we'll say that we'll give the person access to the library, the full library for Trove.
let them look at that to verify and then that saves them some time for examples later on. And we find that functions are more accurate that allow people to be more accurate in predicting the correctness of the outcome maybe because the functions also have documentation that's been generated and just a better level of abstraction but we also find that our method which reuses functions allows people to be much faster at verifying all of the tasks within the data set.
And the intuitions for this are sort of what you might expect, that these solutions that use the induced functions have a better level of reusability and abstraction.
So I think the main takeaways here are that programmatic tools can be used for somewhat realistic tasks like visual question answering and kind of interestingly, you know, CodeLAMA does not have a vision encoder, so we were able to answer questions about images by just predicting code from the text and executing it on the images. This is sort of like a VizProg type approach if you've seen that. But programmatic tools allow, you know, acting.
As long as your tools are a good fit for your domain, allow acting in a variety of realistic domains, we also find that they can facilitate faster human verification, and they can adapt in a way that's data set specific if you're building functions in this online way. Okay, maybe I'll take a question or two there if folks have any. Yeah.
Uh, my name is uh Timur, I'm from Gen Brains Research. Uh I'm sorry, maybe I missed that you compare GPT four uh GPT four with uh your uh with an with uh without uh your method. What is uh m what is the cost of your method in terms of token additional tokens or time?
Yeah, so this table doesn't, there's results in the paper that show GPT -4 with and without our method. This table just shows a comparison to past work that generates new functions on the fly. So our approach, if you imagined a version of our approach that was not generating multiple candidates in parallel, you would just have, I think, a factor of up to a factor of three.
three times more compute use than the base model because you're doing these three parallel tracks of like generate the primitive solution that one should be the longest it'd be the same as the base generate the function well which might be a little bit longer depending on the complexity of the function or or reuse an existing function which should be the shortest Okay, so yeah great. and of course like both approaches you can apply multiple sampling and grouping for consensus so my guess would be like roughly a factor
factor of up to three. But yeah, the we sh we should check if if we don't already have those experiments in paper. Thank you. Sure. Any other questions? Yeah, great question. Okay, cool. So we'll go on to the next part, which is about agents that can act in an environment.
So this is work that was led by Shuyuan Zhou, who's currently at Meta and going to be an assistant professor at Duke next year. She's really great, so I definitely encourage any students to consider working with her. Frank Xu, who's now at Microsoft, and my PhD student, J.Y. Ko. And so...
Agents that act in an environment, we built some benchmarks for a web -based, for agents that can act on the web. And we started this work maybe about two years ago, and here's a demo that JY built that shows just kind of the setting that we're going to be operating in.
And you can see on the right here the chains of thought that are predicted by the agent along with the actions that are taken. And on the left you'll be able to see it taking actions in the web browser. But the task is like navigate to the page of a good Thai restaurant in Pittsburgh. It should have at least 200 reviews and 4.3 stars. Pick the one with the highest rating. And it's able to predict these fairly low level actions. We'll see the full action space in a little bit that like.
like interact with individual elements in the page and scroll and click in boxes and type there. And Tao is giving a talk next, which I imagine will go into settings like this quite a bit more, especially because it has multimodal in the title. So excited to see that. But why web agents? Web agents are kind of the, you know, the web is the main interface that

You know, the web is the main interface that most people have to the digital world and you do a variety of tasks on the web. There's personal tasks like, you know, the one that I just showed you, but also work tasks like maybe interacting with the spreadsheet.
And so there's been a lot of interest in this over the past year and a half or two years and probably will continue to be. So the work that we did here starting in 2024 was building benchmarks that have simulators associated with them so that we could very carefully benchmark in a reproducible way the way that an OLM agent would interact with realistic websites. So we took open source and this work was called WebArena.
And then a follow-up visual Aberina, which focused on multimodal settings.
And so the formula in both of these was we would take an open source implementations of websites like an open source classified site, Reddit, a shopping site, and we would build a dockerized version of that web page, populate it with real data and then write tasks like the ones that you see here. Help me make a post selling this item and navigate to it, price it at $10 cheaper than the most similar item on the site.
And we would write reward functions that check to see did the agent carry this out correctly. So the action space here and the observation space are more complex than the QA settings that we looked at before. They can take in the image of the web page, so this will motivate using multimodal language models, but they can also take in the representation of the page itself, whether that's the HTML or a simplified version of the page using something called an accessibility tree.
And for our purposes, the thing that we're interested in is the action space. Pretty low-level actions like clicking on a particular element ID which comes from that accessibility tree. Or we also have some tab level and kind of browser level meta actions like navigating back and forth in the history. Some example tasks here. Some of them are information seeking like what is the ISN of the company that occupies the largest portion of Warren Buffett's portfolio.
Others are a little bit open ended in the questions that they're asking and require state changes in the world like add something like what the man is wearing to my wish list. So the reward function that we wrote for this is actually going to call a VQA model. So it's first going to like check in the state of the web page and pull out what's in the wish list iterate through the items in the wish list and then on each one apply a VQA model to.
to check to see is this a green polo shirt? So that's the reward function that we wrote there to, or you know, the evaluation function we wrote there to check if that was correct. And it also involves actions that might require making other kinds of complex changes like creating a text post. Just kind of briefly we spread this across three different main sites in visual web arena. There's a overlapping set of sites in web arena. And some tasks involve acting across multiple sites too.
But for our purposes, and these tasks are hard in different dimensions, you know, some of them are kind of visually challenging, have tough language grounding. But for our purposes, I'd like to talk a little bit about the long horizon nature of these tasks. I think the average task length in visual web arena is like 30 of these pretty low level actions. And the tasks might look things like create a repository named great do-it-yourself ideas that includes a readme file, which links to the most active six.
do-it-yourself ideas on the do-it-yourself subreddit and each of these sub parts of the task are going to require many steps to carry out correctly like creating the repository on github requires going to the home page creating new projects putting in the name doing some other setup some of this is under specified in the task instruction so I think that's another you know separate interesting problem adding the repo file and then adding the links which are taken from this other website
So there's a lot of kind of, there's a lot of steps here, but there's also some subtask structure. And you could imagine even for natural, for naturalistic tasks, you might have some of those subtasks be, some of that substructure be reused across tasks. For example, creating repositories is a pretty common action that you might want an agent to carry out. So if we can discover how to do these smaller subtasks in advance, we could reuse those to do better in the future, just like we saw in the first part of the talk.
And that's the motivation behind two works that Zohra did that focus on these agentive settings. One called agent workflow memory. I won't go into that too much because it's not programmatic, but it shows that we can, in an online way, build up representations of these subtasks, represent them using text and allow the agent to retrieve from them to improve performance. And then a paper that she put out just very recently.
that uses induced functions to, in a similar way to what we saw in the first part of the talk, improve agent accuracy and efficiency of the action space.
But just a little bit more motivation for skills. You can think of, so skills is kind of the RL term, like a subtask that has its own policy that carries it out. And in our web domain, you might have a skill that you could produce a natural language description for, like finding a place by its name.
And these skills are going to be parameterized. Like they'll take in the ID of a, you know, it'll take in a location string and that's going to be the location that you would search for. And it will also take in some attributes of the environment, the web page that you're currently acting on. So this is already starting to look a little bit like a function, right?
But these skills can be reusable too. So if you know how to find a place by its name and you want to get the zip code of a place, you would probably first find the place by its name and then extract the zip code from that found information and return it. And just like in the first part of the talk, we're going to be building and maintaining a library which will allow the agent to act more efficiently and accurately on new examples that it sees.
And in this agentive setting, this is going to be a library of skills or a library of kind of like tools that produce actions in the environment. So this is also going to be a streaming setting. We'll take examples one at a time in whatever order the user would be producing them. We do some experiments with randomizing the order over these data sets and find that for the data sets we're looking at, it doesn't make too much difference.
But we'll take in the example, we'll try to solve the task. If it seems like we solved the task successfully, we'll allow the agent to induce skill representations from it and then those can be retrieved from the memory to aid performance in solving future examples. And yeah, so we're increasing this skill memory over time in a very similar way to what we did in the first part of the talk.
So in Zora's first work on agent workflow memory, that doesn't use programmatic representation, so I won't go into the details too much, or really at all. But I do want to kind of just give you some intuition for the skills that the method produces over time, where, so this is an online setting, we're getting the tasks in a randomized order. And we start off with the agent, like this shows you kind of...
kind of the tools that are, sorry, the skills and the names for those skills that are induced by the agent as it sees these examples one by one. So it first learns how to find a place by its name, then find a cafe near a place, display a route. These are all on a subset of the web arena examples that deal with using a map tool and increasingly comes up with more and more complex skills.
skills, eventually deciding if it can drive from A to B in a given time and finally finding a Hilton hotel near this location showing the shortest walking path to a nearest supermarket and so on. And we're showing the gap here between our method which induces these skills online, the black line, and a baseline method which does not use skills and just treats each example independently.
But for programmatic skills, I'll show a little bit more about the method. And this is work from her very recent preprint, Inducing Programmatic Skills for Agentic Tasks, which we also call agent skill induction. And the procedure here, so I'm showing you an example of a natural language query and the trajectory of actions, low-level actions that are produced by an agent without using any tools to solve this task.
So we'll have the agent produce that trajectory just like we did in the first part of the talk, produce this code that attempts to solve this query and is executable in the environment and will prompt a strong code model which we did this work recently. We're using Claude for the induction step. We'll prompt the model to take in this trajectory and predict some functions that abstract parts of it.
parts of it, it might be reusable in other examples later on. So the examples that it pulls out here are open the marketing reviews, which is has hard-coded that it should, you know, look at the the marketing section of the of the page. So this is specific to this particular website. But we find that even skills that are specific to particular websites can help on that site, as well as a search reviews function, which takes in an ID of the search box and
and determine

an ID of the search box and a term to search for. And we'll also predict some code that uses these functions.
And we want to only induce functions from trajectories that we believe are correct. In the first part of the talk, we approximated correctness by sampling multiple times and grouping. Since we want to have an efficient approach that doesn't need the agent to act multiple times in the environment, here we're going to be using just a LLM-based evaluation model that takes in the final state that is produced by this.
test code using the functions and some maybe additional primitive actions prompts the model to see is this does this appear to be correct or not this final state matching the natural language query and if it is then we will take these functions and add them to the memory
And I want to point out here that we are going to be executing this test code in the environment, and we are actually going to be calling these functions which ground out into these primitive actions which can be executed in the environment.
So how well does this work? Well, a baseline method that just predicts these low-level primitive actions is one of the state-of-the -art methods on WebArena. It gets 33 % success rate on average. You know, state-of-the-art for something that doesn't use additional potentially orthogonal method approaches, but this is just kind of like with the best action space that we have and the best representation of the environment.
And a strong multimodal co-generation model gets 33% success rate. But if we add in our approach that builds up and reuses these functions, we see a substantial increase in performance, about a 25% relative increase. And we also see a decrease in the number of steps that need to be produced, going from 5.6 to 5.
So when we built Weberina, we were mostly focused on a couple different types of complexity. But the tasks were actually not too long. The average number of steps in them was 30. And I've shown you some of the kind of like longer steps here. But to evaluate the ability of this method to improve on
a realistic but it's still realistic but potentially more complex tasks for we also built a sort of challenge version of web arena which has more scaled up web activities so here's an example where I recently moved can you change my billing address to X and then update my shipping address to Y so the baseline method here has to produce all of these low-level actions one by one you know I
clicking the the add new address box and then going into the street box, the street one, street two and so on. Um and the action sequences are really long.
Whereas the method that uses the induced tools actually induces a tool for update address details, which can then just be called to parametrically fill in the tools that you have in mind. And so we built a challenge data set of about 50 of these tasks with a kind of similar flavor across five different domains. And we find that we get very substantial increases in the success rate of the agent here going from.
You know, between from around like 30%, I believe to 75% and also a substantial decrease in the number of steps that are needed.
So some takeaways here are that tools, skills, functions can be induced to capture substructure, shared substructure across somewhat realistic web tasks and agentive tasks. And I think that there's a lot of potentially interesting work that could be done in, for example, software settings where, you know, an agent, we as programmers interact with like a coding environment.
We often need to like write helper functions or write one off scripts that could be useful to help us solve the task more efficiently. We find that the method that we introduce here allows the agent to be more successful on these tasks, but also be more efficient in the number of tokens that it needs to predict on average.
But I think there's a lot of open questions. As I mentioned earlier on, I think the function induction, there's a lot of interesting stuff that could be done beyond just prompting an LLM to generate reusable functions. I'd be excited to explore those. But one that Zora and I and Graham are really interested in is how to learn over very long time horizons. So if you want an agent that's like kind of operating alongside you over years and helping you carry out tasks or acting on your behalf to carry out tasks for you.
You're going to need to have like a very large library of skills and it's not clear what the best representation for those skills will be and what the best way to like store them in a memory retrieved from them, throw them out if they're no longer useful or if they're even harming the system might be.
And one thing I'm really excited about is human interaction generally between systems and agents. And I think like if we're building up personalized representations of, you know, shared task structure that are specific to an individual, how do we let a person have control over that? How do we let the person kind of like discover what the system knows about them, update that in some way that will help the system, you know, help the person trust the system better, help the system carry out what the person wants with.
without infringing on, you know, kind of the privacy of the person, and allowing the person to maybe edit this library in a way that helps the two of them, the two agents, the person and the system cooperate better together.
And so, yeah, that sums it up. I would want to, if you're interested in this, definitely check out source's code bases and feel free to to get in touch if you if you're interested or you have any questions. Thank you. Thank you, Daniel, for the great talk. Thank you for the great talk.
So thank you for the great talk. Um I was wondering uh if you could share a little bit more of um uh what you mean when you say you know put in something better than just prompting and L-LAM, because this is a little bit uh what I was thinking w uh when I when I was uh listening to your talk. And uh in particular, you know, the fact that
We are not really in control of this process because we don't really understand when an LLM is gonna somehow factor out a task or a skill uh which is uh specific and when it's somehow gonna ignore it. So what do you think will be the most promising direction to actually avoid this kind of situations?
Yeah, I think that, well, so I do want to say I think LLMs will be a crucial ingredient, most likely, in approaches that are used for that. But I think that like we can take some inspiration from what people are doing in program like induction and program search, where we might want to like guide the search over possible ways to refactor in ways that are appropriate to the situation. So we do that a little bit in kind of a course way where
Where in the trove work we say there's three like branches that you could take and we're going to force you to explore all of them. Either induce a function, um reuse a function or don't use functions at all. But like inducing functions could also have kind of like a guided search through that space, um where we might want to induce like functions of varying complexity um and um it choose the best from each of those paths that are a little bit more structured. Um uh I think we could also explore a lot more ways to
to verify the functions that we're inducing. We're using pretty simple ones that either kind of like check for output matching or prompt another LLM to see is the trajectory correct. But I think we could import or modify some of the work that people are doing on using LLMs in verifiable domains and try to make adjustments for these settings that are a little bit fuzzy and maybe whether the task was solved or not.
Um, yeah. And, uh, I think that like, um, also I think there's potentially a lot of room to use natural language to guide both the search space and the verification. Right now we're just using task descriptions. Um, but if you also had kind of like descriptions of what your library looks like currently, or like what are the sorts of, um, uh, what are the sorts of ways that a person might want to like modify the tools that are being built up, you could use that to
Since LLMs are good at conditioning on text, you could use that to like guide the functions also. But yeah. Any other questions?
uh Amrita from Sears first. And thank you for the great talk. Uh so I had one question uh like I just wanted to understand your opinion about uh model context protocol uh so since that is becoming very ubiquitous uh since you talked about web tasks, uh so do you think like that will fundamentally uh change or simplify maybe how web tasks are gonna be performed? Or do you think there will still be relevance of uh like the U_I_ based uh engines?
I know all of the things which you talked about is still gonna be relevant there as well, but just wanted to understand your view. Yeah, I think it's a great question. Um I I think MCP is is uh is a really useful protocol. Um and I think that like um we'll

And I think that like we'll probably generally apart from the specifics, I think we should have a agent, we should have base models that support MCP and other protocols like it. We should also compare the methods that we develop to ones that use MCP.
But I think that like we'll probably generally see like two, you know, types of approaches for agents that interact with the world. Ones that interact using more APIs that are like designed right now designed for developers to call but increasingly will be designed for agents to call like MCP does. So that's one paradigm. But the other paradigm is ones that interact with the web in the way that we do, which is useful if people haven't built, you know, an API yet for your domain.
um because at least for now the web's still intended for human users and i think always probably will involve a human interaction component you know to verify that it's doing the right thing and so on um but i think things that hybridize between the two will be really interesting also um there's some work that uh yi qi song who's one of graham's um now phd students um worked on that shows that apis can help a lot on web arena visual web arena but also has like a hybrid method that's
that switches back and forth between the two and I think like methods that do that but also potentially like you know interfaces like that combine the benefits of both the very flexible just interacting with the raw web page which can be noisy and risky maybe using existing APIs and also inducing APIs like we're doing I think that'll be a really powerful class of methods in the future
Hi my name is Rajan so I'm from Snowflake. Um so one question in your e the agent induction task um out of curiosity, a lot of websites actually look like rendered versions of databases.
uh you know it's like they have people names and companies etc laid out in some sort of form. Um and I I guess you tried to see how much of tasks that you induced generalised to various website structures. I'm just curious you found some interesting patterns that your agents may have uncovered. Uh maybe there are things that n they need to unlearn and then learn on some other t uh websites like any curious insights there.
Yeah, that's a really great question. So we have some experiments in Zora's, well, both of her papers that look at generalization from one website to another. And there is there is some amount of generalization. So you do you do get some boost if you, you know, take the functions you induced on one web page and start on another. But very quickly, the online learning, you know, that's the method that's inducing new functions.
you know functions from scratch on the website catch up so I think that like learning the functions online can can help regardless but I think that one thing I think and also I should say like a limitation of web arena and visual web arena for the settings that you described is we don't really have websites that look like that the closest thing might be you know like reddit which is very visually dense or kind of like one of these shopping sites which just has like you know the paginated lists of products
Um, but I think that there's, um, so, you know, and actually I think like, uh, uh, um,
Yeah. Also, we can talk later. I'll try to think of a benchmark. There's one I have in mind that's slipping my tongue that does look at more sort of like a company facing task that might be a good fit for that. But I think there's a lot of room for methods that like actually run code on the DOM itself. We didn't explore that here. But like if you're if your DOM or something very close to the DOM is just a table like we saw in the first part of the talk, you could.
You could apply the kind of like pandas type methods that process it and that might work better. Any final questions? Okay, if not, let's thank Daniel again for the great talk. Thanks for having me. We are going to have a break now and we'll resume in 10 .30.



for the talk. So we are honoured to invite Tao Yu uh to give the talk Multi-model Co-generation for embodied AI agents. So Tao Yu is an Assistant Professor of Computer Science at the University of Hong Kong uh where she directs the X_ Lab as part of the HKU NLP group.
His main research interest is in natural language processing. He completed his PhD at Yale University and was a postdoctoral fellow in the U.W. NLP group at the University of Washington. His research aims to developing body A.I. agents that ground language and perception into code and actions executable in digital and the physical environments.
Helping people perform data science, control computers, and collaborate with robots to carry out real-world tasks. Tao is a recipient of the Google Research Scholar Award and the Amazon Research Award. Okay, let's welcome Tao for his talk. Yeah t uh thank you for the nice introduction. So yes, uh I'm Tao uh from like uh HKU.
So for today I will be talking about the multi-modal colour generation for embodied AI agents. Just like a colour generation for uh little bit like different perspective.
Okay, so uh let me first uh connect to this like a topics like a uh w uh this like uh uh workshops like topic uh deep learning for code. So which has been started uh for about like ten years and uh some like uh early work like uh Conara uh from Ponson and uh new big uh focuses on this kind of Python code generation.
And task, right, so which is much easier compared to today's like uh uh focus, right. So basically models need to generate uh uh uh like a very simple like uh uh coast nip from a very short like question.
Uh and also Victor and I I worked on this kind of text to secure domain. Uh for example, a signal uh like uh uh uh text to signal or spider uh one point zero, right? So basically in this kind of task uh models need to map a data base and uh also uh a question into uh corresponding signal query uh which was very hard at that time.
So basically, uh because this kind of limitations, colour generation unlike today uh actually was uh very simple.

uh actually was uh very small like a research field. So before like a chat it, uh models were were not that strong and uh research back uh then mainly focused on this kind of uh improving model architectures and also better like uh attention mechanisms. And also at the same time people uh uh tried to for example add this kind of uh A_S_T_ tree, like a abstract syntax tree
uh to enforce like a a syntax like a a a like a correction or something and so on.
So and also at that time like x-mans uh were also simplified. So all the data will be like uh was like a prop like pre-processed into for example some files, for example like a JSON files, for example in spider uh uh one point zero models receive this kind of a clean data schema and also a question and then output this kind of a single line of code, SQL code, all in one shot, right, so uh without any in
the interaction in the any kind of coding environments and also incorporating this kind of arrows, something like this, at that time.
So in the past year or two, we have seen a major shift in this kind of domain, right? So with the rise of like foundation models, code generation is no longer just about like solving like a slightly harder like coding problems. So we are now building like AI agents that can operate in this kind of complex coding environments, right? So for example, they hold a GitHub repo.
Oh, something handling much more complex like a software engineering or data science tasks. For example, here like S_W_ bench, right?
And then similarly, in tactile signal uh area, so we uh we introduced a spider uh two point zero, which was just presented uh uh here at uh like I cleared this year as an oral paper. Uh spider two tasks involve much more like a uh challenge and uh realistic uh settings. So for example, it contains a lot like a real complex uh cloud uh databases. For example, like a big like a big query.
snowflake, something like this. Some databases has a lot like a uh over three hundred like a three thousand uh columns and uh also it contains like a uh like a hundreds of like the lines of uh uh uh signals in different uh databases. So covering like a data gathering, transformation, analysis pipelines, something like this.
Uh beyond just like a single generation uh many tasks f uh uh also follow this kind of enterprise level of agentic uh coding flows. So which you have to uh uh the model uh has uh like uh have to access to for example complex code bases and also right the single probably using like a D_B_T_ and uh also there are a lot like uh uh documents to refer to.
So, uh on like spider two point zero, even the best uh model cloud is uh uh like a three point seven, uh so uh s uh less than like twenty five percent of the tasks. So which is clear, so existing large range models are still far from this kind of real world uh deployment uh uh and also o on this kind of uh uh enterprise level tasks.
So basically like other speakers like Daniel and Fred here at the workshop talks about and also will share much more insights on this kind of co-generation, like coding agents for like software engineering and data science and so on. So for this talk I would like to shift perspectives a little bit on multi-model co-generation for embodied AI agents.
Like imagine like AI agents working not just within these kind of code files or the GitHub repository but with the whole digital world, right? The whole computer.
or the physical world via these kind of robotic arms, something like this. So in this kind of settings, large range models and the vision range models uh must uh perceive uh like this kind of environment uh uh dynamics like uh screen-shots or like camera views uh ground the user instruction like uh uh natural language instructions into the environment and then generate the code or action sequences.
is to control your laptops or or or like robots step by step right so until the task is complete. So
The challenge here is not about like complex reasoning in like coding algorithms, but reasoning about like complex dynamic environments including like this kind of spatial reasoning stuff, right? So and also grounding this kind of like language instructions into like a to this kind of digital or like physical actions through this kind of multi-model perception.
Right, so these tasks require like this kind of sequential, we call it sequential decision making. So you have to like perceive first and also predict the actions and execute the action and see the next like views and the next environment state and then continue, right? So it has a lot like interactions with the environments and sometimes the process.
also is very time consis uh is also time sensitive. So, for example, if you want to generate the actions sequences to control the robbers, probably you need to uh uh be very like uh uh fast, very quick, right.
So this directory is naturally connect to the research focus of our research group, excellent lab. So it called like a acquirable language grounding. So all our mission is to develop AI assistants that can effectively ground the language and the perception into code or like action sequences as curable in the digital and the physical environments, helping people perform like a data science.
control computers and they collaborate with Robbers to carry out these kind of real world tasks. So our
Maybe some of you might wonder why like a neural-colour generation is related to embodied AI, especially like a uh uh uh embodied AI agents is a b uh especially this kind of robotics, right? So actually early work like uh code as policies used uh uh large language models to translate robotic uh uh task instructions into like robot policy code. And then coding this can I trained uh atomic policies to complete
uh like uh uh new tasks in the physical environment. Our lab also explore the this kind of direction a little bit. So in our text to reward project we leveraged uh a large range of models to automatically generate a dense reward code for task ins like from task instructions and the environment information so that you can like train like a uh like a train I_L_ uh policies on based on this kind of reward.
Recently uh our vision uh language action models uh like pi zero actually w it was like just presented uh in another room uh have they been like uh trained from end to end that generates the robotic policy policies with actions including the action sequences including this kind of $3D movements and the locations to control your robotic arms um something like this.
So if we think further, so we will realize actually robotics and the code generation actually are connected. So in this talk, I would like to focus more on a middle ground, okay, so basically multi-model code generation for computer use agents. So last year we introduced the the OS world framework.
built on top of like a real computer environment for developing and evaluating this kind of open-ended computer user agent.
Uh so OSwald actually uh unifies its agent environment into uh uh a single desktop uh operating system. So for example like uh w Windows, Mac OS or uh Ubuntu. Uh so where agents can interact uh with any kind of like applications from code tools to games uh and the browsers. Okay, so based on this kind of OSwald infrastructure
Uh uh we created a benchmark of like about 400 like real world computer use tasks, spanning this kind of uh web, desktop and the cross-application workflows. So you can define actually you can define any kinds of like uh digital tasks, including colour generation tasks in the computer environment, right?
So basically uh our source standardizes multi-modal uh inputs but like uh screenshots and uh accessibility tree for any kind of like uh applications. You can think of like uh accessibility tree as like HTML uh files for different uh like uh websites or applications. And also the outputs like uh keyboard and the mouse controls.
Right, so the the up these kind of outputs, keyboard and the mouse controls can be represented as like a Python code. Uh you here we use like a library s uh called like a PyAutoGUI. Uh actually it contains a lot like a uh like a human mouse c keyboard uh like

human mouse keyboard uh like mou keyboard and mouse control actions. For example, click, move to, press and uh writing uh something like this, right, and then you just like uh predict the correct like uh coordinates for for different place to click on and uh scroll to something like this.
And also for the action space, uh uh we can also generate like uh API course or like uh this kind of we call like uh recently like MCP code to control computers, right, instead of like a generating this kind of GUI control actions, something like this.
So let's quickly compare these two. So since like GUI-based agents directly work with the UI, computer UI, this kind of stuff, right? We can use all the existing like websites or applications as they are without designing any kind of like specialized APIs. Yeah, right? So just as like a set like as we do just like how to use the computers.
So however uh this approach is not always the most uh efficient uh uh for example especially for repetitive tasks like a like a R_P_A_ tasks.
But on the other hand, this kind of API based control also has his own like limitations. For example, like APIs or like this kind of MCPs do not always exist for any for every application, right? And the building or modifying this kind of APIs or MCPs for the like a full automation is also expensive.
And also sometimes this kind of APIs are often only accessible to big companies, right? So it's just like a private.
So also this kind of API and also MSAP controls are harder, much harder for non-tactical uh users to verify and to trust compared to this kind of uh like a visible GUI controls, right? So it's kind of hard for user to verify and to trust that this kind of approach. So for this talk uh we will mainly focus on this kind of GUI-based uh computer user agents.
So this debate is just like uh uh arguments uh arguments uh in robotics, right? Should we build this kind of humanoid robots that interact with the world as as humans we do, by all specialised uh robots optimised uh for some specific uh work flows something like this. So so so this is just like a continue still continue uh uh uh continuously uh debate. So it's kind of uh dynamic.
So OS words have been adapted by like open eye and and tropic to evaluate their newly introduced computer use agents. So actually in OS word most tasks can be completed by human by humans with about like within about like 15 steps.
However, even the most advanced agents now, like a cloud is 3.7 and the open eyes operator, only achieve a a around like a twenty percent success rate in like a uh fifteen steps, compared to for example like a seventy two percent uh human performance.
So even when the start budget is expanded from like 15 to 100, using like a test time scaling, and the models still perform below this kind of, for example, 40%. So also there are just a few like a technical details available online about this kind of systems, actually how this kind of system actually work.
So this kind of significant performance gap between this kind of these best AI systems and also humans highlights that turning foundation models into capable computer-based agent actually is not that straightforward. Just like robotics, because of like embodiment and also interactions, this emerging field needs like a complex infrastructure and also ecosystem support.
It's not just about the models anymore, right? So in this kind of rest of this talk, I will share some of our recent efforts and the findings of the past half a year and the coverings really like core challenges in this kind direction, basically how can we effectively scale the data, training and evaluation for AI agent development.
So now uh let's move to the uh first uh challenge uh which uh data, right. So so which is uh uh like a critical bottleneck uh for like a uh agent environment.
So a c typical computer use agent uh uh data example typically consists of like two comp key components. So a task in instruction and a t a trajectory. Right, so each trajectory contains paired uh observations like a desktop screen like s uh desktop screen shot uh and also actions like a piezo gyro code or or API call or something like this uh like uh each time step.
So basically collecting this kind of embodied AI agent data is challenging because it's requires embodiment and interaction. It demands very complex like a infrastructure uh and also interaction with diverse like uh environments.
And moreover, this data must be like a goal aligned. So not just like a random, random actions. So making connection even more challenging. So so basically, yeah, just as shown here, right, so if you're tele-operating like a robot in the physical world, actually you need a lot like equipments and stuff. And also, probably people can wonder, for example, for us.
uh both of us like everyday we're gonna use like uh uh use like a laptops something uh especially for big companies they can collect all this kind of uh actions from us, right? So you don't have a lot like computer use trajectories, right? But most of them are not goal aligned. So they are just run and click or something you cannot interpret it from this kinda actions to to to get like what users would like to do. So this kinda data is
It actually is not that useful. So it has to be like a goal aligned.
So for example, building a unified, this kind of computer's agent, uh uh computer use uh uh data infrastructure requires this kind of real-time capture of like user interactions with the computers and also this kind of computers uh like states, for example screen-shots or a specific tree of a current uh computer uh uh uh like a uh state, right? And also transforming this kind of raw human complex actions into this kind of unified
uh agent acturable trajectories is also uh non-trivial. It requires a lot like a data complex data processing and also alignment of stuff.
So to address this kind of uh uh this challenges with the ap uh with the black uh uh rapidly this kind of we call agent net tool so which is a cross uh operating system agent uh data collection platform that allows users to annotate a long duration agent track uh tasks.
So during the task that um like a demonstration process from the users, the tool will uh seamlessly collect all necessary agent data, for example, screen shots and the accessory tree and also where uh uh which kind of kind of actions the user performed.
After that the the the tool automatically aligns the states of the users like screenshot action data and reduce them into a unified trajectory data for agent training stuff
So based on this kind of agent net, we collected about like a twenty like a twenty K uh complex and diverse and real world uh desktop computer task instruction and trajectory pairs. So compare with like uh pr uh like a prior digital agent uh uh data, agent net data has uh a much longer a task uh trajectories. So averaging over like a twenty these steps.
compared to less than like a a ten in a prior work. And also covering a a a diverse range of like applications, web-sites and the system operations in a like a uh personalised uh environment, which means actually we collected the users, like for example, users rec required to uh are required to download this kind uh application uh on their laptop and uh uh yeah and also collected it from their real like uh uh uh
uh computer use like a scenarios. Instead of like uh every time you just like have a very clean like desktop as your initial like uh uh like a ye ye initial computer uh state scenario or something like this. So with this data ready, so the next step like a next question is how do we actually train agents uh on on it. Well so
Well basically we first uh convert each kind uh uh uh agent net task example of for example instruction and uh trajectory into multiple training examples. So for for for the basela uh baseline method each training example comprise this kind of current uh screenshot or current uh like a state of the computer and also the task instruction and uh the previous action sequence like action histories.
Right? Uh and then to predict uh both trend of thought uh reasoning and uh the

uh reasoning and uh the the NaSTeD RNNUI control sequence computer control sequence something like this. So this is basically the the the the baseline like a input and output for our models for S_F_T_ uh like a like a supervised fine-tuning. So after preparing a data this way so we fine-tune the quin uh quin two V_L_ model on this example to build a capable
uh computer use agent. So here I gonna basically uh t uh like uh show that results uh of from the uh uh s like seven parameters models uh
However, when we started our training, we quickly rea realised that scaling data around was wasn't like uh enough. Unlike coding data, computer use agent data actually rarely appears in the large range model or vision language models pre-training or post-training online data. Right, so it's c yeah, there basically there's no uh much of this kind of data uh online. Um uh it's better to ground your data.
as a result, simply applying this kind of standard like a triangle of thought S_F_T_ uh recipes doesn't ju basically just doesn't work well. So you can see here, right? So uh even f for example we scale the data from this kind of uh five K_ to twenty K_ the models performance on all swart only improved uh by uh very small margin, just like two per cent.
So what does an like a effective training recipe uh actually look like? So one important insight we found is that training data mixture matters a lot. Okay, so you you cannot just like fine-tune on this kind of human demonstration train of thought data around. So you also need to include some like a diverse types of like a train of thought reasoning and also general pre-training or post-training in like uh data.
Uh this kind of mixture uh data mixture makes the training uh much more like uh uh stable and that leads to uh uh much better performance. Another key point is to maintain is to maintain and improve it like uh this kind of agent grounding.
ability. Okay, and make sure, for example, once the agent understand what kind of uh uh what kind of action to take and then it can actually uh it can actually click uh on on the correct uh buttons or icons on the screen something like this.
And also is is helpful uh to include examples where uh the agent makes uh mistakes, reflections, and uh and also recovers. So which build uh which can build like a uh much better uh exploration and uh also recovery scales for the uh agents.
So there are other like uh additional insights too, but but due to the time limits and also uh because our work is still on going, so we will share more details in our like uh incoming um papers soon.
And here I I just wanted to uh uh quickly elaborate on why like a reflection data uh inside this kind of uh uh train of thought is so important for the computer user agent, especially for this kind of embodied AI agent stuff, right. So here is a simple example. So the task is like uh in the feature slides, insert a table with like uh five rows and uh two columns, something like this.
Suppose add like a a step eight. The agent makes uh uh a mistake, okay, click uh on the uh wrong like uh option and the setting. Only for example one row instead of like uh five something like this, right?
So in this kind of long-form uh C_O_T_ refraction, the agent notice here just say okay. Babah and however the number of rows is correctly set to one, but we need to we need five rows according to uh the uh uh uh according to our goal, right? And then it replans we could uh select the current value and replace it with five. So as a result
So the agent predicts after selecting for example the uh the the one and the the next uh step would be to type like five to re replace it uh blah blah something like this. And then the agent executes the uh uh the action and the step nine and the step like uh uh ten recovering from this mistake uh identified during uh this kind of reflection.
Right, so uh this kind of uh uh this kinds of like uh recovering and reflection flows are critical for building this kind of more robust and uh uh flexible agents.
And also uh in the past uh uh few months, well we have seen a lot of work on training a large rank model, uh larger models using like a scale I_O_ like a deep seek R_ one and a Keemie one point five leading to more uh much more uh i extensive reasoning steps and also longer outputs, right? So this naturally uh makes us wonder c could we also apply this kind of scale to
non-CO2 reinforcement learning to train more effective computer agent rather than solely based on this kind of supervised fine-tuning on like human data, right? But this could be very, very challenging. For example, unlike scaring like eye for code or math tasks, there are much more like new challenges when applying this to computer using agent.
So for example, first, this kind of, try to as said, right, this kind of embodied uh agent usually allow multi-turn interaction, right, so you'll have to do multi-turn IO. And also, due to the embodiment and the interaction requirements, steering this kind of IO for computer agent demands like infrastructure with like a massive like a parallelisation and the rapid reset and restore of this kind of computer use tasks in thousands of like a virtual machines.
Right so you have to launch like thousands of virtual machines running in different uh like Windows or Mac OS uh assistance and set up the tasks like at the same time, so which require a lot like a uh infrastructure uh support.
Additionally, we need to like automatically process is to effectively scale open-ended environment creation and a task uh uh rewards, right. So basically here uh I think the code generation for environment uh configuration and the reward generation and maybe uh uh and like a exact uh and like a exciting direction to go. Uh
And also another side on the other side, unlike this kind of coding or mass reasoning tasks, even the best uh uh uh open-sourced uh uh vision language models like uh a quint two or two point five V_L_ uh that we discussed earlier uh actually just scores uh very low for example below twenty percent on the O_S_ word tasks after year after supervised the fine-tuning.
So this raised raises the question can be a can such like a a a model is served as a good enough prior or base policy for computer use steering. Uh-oh. Right? So basically for for for the eye out, steering eye out, uh are to work, then you have to have like a this kind of uh uh good enough like a prior or base policy as a starter, right?
So again, since this work is still ongoing, so here I'll just show a bit on our very initial and the early yeah like a steering eye or Aximons here, based on like a seven-bee parameter uh models here. So on all this words' task performance uh of this kind of based uh uh again like a one uh seven billion parameter uh model here, okay, so increased uh from this kind uh uh round like a eight-
eight percent to approximately like uh uh s uh seventeen in percent on our source tasks using this kind of uh a screen I_O_ So additionally, as you can see here, for the uh blue light, right, the the trajectory length increased uh with the iterations. So growing from about like uh around like a twenty uh like a twenty five steps for for for the tasks to over like a forty steps.
So which indicates that like models actually engaged in more refraction when like solving problems. Now let's turn to the final major challenge here in developing like a computer with agents, like which is like evaluation.
Right? So for agent evaluation, so probably uh some of you will wonder okay, we right now we have like a web arena, vision web arena and also OS world and also other like a static uh benchmarks, right? So why do we want to scale the evaluation for this kind of uh ye y in this kind of direction? So actually there are several reasons. First one is like uh for for for mainly like a computer use tasks.
actually they cannot be uh uh they they are basically just open-ended, right. So you cannot write like a script uh uh this kind of reward code for for for this task. Right. So and also is time consuming to write down all the like task for different uh uh uh uh for different computer scenarios this kind of stuff. So uh basically the static of benchmarks cannot cover cover
lot of like users can produce scenarios in that case, right?

Right? So So so probably there's another approach is like a uh uh like crowdsourcing evaluation from the real users. So instead of like have like a collect uh this kind of set up code and reward code uh for different for l uh limited uh number of like uh uh computer user tasks instead you're gonna ask a real users to evalu to to the evaluation and the propose any tasks.
So this kind of approach actually offers several advantages. So first one, right, so so
Just as I said, probably some uh mainly like computer use tasks actually are open-ended and also probably they are personalised uh to to to to the users, right. If you real users do the evaluation then we can have this kind of personalised and the robust like a successful uh like a success criteria, right? And also, it gonna uh in this case we can have very diverse task uh scenarios and the environments.
from uh on from large number of like different users across the uh for example across different industries and the backgrounds and also countries stuff, right? And also is gonna have uh much uh like a natural interactions and also feedback flows because you have the real users in the loop to interact with the they need like anonymous like uh agents and stuff, right?
Uh lastly, it is also very hard to um uh much harder to over-fit, right? So so it's not like uh static uh uh like a benchmark which is kind of like a thou like a hundred or a thousand like uh tasks.
So uh as most of us already heard about like a t uh chatbot arena, right, so which is a crowded like a cr uh a crowded source uh a large link model evaluation platform based on real use u user's preference. But it's not designed for uh for like a agent, embodied agent environment uh uh evaluation. But it just provide these kind of two dial like a uh uh like a dialogue windows, right, without any embodiments or something.
something. So that's why we introduce this kind of uh uh like a agent arena uh uh platform uh collaborating with this kind of the chat bot arena team uh to introduce this kind of uh open source. We call that like a uh like open uh crowded source evaluation platform for digital AI agents.
stuff. So actually you can go to uh the link here, arena.xland.ai. Uh uh so so you can like a play with it. So basically here uh you can have like a two
Once the user go to the website, uh you can choose like which kind of uh operating system you would like to choose, for example Windows or Ubuntu, uh right. So and then um the users can choose to up like uh customise this kind of to like a virtual machines to mimic their real like uh computer's scenarios uh and then they can tap in their questions.
So after uh so and also these two computers uh uh uh like uh will be like controlled uh by two anonymous computer users, agents. For example property power by a cloud is three point five or of three point seven or this kind of operator stuff. So after agent task completion, they can compare the agents head to head. Right, so which one is better, which one uh actually finish their task something.
Something like this. So and then after evaluation, the the user can see the identities for y each like a computer's agent. So over
The nearly three weeks are since our public release, so we collected about like a one thousand like votes. So surprisingly we have observed that uh actually the top three ranking uh in like agent arena leaderboard uh differs uh significantly from the uh the trends seen that in like uh statistic benchmarks like Allos World and uh web arena stuff, right. So
Well, just as I said, since this kind of uh uh like static uh benchmarks, uh they just cover very limited tasks and are easy to be over-fitted. Right, so so so basically yeah some companies probably they you if they want to tag a lot of trajectories, it's very hard to uh why uh it's very hard to not to like annotate a like a uh or still the similar like similar tasks. Right. So so based on this kind of uh uh uh like uh uh a chart bot like a uh a age
Uh Agent Arena, uh actually we collect the like uh this kind of feedback from uh uh uh like a wide range of like users and with uh like uh and also these models cannot like uh like predict uh what kind of uh questions like uh the user will ask, right? So basically for example on all s all this word this kind of operator and also your task one point five actually w uh were like are reported uh for example ten percent higher than as tropic.
Like five to ten percent, ten percent uh higher than entropic uh uh cloudy three point seven stuff, but here, as you can see, right. So so the the the the here is the allow like allow scope is the confidence intervals. So as you can see the first one like a cloudy three point seven actually is like a uh uh like a significantly uh better than other models for example like operator of of an open eye and also
you are task uh one point uh five. Okay, great. So finally I would like to very quickly uh talk about like a future research direction here. Nice. Oh first of course uh data. Like data data. So uh how we can effectively scale agent data stuff. Uh and also uh
How we can find this kind of scaling law for agentic foundation models, right? So, for example, like how we can effectively leverage this kind of like a human data and also this kind of I.O. tasks to train this kind of computer with agents.
And uh and also this kind agents uh will uh interact uh uh with your computers and uh take actions, right? So in the real world. So it's very crucial to identify like a potential risk and uh and also design this kind of agents that knows when to like absent and also verify with the users, right? Actually for cloud is uh three point seven and also operator uh computer with agents they can
uh actually stop uh uh uh stop at uh at some steps and then confirm with you uh if you want to proceed. For example you if you want to delete uh some files or if you want to run some code something like this. So you it has like multi-turn uh and like interactions.
And also personalization and also this can find really like a human-agent computer interaction, right. So so basically if we have this kind of powerful computers agents we need to rethink about this kind of uh agent compu uh agent humans and also computer interactions flows, right. So so so this is a just yeah as I said is kind of dynamics uh ecosystem we need to build.
So finally, let's step back, like a step back and think about the big picture, right? Over the past few months, just as I mentioned, we have already seen many exciting applications of like a large language model or vision language model based agents, right? So for example, coding agents, like deep research agents, computer use agents, even robotics, right? So looking ahead.
An open question here is like uh can we eventually build a generalist uh AI agent like AGI agent that can perform all these kind of agentic tasks across both like digital and the physical environments, right? So which is a very exciting thing questions uh to go but uh of course I don't know the answer uh could be like 10 years, 20 years or even longer but yeah definitely there is a trend forward that.
direction and also where the path forward come from this kind of scaring long like a scaring aisle right so so which we don't know the answer right so either way we are entering a time of like a rapid change so I think especially in academia right so so it's a time of like a full opportunities but also new challenges that require significant resources to tackle right so
So so basically especially for the people in academia. So it's sometimes it's very high uh that it's forced that to private with like uh big companies. So because they have a big uh like uh computers and also infrastructure support to do this kind of uh uh uh like uh research. Okay great. So uh yeah so uh I would like to uh thank all my students. Yeah all these kind of students they actually they they they do the uh real work. Okay.
Okay, so and also uh thank uh the uh this kind of foreign institutions uh institutions for their like open source like a support. Uh yeah, thank you for listening. Yeah uh open to any questions. Okay, thanks for the great talk. So during two time constraints we only have one slot for the questions. Do we have any one has a question?
You can raise your hand, okay. Thank you for the nice talk. Uh how far are we from uh generating lot of synthetic trajectories and uh where these agents can actually uh simulate what we did with the L_L_M_s Oh, with oh. the L_L_M_s uh with Uh yes, sorry can you s like s speak louder? Oh yeah yeah. Uh so how far are

Oh yeah yeah. Uh so how far are we from uh sit uh generating lot of synthetic trajectories for different agents like web agents, voice agents and so on, and uh when do you think like how far in a year or two years we will reach eighty percent or ninety percent Mm. in this area? Okay, so basically your question is like uh uh let uh about the synthetic uh data and also where we can reach like in like two or three years?
Yeah, uh yeah, so here, uh good question. Uh actually uh here we also uh did some works related to for example generating synthetic data uh from like a web size and the applications and then train the data train train uh like uh for example web agents or computer agents on this kind of synthetic data. Uh yeah, I think this definitely c uh have a lot of potential. Uh
But currently one of the question here is like a probably due to the limitation capability limitations of the current uh large model is that the the the data is like generated from from these models actually are not like that diverse and cover a lot different uh scenarios. So but of course uh as like uh the foundation models capability uh continue increasing probably we can uh generate a much more like a uh uh like a general and
and diverse data in that case, so we can definitely leverage uh much more like a synthetic data to train more robust uh capable uh agents in that way. Uh and for your second question, uh uh it's kinda hard to say and uh also depends on your expectations. So if we want to build this kind of web agents or or computer agent for very professional uh applications like uh with like hundreds or or thousands of steps.
to complete some meaningful tasks, then that would be very very challenging and that require a lot like a domain uh knowledge to incorporate it with within these kind of uh uh uh agent training stuff. But for example for daily life like uh interactions with for example Google uh I'm not sure, probably Google slides or slack uh or any other very common like straight kind of straightforward uh uh uh like a application probably, in two or three years uh we can see a very like
like uh uh uh uh a big like a performance jump. Yeah. Thank you. Yeah. Okay, thanks for the speakers. Nice talk. Okay, next talk, we will welcome Xin -Yao Wang from uh open all all hand A_I_ to give the talk designing, building and training effective software engineering agents.
So, Xin Yawang is co-founder and the chief AI officer at All Hands AI, where he leads agent development of open hands and open source platform for AI software agents. Previously, he was a PhD candidate in computer science at the University of Illinois.
under Professor Heng Ji. His research focused on building interactive language agents that can execute code, assist humans, and self-improve through environment feedback. His work has been published in leading venues including ACL, MLSys, and so many conference. And he has received the NAACL 2024 Outstanding Paper Award. He has worked as an intern at Google Research, Microsoft, ByteDance, AI Lab, and Tencent.
Xinjiang holds a bachelor's scholar in computer science and data science from the University of Michigan, receives the 2024 to 2025 uni and Maxine Paul Memorial Fellowship, and they are the honorable mention for the CRA 2022 Outstanding Undergraduate Research Award.
this task. Yeah. Thanks, Jian, for introduction. So, hey everyone, I'm Xiniao. I'm a co-founder at AllHands. And it's my honor today to give a talk here about how we can design, build, and train the next generation of state-of-the-art coding agents. So let's start with building uh that sorry let's start with designing. So this was work was done like last year and published at ICML 2024. So the high level idea is that we are trying to use executable code action to build up the action space for agents.
So how do most language model agent works today or maybe like a year ago? Like most of this agent uses single tool call which is like a text adjacent per term. So assume like assume I give you instruction something like okay I want to purchase a phone and then can you just search through a bunch of different countries and get price on those countries and figure out where is like the cheapest for me to buy. And you will send prompt something like you will send a system message or prompt like this to the language model like.
like okay, here's a list of tools you can use and then you can generate a tool code by generating JSON or text.
alike, what is missing in this type of a single text and JSON action? Like, let's imagine you're the agent and you're trying to solve the problem. So you would start by, okay, maybe I should start looking up rates in one country, and then once you've got the exchange rate, you try to look up phone price, and then you try to convert it at a tax. So basically you call a bunch of tools, and then you realise, okay, I need to do this thing over and over again for different countries. So this repeated procedure doesn't doesn't seems like optimal. So can we
can we actually do better here. So the proposed uh the proposed idea here would be like, can we use like a block of executable code to actually do this. So instead of like exposing like multiple tools, multiple individual specialized tool to the agent, can we just provide this tool as a function inside for example a Python interpreter and then the agent would simply write a bunch of code to uh solve the problem. For example here, the agent will simply write a for loop to iterate
breakthrough like of this a bunch of like complex operations. So this basically allows us to leverage the control and data flow feature of the programming language to simplify this type of complex operations. And then find also like using code as an action also allow us to reuse these functions and tools from existing software library which is another free things we can use when building our agents. So in general this requires fewer turns of action to solve the exact same task.
And then now I'm going to talk a little bit about like a several aspect of the codec that's useful for agent. As we talked earlier, like control and data flow feature allows the agent to store this type of intermediate result as a variable for future reuse. And it allows the agent to compose like multiple tools together within one piece of code like really easily.
And inside benchmark scores, we actually see that Kodak takes fewer turns of interaction, but gets more things done. For example it's getting higher accuracy. For example the best model, well, at that time was like GPT-4-1106 preview. It got about like twenty percent higher performance while requiring like two point one fewer interaction turns on average compared to for example using text and JSON actions.
And then the second benefits of using code is kind of obvious. It's like because like programming language was initially designed for human. So human already builds a lot of tools for human in terms in forms of like software libraries. And then Codex basically allows this type of agent to use open source libraries and tools like PIP, APT, get install, NPM, etc. based on its programming knowledge learned through its pre -training. And then on the figure right, this is actually a 7B model we train on Codex.
that can already execute sophisticated tasks leveraging existing Python library. For example here, it's able to use pandas download, download, examine and process a bunch of data and also knows how to use scikit-learn library without you explicitly telling it. So you basically in the instruction you just tell hey, here is a data set and I want to understand something and then the agent will figure it way out on how to actually carry out the task.
And then the third benefits of using codec would be automated feedback. So if you are implementing a tool yourself, you kind of need to think of different corner cases or think of different edge cases of different parameter inputs of the tools and think of different response for those. However, if you're using like execution code, like if you're using code execution, human already like
Actually, there is like already infrastructure like Python interpreter where people spend a lot of time catching all sort of like different color cases. Then if you directly connect those interpreter to your agent, that will basically allow the agent to get automated feedback, which enables the agent to do all sort of like self-debugging.
And then the last the then the last point I will argue is that this type of coded data are widely available and already widely adopt into most more than language models pre-training corporate as well as as evaluation benchmarks so the takeaway is like okay language models are already familiar with the code and then we actually quantitatively measure this on a readjusted version of API bank so what we do is like we constrain codex to only producing one atomic action at a time so basically we disable the control and data flow feature
So we can only focus on like whether the language model is familiar with code versus it's familiar with JSON or it's familiar with like the text format and what we found is like codec achieve comparable or better performance even with atomic action where text and JSON are like heavily favored because you sort of like remove the control and data flow feature.
And finally, now because it's like 2025 now and that work was like done in 2023, 2024. So we now have something called like native function calling and most language model providers already implemented it. So what's the difference between like this sort of like text and JSON format versus native function calling and what's their relationship with like codecs? So text and JSON formats is rather like an older prompting technique, like probably people use it from like 2022, 2023.
when the function calling is not really a thing. So I think OpenAI first support the function calling in like June of 2023. And whereas like this type of native function calling is implemented by like training this type of language model to perform tool call by output a structured text format. So you can.

output a structure text format so you can imagine it's like using text in json formats or xml tags whatever but like the model is like specifically optimized for it so like as a user you don't need to like really worry about what type of format you should use
So in like the 2025 interpretation we call that with function calling, so as a prompting technique without function calling, because like language models are from more like the last benefit we talked about earlier is like language models are more familiar with the code. So using codecs is better for prompting these language models. With like widely available function calling today, this advantage is probably less relevant now.
Like most advantages of codecs are still relevant. For example, the core idea of using fewer and powerful tools that leverage executable code as an action space. For example, if you have a powerful tool like Bash terminal, Python interpreter, it's kind of better than using a large amount of specialized tools. For example, you have a specific API for weather, you have a specific API for GitHub, and then ask there's more tasks you want your agent to do.
you sort of like expand your tool list eventually to a point where then some of our just so confused to start working on it and this means like Kodak can still leverage this control and data flow feature extensive software library as well as the automated environment feedback so let's fast forward to the building agent so in the in yeah in this section I'll be talking about open hands where we built like a open open platform for AI software development agent
So it stems from the idea, fundamental idea of codecs. It's like if I gives you a few about really, really powerful tool, like web browser, terminal, file editor, like what could you do? And I have a quick demo video. Welcome to OpenHands, Maybe people can get an open an source idea, software development agent that can help out with many of the tasks that human developers do. It can build new apps and scripts from scratch.
Yes, we can see there like the agent was actually using the curl command to send a post request It to GitHub can fix API issues without actually in big code bases with a single relying command. on a specific GitHub API.
It can help you fix those annoying merge conflicts and test failures. It can help you write documentation.
OpenHands is super powerful, and we developers use it every day to do all of these things and more. And the best part? It's an open source project developed by a wonderful community of over 250 plus contributors. Download and try OpenHands today. Or sign up for the OpenHands Cloud, which lets you use OpenHands through your web browser, on your phone, or through our integrations into GitHub and more.
Yeah, that's how much things you can do with an agent that's so simple by just putting them together with a bunch of real powerful tools. So next I'll briefly talk about like the architecture design of open hands. So open hands consists of three major components. The first part is like agents. So we define agent as something that converts a history of actions and observations to the next action. And there's also an event string for tracking history of action and observation.
And finally there's like agent run time to execute all actions into observations. So let's start with agent. So here is like really pseudo code of like how you can define the agent. So you sort of like handle their the history of action and observation and then you sort of like prompt language model for the next action and then eventually you sort of like parse the language model response to a action that's exist in open hand. So it's like super simple.
And then the default agent of open is like codec agent, which is what we talked about earlier. So it works by interact with environment with a file editor in a small set of really powerful tools that use executable code as action space. So for example, if there's like a fully capable bash terminal where the agent can just run arbitrary bash command without restriction. And then there's also a Python interpreter for agents if they want to do any sort of like data analysis task and finding there will be like a browser that's interactable with a domain specific programming.
programming language. And for event stream, it maintains all type of event. For example, there there is like message from the app user, there will be like action from the agent as well as observation resulting from executing the action from the agent inside the runtime.
And then the biggest components we spend most of our time on is agent sandbox or agent runtime. So why we need to sandbox the agent runtime? Because we wanted to do interesting things and then we want to not destroy our computer because sometimes agent might just RNR off your entire like root directory and you're doomed, whatever. And then so that's why OpenHands execute all actions inside Docker sandboxes, which we call the runtimes, isolate this environment.
OpenHANDS maintains an action execution API server that connects to terminal, iPython server, browser, etc. inside the sandbox. And OpenHANDS runtime harness automatically install this action execution API into arbitrary Docker images you provided. So basically that allows us to run the agent on diverse environments, like whatever environment, as long as it's a Docker container.
And then I think I think it's how from previous talk also mentioned that setting up infrastructure for agents, especially coding agent that requires actual executions like extremely challenging. We spend a lot of time setting up parallel sandbox for evaluation and training. So this basically allows us to spin up, for example, like 200 Docker container at the same time on a remote cluster that allows us to like shrink our like serial evaluation that you used to take two days into like
into like base number 1.5 hours, which makes like the development of agents much, much easier. Feel free to check our blog if you are interested in learning more about this.
And for actions-based, our runtime provide like a three major action space. The first one will be like the terminal. So it allows the agent to interact with terminal and file system through these type of command-and-run action where the agent can execute a batch command, or a Python run cell action where the agent can execute like arbitrary Python code inside in a like Jupyter notebook style.
And then for the web environments, agent can interact with the web browser through like browser-driven domain-specific language. So basically there will be like two actions. The browser, browser URL action, basically you give it URL and output a markdown file directly to the agent. So this is like a simpler route when the agent just needs to do some sort of like information seeking on the web. And there's also browse interactive action that basically allows the agent to output a Pythonic code that essentially is mapped to a playwright API.
that essentially controls the browser. And this web functionality is implemented through browser chain, which allows the rendering of X_T_M_L_ PDFs and screen shots, as well as summarising X_T_M_L_ as tags, or accessibility trees. And it also supports doing something like a viewport filtering.
And here, yeah, this is a fun fact. Like once I ask open hand to read the source code of my latex file of a paper and try to shrink it from like 10 page to 9 page, it does that by just like installing PDF latex and then just opens out the PDF in the web browser and constantly checking if the conclusion session is like we think the 9th page.
Yeah, and then the third part of the action space will be the file editor. So the file editing is impro is performed using a file editing tool that allows the agent to view, create, replace, insert and undo edits into a particular file.
And then here is like a visualization. Sorry, this is like the open hands visual user interface now, but like we are still in the process like iterating with it. So that might change again in the next two weeks. But in general, you basically have a place where you can come like where you can talk to the agent, ask the agent to do stuff while on the right side you control like watch the agent as it's doing its task.
And finally, like we come to the evaluation session of the open hands agent. I think evaluation is really, really important because we want to be with a general agent and a general coding agent should be able to tackle a wide range of tasks and to prevent ourself from overfitting our own agent design to like one particular benchmark. We actually evaluate our agent on three different domains across 15 benchmarks, primarily across like software engineering, web browsing and miscelluses assistance.
And then that 15 number was actually from July 2024 when the paper was written. Right now, all pens evolved to harness include over like 24 challenging benchmarks, including SweepBench, WebArena, Visual WebArena, et cetera, et cetera. And then here are some of the core benchmark we focus on each domain. So the first one will be SweepBench. I'm sure most of you is probably kind of heard of this benchmark already.
So

heard of this benchmark already so what this benchmark does is like it take issue and code base from github and then it prompts the agent to generate a pull request which is like a diff a git diff of like how how you should change your existing code base so that eventually passes all the unit test this benchmark is particular challenging as it requires long context understanding and precise implementation and also have like a full light and verified subsets so right now most people start using like verified subset it's a subset
where it's a subset that have gone through a bunch of like human programmer verification to make sure the problem are actually solvable. The second part of the benchmark we focus on the web domain would be like WebArena. It's basically an open source sandbox internet with tasks that can be solved and validated eventually by human written unit tests.
And for micellas as this assistance, we consider something like Caia. So it consists of real-world question that requires a set of fundamental abilities such as reasoning, multimodal handling, web browsing and general tool use proficiency. For example, the problem here would be like I gave you a Excel file, just answer my question.
And then what we found is like open or codec agents generalize across task categories. So basically without changing prompt, the same codec agent demonstrate competitive performance across different baselines, especially a lot of baselines are specialized for their own domain. So this is actually something exciting that we think. And then that was a year ago. Like how does open hands compare with other scaffolds today across benchmarks?
So OpenHands recently is the state -of-the-art own sweetbench with infrared time scaling which I'm going to talk about later in the next section. And then OpenHands is state-of-the-art on multi -sweetbench which is like multilingual version of sweetbench with like eight programming languages. And OpenHands is like top two on live sweetbench. It's a contamination-free benchmark for AI software engineering.
And then it's also the state-of-the-art on commit zero, where the agent needs to create a python library from scratch based on unit test. So I think it's probably safe to say open hands still generalize across benchmark today.
Yeah, and why do we want to create open hands? Like what's the like what's the goal of open hands? So we want to create a platform that allows users to use agent for software engineering For example, there's something there's agent you can just pop out your browser, open your GitHub and then just throw an issue and ask you to do your work.
But like on the other hand, we also want to build infrastructure like evaluation harness, runtime infrastructure to enable AI to perform software development in the broadest sense, as well as supporting all the relevant research we do here. And then finally, most importantly we want to do it all in the open and collaborative way in contrast to many closed alternative.
So OpenHands community, OpenHands is like MIT license project. Start with a tweet and read me following Devin's launch on March 21st, 2024. It was initially called OpenDevon, but now it's called OpenHands.
And then now it consists of about more than 300 developers who joined over the last year and have like 53K GitHub stars. And people from a lot of institutions have already contributed. For example, it's being used in research by CMU, Berkeley, UIUC, Yale, and other places. And it's also used by a lot of companies and some of them even like contribute code back to the repository.
And then now we have idea of how we can design a good agent and how we actually build this agent in practice. That's how we can build this type of general agent in practice. How we can train this agent or more specifically train the foundation model underlying best power in the agent.
So what's what are the typical ways for us to improve language model agents? So the whole system is like more like a neuro symbolic system where you have a language model component where and you also have like a external environment component like user and term and the tools like terminal browser and file editor. So the easiest the easiest thing we can do is like we can engineering a better language model environment interface for example by tweaking the prompt or we can just by tweaking workflows for example you should solve a problem.
solve a particular task following order. First you should explore the repo, second you should try to reproduce the issue, et cetera et cetera. So all the all of this are more restricted inside in in terms of like a domain. For example you are specifically optimising a prompt for one particular domain, it might not generalise really well when you want the agent to other things.
But like there are also something, some other options we can explore like we can train a agentic language model or we can do inference time search for better solutions. So next.
So what what's the height of idea for training like a language model agents or training the foundation model specifically for agent purpose? What we need is like we need to build a rich environment which we with reliable rewards For example, you can either use rule-based reward for example You run a unit test then unit test pass or you can actually train a reward model to predict a reward given like agents behavior And then you can apply any sort of like learning algorithm by reinforcement learning
or distillation or simply just like rejection sampling fine-tuning and then the second thing we can do it would be search so what a search do will be like we can roll out multiple possibilities or multiple candidate solutions and we use a model or use a heuristics to select the best one so I'll first talk about like how we can train this type of agentic language model first so the high-level idea of the method will be we have a training example
And then we put the issue and the code base as input to the agent. So we ask the agent to solve this issue within this code base. And then the agent will generate, for example, a Git diff or a pull request. That we can run against the unit test. So we will get basically our reward. So basically if agent solution passes all the unit test, then the reward will be one. Otherwise it will be zero. And then eventually we will use gradient updates to backprop the reward to the agent, depending on the algorithm you choose.
So there are many accident coding data sets today, but like none of them are ideal for training agents, at least for now. For traditional coding data sets, they aren't really contextualized in code basics, for example apps. It's more like a single term function completion or maybe a multi-term, but like there's like no code base access. And they often don't really support execution based feedback.
Like recent software engineering benchmarks solved both, like SweetBench and SweetLancer. But like the thing is like most of them are limited to evaluation only. So that's why we were motivated to build a sweet gem. You can actually consider it as like an execution, it's like an executable training split of SweetBench.
So we we we have like about 2 .4 k task grounded in github code basis and all all of this task accompanied with like executable environment with unit so there's like one docker container per task that allows the agent to just go in there and just solve problems and then what we do to collect switching will be something similar to a switching collection pipeline
We collect candidate tasks by finding top Python repositories on GitHub. Uh we we we have like about 68k candidate task from about 350 repositories. And then we set up uh this environment and validate the task. So we set up the executable environment for each subset and we validate and we we consider environments valid if, for example, we take the actual human written pull request and then run the actual human written unit test. If if that
that pass inside environment. We consider this environment as a value environment and we keep them. So after filtering we got about two point four K_ like valid instances. And one thing to note is like we actually th we actually find that sweet gym to be uh slightly harder than sweetbench probably because like there are a large fraction of data set like pandas which are super challenging to uh to to work on because sometimes they requires you to compile some like C_ components.
And then, for example, here, uh the accuracy on light's up set is like uh about eight on switching where the same number is about twenty two percent uh on switch using open hands as the agent and GBD4O as the model.
So our our training method will be using distillation by rejection sampling fine-tuning. So what we do is like we collect trajectory from a teacher model, which is like in these cases like GPT 4.0 and Cloud 3.5 agents. And then we use unit tasks to judge if each of those trajectory is successful.
And then we're doing S_F_T_ on the stdet uh uh then we're doing like S_F_T_ on the stdet on the successful trajectories. And we use the base model like a quaincoder thirty two bit in tracks. And then what we found is that the performance improved smoothly as well we obtain more successful trajectories. Like two X_ data typically lead to a round like five percent improvement on superbench verify using open hand's framework. And then the zero shot performance about like seven percent. So as we can see,
see here. With like 500 trajectory, we are getting around like 21% ish has one. And then one important question is, does SWE DREAM scales with more computes? So we can get more data by repeatedly sampling from SWE DREAM. But like, is this performance constrained by unique number of tasks in SWE DREAM?
So we did a a quick experiment. A quick cut to the chart on there is is like probably now. So given the same amount of the training data, so if you focus if we focus on this orange curve and this green curve here, uh this
Orange curve have like more task per repository and this and this green curve has like fewer task per repository. And under the same number of like total number of training instances, we can see here like having more task per repository actually helps. So that basically tells us like.

So that basically tells us like repeated sampling is highly effective. So we haven't yet reached the upper ceiling or we haven't yet saturated switching because like you can still run on the same repository and keep sampling, keep doing repeated sampling on the single unique instance. And repository and instance diversity aren't currently like the primary or primary bottleneck.
And as a follow-up or an extension to switching, we train open hands L_M_V_ zero point one. So it's uh basically like an improved thirty two billion open source model based on switching. You have like a hundred twenty eight K_ context window, it got thirty seven percent sweep entry verified, which is pretty impressive compared to uh given like its scale. So the performance is actually comparable to model with like twenty times more parameter, including like the latest deep seek, which got about like thirty eight percent.
And another interesting thing I found during training is that open -hand is how this model generalize. So when initially I was training this model for three epoch,
And then after training, I try to plug this model into OpenHand's UI and try to use it. I said hi, and the model say sure, let me install this a list of like Python packages for you. Like it it's it's like, it's like over fitted to uh try to be as much helpful as possible with like while ignoring like what user is like actually saying. So eventually you like we release another version that we only train the model one own like for one epoch for improved generalisation.
So it's actually quite impressive a 7B model. So a 7B model that's only trained on Python trajectory in SwitchM, but like a language model is able to generalize to JavaScript and coding from scratch based on the rights. I was asking the model use Vue.js to start to build like a to-do list app for me and the agent will just go ahead and do it. And then finally the last section about like training models would be like how do we perform inference time scaling with a trained reward model.
So the high level idea here is that we can train an outcome supervised reward model with three gym sample trajectory reward pairs. So we obtain trajectory reward pairs by rolling out this agent on three gym. So you have some tasks that are successful, some tasks that are failure. And then we train the reward model to predict the unit test result given the trajectory.
And then, and then once the model is trained, we use the reward model for passage case selection. For example, we will roll out the agent on the same task for N times. And then we will use the reward model to pick the most promising trajectories. And as we can see here, we are seeing a log-linear improvement curve where the more compute you spend on the agent rollout, the better performance will be. For example, the passage case here will be like...
around twenty one percent. And as we sample more trajectory, eventually push up to about thirty two percent. Uh like I mean ten percent eleven percent improvement is quite impressive.
And then training this remote model also involves some sort of like data engineering. Basically how can we best train these pipelines with software engineering our reward model. So best performance actually stems from a diverse and balanced data mixture. So we need to include both on -policy and off-policy data. For example here if you're using off-policy data basically you are generating trajectory from a fine-tune model to train a verifier versus you are using trajectory directly from cloud and GPT to train a verifier.
verifier and then if you combine these two data together you actually end up with the blue curve that scores the best and then the other thing we found is like you also need to kind of like do a balancing category for example you need to keep your positive and negative data with like one one to one ratio if we try it like one to two ratio whereas like two times more positive two times more negative data and eventually it's like not helping and in other experiment find that it should be even like worse
And then also this is also an extension of switching. So we eventually train an open hands creative V0.1. It's it allows us to achieve the state of the arts on switchbench verified.
So what we did there is like instead we are using a regression hat instead of like predicting yes or no token for this reward model and we include more training data and we train it for longer context and as we can see here it's a it's a pretty similar inference time scaling curve where we it's like we are getting a lot linear improvements as we scale the number of reagent routes but one thing to note here is like this policy model is actually close on f3.7
So we were essentially training this creating model for a proprietary model. Yeah, I think that'll be all for my talk today and thank you all for listening and I'd be happy to answer any questions. Thanks to the speaker for the great talk. So any question? Thank you for the great talk.
So um you were um, you know, carefully describing your uh open source approach and uh I think that's great to see uh at the same time uh your best results uh that you just shared are still based on uh core model which is basically proprietary model. Do you see a future or a
Somehow we should prefer what will be the timeline for having like a completely open source or if you prefer a free solution uh agent that can actually compete at the same quality. Yeah, that's actually a pretty uh good question. So I think we are we are working on that. So we have like the we have like the sweet the the open hands LMB 0.1 and we recently we recently internally tried to scale the same recipe.
So for example deep C V3, like the big one. And then after fine-tuning we are getting about like forty, fifty percent, which is already kind of getting close to the old version of. And we are we are definitely gonna to open source this at some point, but we are still trying to improve it. Yeah. Thank you. Okay maybe one more question.
Well, think of a joke, so you mentioned that you use the uh benchmarks which are not related to code like Jupyter QA. And I wonder how
Uh how does a good performance in GPUKI help open hands in, you know, general programming understanding? Because at least in my opinion it it seems to me that the GPUKI is very different from they have things you want from a programme, you know. I mean Yeah, exactly. So I think there are some separate questions subsets of questions that will be helpful if you have for example access to a Python interpreter where you can do a bunch of calculations and then I believe open hands also have for example a browser or whatever things.
things it might like basically the when the agent might find useful for solving this type like question answering task. Because you you got the action space there, it's like the agent's choice decide like which things they want to use. Thanks for the great talk. Uh next we will have two spotlight talks from our oral papers.
And they will be hosted by Wendy.
Yeah, uh please uh join me welcoming our next speaker, Simon, presenting uh their work on kernel bench. battery's Okay. a weakness. Uh hey everyone, my name is Simon. I'm a PhD student at Stanford and today I'll be talking about kernel bench. Um this is joined work with my labmates at Stanford uh and Simran, Alex and William was our advisor, Azalia and Chris. And we really want to understand question can language models write G_P_U_ kernels?
So why write GPU kernels? Um it's a very different thing than writing software engineering code or competitive programming.
Not only you have to write the code, you have to understand the hardware and how to effectively map your operators onto the hardware. And these hardware are getting ever more performant but ever more complex. Like uh the GP Nvidia GPUs over the last gen last few years. Every generation have more hardware features like tensor core, tensor memory, and you have to do all kind of tricks like async memory access, pipelining, and that's very difficult for humans and uh well see for models as well. And this is a very iterative and painful process for
And my engineers, you have to try something, see if it breaks, understand the profiler result and debug it again. So this is why, you know, for the most important kernel of our time, flash attention, after two years of releasing the Hopper GPU, we have a performance report of flash attention on Hopper. But you might ask like, okay, why not just let Nvidia do this? Like we can just live on a free lunch and if our we care is transforming attention.
Well, there's been an explosion of model architectures. They're supposed to be better than attention. They're sub uh quadratic and but if you're uh if you think about the uh walk-clock time, not the algorithm complexity, they're actually slower than flash attention, because they don't have a optimised kernel. At the same time you have all these different uh new ML hardware and uh they might be very um performing in the hardware specs, but when you

performing in the hardware specs, but when you actually run PyTorch on it, uh it's much slower. So you wanna wanna use those. So if we can automate uh writing kernels uh and make it much easier, there's a huge uh amount of opportunities that we can unlock.
And so this is what we're interested about. Can we leverage the language model as a compiler or transpiler? So concurrently the task is kind of like how the engineers actually do this. They have a PyTorch program of a bunch of operators and we give it to a language model, let it choose what operator it wants to optimize and replace them with custom operators in CUDA. And the question is that, okay, how can we evaluate this? What kind of problems can we test this on?
So this is why we make kernel bench, the benchmark part. We created 250 programs across three levels. They are different in complexity but also in their challenges. So starting from level one, there are simple operators like a matmul or convolution. They're very simple, but you are competing with highly optimised handwritten kernels. Then at level two you can combine them together and there's a lot of opportunities for kernel fusion which is usually what graph compilers do.
Uh you reduce the memory access by fusing the kernels um all in one operator. And level three we go full model architecture, we give it like a transformer block, a Mamba block, and let us see if we can identify opportunities to optimise. So we test this um we feed the models the uh these problems and we really care about both correctness and performance. To evaluate correctness we fuzz the programmes, the reference programme and new programme with the kernel with randomised inputs and check the outputs are the same.
And to measure performance, we just kind of measure the walk clock time and measure the speed up. But what's really interesting is that a lot of the coding benchmark up to this point really cares about correctness. We're adding this axis of performance, which is what we really care about for a GPU code. Let's make it fast, but we also want to make sure it's correct. If it's not correct, there's no point making it fast.
Um so to measure this we came up with a metric to holistically measure across the kernel bench con uh both correctness and speed up. So it's a binary indicator of the modu pro number of problems that are correct and also have a speed up faster than P times of the baseline. Uh so concretely, if I said P_ two one, it's number problems that are faster than PyTorch, um M_ is set to two, it's two times faster than PyTorch. So if you increase the structure of P_ you increase the difficulty to make the benchmark more um difficult.
and avoid saturation eventually. Um so we test out a bunch of frontier models and Mm-hmm. we see that um we plot the speed of distributions um across the thresholds and uh if you see the graph, it most of them don't do that well. Uh most of them are pretty slow, they don't really generate fast code.
And we try to understand why this is the case. If you look at the code, a lot of them are just not correct. They're just plainly wrong, doesn't execute. But interestingly, the reasoning models make much less execution failure, which is like the code doesn't execute. They make less syntax errors, but they still struggle with functional correctness, which is like the code is not correct. The tensor is not what we expect it to be. And so that's really hard to reason about even for a human.
And we look at the code, like why it's really slow, it doesn't really leverage off the hardware features that you imagine performing kernels use, like tensor cores or async memory. Even when we try to explicitly steer these behaviors through examples or hardware specs, it doesn't really understand it. And this is probably because like we don't really have much GPU code in the public or in the training data. It's a very scarce and low resource.
source of data. But we're not hopeless. The nice thing about kernel bench and generating kernels is that you can run it. Uh you can just run the compiler and get errors. You can ex uh measure if it's correct, you can uh look at the profile results and see what's like uh the what's the bottleneck and what's slow. And you can use these as ground truth verifiers. This is a perfect setting, you can scale up uh test and compute which and the kernel bench provides like a big uh playground for you to try these things.
So the most naive thing you can do is just repeatedly sample, like scale this repeatedly in parallel, you do a hundred samples, turn up the temperature and choose the best one. And we found that even with something like this, you are able to improve the correctness of speech and discover more solutions with different strategies. But if your base model is limited by its ability, like some of these base models never get convolution problems, no matter how many times you sample, you're just never going to get it.
A more natural way is to iteratively refine your solution, kind of scaling sequentially. If you give it a model, it's previous generation and adding more information about its generation, like the execution results or the profile, it's able to, something like a deep seek R1, it's able to improve steadily with more turns as well as giving more information, which is quite surprising to us.
And we compare these two methods. We found these iterative refinement methods are much more effective in most of the cases. It's able to use the profile information to identify bottlenecks and overturns is able to do fancy optimization like using shared memory or register blocking.
So kind of our contribution is kernel banjo is the framework that lays the groundwork of using transformer and language models to drive kernel optimization. We test a bunch of models and test time approaches and the key takeaways are writing this code correctly is very very hard for these models but they do demonstrate some potentials like we saw kernels that use like complex hardware instructions not very successfully but they tried at least they're able to do
Reason about like semantic meanings like sparcities and do block sparsity and reduce computation capacity. We have a lot of them in the paper in the appendix which is very interesting. And we found likely like kernel engineering is a very iterative process. So if the model can understand feedback and leverage them effectively it's probably, that's probably very important for it to make progress on this benchmark.
And more importantly, after we released this, I was not expecting this, there's a lot of work that kind of came up after on our benchmark. There's one from Nvidia, from meters like AI safety org, from Sakana, which is a lab in Japan, they build the agentic system to optimize CUDA and come up with CUDA kernels on kernel bench. And also recently there's been work on scaling synthetic data and post training to create language models specifically targeted for general generation.
So we are updating the benchmark. It's a dynamically evolving benchmark. We are adding more real-world workloads as well as support for hardware platforms and programming models like Triton and the custom DSLs like Sonnet Kittens. So if you're interested, feel free to check this out and find me at the poster session. Thank you for the great talk.
Maybe we can take like one or two questions. Thanks. Thanks for the great talk. I have one question about the baseline uh instances of the pie torch kernels. Are there uh examples where you know the kernel is already optimal that you can't possibly write even faster kernel than that? Uh so the question is, is the baseline already optimized? Yes.
Yeah, so PyTorch actually consists of handwritten kernels for optimizations and Torch, we also have a benchmark against Torch Compile which is a crack compiler to do kernel fusion in Triton. So yes, the law of the baselines are optimized but there's also a lot of rooms like especially our fusion we see the model is able to identify opportunities that the Torch compiler cannot actually find or the eager mode execution does not fuse operators that we're able to beat this. But
uh the baseline it's an evolving benchmark I wish PyTorch comes with more optimizations and get harder to beat these um yeah so this is the um this is kind of like a relative benchmark rather than the absolute truth yeah Thank you. Uh I'm curious also if you have some sandbox environ uh do you have also some sandbox environment where you can actually execute all the pipe you've been described?
Uh, is there a sandbox environment to uh test When kernels? you have the comp I don't know uh kind of a document when you have the sample when you have the compiler when you have the ev everything included. Yeah, we we uh we host this on sandbox on Modo. It's like a public uh serverless cloud. And we also provide these endpoints for people to submit their kernels and evaluate them. Please sing uh our speaker again.
Oh. Sorry about that. Yeah, so next we have Olivia Hsu presenting their work on adaptive self-improvement LLM agents for ML library development. Take it away. Thank you. So hi everyone. My name is Olivia Hsu. I'm a final year CS PhD student from Stanford and expect to be an assistant professor after graduation. Today I will introduce our approach.

Today, I will introduce our approach on how to improve agent generation for also ML library code. So thank you, Simon, for that. And I'm presenting this work on behalf of Gangang Zhang, who could not be here today. So as Simon already said, kind of recently computer architectures and hardware are specializing in domain applications to achieve greater performance and efficiency, and they'll continue to do so.
Users write these operators in high-level machine learning frameworks like PyTorch and JAX, and to bridge these two, there are high-performance machine learning libraries like cuDNN or ML Open, and they're often written in these architecture-specific programming languages with high performance that come with these domain-specific architectures. And as you can see, this co-generation flow is quite complex and it poses many challenges, and also Simon alluded to that.
So one of the first challenges is the fact that this ML library code generation requires complex reasoning. And again, Simon used this example, but I have some data. So between for the A100 GPU for the development of flash attention, it took actually between two to three years to not only get a functioning kernel, but also a kernel that uses a higher percentage of the peak performance.
And when we look at the H100 again, actually it follows the same pattern. So with completely human expert handwritten code, we have a two to three year delay by experts that motivates the need to use LLMs to increase productivity and to close this gap. But another key challenge arises when we're using language models or automation of this task. There's actually limited data available.
And to show how limited the data is, we choose Cutlass as an open source ASPL for the NVIDIA GPUs. And until February this past year, there were only about 100 examples from public repos over the years. Moreover, within these 100 examples, around 50% of these examples are all just GEM, right? And so some approaches to automation are mainly mechanical, and they optimize ML operators selectively, like targeting key operators that are used like GEM.
However, our approach uses language models to enable improved users' learning abilities. So we propose an adaptive self-improvement large language model agentic system at test time to address the two challenges I previously presented. We first design an agentic system that is specifically tailored to our target ASPL. And then on top of that, we build an adaptive self-improvement learning algorithm that is not specific to the agentic system.
So similar to human experiential learning, LLM agents start from their base knowledge and accumulate experiences through parallel sampling.
This algorithm filters correct and high-quality answers, then stratifies the earned experiences by difficulty, and then adaptively selects demonstrations to enhance the LLM agents. And like I mentioned before, this algorithm can be for different types of programming languages or even task-agnostic, which we have work ongoing to show.
And so the key idea for this adaptive self -improvement learning is the fact that LLM agents evolve through learned experiences, and these evolved agents can then earn more experiences over time. So let's first look at this running example to show how the algorithm works. In this example, we have five tasks. They're highlighted in red that the agent needs to complete. After sampling at the first iteration, we can get two, nine, and seven correct samples for tasks one, three, and four respectively.
And we choose in our system one representative implementation which will be filtered for each completed task and stratified based on the success rate. So in this example, low success rate means that the task is extremely hard. And in this case, task one is the hardest since there's only two correct samples.
And then our system will prioritize hard tasks as demonstrations for the next iteration because they can bring more new information at test time. So after iteration one, there are no new tasks that are completed, but after iteration two, the algorithm will then select more examples. So in this case, we will now include easier tasks like the hard and medium tasks from task one and task four.
And then in this case, after iteration two, when it's introduced into the agentic system, a new task is then completed across iterations. The algorithm then continues this process again. So it introduces tasks from a stratified perspective and repeats until all tasks are complete or it runs out of examples.
Again, our algorithm prioritizes these hard-earned experience gained from challenging tasks because when these hard-earned experiences are used up, the algorithm can adaptively choose to add or increase the number of less challenging demonstrations. And you can think of it a little bit as exploitation versus exploration. We're going to exploit things that are hard to do at test time, but then still explore and introduce new information that's easier to do across time.
Now that we have understood the adaptive self -improvement learning algorithm, let's dive into how the agentic system organization specifically is designed for our new ASPLs and for AI accelerators in general. So in this case, we don't actually use something like CUDA or Cutlass because as as Simon mentioned, there's a lot of information on that. So in our research setting, we're able to introduce a new ASPL for data flow accelerators.
Our agentic system is then composed of three parts. It's two agents, a code generator, and two verifiers. And then in this case, a second agent is required because in our specific research setting ASPL, there are type constraints. And then this type constraint, you don't have to understand the details, but it means that every variable in our hardware language has to be consumed at most once. This type constraint ends up being a global property of the program, and this is similar in many programming languages.
So it requires thinking back and forth beyond step-by-step reasoning, which is challenging for causal generation of language models. So therefore, we designed a guardian agent to check and correct the type constraint error globally after a proposer has causally generated some kernel. In addition to that, the inputs and outputs to our agentic system are a structural intermediate representation and the programming language source code itself.
The structural intermediate representation is necessary because it uses a data serialization language that allows us to both externalize and condense programs, allowing us to modify programs easily. In this case, also the source code, even though it's for some architecture specific programming language, we do translate it to Python syntax because language models are better at reasoning about Python because of the data that they have to Python code.
With our combined contributions, we show the benefits of our approach using realistic benchmark for ASPL operator development that we constructed. So we tested on both open and closed source models, which at the time were state of the art when we conducted the experiment, and we measured the pass at N to show how many tasks are completed correctly after N samples.
In our results, we show that we're able to solve up to 96 % of the tasks in our benchmark using the best base model, and we can achieve up to 3.9x over a baseline single LLM. But for most of our results, we show that this test time algorithm actually improves all LLMs, no matter which model they use.
Another interesting finding from our results show that the self-improved relatively weak base models can in fact surpass a powerful general reasoning model, making it better accuracy or performance per dollar, which is something that we found quite surprising. In our case, there's a caveat where we show all of our algorithms with samples of n equals 64 and our reasoning model, we only show eight samples, so it's not quite a fair comparison, but it's because in our research setting we're limited.
limited by cost. And so it's actually much cheaper to start with a relatively weak improved model than to use a general reasoning model that is very expensive to probe at. So in summary, we propose an agent system technique to improve learning for generating machine learning library code and to improve the development cycle of machine learning system software and AI accelerators.
We implemented the end-to-end agentic system showing task completion improvements on all model types. Thank you for listening to my talk. If you have any questions, please feel free to talk to me or reach out to Geng Han via email. And I'll be at the poster session later in the afternoon. Thank you. Thank you for the great talk. Any questions?
And let us thank the speaker again. We will have the lunch break now and we will resume at 1:30.













Thanks for watching! Thanks for watching!

No, there is a a lot of uh a lot of there are a lot of people waiting still in the line and the more and so on. Uh let's give them another two minutes and see.

Hi everyone. Thank you for coming back to the deep learning for code workshop. I'm glad.
Some people manage to be back at least. Probably we get a few more uh in the afternoon. Our next speaker is uh Alex Whoo is a PhD student at M_I_T_ where he also got his bachelor and master. And uh Alex is uh both passionate about uh um doing math with L_L_M_s and uh to develop approaches that can actually solve software engineering task.
In the next talk, he will give us a an overview of where we stand and hopefully where we will get in the next years. Thank you Alex. The floor is yours. Thank you very much for the introduction. So hi, my name is Alex and today I'm going to be talking about the state of AI for software engineering. I'm going to talk about where we are now and I'm going to kind of talk about what lies ahead.
And this is work in collaboration with researchers at Berkeley, Cornell, Stanford and UPenn. So if you're here you're probably excited by all the amazing things that AI has been able to accomplish today in AI for software engineering. And so from awesome code editors like Cursor to impressive foundation models like Claude Code as you see here, AI can do a lot of things that weren't even imaginable a few years ago, like creating fully fledged web apps and complex simulations from scratch. But today we're actually going to look even more into the future.
I'm going to tell you about some of the challenges where I think AFROCO systems still aren't quite there yet. And then I'm going to try and convince you that whether you're an industry, academia or something else, there's many, many exciting frontiers in the field that we can conquer together. So first I'm going to give a high level overview of the different moving parts in software engineering. Second I'm going to tell you about some shortcomings that we've been seeing in today's state of the art models. And then finally I'm going to tie everything together and give you some ideas to address these challenges that I personally feel relatively optimistic about.
So let's dive right in with the tasks. Today I'm going to cover six tasks that are crucial in the software engineering process. So the first is code generation. This is the task that we all think about when we think about AI for code, right? So generation has been the predominant focus of efforts in the field. And this is actually for a very good reason, because this is exactly what people actually need when they're working at AI for software engineering. AI coding assistants are very, very mainstream already, and they can certainly already do relatively impressive things.
you know as we kind of mentioned before but moving forward if we want things to be even more autonomous I think it's important that we look forward not just from co-generation but also to other tasks because it's impossible for models to just get everything correct in one try so the next next task we're going to talk about is co-transformation so co-transformation has to do with taking a piece of code and making it improved while maintaining the semantics so one impressive example that I want to talk about here is Google Chrome's VA engine
Through almost a dozen years, I was able to achieve a 20x performance optimization through coordinated optimizations on multiple layers, such as implementing concurrent garbage collection, developing specialized kernel compilers such as TurboFan, and also enabling background compilation and background parsing. This is a very impressive feat in co-transformation. The third task that I want to talk about is dealing with software bugs. This is an inevitable part of programming. It's kind of one of the parts that we really don't enjoy dealing with.
And the reason we don't like dealing with it is because that these bugs can actually vary, very drastically. They can be from small typos, they can be deeply nested issues. Some of them may even occur as rare as one in like, you know, one million or so runs. So some of these issues, you want to try to surface bugs, you run it again and again, and then, you know, only after running so many times does the bug surface.
Block fixing software is actually already very powerful today. And within hours, Google's OSS fuzz was able to find a heat buffer overflow on this thing called FreeType, which is a font rendering system that was deployed on over a billion devices. But however, language models still have a lot to contribute here. And having seen millions of bug patterns, these models certainly have a very developed intuition for what parts of the code base may potentially have bugs.
The fourth task is software maintenance, right? This is a chore that we all wish could be automated away. And indeed, writing documentation, reviewing pull requests, these are the things that humans are, you know, tirelessly doing out of things that they don't want to do. But I think these are actually prime targets for AI. And because these are relatively low logical complexity tasks, and looking even more forward, it would be awesome if AI could, let's say, start onboarding us onto codebases, they could answer arbitrarily complex questions about our codebases.
and so on. The fifth task is scaffolding and metacode, two frequently overlooked but still crucial aspects in software engineering. So scaffolding is what you kind of have to do outside of the code so that it works properly, right? So this includes generating API tokens while metacode refers to code that's outside of the main logic, such as configuration files or Docker files.
So there's actually one tool that does configuration validation with LLMs that I want to talk about called Siri. And so Siri is a tool that actually successfully was able to detect misconfigurations on open source projects such as Django, Postgres, SQL, and Redis.
And so, you know, while Siri is able to detect misconfigurations of syntax and range violations, it actually started to fail when you ask it things like dependency or version violations because these are still, you know, relatively difficult to kind of detect. And so tools like Siri are still limited to a very narrow range of misconfigurations. The final task I want to talk about today is going to be formal verification. So formal verification, this is actually one of the most forward-looking of the tasks. And this has to do with guaranteeing that code satisfies desired properties.
In property verification, you know, you can think of key properties like memory safety need to be approved. While in end-to-end functional verification, as you see at the right, I'm not sure why that slide's not working. But the goal is for everything to be well specified from end-to-end. And one example here is CompCert, which is a fully optimizing C compiler which supports most of the ISO C99 language. And the important thing about CompCert is that it's formally verified in Coq, which eliminates the potential for compiler bugs.
This, you know, most of today's software is actually not really formally verified. And I think that because this task is very forward looking, AI could really make it much more feasible to verify code at larger scales, probably starting with property verification, simpler properties of relatively more small snippets of code. So with these six tasks in mind, now I'm going to start to share some cross-cutting challenges that today's model still face today.
We'll group these into four major categories, data, scale, interaction, and management measurement. So when it comes to data, you know like we all know that these models are super good when it comes to reciting things that it's seen before. So you people always talk about contamination and memorization. These are within the range of tasks and capabilities that these models are super super good at. However, coding actually relies on some kind of generalization pretty often. And when you start to ask models to do tasks that they really haven't seen before, this is where they begin to trip up.
So let's actually see an example of this. You know, by a show of hands, who's actually programmed in the GPU language Triton before? Anyone here? I've got a couple. So for those that haven't, you know, Triton is a GPU programming language that's used to write kernels. So when we ask Gamma 3 to write one of the simplest constructs in Triton, so this is a dot product kernel, it actually makes a very fundamental mistake of using dot products via indexing, right? So you can see in the red here that it's using index notation.
But in trying to actually these languages, you need to communicate with loads, stores, and batch operations rather than indexing operations. And so this is actually completely invalid syntax if you know anything about training. So this type of behavior is a result of borrowing constructs from higher-level languages. Because you know in Python, C, Java, you always have these types of indexing notation constructs. Next, I'm going to share another example that's close to my heart. And so this is an example in Lean, which is a form of verification mathematics language.
So here I asked Claude 3.7 Sonnet to prove a theorem that says there are infinitely many primes that are 1 mod 6. And so this theorem is actually a direct application of Dirichlet's theorem. And if any of you know that, it says that arithmetic progressions have infinitely many primes as long as you have some mild conditions being true. So, you know, in this case, unlike the previous example, the syntax is actually completely correct. You know, it's validly in syntax, the model got the problem statement correct, it even knows how to prove the theorem.
But the issue here is that it hallucinates both the name of the theorem that doesn't exist, and it even tries to guess how you apply the theorem. And so for those that are interested, this theorem actually does exist in Lean, but it's called something else. The exact name is called for all exists prime greater than or equal to mod. But to the model, probably to us, I think it's more natural if we say you want to have this theorem, and probably you can imagine that this is a reasonable name to kind of hallucinate for a theorem like this.
So another anecdote about Lean is that around 2021 everyone was using Lean 3. So from Lean 3 to Lean 4, Lean 3 the community had already contributed like half a million lines of code to this library that's called Mathlib. And a Mathlib is like this big ongoing project that kind of talks about like trying to formalize all of mathematics in Lean. And later you know people started porting Lean 3 all the way to Lean 4 and Lean 4 had its first stable release in 2023 and Lean 4 is therefore the version of Lean that we all use today.
So why am I telling you this right because these library version updates often can trip up models So let's check out this example here So even though I explicitly told o3 mini here to write a lean4 proof it still reverts to lean3 syntax Which is completely incompatible with lean4 and so if you try to run this in lean4 you'll get something that's absolutely completely incorrect
And so even though Lean 4 has been around for two to three years now, there's probably still a lot of Lean 3 training data. And so I would say this is probably one of the predominant reasons because most of the code on the internet is in Lean 3. So the model.

code on the internet is in lean three so the model probably learns lean three better than lean four dealing with these version updates can be hard for several reasons right because while telling you know the models which one's lean three which one's lean four that's pretty easy but the thing that's hard is that libraries and apis will go many many updates you know there will be completely different constructs between the different versions of the language
And so even if we know what version we're working on, you know, trying to adapt the version in order to know the correct functions or what to apply, this is still going to be a super hard task. And I would say finally the critical aspect of adaptation is being able to adapt these new features and paradigms and be able to leverage new releases even before there's massive amounts of training data.
And because the fact that there even is a paradigm shift, that means something has happened. You know, like one alarming case here that I want to share is that in Java 17, there was an update on how to do more secure random number generation. But then there was another paper that shows that when you ask these models to try to do random number generation, what happens is actually it still reverts to these old ways of doing relatively insecure random number generation.
And so the whole point of updates is to fix things that are worse, but today's models are still lagging a lot. And so in the time that it takes to adopt and switch between various versions, these models are starting to become outdated. The last data-related challenge I want to talk about is out of distribution domains. So here I'm talking about the tasks that are challenging for even the best of human programmers, requiring very high level of algorithmic ingenuity and complex logic.
So in these domains, the search space can be large, and that's one of the big problems. You have super high non-obvious algorithms and there may even be limited verification and intermediate rewards. You can think about tasks like finding a tax in complex systems or even designing new programming languages.
So let me give you one example of this, right? So when trying to formally verify new domains, you often need to devise new theorems to faithfully represent these desired properties. So in 2015, there was this work that proposed a formally verified file system that's called FSCQ. And so FSCQ actually is able to guarantee that under any sequence of crashes and reboots, it's able to recover the file system completely correctly without losing any data.
And so one challenge here is that because, you know, you have, safety can't be done at the source code level because instructions are not necessarily atomic. And so if the crash occurs within a non-atomic operation, you may have data that's lost. And so what they had to do instead in this paper is create a new logic that's called the crash-horror logic. And for this they have to develop new constructs representing what is a crash condition or what is a recovery procedure.
And so when it comes to tasks like these, I think we really should think about, you know, where is AI right now? You know, and then what do we need from today's AI in order to start to develop these new crazy logics and out of distribution domains? The next challenge is scale, right? So what do we talk about when we talk about scale? So when we talk about scale, you know, we have these code bases that are millions of lines long, almost, you know, a lot of industrial code bases. And in these code bases, we have complex algorithms and we have intricately connected components.
When it comes to the issue, you know, one point I really want to drive home is that I think purely just scaling up the model size and the data is not going to be enough to tackle these challenges. And now I'm going to try to convince you why and we're going to explore these challenges in more depth. So the first challenge here is dealing with large scopes and long context. You know, as a community, we've been obsessed with quadratic attention for a long, long time. And even though there's models now that are trying to support long context length, you know, performance is still much degrading as these contexts get longer.
And so the most popular way people do try to mitigate this is via retrieve augmented systems, where first the retriever is going to find relevant code snippets, and then, you know, what they do is they put the retrieved code snippets there and they try to generate resulting code. But today's retrieval systems are actually insufficient for several reasons that I'll talk about now.
So the first thing is that, you know, retrievers are purely, well not purely, but highly syntax based. And so here in this paper we did this experiment where we took a few hundred code snippets, each of which had three versions in Go, Python and C sharp. And we plotted their embeddings in the chart to the right. What we actually see is that the clusters are actually dominated by syntax rather than semantics. And so semantically equivalent code that's in the different languages are still relatively far apart if you look at this chart in embedding space.
So that's why it's kind of hard to find retrievals that are semantically relevant but syntactically potentially different. The second is that unlike in many natural language tasks, using retrievals in generation is actually not straightforward, right? In all tasks you might have a retrieval telling you exactly the information that you need, but in code you need to piece everything together and you need to fit the current context and then you need to write the correct code.
So whether you're using a retrieval augmented generation or not, writing code at large scopes requires a very general semantic understanding of the code base, which I would say is still lacking in today's models. And so finding techniques to try to improve this semantic code understanding, I would say remains a challenge today, and training on one code task doesn't necessarily lead to generalization on other code tasks.
The next challenge I'm going to talk about is long horizon code planning. And so long horizon code planning is crucial because you need to design good abstractions and data representations that are both reusable and also cater to the needs of the application at hand. And while there are many ways to make things work, I would say that good abstractions will give users a very simple mental model of how a large code base is pieced together. Related to good abstraction design is modularity and code quality.
And so there's an old saying in software engineering known as three strikes and you refactor. And what this means is that a piece of code, if you duplicate it three times, it's time to refactor it into a new module. Because what that means is it's probably easier to maintain if something changes instead of going through and changing every instance of the code, you probably just change the modular part. And so maintaining good modularity and code quality during the developmental process, it really makes it much easier to succeed in the long term and probably also avoid technical debt.
And the final challenge is now is that humans often rely on external tools when dealing with unfamiliar territory. So think about like when you're trying to implement something in a code base, you probably aggressively use IDE search functions. And to do this, you find where things are implemented. When we want to address a performance bottleneck, we're going to take a profiler and run it through our code base.
Well, we don't know what tool to use. What do we do? You know, like we search online, we find how to use the tool, and then we immediately try it out in our code base. If we can't find anything, then what do we do, right? You know, we might even go create our own tools, create our library functions, and then, you know, ship it out on GitHub. For example, people even created things like Vim and Emacs because the original IDs were probably too hard to work with. And so, you know, as you can see, tools are a very crucial part of how we manage large software projects.
Now, on the other hand, if you think about AI, you know, like, can you really think of an example where AI has relied on tools beyond just an executor? I think these are very, very rare. And this is because using tools effectively is a very challenging problem. You know, if you think of an agent trying to use tools, they need to think of like what tool to use, they need to think about when to use the tool, how to set up the tool, how to adapt the tool, and then finally, you know, what happens when you run the tool and how can you go back to the code and use the results of the tool in a nice environment.
in productive fashion. The next challenge I'm going to talk about is interaction. So interaction is all about how we can design AI coding systems to interact seamlessly with us instead of introducing additional overhead. And to give you an example of this point, here's a representative example from a sweetbench. So there's an example that asks for a code base to support a new input file format because there's just a lot of data in this new format.
And so when seeing an issue like this, a seasoned engineer would say, okay, you know, I want a new data format, I want to implement both a read function for the format and a write function for the format. But instead, you know, what models do is they actually only implement a read function, making it almost impossible to write data in this format. And so this highlights a common issue when working with coding models. We give vague specifications that may be clear to another human, but the model interprets things another way. And because language are in code or at different levels of abstraction, it's impossible to us to always specify things 100 % precisely.
Beyond that, I believe a bigger challenge is that today's human AI interface is very restricting. And to see this, actually, I'm going to draw an analogy to driving. In the previous decade, cars increasingly had new mechanisms like cruise control, collision warning systems, and so on.
And each of these enhancements actually marginally increased the experience of driving. But then very recently we had self-driving, which I would say is the real paradigm shift here, which is a completely different experience. And with self-driving, all we have to do is think about, I want to go from point A to point B, and then I just have to monitor the car to make sure the car is actually going on the path from point A to point B.
And I think actually AI for code is at a pretty similar point here. Today we have these little IDE enhancements that can complete our functions properly, but soon I can imagine a world where AI is doing all the scaffolding. I think we will have this self-driving car moment in AI for code, and I think that's why we should really think about the design of what this might look like and how we might get there.
Finally we're going to move to measurement. What is the right way to evaluate these AI for coding systems? You might say we have all these benchmarks, human eval, suitebench, etc. etc. But I'm actually going to argue that these aren't necessarily the benchmarks that we want by telling you about three major problems I see in today's coding LLM evaluations. The first is task diversity. You've seen this figure before earlier I talked about all these different tasks that we have in software engineering.
But if you look at all the benchmarks we have, it actually looks more like this. It's very dominated by co-generation benchmarks. And I would say that is actually not a coincidence. Co-generation problems are easy to source, easy to evaluate, and so we've gone after them. We've been trying to solve simple function level tasks, human eval, MBPP apps, live code bench, so on. But now that models have actually began to saturate all of these, now it's time to be deliberate about how we evaluate our models. Instead of generating code in one go, maybe future AI coding systems need to tackle more complex tasks.
complex tasks generate test cases refactor code formally verifying code and so on the second issue is contamination right there was a time a few years ago where people claimed their models could solve competitive programming problems but then as a community we realized like we try some older problems you try newer problems and we realized the performance on older ones was actually much better than the newer ones and then we have this hypothesis that's like you know older problems are probably showing up in the training data and that's why we can solve them rather than actually being able to solve them
And so similarly benchmarks like SweepBench are also sourced from openly available GitHub data. And so I would say a lot of the solution patches are right there on the GitHub page. So when a model solves a SweepBench task, you know, there's many explanations as to what could be happening here. So we need to be very careful about the

happening here. So we need to be very careful about the conclusions we're making. But beyond these, the biggest challenge is construct validity, whether our benchmarks are really measuring the desiderata that we want from them. You know, automated unit testing, very nice, very clean, but there's so many things that can't measure, like let's say multi-turn co-generation, writing code that's clean and maintainable, and so on. Like SWEbench, we might actually be less interested in whether the models can solve them autonomously, but rather whether they can solve them after a human goes in and gives them some feedback with a little bit of hand -holding.
Like in the astrophie example before, you know, where the model couldn't implement both read and write, it actually knows how to do it if you tell it to do it. But it's the vague specification that was the issue there. And I think like being able to integrate, you know, can we integrate this level of human feedback into our evaluations? And I think that's why it's kind of hard to think about the research questions because we don't have evaluations that are independent of some of these confounding factors. So now I think it's time to take a step back and talk about how we as a community can start moving forward.
I'm going to talk about some ideas I personally have for mitigating these challenges, but of course the fun part is that all of you will have your own exciting ideas for how to address these hurdles. So we're going to break these paths down into data, training, and inference time approaches. So let's start with data collection.
There's a general concern from the coding LLM community that we've exhausted all the data on GitHub and we start to need to turn to annotated and synthetic data. And I think this is a very valid concern, especially if you're just looking for more raw code tokens. But a big untapped source of data, I would say is actually all the programming language tools that we have access to. Now we have decades of programming languages research that has led to software that can do static analysis, program instrumentation, dynamic analysis, formal verification, and so on.
And so on. And I think all of these can be used to augment and annotate the code that we already have. Earlier, we talked about how the models have a poor semantic understanding of code bases, including, you know, these semantic property annotations. If we put these into our code bases and our training data, I think we can really improve this. And so I would say another rich source of data we can obtain is high quality synthetic data. And here we can even do large scale sampling and use these tools to kind of filter and leaving only the data that we still want today.
Now turning to human data collection, I think this is where we really need a big community effort building open source platforms that can really produce these open source data sets. You know, many companies like Google, etc. have instrumentation in their IDEs that can capture these fine grained developmental data. So user edit sequences and so on. But also it's very unlikely this data is going to be shared among, you know, these competing companies with their own incentives. But this data is very crucial when trying to train models to do things that are beyond just automated things and including user action.
actions. So let's say this open source platform, you know, if somebody wants to do it, it could very much allow users to submit challenging tasks, capture data like how humans interact with models, and so on. And I would say that this is this is the data that's very hard to source automatically. And I think that's why it could really make a difference in training the next generation of coding models. Now I'm going to highlight three promising training time approaches.
So the recent successes with reasoning models should really be a wake-up call for using this RL with verifiable rewards. And because software engineering is a domain where we can clearly extract signal and clearly extract reward, I would say it's natural to try to push this and see how far we can go. The biggest bottleneck today is designing environments where we can really execute code arbitrarily, especially in languages beyond Python.
However, having these executable environments really unlocks this treasure trove of prompts and rewards for diverse tasks. For example, if we want to run R1 code optimization, all we have to do is take a bunch of different versions of the same piece of code, make sure they all pass the tests, run them through a profiler, and then we get the speed up. We can start to use this data for our loops.
While being able to execute everything is ideal, you know, I would say it's relatively unrealistic. Right now we just have maybe some subset of Python that we're able to execute. And so the question is, you know, can we develop good proxy rewards rather than being able to execute everything? Similar to how perplexity, you know, is just training on negative log likelihood, we're already able to see incredible progress in here. And so I think using information like abstract syntax trees or static analyzers to design these reward functions could be a very fruitful avenue for exploration as well.
Because almost every company has their own code base that's changing every day, it's crucial that we find new algorithms and techniques to deal with these low resource and API updates. One high level idea is to adopt test time training or prompt and prefix tuning to these new code bases. And so here we can borrow techniques from continued learning literature in order to try to learn how to do these low resource code bases.
Prompt and prefix tuning I would say could be effective when it comes to version updates. For example you can try to train an embedding that corresponds to every single version of some API and when it's time to deal with that version we just embed that prompt and append it to the input representation. Another idea to deal with these low-resource domains is to keep a knowledge bank of information about the domain. So this could include documentation, co-snippets, usage patterns and so on.
And taking inspiration from a work called DreamCoder, I think something we could try to do is to continuously search for new primitives and programs that implement these common functionalities. And then we can update the knowledge bank until we find more successes. And I would say in this case, we can start to bootstrap this kind of general model for a code. When it comes to collaborating with humans, I think we really need to teach our models new capabilities and behaviors rather than just allowing them to have what they have today.
So you might ask, what are these new and interesting behaviors? Well, earlier we talked about how specifications can often be vague, right? And to mitigate this, we can imagine augmenting these human specifications with formal specifications and test -based specs as well. So you can imagine like models can suggest tests, they can suggest formal specifications based on user queries.
I'll say that right now models are actually relatively poor at this. So in this case, would you try to generate a different mode specification and varis for a ring buffer and queue function? It actually lacks many of the required conditions such as before and after the enqueue function, the elements are actually the same.
Beyond specifications, I would say a coding agent should be able to know and quantify various sources of uncertainty when writing code. So this includes uncertainty from the user's vagueness as well as its own capabilities. If a task is too difficult, I think the AI should identify that and communicate proactively rather than pretending and just coming up with a program and saying, you know, here's the result. If there's multiple ways to implement something, I would say the model should also try to identify the trade-offs, clarify with the user before just giving it a result.
And be able to do these things, I would say, as a combination of both instilling these capabilities into the model and also steering them to show these behaviors. Finally, I'm going to conclude with four inference time approaches and you'll notice the theme with these approaches, it's to really make use of the unique properties of the code domain to improve LLMs compared to what we have right now in text.
There's actually a lot we can do beyond just scaling data collection. So first, you know, before we mentioned how our retrievers are struggling to find the semantically relevant code and retrieve snippets during generation. And so we can consider, you know, why don't we find new ways to find semantic aware embeddings? For example, by using an executor and then adding a loss term that forces semantically similar code to be close in embedding space. When it comes to retrieval and NLP tasks, we primarily train retrievers in this black box setting where the retriever and the pre-trained model are tuned independently.
And this works fine when it's easy to use the retrievals during generation. But in code, actually learning to piece these retrievals together is a complicated reasoning task on its own. And so I think it makes more sense to jointly train the retriever with the generator. And because keeping a retrieval database can be difficult and expensive, I think this is where on-the-fly code navigation could actually really help. So if you want to retrieve something, you can go to a terminal, you can try some commands like ls, cd, pwd, see the directory, see the AST, and then based on what you see in the directory, you can start retrieving what you need on the fly.
There's also a big opportunity here to integrate AI tightly into SWE development frameworks, including automated code review, risk assessments, and release notes. We can improve AI by learning from software engineering research. So for example here, CWE is Common Weakness Enumeration. It's actually a set of code patterns that's commonly known to lead to vulnerabilities and security issues. And so I think it's very interesting if you try to use these as negative signal during training to see whether you can prevent models from generating insecure code.
Similar to integrating with software engineering research, there's plenty of programming language advancements that can be integrated, such as abstract interpretation, model checking, or even type checking. And one example of this, let's consider optimizing a program into a more efficient one. So a promising approach for this might be deductive synthesis, which starts from a clean and correct implementation. So once you have a clean and correct implementation, then you can start to apply rewrite rules and convert it into a more efficient one.
So the appeal of deductive approaches here is that because these rewrite rules are semantically guaranteed to be preserving, this is the correct by construction guarantee. And so a success story of deductive synthesis is called spiral, which is the DSL for signal processing kernels. And it tries to take advantage of these domain-specific transformation rules to produce implementations that are able to beat expert handcrafted code.
And so you can imagine here that an LLM learns intuition about which rewrite rules might be able to apply at every given point, and this will prune the large search space that's required of traditional search techniques. And finally, when it comes to interacting with humans, I think we should ensure that AI coding systems really make it easy for us to guide and monitor their actions. And one way to do this is via contextual information, such as enriching AI-generated code with summaries or test cases to enhance interpretability.
And another tool here might be interactive approaches like live programming, where you have runtime information, runtime values. You continuously display them to assist in error identification. So despite the remarkable progress in AI for software engineering, today's models still struggle immensely when it comes to data, scale, interaction, and measurement.
But I would say there's many promising ways to address them. And so I hope that through our discussions of challenges and paths forward, I spread a bit more optimism and inspiration about the exciting frontiers in the field that are still remaining to be solved by all of you. For more examples and an in-depth discussion of everything we talked about, feel free to check out our paper tinyurl.com slash AI for code. And of course, if you're interested in pursuing any of the directions that we mentioned today, please reach out and we're very happy to collaborate. Thanks a lot for listening and I'm happy to take questions that you might have now.

Hi, my name is Arin. I'm from Danics. Uh so my question is that you talked about how c uh code is much more difficult to perform a semantic uh retrieval on compared to text. So could you talk more about uh why is that the case when we have uh quite a bit of code data available maybe not as much as text, but still uh large abundance of code data and like how can we tackle that challenge?
Yeah, so I think one reason that, you know, code embeddings aren't as good as text embeddings is due to the way we train them. For example, if you think about training code, it's mostly trained autoregressively. You know, you take all the GitHub data, you put them through, you know, NN out loss, and then you end up with embeddings that are, you know, kind of aligned with what the model is able to learn on its own. But I think like, because for code, you know, it's very semantically driven, because even if you have one token that's different, you get something that's completely different. Whereas in most sentences, if you change
arbitrary tokens, you probably get something that's still relatively comprehensible.
And so I think in terms of improving it, you know, one thing I talked about is trying to use the execution information during training. So maybe contrastive learning could be something that's useful here where you have multiple snippets of code where they do the same function semantically and maybe you want to try to get them to be closer in an embedding space. And I think it's still very unexplored what these semantic embeddings really, you know, what they might look like, what current embeddings currently contain, but I do think there are many ways that we can start to use this information.
and train better retrieval models. Uh and uh would you say that the better way would be to again uh train embeddings in a uh different way or to uh make solutions that are more engineering focused compared to more uh, you know new training paradigm focused?
Yeah, so I think there's multiple ways to approach this. You know, you can think of like different pieces of code that are semantically equivalent. You know, there's some previously I talked about modularity and code quality. You can think of different pieces of code that some of them are better in terms of quality, some of them are worse. Maybe, you know, what you want in an AFR code model is you don't even want those, you know, worst pieces of code to be included. You know, and so maybe you want to completely exclude them from the distribution of code that's able to be generated. But, you know, on the other hand, you can imagine you want a model that if that
if that piece of code does appear, you want it to understand the piece of code. So you can imagine having all this horrible code, but you still have a good semantic model of this code. And I say if you want to do that, maybe you want to take a bunch of pieces of code there, you want to like see terrible code and good code, but these have the same execution behaviour, and you want to learn embedding so that these pieces of code are end up being equivalent in embedding space. We have time for another question or two.
I have a few questions but Yeah, shall sure. we ask only one today? Uh you you mentioned a lot of different uh some odd directions. Yeah. Uh-huh. And uh, you know uh of course this is uh all very interesting. But if we will need to pick only one of them, If I what were do to pick you think would be the one that gives us uh some odd biggest improvement?
I think it's very hard, you know, I think I personally do believe that a lot of data, especially human annotated data is able to give you a lot of progress towards AI for code. I think right now these models don't really have a good human intuition of like, how do humans perceive that the edits that they're generating is able to be processed. So I would say the human data collection effort is, I would say the one of the ones that are really able to kind of show us, you know, now if we have all this new human data.
than how far can we go with AFR code models like if we train on a bunch of code edits if we train on a bunch of tasks that are beyond just code generation you know if we have all these potential improvements that are beyond what we have I think it's you know then we should probably evaluate like once we have all of this data if we have another like
millions, billions of tokens if we train on that and that's like high quality human generated data then we're you know well what are the limits of the new models after we train on all of that so I think you know there's a lot of that information that we currently still don't have and that's why I would say that's one of the most important directions. Thank you.
Yeah, thank you. Thank you. Uh great talk. I wonder if you have uh some thoughts on the human and AI interaction. So Mm-hmm. I think today we've we heard about five coding and then I think this is published something which goes a bit more beyond five coding uh where where do you think this is going and do you have thoughts five years from now? What what will it be like, the interaction between human and AI?
Thanks. Yeah, I think in the ideal world, you know, personally for me, I really don't want to deal with a bunch of low level details, but I do want to still have complete control over what my code produces, right? So I want the code to have this functionality, I want to be able to monitor how the code's written, I want to like understand all the code that's written. And I saw and I say that, you know, similar to the self driving car example, maybe what will happen is that the IDE will say here's the outline, maybe take a look, does this look good? If I say yes, then it will continue saying.
saying okay now here's the new structure I have this new outline and then I'm going to start implementing things in various ways you know maybe there will be some decision points where it will show me the algorithms that I want to implement I will say do I like this do I not like this etc so on I think I still want to have control over these parts but I do think you know we need to move towards five years in the future probably we'll have something that's way more autonomous and is able to drive the way that we program rather than having us still being steering everything and saying like you know implement
implement these these these functionalities. And I still needed to check debug and so on. So I I think that's kind of what we're heading towards. Thank you. Thank you for the great talk. Yeah, thank you for listening and for all the great questions.
Verimotto will give a remote talk. And is a Stephanie Druga, a scientist from Google Germany. Before working at Google she has been working on the University of Chicago and at University of Washington. Today she's gonna tell us about a topic that we already discussed in a few of the talks, but uh you know we didn't really dive deep into and uh we
She's going to tell us about the future of multimodal applications. Hello, can you hear me? Okay. Yes. Hello, I Hi, do you hear us? can hear you. Can you hear me?
Yes. Wonderful. I'm going to try to share my slides and hope that that works as well. Can you see my slides?
Wonderful. Hi, everyone. I'm Stefania. I'm so glad to be joining you today remotely from Tokyo, Japan. And thank you so much to the organizers for inviting me. I have a lot of things to go through, so we'll see how much we can cover. But yeah, I really hope to have some time for questions at the end. And I'm glad to come after Alec's presentation, which was fantastic because I'm going to reference some of the things he said.
So today I'm going to talk to you about the future of multimodal applications with code. And let's start by looking at some existing code support applications. So here is an example from Cursor. On the left you see is like the IDE where it's like our code editor and on the right is the chat where we kind of give instructions to the model to support us with code generation or kind of code understanding. Similarly in WinSurf.
We have the same type of interface and workflow. It starts from the IDE. We have the code editor on the left and then instructions in the chat on the right. This is like WinSurf now has a cascade mode where they actually map like your entire repository and then they can edit multiple files at once. And also we could have the execution and instructions in a terminal window at the bottom.
Other type of tools that are code support applications like Replit here focus more on the execution so like the primary real estate on a screen would be like the output of the application that the user is trying to create and instead of having like a code editor most of the instructions are sent by a chat to this agent of course the user can see the code files and edit them if they want to but that's not the primary kind of
interaction mode that this tool is designed for and this is similar to devin v0 or bolt which are other type of like agents that are designed for co-generation support
Prime tools like Gemini and Anthropoclod and of course ChatGPT have now canvas mode. So oftentimes when people ask code questions where it opens like this code editor which has both
the ability to be edited and also show us a preview of the execution of the code so we would have the instructions on the left and then a coded editor and execution on the right and in tools like Colab and this is actually part of a project that I worked on early on in 2021 at Google X Google moonshots these things are interleaved in Colab right so we have both coded editor cells and instruction cells and then execution cells and we can go back
go back and forth. So I'm sort of alluding at what are the building blocks of existing codes for the application and by all means this is not an exhaustive list and it's not complete but it's just to kind of guide the discussion.

but it's just to kind of guide the discussion we're going to have today so we've seen like we have like different types of code editor they can be text-based or flow-based or visual programming which is something that I worked on we have different ways of passing instructions this could be via chat or in editor rules like
We've seen now with WinServe and Cursor and VS Code, like people create this editor rules to kind of guide what they want the model to do, if they want the model to always write tests or like have certain like syntax checking. Oftentimes people have projects specs that they create, especially for LLMs that they include in the repo. So that's another way of giving instructions or adding screenshots of the execution of the output or different other types of.
of things that they would like the model to reference.
Another building block is execution. So we've seen in the Replit example or the Canvas example, oftentimes some of these code support applications are rendering the code, rendering an app, or we see the output of the interpreter, right? Like it runs the file and it tells us what the execution look like. Or it has tests, it can write tests and tell you if the code passed the test or didn't pass the test or what was the result of the test. Many of these tools have different ways of doing.
Doing grounding either with online search or local search by looking at the logs, by looking at different execution traces, by creating a knowledge base of user preferences. Devin, for example, is very good at doing this.
taking screenshots in real time while trying to implement different features and then there's the context right and the grounding and the context are interleaved quite often in these tools so for context like it's not very transparent what these tools take into account but we know that they look at local files we don't know how many or like which local files we know that they are looking at the current file
The name of the current file, the history of commands oftentimes, wireframe, screenshots, or the program state.
I'm going to show you three examples of multimodal apps that I built for code support and kind of walk you through my decisions as a tool designer and a researcher in how I use these building blocks that I showed you before. So we're going to talk about a case study in visual code support for youth, one that is like a science lab assistant and one that is a tool for detecting math misconceptions.
Let's start with the visual programming support. So Cognimates is a platform I built in 2015. It was the first AI education platform for youth, so seven and up. And it was meant to teach young people how to program smart games and train their own AI models. Like at the time it was machine learning classification models and they could use this custom classification models in their coding programs.
Why did I choose to do this? There's over 100 million children using Scratch globally.
I was part of the Scratch team during my master's at MIT. And I saw like back in 2015, voice assistants were becoming part of young people's lives. So I wanted to provide them a way to program these voice assistants and smart robots and smart toys and also like understand a little bit more about how this technology works. So here's an example of a Cognimate project.
In this program that Tiana here built, like it's a simple hide and seek game and she created this game to play hide and seek with G-Bot, a robot that is sitting on the table. So just in a couple of blocks, like she could create a very rich interaction. Of course, like there's a problem with this program. I don't know if anyone in the room can shout what the issue is like with this program.
And I can't see you. So like, this is going to be, I'm hoping someone is saying something. But of course you want. Yeah, sure. That would be great. And if you could pass them the mic or just tell, tell into the mic what they're saying. So how many times like she wants to play with the robot hide and seek all the time. So how many times like is this program running?
I'm going to give you a clue. Any hints? Okay. Yeah. So spoiler. Yeah, there's a for loop missing, right? So she could only be like she wanted to play continuously with the robot. So she quickly realized that she needs to put this into a forever loop, which is one of the grammars in Scratch. And yeah, the platform has like visual programming blocks, a coding area and a stage, which is the output.
And I created a library of 18 extensions. You could think of them as APIs to allow young people to program anything from their Alexa to their smart lights, like different kind of robots, use off the shelf image classification or sentiment analysis. And of course, like I mentioned, there was this training page where they can train models with their own examples of images.
or text or sounds and at the time like in 2015 I was using transfer learning on top of the Watson API from IBM today I'm building a new generation of the training set with like on top of the Google stack which is different but it's the same kind of user interaction and flow so
Let's keep through this. After building Octimates, we tested it with young people in after school programs, in public schools, private schools, community centers in the Boston area. And they engaged in training their models, making programs with these custom models and kind of testing and refining their games. And what we found after they did these activities during six weeks is that it really supported children to get a...
a more critical understanding of AI. So by being able to kind of engage in this scientific process of formulating hypothesis about how Alexa works or how Jibo works and actually test those hypotheses in their own programs with their own custom models it allowed them to refine their understanding around how some of these predictions are made and we asked them questions around intelligence attributions for AI devices before
before and after and we saw a significant difference in them saying that you know Alexia is smart or Google Home is smart before versus after. This is I'm going to show you a very quick video to see kids in actions using the platform. Let's hope this works. So we were programming robots You could play rock, paper, scissors.
Okay. You did rock, paper, scissors into the camera, and on cute you did one of the motions, and the camera did one of the motions, and it's like rock, paper, scissors, shoot. The computer gets like better as you play the game, because like us, we might not know everything at first, but if we keep trying, we get better.
Everyone has heard about like machine-based learning or artificial intelligence and there was a sort of no questions asked for a lot of the more tech savvy parents was like go for it. Technology is going to be a huge part of their lives much more so than my life. If it's scary for some people, this AI technology, I totally get it. But as a parent and as a teacher, I thought it was really important because these are skills that 21st century kids need to have. When my dad was young he bought a car and
Tick-tock to see how it worked. So you teach people that young how these things that grown-ups mostly program how it works.
And of course, you know, like this analogy of like taking the car apart made me think of the driving and self -driving that Alex was talking about. But the next step for Cognimates was to really make it work for families and parents as well. And during the pandemic, I had the opportunity to work with families all over North America in 10 different states and actually see how they would like to learn to program together.
And how we might support that with an AI assistant, right? So before going ahead and building the AI assistant, the first thing I did was to actually study what these children and parents expected from the AI assistant when they engaged in creative coding. And for doing that, I actually created a Wizard of Oz study, which is like...
pretending you have the AI is actually a person it was me and engaging with the families in different programming tasks and see what sort of questions they ask and what are their expectations of the AI friend of course telling them at the end that the AI friend is not it's a person and learning from this whole interaction in order to have a specification for how we're actually going to build that AI assistant.
What I found from the first kind of like design study was that children and parents really wanted to kind of have the AI friend help them generate coding ideas, like one of the big problem in Scratch and in coding for kids is like the blank slate, the blank page effect, like when you go to a platform and it says like you can program anything like it's really hard to know what to start with.
it was very helpful for the iFriend to kind of ask them like what are you into are you into sports or into music or like what sort of games do you like and or you want to do to really help them develop like some initial ideas
um they wanted the AI friend to help them express and elaborate their ideas in code so like what are the algorithmic steps like if I want to make a ball move or bounce like what does that look like or if I want to make a character jump something that was surprising like was that they really want

was that they really wanted the iFriend to support their creative coding identity and oftentimes that would come across through like a lot of affirmations like oh my god that was great what a nice effect well done and we saw the students participating in our study the kids participating in our study spending double the amount of time that they would normally spend programming as reported by their parents
It also encouraged joint engagement with the parents or with their siblings encouraging turn -taking, but it also didn't always work. So sometimes we really needed the parents to be in the loop like sometimes it was too distracting and we allowed the participants like to stop the assistant like they didn't need to use it and if we had participants that were really advanced in scratch or really had their game vision and they just wanted to work on it like they would stop the assistant and they didn't want to be distracted by it.
If we had siblings that were fighting over taking turn taking, over who's driving the coding, like, you know, the iPhone couldn't really moderate. And when there were more complex concepts like the concept of broadcasting in Scratch, it was difficult to kind of like explain it. There were too many steps involved.
So it was very helpful to have the parents there in most of the cases when the AI friend couldn't do it. So once we had like our four scenarios in which the AI system could be helpful for kids and parents in coding, we went ahead and created a benchmark. So we created...
50 scratch programs that where we wanted to test all existing state-of-the-art models large language models to see how good they are at code explanations like supporting with idea generation and supporting with debugging and these are these were the results it turns out that most of the this was on GPT -4 and
one of the early versions of the Gemini models like it turns out that most of the state-of-the-art large language models are pretty good at understanding scratch programs and supporting anything to do with scratch programs so
That was reassuring because my initial approach was to use program synthesis and create my own grammar and have like SMT solvers, which was much slower. So now that we saw like that we have like good enough of quality for large language models for the type of tasks that we want to support you with, I went ahead and build the co-pilot in Cognimates and this is what it looks like this.
It's going to be presented at IDC ACM conference next month.
And after building it, of course, like I tested it with kids all over the world. So this was tested with 20 kids from 11 different countries and the co-pilot were accessing all the major languages. So as you can see on the left is like the code editor and output and on the right is the section where kids can give instructions, but there's also execution like where the AI assistant can generate some of the.
images or generate like analysis of their code images. This is the architecture of the copilot so there is the code editor and the AI chat, a web server where we keep track of the messages and the responses and we're using AI services for LLM support, Gemini 2.5 and for generating art and for this one I'm using Imagine.
3.0 and this is an example of like a situation from the evaluation study with a student from Mexico where it's like trying to program an asteroid game and is able to kind of interact with the copilot in Spanish and get support for for his game and what we found from this evaluation from the 18 participants is that
There were lots of evidence of the co-pilots supporting them with concepts, like helping them generate project ideas. Also with designs, like help them design like new images for their backgrounds or their characters, but also with code. And it was created a Socratic assistant. So the assistant, the co-pilot is not giving them the solution, it's asking them questions so they can figure out the solution.
themselves so it also provided positive encouragement it helped them with platform navigation like if they were very new to scratch or they never programmed in scratch before like it would help them know like how do you start the program like how do you upload a new character like how do you find this block
um but there were also instances where it was unsuccessful uh either because like the question was too fuzzy from from the from the child or because it just didn't understood the intent um and we've seen evidence also where children really got the opportunity to express like take take into stay into the driving seat and like have their agency um be respected like where they refuse to use the uh suggestions or
or really got to like decide what was the direction of the program and what they wanted to do. Here are some examples of code support. This is a student from Jamaica who never programmed in Scratch before and he was able like during 40 minutes to...
collaborate with our copilot and actually from the beginning with no no assistance like learn how to use scratch learn how to make his first programming scratch to make the character on the screen say hello and talk to him
um it was very helpful you know for very beginners here's an example from a more advanced scratch user where um he could actually use the copilot to generate like a whole suite of characters and code um to a more complex like basketball ball and in this example is like how it provided conceptual and design support like one thing i didn't expect was that kids would actually use it to generate characters ideas or like
like plot ideas it was pretty good at that too and as I mentioned earlier it prioritized an encouraged youth agency so if in this case like the user is showing an example of code
and the copilot gives a suggestion based on the example of code and it says like oh I actually don't want to do that type of movement so it's like no really no problem go and enjoy your game and if you need help just just ask me I have a video demo I'm going to skip this for an interest of time but the copilot is live and online so if you want to try it you can sign up for early preview at this URL and just test it
Peace. And it has like it allows users to create images. You can ask the question either by typing or by speaking and it works in lots of different languages. Now, a lot of the insights came from this evaluation with youth worldwide because one of the things that they
would like is to have automatic new libraries. So similar to the extensions that I built early on, if they want, let's say, to make a game about creating sounds or creating new type of songs, they would like to automatically have a new library that allows them to interface with, let's say, the Suno API that would allow them to do that and have the right constructs, the right primitives in order for them to program.
soon a sound generation in the interface. They also wanted to have the copilot be able to move blocks together with them and delegate like maybe I want to do the Pac-Man and I'm going to ask the copilot to do the ghost game. In terms of the assets generation they wanted the assets to be generated directly in the interface rather than in the chat.
And this came up several times, like they really wanted to see simulations. So they wanted to give like a task examples like program goes chase Pac-Man and see like five different co-pilots taking a stab at this task, right? And maybe for them to give them different inputs, like maybe the maze looks differently or maybe like the number of ghosts is differently in each of these scenarios or but they want to.
to actually have a coding system that is in operator mode that can go on the web.
and take all the actions that they are taking in the platform and be able to kind of observe how this operator coding assistant is doing that. There's like new custom training coming as well in this new version where I'm allowing kids, I'm enabling kids to train with their own data, but also use synthetic data. So for example, like generate quickly like accelerometer data that could simulate walking.
so they could train a model that detects if they're walking versus running with a micro bit, for example, or for sounds or for vision or for text training. And now we'll switch to the other example. And so from co-generation, how do we bring this into the science lab? So for this, I built an assistant called KimBuddy.
And this paper is in proceedings for WIST. And this one is actually...
multi -modal like even more so than the scratch and the co-occurring mate co-pilot it has like a camera input where it's the lab view so in real time I can take pictures of what I'm showing to the screen that camera can be a microscope as well like any webcam can be transformed into a microscope it's also connected to Jack that which is a version of microbit that allows microbit or like microcontrollers to connect
to connect very easily plug and play to all sorts of sensors like temperature sensors light sensors co2 it comes up it comes with recommended experiments and then it also allows users to create visualization like chemistry visualization this was done also for middle schoolers but you could see how it could be adapted for adults this is what this is

apps. This is what the system architecture looks like. So there are lots of different, there's the client side on the browser, which is the React app. It has lots of different custom hooks for the Jackdack and Microbit and for the webcam and the speech API.
User can talk to it or text and camera. The data from the sensors is being collected in real time. There's an integration with the Gemini APIs for analysis of the sensors, of the images, and for the generation of images. And what we found that is very helpful is that once you have...
An assistant that can access more information from the context in real time, such as the temperature, the responses to questions are going to be better. So if a user would ask something like, is this reaction getting warmer without actually having that temperature sensor data in real time, the lab assistant or a chem buddy would give a more generic response versus actually talking about their experiment that is taking place in real time.
Moreover, it allows users to kind of walk through interactive experiments like step by step and write down like what are their predictions and experiments, but also collect the data in real time from their camera or from their sensors. And when they ask questions, it's actually linked to a benchmark of science misconceptions from Mozart from Harvard School of Education. So it detects if the student has certain misconceptions about.
about chemistry, making a report both for themselves to debug their own thinking and also for the teachers and the parents.
It can also generate reports of the experiments that they're trying. Now, what would this look like for adding code support and kind of adapting it for adults, right? So one could imagine that we could actually have it linked to a real-time bacterial growth monitoring and then it tracks the light sensor data in real time. This is based on the live data slope it would actually generate like
like all sorts of analysis and give suggestions to the scientist on what steps to do next in their bacterial growth monitoring if they need to increase the temperature or if they need to increase the light exposure so you could see how the co-generation could be helpful in that way.
The last example is for math. So together with my co -authors Nancy Otero, we decided to actually create a benchmark for math misconception because math is one of the fields where we've seen the largest learning loss during the pandemic for K through 12. So based on prior literature and collaboration with math teachers, we created this math misconception benchmark, which is public. It has over 55.
common algebraic misconceptions. And I created a tool that is using this benchmark to detect misconceptions that students might have about math in real time as they're solving math problems on paper. So the way this works is that you can capture
um in and it has to mode like the video is always on or you can take pictures by clicking a button you can capture your work uh and then it analyzes and it tells you like if you have any misconceptions or it asks you questions like about what you're going to do next in your math problem and you could do that by using your webcam or uploading images that you have on your computer similarly like it has like this
Real-time like front-end application in React, it encodes the images in base64, sends them to the Gemini API using the 2.5 model, it analyzes these images and based on that it retrieves like the matching to the misconception database and based on the misconception detected it provides exercises and feedback. So this is the user flow support in MATMIND.
You upload your work, you get some feedback. If the system identified a misconception, it would give you some exercises and support your practice time. It will also keep track of everything that you tried. So all the types of images that students like had as an input and conversation. And these reports are very helpful both for students, parents and teachers, but also for tool designers because they can be used for benchmark design.
I evaluated like the current math might implementation against like old open source models that support image input and I found that the Gemini 2.5 was the best at misconception detection.
But the LAMA performance was quite good as well. So LAMA 4 Maverick is a strong contender from the open source world. And in terms of evaluation, like here I use like 22 images of student answers and I analyze these images using the same system prompt I have in my implementation against like all these models and compare what they return.
The misconception is called they return against the truth label. But I also used a benchmark that allowed me to analyze the app along these dimensions like is it concise, is it clear, is it coherent, is the tone appropriate, is it human like, is it appropriate for the age that I mentioned in my prompt, does it have a Socratic approach which is something that I wanted to have. So I use this.
AI tutor evaluation that was created in particular for LLM AI tutors and it's available on GitHub I added the link and I added some new rubrics for the Socratic approach which is something that I designed in particular for my application and age appropriateness.
So in here you can see like, oh, the editor and context is actually in real time on paper. The execution is the detected misconception and then the instructions are actually coming in this case only from the model because the student is just like working on paper and talking in real time. It doesn't need to chat.
So I want you to like based on these three examples I provided to kind of think of like how do we mix and match these building blocks of existing code support applications when we work with multi-model applications and when there's like much more blurry line between the context and the instructions that we send the execution and I'll finish by sharing some exciting new domains to kind of inspire people in the room.
I'm sure many of you have seen this AI co-scientist paper from DeepMind that was just published and I think this is a very active area of research of like how do we use large language models for doing science and research and as co-scientists and my invitation is like how do we actually create AI co-scientists that are grounded in real-time empirical experiment data.
Some potential like cool applications to look at are like the framework from Hugging Face, Loro Bot, which have very affordable robot arms that could be used for having empirical real-time experiments. And of course, like lots of projects from NVIDIA and like Seed Studio. And across the board, like when we think about code support that is multimodal, like this could be either done in CAD for design support.
material science, low resource, rare languages preservation, cultural preservation, lots and lots of domains. I'm going to stop here because I think I am a time. All the papers are on my website and yeah, I will open it up for questions if there are any. Thank you so much. Any question?
Thank you for the presentation. Kind of a classic question, but how did you design these applications for kids while trying to ensure like their safety and make sure that the model doesn't say anything harmful to them?
No, it's a great question. All the applications have safety filters in place, which are using both the safety settings of the Gemini model, but also additional tests that I implemented. And this approach of creating a benchmark and making sure you identify what are the tasks for the benchmark and running an evaluation against those benchmarks for that specific application before you actually build it.
that was very helpful. for question from the room. Um I have a question if you don't mind. Um you have this assistant uh that the kids can somehow use to to create their own little programs.
And um did you consider like using the assistant to somehow make uh the interaction uh a little bit more fruitful for the kids and instead of only giving suggestion maybe also detect when uh certain uh examples or exercises are too too simple and get increase engagement basically uh with the tool.
Sure, yeah. I guess more fruitful in quotes is a very subjective label, right? Hey So the design and the current implementation of it being Socratic is based on what they wanted. It turns out that young people really want to be the owner.

really want to be the owners of their programs and their games it's like their identity is so tied to these programs that they're building and the games they're creating and they want it to be their game they don't want the assistant to to do the program for them oftentimes they would say that's cheating so the this kind of core design feature came from the initial design study and based on what they express they want I do think that there are lots of opportunities for
are having proactive support so like if there's if the agent you know like detects like okay the student is always like what was it three strikes like copying the code maybe we can help the student like figure out like how to refactor like the code and also the logic around that and
I think there's that's something that I've been thinking a lot about which is kind of what I hinted at like the more tightly linked integration with the platform so instead of having the chat on the side like monitoring what's on the stage in real time and providing kind of more hints and suggestions I think that's a something that is would be great and I'm actively working on implementing I would say that
creative coding and kind of like the scratch approach to coding is very different than traditional CS so the goal is not to teach them like what a variable is and what a loop is and that does happen but the goal is to enable them to fluently express their ideas in code and it's it's a
there's a tension there right in terms of the tool design of like how do we support them to have fun and create their ideas versus like how much time do we spend on kind of identifying what was called like code smells or like bad practices and kind of addressing that but it's a great question Thank you. Thank you very much. Any other questions?
Then let's thank our speaker again. Thank you for bringing a very different point of view to this workshop today. Thank you. Now we have the poster session. So please uh get your posters and uh, you know, people will be around here and uh there is also probably some coffee or something outside, but I cannot guarantee that.
Sorry, we start again with the next talks at at four thirty.





Obrigado. Tchau.



Oh









Okay, so it's my pleasure to welcome our last speaker, Baptiste. He's a research scientist at Maestro. He's leading the cold generation team and has released models like ColdStroll. And previously he's in Meta, contributed to Lama, also is a lead author of ColdLama.
And also, yes, I like focus on like a programming language translation work there as well. So please join me. Welcome Baptiste. Hey, hi. Thank you very much for the introduction. Sorry, I wasn't able to join in person this time, but I hope you will enjoy the...
and the talk I will give remotely. So yeah, I will tell you a bit about what we do at Mistral on code generation. First thing, why would you want to work on code generation? Probably at this kind of workshop you're already convinced and this slide is not really needed. But basically,
A lot of developers, about three quarters of developers are already using or are planning to use AI tools for their workflows and about the same proportion, so about three quarters as well, as a positive opinion about this kind of tools. And interestingly, professional developers tend to use tools more.
and have a more positive opinion about them. So yeah, basically there are tens of millions of developers in the world and they are already sold on the fact that they can use AI tools to improve their workflows and if you can make each one of them just a tiny bit more efficient it's a huge impact. It all comes from a Stack Overflow survey.
And a diff source case that you may be thinking of when thinking of tools for code is completion in the IDE. So the most basic use case is you type the beginning of your function like that, and you want the model to actually complete the function by implementing it essentially.
So that's an example of code completion.

of code completion. Real examples are generally a tiny bit more complicated because you want to use some context coming both before and after your cursor.
So here if we look at this example again you define the character called with Alice 45 and software engineer and if you type class at the beginning of your file you need to use this context that comes after the cursor and also the fact that you typed a class so that you want to implement a class and the model can understand that you need to actually implement.
to class that you instantiate in your main. So that's called infilling, it's something that has existed for a few years. And the basic idea of infilling is that
Because models, like generally the models that we train now are causal, so just using the context from before, they are not really able to fill any context in the middle, but you can just reorder your examples. So basically you can sample some middles randomly which are...
basically this section that you want to train to generate and you have the prefix which is which is what comes before the middle and the suffix which is what comes after this middle that you sample and you can reorder them to put the middle in the end
And there are basically two ways to do that. Either you put first the suffix, then the prefix, then the middle, or prefix, suffix and middle. We call them SPM and PSM to make it shorter. Both of these things work. The SPM version works a tiny bit better, probably mostly because prefix middle.
is a pretty natural kind of completion. It looks like what you see in other places while going from the suffix to the middle is a bit less natural. And yeah, if you do SPM, you can even choose to omit the middle token if you want to.
and just have suffix a special token for the suffix then the prefix at this time you can pre-fill it with well your suffix and your prefix and without any special token your model will just continue your prefix which is the same as generating the middle and yeah then
With that you can train it just as a simple causal network from left to right with a normal loss. So here in this example that we showed above, if you use the SPM format you will have your main where you instantiate a character.
And here you will have the class token for the prefix. And you need to generate the collector token and then to actually implement the function. So, codestore was mainly trying to be better at infilling. And another thing that's really important if you target code completion is that
Your model needs to be fast. Basically if you... So when you want your model to generate a completion in your ID, if you need to wait for this completion for too long, it's going to be useless because you will have already typed something else. So your completion won't even be shown. And that's why you need to answer queries in...
Just a few hundreds of milliseconds. So basically everything that goes above half a second starts to be too slow. And if you need several seconds to generate to completion, it is generally completely useless.
So there was quite a lot of work going to the new version of COTSAL that we released at the beginning of the year to also make the model faster without having like with better performance as well. So as you can see here on the RNS course and the RNS course for the copilot arena so for code completion.
We see new code style with better performance than the previous one and it also roughly at the same level as Claude 3.5 SONNET. It depends on the version of Claude 3.5 while being significantly faster so more than 200 tokens per second versus less than 100 for Claude.
Um, and it's, um, the best model of, um, this, uh, speed category. At least it was, uh, when it was released and among those that are tested by, uh, uh, the co-pilot right now. And, um, yeah, we also had very good performance on infilling benchmarks. So I guess that most of you will be familiar with human eval.
Here these benchmarks are created based on the human eval examples, so basically sampling some some middle lines randomly in human event and because it's human eval you also have unit tests so you can check the performance with facet one.
And so yeah, here you can also see that we have quite a nice improvement compared to the previous version. And it was mostly done by changing the parameters of our infilling at training time. So better choosing, well whether to keep the middle or not. Well, now keeping the middle while the previous version wasn't. And also...
The exact parameters on how to sample the middle. Then what you can do of course after pre-training your model and pre -training was as I said already enough for in feeling even though of course you can also fine -tune your model on real example for in feeling to improve it. After you can also
uh do instruction fine-tuning uh so basically if you want your model to actually answer queries and to uh work as a chat a bit like chat GPT uh you need to train it on a few examples um where you have examples of questions and answers and of course there is also things like RL with GPU afterward but I'm not going to talk about it right here
But here you can get this kind of examples, so cheaper to get preference data. So compared to getting humans to generate the function from scratch, you can generate two examples and ask annotators for their preference, which will be much faster for them, so cheaper for you.
So you can get a more than 10 data and if you do it really on policing, it's going to improve your model a lot. After it has already been trained to start answering queries. And another thing that has become more popular also more recently is that you can get automatic preferences.
with judges that are based on execution. So an example here is that so here both of these responses are correct just that the first one is more optimized because you stop at the square root of X instead of going from 2 to X in the for loop. So basically
The first response is both would pass unit test, but the first response is faster. And that's something that you can notice automatically if you have a test bench that can test for both the speed of the generated function and the correctness. And then you can know that you will prefer the first response to the second one.
So that's something that's even cheaper because even though it uses some CPU time, basically here getting the preferences is almost free compared to getting a human to look at both of the solutions and giving you their opinion. So that's something that's been used a lot more recently conjunction to RL.
to make sure my delimeter at generating correct code.

Genotyping like code and also a genotyping faster code. Another thing that you can train your model to do with instruction fine -tuning is tool calling. So here I'll show you an example with the code executor so you can give a spreadsheet as a CSV as input to your model here.
And then you can ask some questions. So like here we were first asking the model to remove the incorrect entries from the data set. So it would be the ones where the pediatrician count is negative. And then the model can also generate more code to answer simple queries such as what is the most or the least busy streets in Melbourne.
A data set was about pedestrian counts on every street in Melbourne. Then you can plot a trend toward the months of December for all of the streets and the model does it and shows you the resulting plot as well. And then you can also ask for a link to download the CSV.
And so here basically the model generates code and generates it in a format when the code can be called automatically, then can get the output and answer queries. Another example of...
agent, this simple agent that can already be done with our system is a SQL agent. So we have actually a cookbook online on how this one worked. So you can basically define new tools using just a few lines. And because the model was trained to answer queries using quite a number of tools.
And can actually generate quite well zero shot. So here, basically the only thing that you can, that you can, that you have to define is while the tools that the model can use. So here, a tool to get a SQL schema of a table, you also give a description and some properties like
the type of tables that the model can request and we can also give like a bigger description basically telling the model how to how to call this tool exactly. The second function is run SQL query and here you can see that the there is a single argument SQL code which is a string.
and a SQL code to be run. So this is pretty simple. It also comes with an addition to the system prompt. And basically something as simple as that already allows you to have a code assistant for SQL queries. So here, if you add this and you of course implement these tools to connect them to your database.
Then you can have some queries like what is the shortest song that you two ever composed and the model will be able to call the tool to get the artist, album and track tables and then to actually run the proper query to get the answer. So afterwards he...
result of the tool is extracted passed to the model and the assistant is able to answer based on that so okay want to take a step back a bit and to talk more generally about different types of agents and different levels of autonomy for for code agents so
As I said, the level 0 is just, okay, so this is wrong, I meant to generate code in plain text. So basically, the level 0 will be things like code completion, where you just generate some code.
And the model is not able to get any extra context, like anything extra to what is given by the user. It's not able to execute the code either. It will just generate things in one go. So it's like ChatGPT at the beginning, things like Copilot at the beginning as well that were just generating the code.
Then for level one, and I think that the two examples I've shown you before were part of level one, you can also do some tool call to get some context and in order to answer a query or to propose a change to a database.
The SQL example is an example of that because here you're getting the schema of three of the tables in order to know how to generate the query afterwards to be able to answer the question. And it's also the case for the code agent using the code interpreter, even though they were.
a lot of interactions with the user and each of the... like basically the agent wasn't paying autonomous because it was always giving an answer and waiting for some feedback on other question from the user but it was already able to use the CSV that was given as input and generate some code to get more information in order to generate the proper graphs on.
on sales records and I think that some assistance between level one and two so level two would be about making larger modifications involving several files or implementing some pretty simple and short projects from scratch not necessarily
with perfect accuracy. But I think that already quite a few tools are able to show some level two capabilities. For instance, the decoding agent in Cursor is able to do larger modifications. It doesn't always work, but I think it has a relatively reliable accuracy.
And also tools like Vercel Visual are able to implement pretty short projects from scratch. Level three will be, in my opinion, mostly about improved reliability. So that's being able to solve any task that will take less than a day for one person with a lot of testing that will make it very reliable.
So basically compared to level two, you will be able to just run the project in the end to check that it's working, while right now, unless you are doing that for a very simple project, you also need to check yourself the result of your model after each simple modification.
And level four would be being able to solve very complex tasks that require entire teams. So, for instance, code S3 from scratch or code a new ID from scratch. Okay. And so to get there, I think there are basically two main components for code agents.
The first one is an edge-end scaffolding, and what I mean by scaffolding is a set of basically prompts and also a set of tools and back-end for these tools, and also retrieval systems that allow you to take a model and make it into an agent. And I think that generally when we think of agent companies and...
And at agents, we think mostly of specific scaffoldings. So for instance, cursor as a specific scaffolding. DeVine is also a specific scaffolding for models. And I think that's, it's pretty clear that the scaffoldings have quite a big impact on the capabilities of code agents.
Um, so most of the improvement, um, on the three bench I think came from a better scaffolding at the beginning.

a better scaffolding at the beginning, and now we are seeing that a lot of it also comes from the model again. So yeah, second, the second component will be the model of course, and here it's not really clear what makes a model good at code agents in general.
But it's pretty clear that some tools, at least for some of the tasks like to improve on sweepbench and solve issues on GitHub, it's pretty clear that being able to use Bash correctly to explore code base and to make modifications or being able to use some custom tools for file edition or being able to generate GIFs.
Also being able to generate unit tests to check that your results are correct or to reproduce a bug. And of course long contextual call because code agents, especially when the task becomes more complex, often require very long context, so easily in the hundreds of thousands of tokens.
And you should work on models for code agents, which is what we do. Basically the way you can test your models is by using open source scaffoldings. So two of them are especially famous, OpenHands, which has basically a very generic bash tool that allows you to explore the code base.
and a custom tool for file viewing and editing and a three-agent which was created by the creators of SwiftBench which has a file viewer which allows you to open a file and to explore it and so a specific search tool for exploring the code base and searching for a specific file or specific content in a file.
and also a file editing tool which has some specific logics or in a sense to always do automatic linting and to only validate the changes that's for which the linter passes. There are also other scaffoldings of course. One that's...
One that gathered quite a lot of attention was agentless, which basically allows you to get pretty good results on benchmarks like SREBench with models that cannot really tool calls themselves. So it's basically a scaffolding where you prompt the model from.
a few of the skills that are needed to solve an issue in a code base. But the model doesn't decide itself when to call a tool or not call a tool. So it works very well, but it's maybe not as generic and generalizable as the others.
And for training methods, the simplest one is to do supervised fine-tuning on successful trajectories. So basically, you can take your model and if you have a data set, you can try to answer some queries on your data set. Then if you also have some unit test allowing you to check if the trajectory is successful or not, another method to check that.
It allows you to just filter out incorrect trajectories, keep only the correct ones, and you can train on that, which is simple and efficient. But something that, of course, a lot of people are talking of doing and actually doing right now is doing end-to -end reinforcement learning.
So think of things like resonance, but also using tool call in the chain of fact in order to answer the query. Of course, you can do that on coding competition data sets, which has been quite a big focus for end-to-end RL recently. But you will, of course, be much more in domain if you do it on data sets of issues and peer data.
If you want to, if you're targeting sweepbench and also if you want to solve real world issues and him just wanted to
To tell you that being in domain is probably pretty important for this kind of task. Because as you can see on this example from this big bench paper from Chambon-Eton. Basically the main result here is that some models like O1 meaning.
And the resonators that are function based on trajectory from R1 are much better than non-resonating models at program synthesis. So here we can see that...
The way you build your Deltan programme synthesis with more than 80% pass at 10 and 68 % pass at 1 for the models based on DeepSig, but for predicting the complexity, and here I think it's the space complexity of a programme.
Even though it would feel like reasoning models should be very good at it because you just need to go through the program line by line and see when the memory is used or not, and then do a bit of simple maths to do the right multiplications to compute the total complexity.
Well, here you can see that reasoning models are not actually better than non-reasoning models for this task. And I think it's mostly because R1 at least wasn't trained for predicting the complexity of a piece of software. And if you were to add...
some kind of reward model that checks that the predicting complexity is correct. It would probably become a lot better than a non-reasoning model. It's just that it wasn't done here in R1. And it seems like reasoning models don't generalize that well to other domains. And so in terms of data sets, if you want to be in domain.
You can use things like a sweet dream which was designed by the people from OpenHands where you have a bit more than 2,000 tasks, only 11 repositories, but you have unit tests and environments to run all these unit tests. You can also get GitHub issues.
So this software ran work recently, I managed to get 11 million pull requests from GitHub. But of course in that case it's much more difficult to build the right environments for code execution. So it was what they did actually there was very interesting, they decided to give as a reward.
the edit distance between the corrective and the generated diff and actually they got very good results doing that without any code execution. So yeah just a small slide on three bench that I already talked about so basically the task here
is you give an issue, you also give a context from a code base, and then you ask your model to generate a PR in a given format. It can be by calling some tools to make some modifications or by generating a GIF. And then you can...
Check with some unit tests that the changes that you proposed actually correspond to actually fix the issue and they do that by only taking issues where some unit tests were added and they check the modification against the unit tests that were added.
in DSPR and also the unit test that were undefined. So if you look at the performance of current models here, and I'm going to leave you on that slide. So basically the first thing that you can see is as we talked about earlier, reasoning models are not really much better.

It's really much better than non-reasoning models on this kind of task. So Autry Mini and O1 here don't really perform better on multi-thread event for PyTorch than Cloud 3.7, even though Cloud 3.7 is not a reasoning model. And they only perform slightly better than Cloud 3.5.
On some of GeoDur scaffolding, they are actually not even better than Cloud 3.5 or GPT-4. So it shows that you actually need to train your reasoning models for this task and with these tools to make them useful. And the other thing that I want to show you is that there is quite a big gap right now between closed source and open source models.
Uh so DeepSeek and Quen are on the very top of this graph and um have less than 10 % accuracy on um on multi-sway agent and um it seems like QLUT 3.7 is way above the others uh so there is a gap that we want to fill. I didn't include our our models right now because we um so we have something that we want to release soon um
And that will hopefully bridge this gap. So we're still working on it. Right now our models are also under 10% accuracy. But yeah, stay tuned, we're actively working on that and we want to bridge the gap between closed source and open source models for agents for code. So yeah, thank you very much.
And feel free to tell me if you have any questions. Any questions?
Would you like to comment a bit more about the differences that you see between the reasoning models and other models which are quote-unquote more generic like uh Sonnet three point seven? Yeah, so I will say that I've seen some people using reasoning model for planning at the beginning and then using more generic models for
for actually doing the tool calls and making the modifications and I think that it brings it can bring some improvement but overall I will say that well it seems like what makes the difference between models that are good and between models for this task is more from the ability to call the tools correctly and to do that
with many tools in the chain so basically to also manage to do that with very long context and to keep coherent with this long context and that's not really something that reasoning models that are at least those that are not trained to generate this kind of tools in their chain of thought seem to be really good at.
Does that answer your question? So yeah, if I can make things clearer, I've seen people using kind of a reasoning model as a tool successfully, but I think that for actually doing detour calls...
Well, right now the reasoning models don't seem to be that good at it if they are not trained to do tool call end to end. Are there any more questions?
Then please join me and stand up at his board a great talk. Thank you very much. Don't hesitate to contact me if you want to discuss more. Thank you
Um, so we have like if you have a few more minutes left now we have a few closing remark Okay, so
s uh quickly so like closing remark uh we really want to thank our amazing lineup speakers and also the uh poster presenters and we also like organizers uh volunteers and of course like uh Eliza from SlideLive helping us all day today and uh of course uh thank you so much for your participants uh uh being our deep learning for Crowdshop for Crowd workshop this year.
And Mm-hmm. we really like to appreciate your feedback. So you have some free so if you have something to tell us please you can use this form. And we hope to see you in the future version of the voting for workshops. For that you can follow this Twitter account for the later like the latest news. And last thing is like
we will maybe take out we will take a group photo here in a just in a minute. So if you uh have a few more uh few minutes time, uh please join our join us for a group photo uh later uh right here on the like right-hand side of the stage. And with that, I would conclude the deep learning for workshop this year. Thank you so so much for coming.
