Placeholder Image

字幕表 動画を再生する

  • Can you hear me?

  • Let's get started.

  • My name is Ahn Jae Man, and in this session

  • I am going to give a presentation about the Life-saving AI and Javascript.

  • Nice to meet you.

  • I work at AITRICS, a medical AI corporation, and I use AI

  • to predict the acute and critical diseases and emergencies of the inpatients,

  • And report the results to the medical team and help them to prepare for such incidents

  • We are provide solutions for such events.

  • Today I am here to walk you through the process and issues during the development of such solutions.

  • The topic itself is very broad.

  • When we say medical technology, it's a very broad term, same applies for the AI.

  • Likewise, there's a lot to talk about Javascript.

  • Our topics are extensive, and since I have such a limited time of 30 minutes,

  • I might briefly touch on some subjects on the surface level

  • On some topics, I may lack depth in my explanation.

  • and it might be hard to understand.

  • I apologize for such circumstances.

  • If you want further information

  • or if you would like to discuss some issues in depth, you can ask me,

  • or you can come talk to me in person later after the presentation,

  • I'll gladly discuss with you later on.

  • So in this session, what I would like to talk about is

  • The field of medical AI is not familiar with most people.

  • A lot of you might have heard of artificial intelligence so you'll might already be familiar with that.

  • but medical AI would be something most of you haven't heard of. So I will introduce you about this first

  • and then I will go over how to develop AI solutions,

  • the process of such development.

  • And then related to this topic, we are using the JS, so I will talk about Javascript related techniques

  • We use a lot of languages like Javascript, Python, and Go,

  • Today I would like to focus on the Javascript related issues.

  • And because the AI is different from regular softwares,

  • I will discuss several issues in relation to that.

  • This is the contents for today, and now I will start my presentation.

  • I will introduce the medical AI.

  • What if your code could save someone's life?

  • What if the code you created

  • Can contribute to raising the survival rate, even just 1%,

  • Your code will be able to save the life of one person out of a hundred.

  • In the U.S., 250,000 people lose their lives annually because of medical malpractice.

  • Now if your code may contribute to reducing such malpractice,

  • and increase the survival rate, even if it's just one percent,

  • You will be able to save 2,500 people annually, out of the 250,000.

  • Isn't it fascinating?

  • Now, I will talk about how the software engineering

  • and AI can save people's lives,

  • So one of the solutions we are working on right now is this:

  • This is a solution that predicts acute diseases in advance

  • and report the results to the doctors.

  • So what are the acute diseases and emergencies?

  • It can be death itself,

  • and an unexpected cardiac arrest,

  • and sepsis, or blood poisoning, which is not that widely known.

  • And many other diseases.

  • It may be hard to understand what sepsis is,

  • the sepsis refers to the same thing as blood poisoning.

  • So what exactly is it?

  • One of the common examples may be,

  • Let's say someone was bitten by a dog, and he was taken to the hospital, but passed away within a day.

  • Or,

  • Someone had an injection, like glucose solution, and suddenly passed away.

  • These are all cases caused by sepsis.

  • So sepsis, among many acute diseases,

  • induces the most deaths and incurs the highest cost,

  • And what's serious about it is, with each hour of delayed treatment,

  • you get 8% higher death rate.

  • More than 50% of deaths in the hospitals

  • are related to sepsis or blood poisoning.

  • Then if we can predict this sepsis and report it in advance,

  • we can intuitively understand that so many people can be saved.

  • So now we are working on sepsis,

  • the solution for predicting sepsis outbreaks.

  • Now I will introduce the development process for such a solution.

  • The overall process is shown in this figure.

  • The data of the patients, such as the heart rate, pulse, blood pressure, and body temperature,

  • and the blood test results, or X-ray, CT scan image, and prescriptions

  • So we collect all these,

  • and when we enter it into a machine learning model, and this model will, in 4 hours to 24 hours,

  • Calculate the probability of death or sepsis occurrence for the patient

  • Such results will be displayed on the dashboard,

  • Which is very simple.

  • It's a simple solution.

  • So this is the solution we are distributing right now, and

  • the mortality, or death, this solution decides that the person is risky of death in six hours,

  • and it notifies of the risk, and its evidences,

  • It offers the view of those information, such as the current state of the patient.

  • I summarized the process for AI solution development into five phases.

  • This is not the official 5-phase,

  • I thought it'd be easier for me to explain if I divide it into 5 phases.

  • I will walk you through each phases

  • First is data refining and model building,

  • this is an essential phase in building an AI.

  • You collect a lot of data

  • As you collect a massive amount of data,

  • you might encounter with strange data, or useless data,

  • Or irrelevant data.

  • So we do data cleansing and pre-processing.

  • And then for the outcome,

  • We have to define what we are going to predict.

  • When we predict death, death is obvious,

  • You would think, death is death,

  • You might jump into the conclusion that it's very simple to define the outcomes.

  • However, it is really complicated since we are predicting acute death

  • and we have to define what acute death is.

  • So the outcomes could be classified into many different definitions.

  • Let's say that the patient dies after 24 hours,

  • if you would like to predict this,

  • what about the patient who died after 25 hours?

  • What about 23 hours? These are all the issues that we have to keep in mind.

  • We think about those various circumstances,

  • and we struggle with many different data,

  • And we come up with the model that fits the data best.

  • This is what machine learning research usually does, and actually that's why

  • data refining and such takes up most of the time.

  • I would like to talk more about this process,

  • but I will skip this part for now.

  • And now the model, we developed this model,

  • and we have to deploy it,

  • and this is how the deployment is conducted.

  • Microservices, for example, Web API, most commonly,

  • or Rest API, we deploy models with these,

  • now that we have tensorflow JS, which enables us to

  • upload the model in the web browsers.

  • So with the tensorflow JS, we can deploy them on web browsers,

  • And of course processes like optimization for faster models, and compression, are necessary.

  • But in the deployment process, if we actually deploy them, it is reflected in the service,

  • so you have to make sure about this.

  • On my slide, it says it's about the safe usage of AI models,

  • but actually AI models do not always give the right output.

  • Even though it has 99% of accuracy,

  • It means it's accurate for 99 people out of 100, but it will be wrong for one person.

  • And this inaccuracy for one person is critical in many cases.

  • So what if the model suggests wrong output?

  • That's one issue,

  • And then when we have the output from the model,

  • why did the model produce such output?

  • How can we trust this output? This would be another issue.

  • So you have to defend such problems or consider such issues

  • to use the AI model safely.

  • So the drawback of the deep learning models is

  • They are very good at predicting the data it already had as the input

  • However, it cannot really predict well about the data it never learned.

  • For example, a deep learning model which distinguishes between dogs and cats,

  • if you put in a picture of a tiger, this model would,

  • It should say "this is neither a dog nor a cat"

  • but instead it will say that "it is a cat."

  • So when we develop machine learning models,

  • we test all of the possible inputs,

  • and even if there's some malfunctioning in the model

  • We need a lot of code to defend such cases in the solution phase.

  • If we provide machine learning models for this service,

  • we are usually concerned about these kind of things

  • so we need the test results of machine learning models for some random input values

  • This is usually called the property based testing

  • you test the model with random inputs

  • and observe what kinds of inputs fail the test

  • The test process for this is called property-based testing.

  • We conduct the property-based testing with Javascript

  • And the libraries like JS Verify or Fast Check supports this.

  • additionally, when the model produces an output,,

  • the issue of how can we trust the output,

  • It's about how accurate the results are.

  • So we have added a module that can be analyzed,

  • and so we were able to analyze and debug the module

  • If you look at the image on the right,

  • the image on the right bottom will be more intuitive

  • Here's a chest x-ray

  • Let's say I want to know if this person's health condition is in danger or not by looking at this x-ray

  • If you give this two images to the model,

  • and it says, 'the x-ray shows that he is in danger'

  • Then I need to know the exact reason why

  • to see if the model's answer is correct or not.

  • By putting an interpretable module, as we did for the right image,

  • it will tell us the reason why it's saying that. And we can see if it's working well or not.

  • So if we add an interpretable module,

  • we can use a much stabilized AI module.

  • Thus, when using interpreter modules

  • it's important to visualize it well when using the AI model.

  • And if I add some more explanation to the property based testing,

  • This is part of our solution code,

  • This code tests whether the people with sepsis actually

  • score higher on the sepsis risk test.

  • So when we find out the effect of sepsis,

  • the best way to diagnose sepsis is called lab blood culture feature.

  • If we give the value of 0.3,

  • the blood culture value is greater than 0.3. The rest of the value,

  • will be random values,

  • and it will automatically run a test,

  • and the result of the test must return a value greater than 0.2

  • And this shows that blood culture has some effect.

  • By testing it like this

  • we can run a machine learning module test randomly.

  • So by doing this,

  • I've introduced a way of deploying safely.

  • Next now that we have a model,

  • we have to find a way to use it with the actual data.

  • When we have data coming in live,

  • by using the calculator we have to find out the score,

  • for this we use data pipeline, like NodeJS,

  • it can be implemented very easily.

  • NodeJS supports asynchronous event,

  • when data flows in,

  • it tells the data to do a certain task,

  • so we were able to build a data pipeline easily using NodeJS.

  • During this progress, we can monitor the data flow,

  • or periodically check it's accuracy.

  • This is a part of our presentation during the PyCon.

  • So a data pipeline is something like this, when a data comes in from the hospital

  • the patients information comes in along with predictive acute disease solution.

  • By using the machine learning model, we can predict and show it on the Dashboard.

  • It will notify it in some way, such as the text message or the phone call.

  • Now you might think that we have simple data pipeline,

  • but this is actually very complicated,

  • If you look on top left corner, we can see that the patient's data comes from the hospital

  • Our synchronizer, which is a microservice, inputs the data into our database,

  • and if you look on the right side

  • you can see prediction, medical score,

  • and an alerting service

  • And if you see on top, you can see the things that must be done regularly.

  • Like backing up data,

  • a scheduler that trains the model,

  • and below that there's the monitor and controller.

  • I think we won't have enough time to go over everything,

  • so I'll start with this first,

  • I'll go back to other things later on

  • The monitor controller part

  • We use redis for this, and redis consumes a string,

  • and if we send it through StatsD

  • you can something like this on the right side of the screen.

  • You can see the medical score or EMR data.

  • By monitoring,

  • we can check if the data pipeline is working well or not.

  • As for the controller,

  • If we type in a command using slack,

  • we can check the status of the data pipeline

  • or rerun the data pipeline

  • you can do these kind of things.