embedding and scaling ai models in healthcare applications › wp-content › uploads › 2018 ›...

56
Embedding and Scaling AI Models in Healthcare Applications BrainX 11/3/2018 Ghaith Habboub MD PGY 6 Neurosurgery Spine Fellow Cleveland Clinic

Upload: others

Post on 10-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Embedding and Scaling AI Models in Healthcare Applications

BrainX 11/3/2018

Ghaith Habboub MD PGY 6 Neurosurgery

Spine Fellow Cleveland Clinic

Page 2: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

ABOUT ME:

https://www.dentonacooley.org/blog/2016/8/11/photo-gallery

Page 3: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Embedding and Scaling AI Models in Healthcare Applications

BrainX 11/3/2018

1. Introduction 2. The Path for Every Data Scientist 3. The Reality of Machine Learning System 4. Existed Model Serving Methods 5. Scaling Machine Learning Servers

Page 4: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Embedding and Scaling AI Models in Healthcare Applications

BrainX 11/3/2018

1. Introduction 2. The Path for Every Data Scientist 3. The Reality of Machine Learning System 4. Existed Model Serving Methods 5. Scaling Machine Learning Servers

Page 5: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 6: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 7: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 8: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 9: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Embedding and Scaling AI Models in Healthcare Applications

BrainX 11/3/2018

Goals: 1. Understand why it is important to create an infrastructure to serve machine learning. 2. Understand what options are currently available. 3. Understand how can we scale our models to serve our enterprise and even external clients?

Page 10: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Embedding and Scaling AI Models in Healthcare Applications

BrainX 11/3/2018

1. Introduction 2. The Path for Every Data Scientist 3. The Reality of Machine Learning System 4. Existed Model Serving Methods 5. Scaling Machine Learning Servers

Page 11: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Classification

Regression

Infection vs. No-Infection

Pathology vs. Other Pathology

.

.

Days

Costs

.

.

THE PATH FOR EVERY DATA SCIENTIST

Page 12: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

MACHINE LEARNING:

Page 13: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

VS.

App 1 App 2

© 2018 Cleveland Clinic

Page 14: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 15: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 16: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

What can I do after I create a machine learning model?

Page 17: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

After deploying the model how would you incorporate the application in the workflow

without interrupting the client routine?

Page 18: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

In 2012 0% of Google applications utilized Machine Learning! In 2017 100% of Google applications utilized Machine Learning!

Fact!

Page 19: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Embedding and Scaling AI Models in Healthcare Applications

BrainX 11/3/2018

1. Introduction 2. The Path for Every Data Scientist 3. The Reality of Machine Learning System 4. Existed Model Serving Methods 5. Scaling Machine Learning Servers

Page 20: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 21: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 22: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

So what is Model Serving???

Page 23: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Embedding and Scaling AI Models in Healthcare Applications

BrainX 11/3/2018

1. Introduction 2. The Path for Every Data Scientist 3. The Reality of Machine Learning System 4. Existed Model Serving Methods 5. Scaling Machine Learning Servers

Page 24: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 25: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

GENERAL CONCEPT: ONE SERVER

Probability Of surgical Success 0.82

Page 26: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

GENERAL CONCEPT: APPLICATION PROGRAMMING INTERFACE

Probability Of surgical Success 0.82

Page 27: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Model Serving Methods

Calling Function Directly

Predictive Model Markup Language (PMML)

Single Server Application Programming Interface (API)

Containerized Application Programming Interface (API) with Container-Orchestration System

Cloud Services

Page 28: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

CALLING FUNCTION DIRECTLY

Page 29: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

PREDICTIVE MODEL MARKDOWN LANGUAGE

Page 30: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

SINGLE SERVER API

Page 31: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

SINGLE SERVER APIRequests per Hour in a single threaded server:

4000 requests

*

1 second

/

60 seconds

=

67 minutes

Page 32: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

DISADVANTAGES OF THE ABOVE METHOD1. Limited by the offered models (logistic regression, decision trees…)

