Hello and welcome to the NVIDIA AI Podcast.
I'm your host, Noah Kravitz. AI is being used to enhance and improve life in varied and often incredible ways.
But what if we could use AI to improve the end of our lives too?
Our guest today is Anand Devati, graduate student in the Artificial Intelligence Lab at Stanford University's Computer Science Department.
Anand is co-author of a research paper entitled Improving Palliative Care with Deep Learning, which details his team's use of a deep learning system to predict patient mortality.
When People Will Die, with the aim of improving end-of-life care for critically ill patients.
Anand, welcome. Thank you. So we're recording here at the end of January of 2018.
And your research has been getting a lot of press over the past few weeks.
So first off, congratulations on your work, most importantly, and the attention you're getting.
Maybe we can start by your telling us about the research and the paper you published.
And for those of us not familiar with the term, Maybe start off by explaining just what palliative care is.
Sure. Let me start off by giving a a small description of what palliative care is.
Palliative care is specialized medical care for people with serious illness.
The focus is on providing relief from symptoms and stress from the disease and also to improve the quality of life for the patient and their families.
It includes things like end of life care, hospice care, et cetera.
But it's also compatible with ongoing curative treatments.
For example, if a patient is undergoing a bone marrow transplant, they would be suffering from severe side effects and a lot of pain.
And palliative care is often consulted for such patients to get through the curative treatments by getting some relief for their pain as well.
So it's kind of working to improve their experience, not necessarily divorced from the underlying cause, but it's not necessarily treating the underlying cause itself.
Exactly. The focus is on the symptoms and the stress that comes from the true disease.
And as you mentioned, it's not exclusive to terminal illness and end-of-life situations, although it often is associated.
Exactly. So tell us about your research.
Palliative care, as practiced in Stanford at least, has kind of two prongs to it.
One of course is supporting the quality of life, which includes pain management, social support, arranging for care at home, etc., And there is also this complementary second prong, which is eliciting patient preferences. for their end of life and advanced illness care.
Now that is accomplished by means of having conversations between the patient and the trained palliative care and this typically results in documentation of their goals of care and advanced directives. legal documents which kind of offer a guidance for the doctor when the patient is not able to make a decision for themselves.
Okay. And if such a conversation were not to happen, for example, in a hypothetical scenario, a Advanced illness can often end up with some kind of a medical crisis.
They would get admitted to the hospital ICU. and once you're in the hospital ICU things kind of gather their own momentum and um Increasingly aggressive interventions start to happen and sometimes the patient ends up passing away in the ICU.
This may not serve well for the patient or the family.
And in fact, studies have shown that up to 80% of Americans prefer to spend their last days in their house, while a small fraction of them are able to actually do that.
A great many number of people actually pass away in the ICU.
So one of the goals for our project was basically have the palliative care team engage in a conversation with the patient early enough so that the patient can think through and articulate their preferences well before a crisis could emerge.
The question was, how do we enable or increase such conversations well in advance?
To answer that, we first see how do such consults happen currently.
Currently, the most common way for consultants A patient to get in touch with a palliative care doctor is through a referral from the primary treatment doctor. the primary treatment doctor makes a referral to a palliative care doctor upon the the doctor's discretion when the doctor feels that the patient deserves.
And currently, what might trigger that? Many studies have actually shown that treatment doctors tend to be quite poor at predicting the patient prognosis.
They tend to be overly optimistic. So even though a patient might be in a much worse situation approaching their final days, Doctors, for good reasons, they tend to be overly optimistic and many times fail to see that the patient is much closer to their end.
Okay. Many studies over the past few decades have shown that the fraction of people who need palliative care but get palliative care is quite small.
Well, I'd imagine there must be a host of factors that could contribute to a doctor or a medical professional, as you said, delivering slightly overly optimistic news or maybe hesitating to... or even influence a patient's frame of mind by suggesting that their condition might be terminal, they might be headed towards their final days, host of emotional factors and it being, you know, an inexact science predicting when somebody might pass along.
So, um, Not to mention the fact that, you know, speaking about death in American culture anyway is often kind of taboo.
It's just not something that people... We spend a lot more time talking about and preparing for our living days and our good days than we might for, you know, crises or even the end of our lives.
So that would make sense. So currently, hard for a patient to even know, I would imagine, that there is such a thing as palliative care, let alone get access to it.
What spurred the beginning of your research project?
As you mentioned, doctors tend to have cognitive biases in terms of identifying whether a patient is appropriate for a palliative care consultation.
We see this as the push mode of referral where the doctor is initiating a consult with the palliative care.
At the same time, we can also imagine a pull mode of referrals where palliative care doctors could potentially chart review every admitted patient every day to see who is worthy of having a conversation with.
Right. But of course, palliative care teams tend to be understaffed and it is extremely expensive for the team to chart review every patient every day.
Sure. This is where a project like ours can come into the picture.
If only there was technology to help. Exactly.
In terms of giving some chronological background, the project was actually conceived by the palliative care team at Stanford. and the Biomedical Informatics Research Department, both of whom are co-authors on this work.
The idea was to have a system or a program that was developed that could be run automatically every day to scan the the records of patients who are admitted that day. and highlight patients who are in need of palliative care.
So that was the context or background for this work.
And this was in 2016? Yeah, around 2016.
That's right. At Stanford, there are collaborations across departments.
It's very common. Our lab and Professor Nigam Shah's lab, we have been exploring collaborations and This project seemed like an ideal project for us to collaborate and bring in artificial intelligence to solve this problem of identifying patients who have palliative care needs.
So let's dig into that a little bit then, the sort of technical meat of the problem.
How did you, I'm assuming there was not a checkbox on a patient's record saying, you know, might need palliative care.
So how did you go about even starting to identify the bits of data that you would use to construct your, your approach?
Exactly. So artificial intelligence these days is primarily driven by machine learning.
And machine learning, as you probably know, is a data driven activity.
You need training data and training data for supervised learning requires labels.
In this case, it would mean we have a whole bunch of patient records.
And along with labels saying these are the patients who needed palliative care.
But of course, as you already mentioned, that is not available.
The decision of whether palliative person needs palliative care or not, as we just discussed, requires a chart review by a doctor.
So generating labels would be very expensive for building a machine learning algorithm.
So our hypothesis was that we could use a proxy problem definition, which was predicting mortality three to 12 months ahead. and use that decision in order to identify patients who may have palliative care needs.
So with this hypothesis, we built a mortality prediction model.
And for mortality prediction model, the good thing is that when you have a death label, it is pretty accurate.
So was there an existing, in the medical community, was there an existing sort of algorithm, if you will, for predicting mortality three to 12 months out?
Or did you kind of triangulate around, you know, a few different health predictors?
Or how did you arrive on your model? Yeah, so within the medical community, there are tools to make predictions about mortality, and most of them are most commonly used in the ICU. and they tend to be tools for predicting near-term mortality.
And by near term? As in days. Okay. Our goal was to build a much longer term mortality, primarily because we want to use this tool to start having these conversations while the patient is still able to have a conversation.
Right. For this, there are not too many tools available out there that does long-term mortality prediction.
And especially given the kind of big data that we have in terms of EHR systems.
It made sense to take a data-driven approach and to build a model that was tailored fit for the kind of patient distribution that we have at the hospital.
Okay. So did you mine through records of patients who had had already passed on to look at their indicators a year or so out or...
Exactly. So we basically use the patient records available at the Stanford Hospital. and look for patterns in the data of patients who had passed away three to 12 months, or rather look for patterns in the data three to 12 months prior to their date of death.
Using this, We built a deep learning model to train on identifying patients who have a high likelihood of death within 3 to 12 months.
No, I don't want to give away the ending here, so to speak, but my understanding is you achieved something around a 90% success rate in predicting mortality.
Yeah. Yeah, so there have been many stories circulating using the term 90%.
But I would like to kind of add some more perspectives to it.
So that's why we're here. Yeah, so accuracy is a good measure of performance for many tasks.
However, it also tends to be a poor measure of accuracy for certain tasks, especially where the prevalence of positive cases is very low.
To give you an example, let's say you need to build a classifier for separating positives and negatives. where the prevalence of positives is let's say 1%.
As a thought exercise, if I were to build a classifier that would not even look at the data and say no to everything, it gets a 99% accuracy.
So accuracy is not always the right measure to judge whether a system is performing well or not.
That being said, we use a few other measures which are a little more technical, like mean average precision, And we also use the area under the ROC curves.
And the model performs quite well on the data that we are trained on and tested on.
How large of a data set were you able to access for training?
Yeah, so the training data was based on a patient corpus of about 2 million, records of 2 million or so patients.
Okay. However, in order to construct a training set, we need a patient's record to be sufficiently long enough so that we cover the three to 12 months and more so that we have something to look at and make a prediction farther out.
So that reduces the number of trainable patient records to somewhere in the order of 200,000 patients.
So that was the size of our training set, so to speak, in machine language terminology.
And so what, if anything, as you were doing the work with the team, what may have surprised you along the way, either from a technical standpoint in learning how to work with the data or from a medical or healthcare standpoint?
Yeah, so there were a few interesting issues we bumped into, especially when we started taking this model and putting it into production.
So one of the things that we kind of learned along the way was that Some of the data that's available in your patient medical records when you're looking back in time is many times just not available when you actually put it in production.
For example, if our historical data involves billing codes that tend to come into your medical records with a lag of four to six weeks.
So if you're kind of depending on that data to make a prediction now, the data is just not available.
So let me see if I understand. So if I had blood work done, And I had actually recently had my fasting glucose, blood sugar levels, and my lipid panels kind of standard tests for somebody my age.
And I may have had those done on January 1st, but they wouldn't have been billed until the middle of February and that would throw things off.
Yeah, so if you were to look at your records, say three months from now, you would be billed for, say, your blood test on January 1st or 4th or whatever. but that data got entered sometime in February.
Yeah, that would throw things off. So that was kind of a surprise that we encountered.
And so we had to kind of retune our model to not look at something you know, some subsets of data because they won't be available.
The commerce of healthcare kind of coming in and messing with your data models.
It's... It's fascinating, but not at all surprising to think about.
There was a transition from using certain standard of diagnostic codes to It's called ICD 9 over to ICD 10, you know, sometime in, you know, 2012 or 2013 or something.
So, you know, patient records up until one point were using one kind of coding and then after That point in time, they were using a different coding.
So reconciling things like that, which kind of came up when we tried to put things in production.
And so how many people were on your team and were they all from, you mentioned that in your project and across the university, there's a lot of cross-departmental work.
Was your team all folks from the AI lab and the computer science department, or was it a mix with medical people?
It was definitely a mix. So the team was Stephanie Harmon.
She's a palliative care team doctor at Stanford Hospital.
Professor Nigam Shah, he is in the biomedical informatics.
Professor Andrew Ng, he's a computer science professor.
Dr. Lance Downing, he is again with Biomedical Informatics.
And Ken Zhang, he's a research scientist at again at biomedical informatics and myself from computer science.
So it was a pretty good mixture and diverse mixture across different you know, the hospital, biomedical informatics, computer science are coming together.
And did you yourself, do you have a prior background doing research or other work in the medical healthcare field?
Or was this kind of your first foray into that?
This was actually my first kind of project in the healthcare setting.
In the past, I've worked on some projects NLP, natural language processing related projects.
And prior to that, I've been a systems programmer for a long time.
So this is something new to me as well. So one of the interesting things with AI in general, and certainly in talking about the work that you're doing, is especially for somebody who's not a computer science, you know, how do they know how much to trust the machine, how much to trust the, prediction of something or the outcome of something.
And when you're talking about a person's life, and again, not all palliative care is, is associated with terminal illness, but a lot of it in the work that you're doing is you're talking about predicting somebody's mortality.
How does a doctor or a patient or a patient's family or caregivers know or start to grapple with this idea of, do I trust the computer when it predicts?
Speak to that a little bit. I think I'll leave it open-ended.
Sure. That's a very, very valid point and an important point as well.
So we believe that artificial intelligence in the healthcare setting, at least in the current form, is best implemented in conjunction with a human operator or a doctor. which means, for example, the program from our project, it is not a clinical decision support system, as in it is not making decisions decisions on behalf of a doctor, but it is a tool that is helping a doctor become more efficient.
What I mean by that is this tool is not deciding who gets palliative care and who does not get palliative care, but the people who are currently getting referred to, say, the primary care doctor that flow of referrals and consultations still continue.
And the program is trying to identify patients who are outside that subset, who are already getting referred. and trying to pick up patients who might benefit from consults.
Is the program currently in use? We are currently in a silent pilot at Stanford Hospital.
We are testing the model. In fact, the model that we are trying out at Stanford and the model in the paper, they're not exactly the same as yet.
So as much as you're able or comfortable answering the question, I ask just to... try to paint a picture of what a doctor's workflow might be like using the system.
And as you said, and it's something that comes up with AI across the board from the robots are taking our jobs to debates about autonomous or semi-autonomous vehicles on the roads.
Again, we're not suggesting that an AI system should take the place of a human operator, of a doctor.
But what might the workflow look like with your model in mind?
Yeah, so with our model, the workflow would look something like this.
So from a palliative care doctor's point of view, they still get the same referrals and consultation requests from the primary treatment doctors as they are.
But also they would get, for example, an email every morning with the names of three or four patients saying, hey, these patients might be, you know. worth getting their chart reviewed by you.
And, you know, this is trying to increase access to patients who might otherwise have slipped through the cracks.
And nowhere is this program being used to deny patients palliative care to anyone or nowhere is this system being used to replace a doctor's decision by the program's decision.
A doctor still reviews the patient's history, the patient's medical records and makes using the same criteria they would have. had the referral come through a different doctor.
It's just that it saves them the burden of chart reviewing every admitted patient every day and presenting them with a shorter list of patients who have a higher probability of having their needs.
Right. It's a tool for finding actionable insights in the data.
Exactly. So this, we believe, is a a good example of how artificial intelligence and humans kind of work together. to make the world better rather than thinking of artificial intelligence as taking our jobs or replacing humans.
Excellent. Our guest today is Anand Avati from the Stanford University Artificial Intelligence Lab in the Computer Science Department.
He's a graduate student there. co-author of a fascinating research paper about using deep learning to improve palliative care.
Anand, let's go back a little bit before you got into this.
You mentioned that previously you have some experience working with natural language processing, but even backing up a step further, When you were a kid, did you know that you wanted to spend at least the early part of your adult life working on how computers and humans could work together to make the world a better place?
Or what led you down this road? Yeah, I kind of got into computers a little late in the sense, well, after my high school, I got introduced to computers and this was back in India.
You grew up in India. Yeah, I grew up in India and I studied computer science in college.
And after that, I was quite fascinated with systems programming.
For well over a decade, I was a systems programmer writing operating system, kernel code, file system code.
And it was about a few years before I came back to school that I got exposed to machine learning. primarily because some of the tools that I was developing at work was being used in a machine learning system, and that got me interested in machine learning. learning and I decided, you know, this is very interesting.
I'm going to go back to school. Excellent.
And so what was the work you were doing with natural language processing?
Yeah, so this was a research project in our lab where being led by one of my lab mates, Yang, for building a machine learning system for correcting written language.
So primarily targeted at non-native speakers.
So let's say I'm a non-native speaker and I write an email or some other document trying to fix up that document to make it sound more natural.
I worked on that for about a year or so and then kind of got a lot more interested in healthcare after that.
So both of your parents are in healthcare, is that right?
They're both doctors? Yeah, they're both doctors in India.
And do you think that had any bearing on your finding your way, maybe down a little bit of a winding path, but finding your way to using your... experience and skills to affect the healthcare industry?
That's an interesting question. So when I was growing up, especially when I was getting into college, I was pretty sure I didn't want to be a doctor.
But perhaps there was some kind of a subconscious effect on me, which kind of got me interested later, you know, about a decade later of trying to apply technology. machine learning in the healthcare scenario.
I certainly hope sometime I'll be able to take some of this work and use some of these machine learning advances to improve healthcare back in my home country someday when EHR systems become more prevalent there.
Right. So to that point, where do you what's going on now with the project?
As we mentioned at the top, you know, the paper was was published in November of last year, I believe.
Yep. And now it's almost February of 18.
There's been a flurry of press around your work.
So- What happens next with the project?
And how do you, if you indulge us, how do you see this potentially affecting palliative care, machine learning affecting healthcare in general over the next five years or so.
Yeah, over the past three months at least, from our research point of view, you've been working on building better models, building more accurate models than the one that was put out in the paper.
The version that was put out in the paper was a relatively simple model architecture, network architecture, and we have a few more more sophisticated models that we are experimenting currently that can make even better decisions, even make even better predictions.
In terms of healthcare and AI in general, as I mentioned a little earlier, we believe that at least in the near-term future, the model that is going to be most successful is one that combines the strengths of a machine or artificial intelligence by keeping a human in the loop in terms of automated clinical decision support systems is probably still a way ahead in the future.
Yeah. Yeah, well, I may be biased because my parents both are also in the medical field, but I think there's something to be said for humans staying in the loop when it comes to these things.
If people wanna find out more about your work and your team's work, Anand, is there somewhere they can go online?
Yeah, so we have a group website, stanfordmlgroup.github.io, which talks about our lab's work in different healthcare. settings.
So the palliative care was in collaboration with Professor Nigam Shah and others.
There are also lots of very interesting projects around medical imaging that are happening in our lab. lab mates and detecting arrhythmias in ECG records, etc.
Those interested can definitely have a look at our website.
A wealth of projects to dig into, no doubt.
Well, again, Anand, thank you so much for joining us today to talk about your work.
It's important stuff. It's fascinating. Congratulations on what you've done so far and obviously all the best to you and your teammates going forward.
Thank you so much for having me.