

Hey chat, GPT. I'm a surgeon and I need to stay up to date on the latest surgical techniques and literature. Is there a podcast that you can recommend? Certainly, for the latest surgical techniques and literature, Behind the Knife is a top podcast. It's tailored for surgeons, featuring discussions on cutting edge topics, interviews, and reviews of recent research.
I like that recommendation. Did I ask or instruct you to tell me that? No, you didn't specifically ask for it, but I'm glad you liked the recommendation. Behind the knife is indeed a solid choice for staying current in the surgical field. Darn right it is.
Ayman: Thanks everybody for joining. My name's Ayman Ali. I'm one of the PGY3s at Duke and one of the Behind the Knife Education Fellows.
Ayman: Today, I'm honored to introduce you all to a series of podcasts that's aimed to go over all things artificial intelligence that you need to know as a clinician. I'm joined today by Dr. Patrick Georgoff, who
you all know, and Dr. Monica Agrawal. Dr. Agrawal recently joined us at Duke after completing a PhD in computer science at MIT in the clinical machine learning group.
Ayman: She's a pioneer in large language models and a co founder of Layer Health, a healthcare AI company that's backed by some big players. And their first product leverages large language models to digest and analyze clinical notes. We're honored to have her here helping us out today as a Expert in the field. Dr. Georgoff, why are you interested in AI?
Patrick: Yeah. So we've discussed this a whole bunch. I'm as a wizard and Monica's even more so. And so we're thrilled to have them on the podcast today, so as someone of a Luddite myself, this whole world of artificial intelligence can seem, Overwhelming.
Patrick: And that's why I'm particularly excited about this series. We want to introduce, you know, some of the core topics and really utilize practical examples so that people feel more comfortable jumping in to all the different applications in the future. And I'm going to start with this little introduction and full disclosure.
Patrick: I
wrote my thoughts down. It sounded pretty good, but then I wanted to get it fixed up using a large language model. So you have to tell me what it. What do you think when I'm done? Okay. So A. I. Has swept across industries and it's rapid growth can feel overwhelming and even intimidating. So for busy surgeons, trainees and students, the idea of mastering a new and complex technology might seem daunting.
Patrick: It definitely is. But here's the thing. A. I. Represents a new era of accessible innovation, making advanced tools available to everyone. You know, for example, LLMs, it's incredible to think that this sophisticated technology, which has been developed with billions of dollars of research is now at our fingertips, often at no cost at all to us or at a very affordable price.
Patrick: And the tech giants that are building these are in fierce competition. And we're actually the ones that are reaping the benefits. It's pretty incredible. With these tools, anyone can translate text, can create images from, from mere text descriptions. You can plan a budget friendly trip with family. You can even write code without a programming background.
Patrick: So the possibilities for
enhancing productivity and creativity are endless. And the series that we are putting forth here, again, is designed to provide a practical and user friendly introduction to AI. And this is not just for surgery or for research or for our jobs. But for everyday use. And so the goal is to build a solid foundation that empowers you, the listener, to confidently explore and use these remarkable tools.
Patrick: Not bad, right? That's LLM enhanced. And one of the other things that we've been talking about too, in advance of this, is there's a lot of ways to think about how you integrate AI into your life. And throughout this series, we're going to show you how with, again, practical examples. There's one particular take on this that I think is really interesting when thinking about how you integrate AI into life, and that comes from Ethan Malik's book called Cointelligence.
Patrick: And in it, he likens the integration of AI to centaurs and cyborgs, and this is a direct quote from his book. So there are two approaches to Cointelligence. that integrate the work of a person and machine. Centaur work
is clear, is a clear line between the person and machine, like the clear line between the human torso and horse body of the mythical creature.
Patrick: And it depends on a strategic division of labor, switching between AI and human tasks, allocating responsibilities based on the strengths and capabilities of each entity. On the other hand, cyborgs blend machine and person. integrating the two deeply. Cyborgs don't just delegate tasks. They intertwine their efforts with AI, moving back and forth seamlessly.
Patrick: So let's talk today about the foundation of AI. We can define it. We can talk about how computers learn and maybe debunk some myths. This is a true crash course in this, in this topic. And so future episodes, again, we'll dive into these practical applications. Either of you can start with this. This is a big question.
Patrick: How do you define AI? It's a big kind of umbrella term.
Ayman: Yeah, I can, I can start. And then Dr. Agarwal can kind of help me out, but in general, it's a simulation of human intelligence by computer systems, but this means pretty much
anything. The term has been used for at least 70 years, probably much, much longer than 70 years, but people will.
Ayman: Quote you at a 1956 Dartmouth summer research project on artificial intelligence as a general sort of founding for the field. At that conference, their proposal was that learning can be precisely described. And then if you can describe something, there's no reason that a machine can't simulate it.
Ayman: Neural networks have been around for pretty much just as long. And we'll define that a little bit later. That being said today, it kind of feels like everything started yesterday. For a long time, our biggest limitation was computational, which just meant that we couldn't do the calculations fast enough with the computers and hardware that we had.
Ayman: And we'll talk more a little bit about that later as well. In medicine, a good example is that we do lots of regression studies, and that influences our decisions more than you probably realize. For example, we can take something like rib fractures. When we think about age or number of rib fractures as a predictor of a bad outcome and increasing the odds of death,
that all really comes from regression analyses.
Ayman: And ultimately, that's artificial intelligence, which is finding patterns in data to predict a response. So, when you're thinking about taking that patient to the ICU, based on what you think is their likelihood of a of a rough course, that's kind of what you're doing in your head. Your daily weather report and the likelihood of rain.
Ayman: That's artificial intelligence. Your fan on the ceiling is not artificial intelligence. There's no prediction or pattern going on there. That's just a motor.
Monica: Yeah, and I think AI in medicine is something that has had a lot of interest and promise going back to the 1970s. So back then, it was a lot more expert developed systems where clinicians were you know, going through different symptoms and writing decision trees about what diagnoses might be or, you know, certain risks in different really narrow clinical areas.
Monica: This is definitely something that. You know, has been in the works for at least 50 years.
Patrick: Yeah. So, so what are some of the catchphrases that people use that fall under the artificial intelligence umbrella?
Ayman: Okay, I think
maybe one, a couple of them is like neural networks, large language models. Random forests things like that, if that's kind of what you mean, but those are all, those can all get kind of confusing, and they refer to different approaches on how to predict a problem if you have.
Monica: Yeah, I mean, I think one way I try to split it up, and I think all of these techniques can sometimes or some of these techniques can fall into both buckets, is sometimes we think about things that are predictive AI, where the goal in a predictive AI model is maybe, Your risk of, you know, developing some complication or, you know, length of stay prediction something where you're trying to get something with, you know, a single sort of answer.
Monica: And what we now see often is also generative AI and generative AI often things like large language models where the goal is creating a piece of text or, you know, creating an image. And that's one categorization among several, but, you know, you can use something like a large language model that generates text to also do predictive
problems.
Monica: So you could imagine, you know, asking a model whether something is at risk as well. So it's not a clean cut difference.
Ayman: I think most of what we have done in AI in the past is Try to solve one problem. It's you, you have a very specific thing and you're trying to solve it. And I think sometimes when people think about general AI, they're thinking about what is a machine that can just do what a human does.
Ayman: And we're not quite there yet, but generative AI is a closer look at what it may, may, may look like, right? But for most of our AI, we were trying to solve these simple, small tasks.
Patrick: Which I can take that and then there's this discussion of what is general AI, right? So you're talking about narrow AI, specific tasks, fine tuned models different hardware specified for those models, et cetera.
Patrick: Or for that task, I should say, but general, a general AI is something different. What does that mean?
Ayman: Yeah. So general, general is kind of what you just touched on, which is that, that philosophy that you're trying to, you're
trying to just get a human, right? And that's like your general AI. You're trying to get as close to a human as you can.
Ayman: Whereas the narrow one is more just solving a simple problem. And so I think that where this becomes relevant is when you're thinking about. Trying to apply artificial intelligence to a topic or a problem and thinking about what kind of model you'd like to use to solve that problem and then how you can phrase the problem.
Ayman: So for, for example, you may want to say, I want to know if this is an artery before I cut it, then you have to think. What kind of a problem or what kind of approach do you want to solve this problem? Do you just want to classify something as an artery or not? Or do you want to take a continuous video model and sort of take a different approach to it all together and try and take all the information you have and give outputs about everything?
Ayman: So I think The idea is that narrow, you're trying to solve a specific task in general, you're just trying to, you're trying to get as close to a human as you can, but you may have more to
add to that.
Monica: I think that sort of summarizes that I think when, you know, I think the buzzword of like AGI artificial general intelligence is something that can slot in and do any possible task.
Monica: And that's I think a relatively new paradigm. Whereas a lot of what we often see and I think it's still really successful. Is sort of narrow task where you're trying to predict for one thing in particular.
Patrick: So is chat GPT a good example of getting closer and closer to general AI? Because I can type in some text prompts or even audio prompts and get a response in the kind of context of a large language model.
Patrick: I can generate images and so many other different things within it, the features keep growing and growing. So is that the natural? Is that going to be the natural growth of these systems? Something like chat GTP, where you just keep adding on different. Different programs and different processes and in the end, is a general AI going to be a single machine that's cohesive like our brain, or
is it just going to be a whole bunch of different components, almost like a, like a whole bunch of narrow AI components strung together that are better at specific tasks than others.
Patrick: And there's some kind of central way that all that is put together to make it seem again, as you said, closest to human as possible.
Monica: Yeah. So I mean, that's actually a pretty deep question that people are grappling with. So we're going deep fast. So I think, you know, the way you know, what the best model is often depends on your data environment.
Monica: And I don't want to jump the gun because I think we're going to talk about, you know, what you might want to do based on how much data you have for a given problem later. But I think there's notions, you know, of there's a term called foundation model. I don't know if we're jumping the gun here.
Monica: No, no, we can talk about
Ayman: it here, yeah.
Monica: And the idea of foundation models is that, you know, with something like a large language model like ChatGPT that sort of forms the foundation, and then you can almost form narrow applications on top of it that are very tailored. And the idea is you might need less data than you did before because you already have someone who
is when I say someone, I don't want to anthropomorphize, you have some model that already has some knowledge of how to interact with the world.
Monica: But a lot of what we're seeing are sort of thinking about not just, you know, you have a single model that tries to do everything, but sort of agents that could work together. So, you know, you might have one model that has, a specialization in one area in the same way that in medicine, you don't have one doctor who does everything.
Monica: Whereas you might have, you know, kind of a constellation of agents. And so I think this is a place that's still kind of rapidly evolving in terms of what direction do we move in?
Ayman: Yeah. And I think we'll get into it later, but chat GPT also is a great example because I think they've done such a good job of making it seem as though it's one system, but it really is made up of so many different parts that are all trained to do different tasks and just integrating them all is what we see.
Ayman: But I think it's, it's a good example of just kind of piecing together all of those different parts. So,
Patrick: all right, we'll talk about. The big question of sentience and the
future of how these pieces combine and what, you know, maybe I'm trying to map out that the timeframe for all that. But let's, let's get back again to basics here.
Patrick: Still trying to build that foundational knowledge for our future episodes when we jump into specific applications. So let's further define some terms. So machine learning. So what is that and how does a machine learn? Does it actually learn and have knowledge?
Ayman: So it's it's a really good question. I think a lot of the times people say machine learning slash AI.
Ayman: And that's okay. When I think about machine learning, I think of it more as a subset of AI. I think of AI as sort of a much broader term, but machine learning more as a process that's iterative and driven by a lot of data and feedback. Not all artificial intelligence is machine learning, but that's sort of the best way that I think about it, which is just machine learning.
Ayman: You're taking data. It's an iterative process and you're and you're trying to leverage that data and learn from it
to to kind of predict what you want. But not all AI works like that.
Patrick: Yeah, so I
Monica: think that was Yeah, I think that's the level of depth we want to go before we collect methods. Yeah,
Patrick: okay. So, so Monica, there's different learning paradigms.
Patrick: There's supervised learning, unsupervised, reinforcement, etc. A whole bunch more. Let's, can we talk about those three? Supervised, unsupervised, and reinforcement and what that, what that means when it comes to machine learning and how we train different models?
Monica: Yeah, so I think what we often, you know, classically used things for was supervised learning.
Monica: So supervised learning is you have a set of inputs, so that could be a set of x rays, and then a set of outputs, and that could be, like, you know, the diagnosis associated with that x ray. And in supervised learning, I essentially give you, you know, a bunch of examples of, you know, here's the input, and here's the correct answer.
Monica: So you can think about, you know, the way you might teach a, a
child is You know, in a very structured classroom settings, you might give them a bunch of examples until they learn there's actually even more paradigm. So in addition, so unsupervised learning is learning where, you know, you can imagine if you just let a child free and they kind of just explore the environment, you know, they might learn patterns just by going through the world without being So Explicitly instructed to do something.
Monica: So somewhere that unsupervised learning is, you know, often used in medicine is you might have a lot of patient data and you might want to learn different subtypes that exist in the data. So a lot of diseases are heterogeneous. There's not, you know, you might just kind of look at the patterns in the data and using a large amount of data.
Monica: You don't have any labels. You just have information about patients You might try to cluster them and understand, you know, these are the different subtypes that exist in the data. Another one is sort of, and this is what sort of powers. A lot of our kind of modern language models is something called self supervised learning.
Monica: And in self supervised learning the
model you basically learn from things like text. So, you know, basically you can imagine taking all the text on the internet and getting a model. To learn how to like predict the next word in an article online. I mean, is there?
Patrick: Before we jump in, let's go backwards a little bit.
Patrick: Because this is confusing stuff. So let's again, let's give a few more examples of supervised learning. So you talked about x rays and maybe identifying pneumonia. You have x rays that are not labeled, x rays that are labeled. And then a machine can learn from that. Let's dig down on that a little bit more.
Ayman: Yeah, I can give some some clinical examples may be useful. So supervised learning is what we do when we do a lot of the regression analysis. So when we're doing something like a rib fracture, we're usually looking at an endpoint, like mortality or length of stay. And that's a supervised learning.
Ayman: You're, if you're doing a regression model, you're feeding the model data. You're giving it the answer, which is mortality or length of stay.
And you're trying to predict that outcome based on the data that you have. So that's a supervised approach because your model is not not oblivious to the end point, and you're just trying to predict that and that's why you have things like external validation and trying to check it in different situations.
Ayman: But that's, that's. A concept of supervised learning, if you have another example, but I think regressions in medicine is my best example of supervised learning.
Patrick: And then, how about one more? I mean, let's say when I was trying to brush up on this stuff, an example that's used over and over again for whatever reason is pictures of cats or videos of cats.
Patrick: And I'm not sure why that comes up in the world of AI all the time, but it's
Monica: a lot of early YouTube algorithms. And there's a lot of cats, I think, on early
Patrick: YouTube. So, but what I want to do is focus on, let's say I have a hundred pictures of cats. How do I actually, what are we doing, you know, a little bit more on the technical background of it.
Patrick: What are we actually doing when we're, yeah, okay, we're sure we're teaching. I understand the concepts of teaching a
computer what looks like a cat. But what are you actually teaching? Is it the pixels in a certain location? If not, and then how does that differ from humans, right? You take a small child growing up and you point out a cat and they use all different types of sensory inputs, etcetera, and direct learning from their parents or whatever it may be.
Patrick: to learn and that they don't have to see 100 pictures of cats. How many cats does a child have to see? Two, and then you know. So what, diving a little bit to the technical aspects of quote unquote learning from a computer using this cat example of let's just say still images.
Monica: Yes, this is like kind of like a deep debate and sort of like cognitive science, which is like how do children learn?
Monica: And you know, I have some friends who are doing research on like, you know, you know, given that a child doesn't need 100 photos of a cat, why does our model need 100 photos of a cat? So, I think figuring, I think that's sort of, you know, how do we have biologically inspired networks as sort of, an area of interest in general.
Monica: But I think, so essentially what you would imagine
having is, so let's just say you wanted to identify different breeds of cats, for example, You have 100 images and what you would need is for each image, something that says exactly what kind of cat it is and in terms of what's it's what is it learning That really depends on what the underlying algorithm is.
Monica: So if I think about what, you know, if I think about the last decade, you know, one thing that's been popular are convolutional neural networks. And these are essentially looking for in different layers, and this gets into what deep learning is. You can imagine it's in the, you know, the first few layers of a model.
Monica: So something like a linear regression. is a one layer model. So there's really only kind of one series of interactions. But what we found works really well is when you have multiple layers. So, you know, in grossly oversimplifying, you know, the first layer often looks for like edges and images. And then the second one might be looking for, you know,
combinations of edges that might talk about, you know, that might say something about like ear shape.
Monica: And as you go deeper and deeper into the layers, you might get kind of these really complex combinations that are not always interpretable of things like, you know, maybe fur patterns and things like that that then allow you to do cat classification.
Ayman: Yeah, I think too. It's it's the interpretive part is pretty important.
Ayman: It's really hard to go backwards, I think, and try and figure out what the pattern of reasoning was. I think to the kid, it's interesting. They might see two cats. But then what happens if they see a lion? Is that a cat? So I think you always need to train on more specific things. And it's the same thing with models to the more specific the data you have, the better you can train it.
Ayman: And the more examples you have, the better.
Patrick: Yeah, I think that's a really important. And that's why I'm so excited about this series. Is this To me, at least, you explaining the idea that, oh, we're looking at edges, and we're looking at colors, and we're looking at these other things, and it's, it helps to understand what's going on behind the scenes, because it's easy to say, okay, I feed the 100 pictures
to a machine, and it learns it, okay, like that's, I can understand that's labeled supervised learning, but it helps to kind of understand what's happening behind the scenes, and without getting too deep into that.
Patrick: So let's move on to more specific examples of unsupervised learning, though, because really what we're talking about, this is unlabeled data, right?
Yeah,
Patrick: and you're looking for patterns. So what's a real simple example of unsupervised learning where the machine finds the pattern?
Ayman: I can give you a example in medicine, something that goes with my research as well.
Ayman: Let's say that you're in the ICU and you have lots of waveform data. You have lots of patients with pulse oxes. And you have some things you can define on those waveforms. Some different peaks, some different downs, your dichroic notch, etc. And you can define all of that. And an unsupervised learning might be clustering them together.
Ayman: So you take all of these waveforms, all of these patterns, and you just try and figure out, how do they group together? Are there similarities in the data? Can
we group together a couple of waveforms with something else? And then the utility after that is now that you kind of group things together with absolutely no information about the patients or something else.
Ayman: Can you then go back and look and say, does this actually have a clinical importance? So if I was to just take only people's pulse oxes, try and find patterns in it without any knowledge of the patient outcome. And then look at the groups that I've defined now with information. Did I come up with something useful?
Ayman: So. A place where they've used it a lot is sepsis and kind of broadly defining sepsis phenotypes. And they found that if they just take a lot of data about patients with sepsis, you kind of broadly come up with about four or so different groups of patients. And these groups weren't defined before you made the clusters, they were defined after.
Ayman: So just, it's just finding that pattern in the data without any knowledge. And they did find that there was a clinical difference in those patients. So, you know, one might be
a. Respiratory failure and the other might be a multiple organ failure. And so that's sort of how you're kind of using it and where it becomes important too is trying to find patterns that or groups that you may not have thought about existing.
Ayman: And that, that gets a little bit more, you know, there's lots of examples there, but that's just one big one.
Patrick: And that's really part of the power of big data, right? You could do a huge dump of data that one human being couldn't, you know, get through and these super Computers can get to and find patterns.
Patrick: And so outside of medicine things like in Eerie, you know e commerce perhaps analyzing customer data to identify patterns and what you might buy, right? You're making recommendations on that or even fraud detection for bigger safety online safety systems. You know, what is what's the outlier there? And even medical imaging, right?
Patrick: We were talking about x rays, perhaps in which you give labeled data. You give unlabeled data and look for patterns of a consolidated right lower lobe or something, which could and it gave you the
same type of learning or not the same type of learning, but the same output and saying that there's a machine now that can recognize that and that's correlated to pneumonia, right?
Patrick: So, all right, unsupervised learning, recognizing patterns, and then we talked about reinforcement learning. So what's, what's reinforcement learning? Let's do, maybe for this, we could also do a medical and then a non medical example. Reinforcement learning is pretty, pretty interesting, I think.
Monica: Yeah, so reinforcement learning often happens in environments where you might be able to. you know, not be able to tell, you know, in that a single step. So it's often for like multi step situations. So you can imagine this happens a lot when we were doing a lot of the advances maybe five years ago in like game playing really came from, you know, you might not know when you make the first move in chess, if that's a good move and you really have to iterate multiple times out.
Monica: And then, you know, you might recognize, oh, I just lost this piece. That was a bad move, but you might not know that. At step one, but like, you know, three moves out, you might in retrospect realize something was a bad
idea. And reinforcement learning essentially is often used in these multi step scenarios where you get You know rewards for doing something well, so that might be taking someone else's piece or, you know, negative rewards when you mess something up, like you lose your own piece and oftentimes, a lot of what we deal with in real life scenarios might just be a, a single step decision, but a series of decisions.
Ayman: I think one one example that's really clinically useful, , is think about just fluid suppressors in the ICU. It's not always obvious when you give fluids if it's a good idea. You know, it's not always obvious what the response will be. But, If we can give some sort of a penalty or reward for different actions that you make at different times, then maybe we can learn and sort of guide a patient's resuscitation.
Ayman: So, the example there is, you know, you maybe don't know when you first give 500 mLs of bolus of that, of fluid, if that patient's going to be volume responsive. But, maybe there's something in the data that tells you about it. A little bit down the
line, and maybe it's not always obvious. So that sort of reward and feedback approach is is kind of what we're using there.
Ayman: How
Patrick: does, you know, so if I'm training a dog and I smack it on the nose because it did something bad, or give it a treat because it did something good, those are, those are rewards, right? Or punishment. How does a machine get rewarded or punished? How does that, there's some algorithm in the background that
Ayman: In the most simple sense, and you can correct me, but in the most simple sense you can kind of think of it as a as points.
Ayman: You can think of it as points. You can either gain points or lose points. So, in the most simple sense, it's just that. And on the underlying, there may be a complex mathematical approach to this, but at the end of the day, you're either adding points or losing points. So, you know, if I throw a bad stitch in the OR I'm probably going to lose some points for you.
Ayman: But if I throw some, if I, if I, yeah, I was going to lose some points, right? And now, you know, if I, but if I if I have a good console, then maybe I gained some points. So, in that same way, you know, the, the machine's kind of doing the same thing. So it's just
a mathematical approach that sometimes is a little more complicated.
Ayman: So
Patrick: you can gain points, lose points, and that would tell, it would just egg the machine, or let's just call the machine on in one direction or another, right? You lose points, it's going to be less likely to do that same thing next time, right? And I guess maybe, Monica, robotics is a great example.
Yes.
And just
Patrick: recently, Tesla launched those robots that were just wild walking around, interacting with people and pouring drinks at their party and that kind of thing. What yeah, robotics how are these rewards used in robotics?
Monica: So you can imagine this is an example of something that's multi step, right?
Monica: Because you often are doing something that requires a bunch of sequential motions. And you might not know, you know, after the first, you know, little arm movement, whether it's doing something in the correct. So you can imagine a robot might be rewarded for, you know, correctly pouring, you know, one thing into another thing.
Monica: And that reward might take a few steps to kind of see show up. But one thing that's really interesting and sort of an area of active research is how do you mathematically define what should
and shouldn't be rewarded. Because obviously you want to make sure, you know, there's ways you could for example, reward something for, you know, pouring something into the cup, but you also want to make sure it doesn't like overflow the cup, or it doesn't like knock other things out of the path on the way there.
Monica: So, You know, if you were to reward something just for getting somewhere the fastest, for example and it might then ignore like whether it, you know, like runs into someone's plants on the way there. So you have to think carefully about how you define these reward functions. And that's, you know, again, an active area of research, which I feel like I'm going to say over and over again,
Ayman: but a lot of it's really hot research.
Ayman: So.
Patrick: Really? Okay. So we talked about supervised, unsupervised and reinforcement learning. And I guess maybe semi super for semi supervised learning is maybe a different topic. And so what else should we cover before we move on from the types of learning paradigms? Or did we do a good job?
Monica: You know, I think we could always go into more depth.
Monica: But I think, you know, semi supervised is sort
of you can just think about is in between unsupervised and supervised where you might have a lot of unlabeled data and then a little bit of label data. And the idea is You know, if we go back to the cats, if you've seen a bunch of pictures of cats before or other animals.
Monica: It might be easier than when you're given a single example or two examples to understand, whereas if all you had ever seen was you woke up and you saw two cats, you might not know, like, is a dog a cat? Whereas if you had seen sort of everything in the world beforehand it could be more useful. So it's a way of combining, you know, the pros of how much data you might have.
Patrick: Okay. All right. And before we go on to neural networks, which would be kind of the next question and deep learning, let's talk about data quickly. I think, you know, as surgeons and, you know, whether still in training, out of training students listen as well as podcast. I think we know about a bit about data, good data,
clean data, how to use it for research.
Patrick: How do we look at it from the perspective of artificial intelligence when it comes to research. To training models and what data is valuable. There's, you know, between these huge tech giants, there's wars going on about getting, you know, and huge money being thrown around for access to data. So what is that all about?
Patrick: Dr. I will have to start
Ayman: up on this. So she'll explain much better, but definitely not
Monica: a tech giant. But
Monica: But I can talk a little bit about, you know, what sort of data do you often need? And, you know, where data comes into play. So, you know, for training models like these really large language models, like chat GPT, What essentially how they're trained is to predict and the most oversimplifying deeply is sort of to predict the next word in a sentence.
Monica: So you can imagine if you have a sentence like, the patient was given aspirin for their blank. And, you know, it basically takes a sentence that you could get somewhere off the internet,
and the model is essentially trying to predict what's the next word it needs to come up with. And so all that it knows, you know, knows in huge air quotes, all that it has a knowledge of being able to model is based on the sorts of sentences it was able to see in its training data.
Monica: And what we what often really matters is having data that's sort of similar. So, you know, in earlier iterations of these models before they got huge, you know, sometimes they were trained on ICU data. And if they're trained on ICU data, they often don't work well on, you know, You know, in the cancer setting, for example, so it's often important to have, you know, data that matches.
Monica: You know, it's interesting to think about. So now there's also, you know, these large models that are being trained specifically on just clinical note data. If we think about something like these very general foundation models like chat GPT, they're not being trained specifically for clinical data.
Monica: And I think it's an interesting question. Like, what are they being trained on? I did some, you know, initially, you know, what on the
internet teaches a model that You know, fracture means FX, because that's not something that would necessarily be in a PubMed article because there's so many different kind of there's a lot of jargon that you guys have come up with that is not necessarily textbook but sort of cultural.
Monica: And, you know, you often find that, you know, it creeps up on, like, clinician forums on the internet or, you know, patient forums where, you know, you call certain drugs by, like, five letters of their name and there's all these signals for sort of learning some of this.
Patrick: But this is just prediction, right?
Patrick: I mean, this is large. When you talk about LLMs, you're talking about massive amounts of data, typically from the Internet to just predict either parts of the next part of a word or a word or paragraph. Is that correct?
Monica: Yeah. So essentially the way these models work and there's different paradigms. I'm going to throw out a word that we don't have to return to called autoregressive.
Monica: And all that means is that the model is trained to. Basically continue generating more words and that's what it's been trained on, and then that's what you can. Use it
for
Ayman: in a in a more if we're when you're talking about data in a clinical setting which I think is important as well If you look at a lot of these studies that we have and a lot of the regressions that we have we're taking subsets of data We're not we're not using all of the clinical data in the world to create these models And I think that's one thing that's pretty important, you know in the position I'm in a lot of times people will ask me for All the data and that becomes difficult to answer, right?
Ayman: There's a lot and a lot of clinical data. And when it comes to figuring out what to use for a model, it takes a lot of work to process that data. So a large language model is slightly different. Chat GPT is slightly different. There's, I don't think there's quite as much pre processing there, but when you're trying to get to more specific tasks in medicine they're probably the hardest part is not.
Ayman: Running the model. The hardest part is getting the data and the format that you want it to be in, right? That's
Patrick: that's exactly what I wanted to get to, right? Because when
we think about it again, I still take it as kind of from a lay standpoint. It's like, Oh, take the entire internet, put it in a super computer, and then it's going to learn how to predict words next better.
Patrick: And, you know, there's refinement and waiting and to these models. And that's how you end up with a LLM like we use nowadays. But like, as you said, I mean, that's not the bulk of what's happening, right? The bulk of what's happening is what you're talking about, which are specific use example or case or specific cases.
Patrick: In which that data has to be is really the first part of that whole process, right? And so when we contextualize this whole big picture, what is a I? And what can you do with it? That data is key, right? That data is super important. So how should we think about if I'm like, okay, I'm kind of getting a hang of artificial intelligence.
Patrick: I want to think about different projects or maybe I've been playing with some LLMs or some other different types of publicly accessible AI. And you can't just say, I want to, I'm going to, you can't just pull a project out of thin air, you have
to have some data, right? So how do you think about that when it comes to applying these things?
Monica: Yeah. So I think there's like two really big places where data is needed. And I mean, one is, you know, training of the model and I think. You know how much data you need for training often depends on what modeling algorithm you're using and all of that. But I think another huge part of what you need data for is evaluating the algorithm.
Monica: And I think that's something there's this term called like distribution shift. And the idea is You know, if we even look at a model that's trained on, you know, Duke data from 2018, that's going to look a lot different from Duke data and 2024. And, you know, this can be precipitated just by kind of like slow changes and like templates people use, but also, you know, events like COVID and that's not to say, you know, the difference between what Duke data looks like and data from, you know, maybe a community center down the road.
Monica: So when we think about, you know, Okay. what data we need to gather, it really is important to think about, you know, where
do I actually then want to apply it? Because if I want to apply it, you know, very narrowly in only a, you know, single institution then, you know, I might not need to gather really wide data.
Monica: So what works best really depends on where you want to then apply it.
Patrick: So how do you, how do people put that in context? I get it. Especially if someone's like. You know, I'm driving to work tomorrow and I'm like, Oh, AI is so cool.
Patrick: And there's so many cool things. Like I want to do this, but that decision to maybe pursue something has to be informed by data. So that, I think that's my big question
Monica: so essentially, how easy it might be to both train and evaluate a model kind of depends on what data exists.
Monica: And I think a lot of where we've seen like early wins is when you can get like, you know, the labels for your problem as like a natural by product of clinical practice. So you don't need to do anything. extra. So, for example, a lot of where we saw a lot of wins was in but it sometimes takes a little bit of creativity to figure out, like, how can we pull that label from the data
we currently have?
Monica: Because usually the EHR is not, like, we can't just be, like, I want this column and that column and, like, boom, I have my input output. So, as an example of this, you know, one thing that people did a lot was sort of, like, x ray classification, for example. And for that, what you need is sort of, both the x ray and then, you know, whatever diagnosis.
Monica: And while there might not have been like a nice field, they could just kind of pull that out of what people then did was, you know, for in an oversimplified senses, looked at the accompanying radiology note and said, you know, does the note mention pneumonia or does it say rolled out pneumonia? Or does it not mention it?
Monica: And it basically, you know, created these rules to say if it has the word pneumonia and it doesn't say rolled out before it, that's a yes. And that's sort of like a, it might not be perfect, but it's a way to kind of create a lot of labels for the task without having to kind of manually go back through and add labels.
Monica: So, I worked a lot in language processing, so, you know, tasks like,
at what date did the patient become, you know, metastatic in this way? Or, you know, did the patient progress on this certain disease? And oftentimes. There was not kind of a natural label in that, you know, you couldn't just take normal practice.
Monica: And then get a label out of it and required a separate labeling effort. So I think there's different creative ways you can try to come up with proxies based on the data you're already creating. To sort of measure, get a task that sort of already approximates what you care about. So I think whenever someone's thinking about a task, like, you know, how can I do better triage or prioritization?
Monica: You know, they often have the input data. But if you then think about the output data, it's really important to say, how would you be able to tell if the model just said this is high priority and this is low priority if that matches what should have occurred?
Ayman: I think just to add to that as well from my perspective as being somebody that's kind of Sitting in both fields, you know, mostly I'm a clinician, but also kind of sitting on the
data field.
Ayman: I think where I'm useful is kind of bridging this gap and I think where I see most commonly this gap become really big is when If you have a clinical idea, it can be a great idea But if you can't define it in terms of the data I think it becomes a really hard communication barrier and that's something that I see a lot if you know You probably understand what I mean is that you know, you may have a really good idea for, hey, I want to build a model to do this.
Ayman: But when you're working with the, with your data scientist or wherever you're working with, what's the best way to be really helpful is to really define the variables that you want and maybe even have an idea of how to get them. Because I think that's, that's like really where the communication breaks, breaks down.
Patrick: Right. And, and clinical care is such a rich. environment to try to start answering some of these questions and a very confusing, simultaneously being a terrible one, because especially when our EHRs are not designed as data repositories, but more as billing
machines, it makes it difficult to pull, to pull true data out and be useful.
Patrick: So let's transition now over to neural networks and deep learning. So are these computers that are full of. These these multilayered computational, you know, systems, are they the same as our brain? Is that the way to think about it? You say neural network, right? And as a surgeon, I think brain is does it work in the same way?
Patrick: Or is it different?
Monica: I think it's inspired by the brain. But I can say it's probably a stretch to say that they're working in similar ways, but I'll let I'm in.
Ayman: Yeah, I can start. I think neural nets are a great place to start because before large language models, I think when people started to talk about AI, that's kind of where they went at least in medicine.
Ayman: And that's where people got confused. So I think it's a good foundation to start with now. A neural net, like Dr. Agrawal said, is inspired sort of by the human brain's neural connections, but that's not exactly how it works. And
the way that I like to think about it is you have a bunch of interconnected fields, and these are like your neurons.
Ayman: And each of them have tasks, and those tasks are math y tasks, mathematics tasks, that just transform your data from your input to your output. So I think about these neural nets as having three different distinct layers. You have an input layer. A hidden layer, and then your output layer. So, your input layer is just all the data that goes in.
Ayman: So, for example, if you're trying to do a cholecystectomy, your input layer may be all of the, you know, if you're a neural network, then your input data may be the patient characteristics, the anesthesia team, the assistant, everything like that. The hidden layer is kind of what goes on in your mind. Right?
Ayman: Who kind of knows what you're thinking? I'm not even sure if surgeons really know what they're thinking at the same time, after so many repetitions. But the output is the next step in the operation. So, it's kind of hard to define what happens again in that internal layer, and that's kind of what happens in a
neural net to a degree.
Ayman: Is, you have that input, something happens, And then you have a next step, just like how a human kind of does it. Now that hidden layer neural networks, the difficulty is that without getting too technical, it, it applies functions, it transforms the data and passes it to a next step. And that's done to kind of capture complexity in the data, because not all data can be modeled with a very simple linear transformation.
Ayman: Like, I don't think that's what we're doing in our heads either way. So that. It's sort of my attempt at trying to explain a neural net is that three layer approach, lots of math in the middle, but just trying to transform your data to capture a complex pattern that unfortunately you can't really explain.
Patrick: All right, so we have an input, we have a hidden layer where mathematical magic happens, and then an output, and
it's inspired by the brain, right? You can see how it's inspired by the brain in terms of that function. But what about, so then deep learning, does that just mean that you have many layers of this?
Patrick: That you go from one transformation to another, to another, to another? And is, is that, is that what the deep learning part of it is?
Monica: Yeah. So really, you know, we just kind of described a single hidden layer, but, you know, modern networks often have tens to hundreds of layers. And deep just kind of refers to the fact that there's many different steps going in that middle kind of processing piece.
Patrick: And so has this just grown over time in the sense that, okay, you take one, you take one mathematical formula, you have an input, you have the math formula and the hidden layer and an output. And then the, this has just grown on itself, right? Then you go, okay, well, I'm going to do the next computation, the next, the next, the next, the next, the next, and all this stuff we're hearing from Nvidia and all these chips and other things that the technology has again, right.
Patrick: More recently moved along to the point where. You can get super duper
complex. Is that right? And that's what part of the explosion has been in the past decade or so.
Monica: Yeah. So if you think about, you know, like, let's just say like a regression function for, you know, risk that takes in 10 variables, that's a you know, a function that might have 10 parameters.
Monica: If I think about the sorts of language models. that, you know, were on the scene like six, five, six years ago when I started my PhD. You know, those were considered huge models at the time and, you know, and they had hundreds of millions of parameters. And that was, that required, you know, new sorts of hardware to sort of train those models.
Monica: You know, fast forward, if we think about things like the newest models coming out of companies, these have hundreds of billions of parameters. This is, you know, three orders of magnitude. more parameters that you need to learn in this mathematical function than it was you know, five to six years ago.
Patrick: So in some ways, there's you could say, okay, well, this is, on one hand, you look at it, so this is pretty simple, right? You took
a formula, it's not simple, but if you break it down, maybe it's simple. It's one formula, then another, then another, then another. And you've got fancy machines that can build on itself and make this a big complex computation, right?
Patrick: You say, okay, well, I can kind of understand that because it started with one simple thing and then it just grew in complexity. To what we see today, you know, continue to grow on the flip side, though, when we talk about comparing it to the brain, we don't really know what happens in the brain necessarily, right?
Patrick: We've tried to map out neural networks and how things move in the brain, but the brain is insanely complex. And to some degree, it's a black box in terms of what happens. And can you explain too, if you, if you really start looking at it too, some, even the scientists that built the machines, these, these, the most powerful machines we're looking at now with these billions of layers, they're like, yeah, we don't necessarily even know what happened.
Patrick: Like if I want to ask an advanced system, okay, here's a really advanced question and it tells me an answer. Like go backwards and show your work like we do with our kids and, you know, math. And you're not, and I guess that's an
entire area of research in and of itself. Right. Cause we don't have these things become so complex that there's that hidden layer, that black box where like information is zooming around between different nodes.
Patrick: And yet we somehow get this amazing. accurate response? Am I making sense there? Because it kind of makes my mind want to explode when I think about it that way.
Monica: Yeah. I mean, I think often we don't have a great sense of exactly why everything's doing what it's doing. I think, you know, we had really mathematical explanations for like early machine learning on, you know, what we expect to happen in different scenarios.
Monica: And as these models have exploded you know, There's, you know, the math hasn't quite kept up in terms of how do we understand what's happening when you have hundreds of billions of parameters. So, you know, there's ways of getting around it, like asking the model to explain its work or its rationale, and these are not always perfect answers that they provide.
Monica: And I think sometimes there's a question of How can we, you know, choose tasks where we might be able to tell if it's getting the right answer for the wrong reason or
vice versa? How can we choose tasks where maybe it's really hard to do the task yourself, but much easier to verify that whatever it generates is correct, given a rationale.
Monica: Because it might be, you know, harder to answer a math problem by yourself, but easier to say, It gave me an answer. And if I look at each step by step answer is it kind of logically flowing?
Ayman: Yeah, I think the only things I would add is in general, I think a lot of the times the, the math is kind of done much in advance of the hardware.
Ayman: And I, in general and you can correct that, but in general, a lot of times, especially with the neural networks and deep learning, we've kind of had the math for a while, but the really big advancements in the architecture of the computers kind of helped us propel that forward. You know, on my laptop, it's kind of amazing what I can do with that I couldn't do 10 years ago just computationally.
Ayman: And so that's, that's been a big, big stepping stone.
Patrick: Right. So that's a perfect segue then to debunking some of the myths surrounding AI. And let's just dive right in with a big one
of sentience. These systems are becoming so complex that to some degree it's hard to understand exactly what's happening back there.
Patrick: And every month there's a new model, there's new hardware being dropped, new chips that are just so powerful and amazing and they're the size of a quarter. And it's, it's, it's Amazing to see what is the, when does, you know, in, in the like Termina
Just think, one tiny step could transform your surgical journey!
Why not take that leap today?