2. Platform dependent.

3. Difficulty with scalabilities

4. Difficulty with replication

5. Difficulty with model updates

6. No support for continuous learning

Page 33: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

http://www.prathapkudupublog.com/2017/04/scaling-horizontally-and-vertically.html

Page 34: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Embedding and Scaling AI Models in Healthcare Applications

BrainX 11/3/2018

1. Introduction 2. The Path for Every Data Scientist 3. The Reality of Machine Learning System 4. Existed Model Serving Methods 5. Scaling Machine Learning Servers

Page 35: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

CONTAINERIZED APPLICATION PROGRAMMING INTERFACE (API) WITH CONTAINER-ORCHESTRATION SYSTEM

1. Capabilities to build any deep learning models including convolutional neural network (CNN) for image

analysis, recurrent neural network for sequence-to-sequence analysis.

2. Scalable.

3. Continuous Learning.

4. Easy to upgrade models to newer versions.

5. Easy to license to third party without exposing our models.

6. Non-platform dependent (does not rely on specific EMR since it is hiding behind an API) which is favorable

from commercial stand point.

7. Easy to expand to the cloud.

8. Able to have multi-input and connect to the outside world as opposed to be restricted to EMR.

Page 36: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 37: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

https://medium.freecodecamp.org/a-beginner-friendly-introduction-to-containers-vms-and-docker-79a9e3e119b

Page 38: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Container Wrapper Container Engine

Operating System

Container Orchestrator

Page 39: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 40: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Try it at home, Maybe!

Page 41: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

GOOGLE CLOUD AND OTHER CLOUDS

Page 42: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

CONTINUOUS LEARNING

Page 43: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

PERFORMANCE MONITORING

Page 44: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

What to get out of all of this?

1. There is far more to create a full machine learning system than just building a machine learning model.

2. Scalability is a key for machine learning systems due to the high computation power required to appropriately serve these models.

3. Appropriate infrastructure is an absolute necessity when deciding to embed these models into health care applications.

4. There is a reason why Google, netflix, openAI, CapitalOne, ebay, Sling… all use containerized application to provide services including machine learning based services and we should do the same!

Page 45: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

RESOURCES:1. https://github.com/rocketheat/Kubeadm_Rocketheat2. https://info.lightbend.com/rs/558-NCX-702/images/ebook-serving-machine-learning-models.pdf3. https://pipeline.ai/4. https://www.tensorflow.org/serving/

Page 46: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Journal Club

BrainX 11/12/2018

Page 47: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

Journal Club BrainX 11/12/2015

Page 48: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

CONTEXT➤ The collected healthcare data are reaching are approaching the genomic scale.

➤ Previous models utilizing healthcare data have limited features included due to the complexity of the data. Typically used models are even simpler with only few variables included and is usually single center.

➤ Fast Healthcare Interoperability Resources (FHIR) represents clinical data in a consistent, hierarchical, and extensible container format regardless of the healthcare system.

Page 49: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

METHODS➤ Dataset: Two hospitals USCF, UCM. Data from UCM also contained text data

➤ Outcomes: Inpatient mortality, 30-day readmission, length of stay at least 7 days, discharge diagnoses

➤ ML: Ensemble of (1. LSTM, 2. Attention-Decision Time-Aware LSTM, 3. Boosted Time-Based Decision Stumps)

➤ Control: Standard known scales including: Early Warning System Score, Modified Hospital Score for Readmission, and Modified Liu Score for Length of Stay

Page 50: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 51: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 52: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 53: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 54: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications
Page 55: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

LIMITATIONS➤ Retrospective study

➤ Each center analyzed separately

➤ Selecting Outcome Measures.

➤ Code not fully shared.

➤ Did not include neurosurgery patients!

Page 56: Embedding and Scaling AI Models in Healthcare Applications › wp-content › uploads › 2018 › 11 › ... · 2018-11-14 · Embedding and Scaling AI Models in Healthcare Applications

QUESTIONS?