Graph Exchange: Jure Leskovec, Foundation Models for Graph Learning
Recording: Graph Exchange: Jure Leskovec, Foundation Models for Graph Learning
I'll show you something that is uh quite incredible and unbelievable uh and I mean it and uh we launched this today uh yesterday morning actually. So um and what is this? It's a foundation model for your relational data. So um and it's powered by graph technology. Okay. So um here is maybe how to motivate this for this crowd right you know we are nearing the agentic futures. There will be digital agents all around us. But one most important thing these agents will be able need to be able to do is they need to make good decisions. Right? If they want to take actions these actions have to be powered by good decision making
Uh this means that these decisions have to be hallucinationf free. uh and they need to be rooted in data. They need to be rooted in businesses, private, enterprise data. Uh because that's what makes every business unique. This is what we need. So what kind of dec and what kind of decisions am I talking about, right? Like if you build a fraud agent, the fraud agent needs to know what's the likelihood that a given transaction is fraudulent because based on that it can take make certain decisions. If you want to have an agent in a hospital setting, the agent needs to assess patients risk of readmission for example or patient risk of having a complication in the next 24 hours. Uh if you have a cu agent dealing with customers, a customer, the agent needs to understand or be able to estimate is a customer likely to churn, how much are they projected to spend next quarter? Um, if we are in the marketing setting, I would like to to the agent needs to be able to estimate which is the offer that is most likely to be taken by the customer
And if I'm a sales agent, I want to first have a very accurate estimate, you know, which of my sales leads is most likely to convert. So, I work with that sales lead and don't waste time on a sales lead that is not likely to convert. Um and uh what we do at Kumo is we make answering these fundamental questions that that are fundamental to every enterprise to every decision um very very quickly and very very easily. So uh what we built is a foundation model that is not a large language model. It's a different kind of foundation model. Um and the best way to explain how this works is to kind of parallel have a parallel with a language model. Right? A language model will take on the input. It it takes a prompt in natural language, maybe code, whatever that is
Then it does this kind of in context common sense humanlike reasoning to give me the output which could be a piece of code or or text or something. So a relational foundation model what it takes on the input is a set of relational tables. So this would be a product catalog, uh customer records, transaction records, uh supply chain records, uh financial ledgers, things like that, right? Tables interconnected um with primary foreign keys. Then we prompt this um uh foundation model by basically asking it a predictive question. So here I'm saying it you know predict me whether the count of sales between now and 30 days in the future is that equal to zero for a given customer or for each customer ID here. So I'm saying is a customer predicted to churn and what this thing will do is on the fly without any model training it's going to do relational reasoning and it's going to give you out an accurate prediction right so today to answer this type of questions you need a team of data scientists and about half a year and they'll come back with a probab with an estimated probability with this you can get that in in a m in in a second so I I want to show you um what I'm talking about So um this is a small demo. It's available at kumo rfm.ai. Anyone here can use it
Um this is the maybe let's do this just so it's bigger. Um this is the schema that the model the data schema that the model sees. The model has not been trained on tuned on this schema. Okay. So this is brand new data. The model has never seen it before. Um and it's kind of an e-commerce like schema. So you have users, you have items, you have the products, and then you have the clicks of users on the products, you have orders of users on the products, and you have returns
Um, and each of these tables has a number of columns, right? A user has an age and a location and gender. A product has a description and an image and price and all these kinds of things. a transaction has a pointer to the product, has a pointer to the user, um has a currency, has time and things like that, right? Very standard stuff. But what I can do now is I can ask predictive questions over this schema and the model is going on the fly give me an accurate answer to that predictive question. So let me give you an example. Um so maybe what I want to do is I'll I'll click I won't I I cannot type, right? um maybe I want to predict um whether a user is going to churn in the next 60 days. So how would I do this? I would say predict me whether the count of orders between now and 60 days in the future is that equal to zero. And I want to do this for you know I want to make this prediction for a given user ID
Let's say user uh 66. And if I execute this I get the answer. Here is the user ID. That's the false probability the true probability. And then the thing that takes the longest actually is going to open AI to to um to textify the explanation. So I even get an explanation of why is the model now predicting that this user um is uh is going to churn with high probability. And this is because they have a very few past orders. They the price of their orders is um is um higher
uh they have they they've been returning items um and and so on right I can also ask um evaluate so which means how accurate is is a model's prediction um and here um you know I get the response that the AUC of this prediction is 84 right uh and the AUPC is 0.92 and so on right so I just asked a predictive question um and I got the answer uh the answer immediately and not only I can do this you know for let's say here um this is binary classification I can do this for regression let's say I want to do uh product sales forecasting so I'm saying predict me the or sum of order prices 3 months into the future for a given product ID can I can play with this however I want and you know I get back the I get back the response um and then you know a second later I get back the the proper explanation why what factors in my database let have led to this uh prediction. Um the last thing I show you um we can also um uh uh um make recommendations. So where I can basically say uh predict and then I can say uh list distinct and now I can say for example you know uh orders dot um uh let's say item ID um maybe between now and you know 7 days um in the future. This is me typing with one finger um for let's say you know for a given user. So users dot user ID you know 42 whatever um and I get I will get back now the set of item ids uh and the corresponding scores which are basically now the recommendations what this user is going to buy uh in the future. So um what I showed you here is basically this ability to do in context machine learning without model training on any database for any predictive question. Uh you can imagine users typing these predictive queries. You can imagine agents typing these predictive queries and getting these predictions at hawk
Um what you can also do is you can um run these things and further fine-tune the model. If you get if you fine-tune the model you will get about 10% lift in accuracy. So of course fine-tuning the model gives you better performance. Great. But I think what is amazing is that without fine-tuning you already get you you get performance that is only 10% less than a fully fine-tuned model on your data for the specific problem. Um I can explain quickly what's the what's the um what's the technology uh behind this. Um we've done some benchmarks and in general we see about 30 to 50% lift in accuracy from what data scientists today do by hand by manual feature engineering. Um and u with fine-tuning we we we can we can uh push this uh accuracy higher
Uh the system scales to tens of billions of records. Um so now I can just show you quickly how this works and why it works. So the way this works is that we take any database any set of tables structured semistructured data uh linked with let's say primary foreign key relations and internally in the system we are thinking of that as a heterogeneous temporal graph. So every user is a node, every click is a node, every order is a node and every product is a node. And of course these nodes have rich attributes right like every every product has a image description color material aisle and category and so on and so forth. Um but when we are let's say making a prediction about a given um about a given user here uh all this data is being used to make that prediction. So what does this mean is that we learn from the user, we learn from users actions, we learn from what products those actions were were uh executed on. We then learn from other actions on those products from the properties of those other users who have made actions on those products from other actions of those users that touched some other products as well
So through this you can see how kind of we go recursively in a sense across the tables in the in the data warehouse um and and then apply uh or a pre-trained graph transformer that can now attend to the first hop information, second hop information, third hop information and so on to basically give you uh an accurate prediction um at inference time. Um and the cool thing is that you don't need to to feature engineer. You just need to point to your relational data. Um and because now the attention mechanism can attend across this set of tables, it can basically discover and and model these higher order correlations that as a you know that a data scientist will never featurize. That's why you get uh more accurate results. Um and and the amazing thing is that if you properly pre-train this model, it's basically able to solve in context machine learning problems over data sets and give you give you a response in about half a second. Um so that's what I wanted uh to show you. If you want to play with this, it's available at kumo rfm.ai
Um if you want to try this out, um you are very welcome to do so. We have both the foundation model product where we can do these predictions at hawk. We also have a fine-tuning product where you can fine-tune for a specific task to tr truly squeeze out um the last uh percentage point of of improvement. Um these models are um you know running at some of the biggest companies here in the valley uh very successfully over you know billions of users. Um and um the the second thing I would I would say if you are interested and have any further questions I'll be around or um send me an email to urkumo.ai. Um thank you so much.