The ability of software to reason, answer questions and intelligently converse about clinical notes, patient stories or biomedical papers has risen dramatically in the past few years.
This talk covers state of the art natural language processing, deep learning, and machine learning libraries in this space. We'll share benchmarks from industry & research projects on use cases such as clinical data abstraction, patient risk prediction, named entity recognition & resolution, and negation scope detection.
1. Dr. David Talby
NATURAL LANGUAGE UNDERSTANDING IN HEALTHCARE:
STATE OF THE ART NLP, MACHINE LEARNING AND DEEP
LEARNING WITH OPEN SOURCE SOFTWARE
2. CONTENTS
1. THE IMPORTANCE OF NLP IN HEALTHCARE AI
2. NLP IS ULTRA DOMAIN SPECIFIC
3. STATE OF THE ART RESEARCH RESULTS
4. SPARK NLP: PRODUCTION GRADE & AT SCALE
3. AI VS. DOCTORS
Deep Learning
Computer
Vision
Access to Care
Diagnostic
Accuracy
4. NLP IN HEALTHCARE
Deep Learning
NLP
Efficiency
Accuracy
Radiology Diagnostic
Mental
Health
Safety
Events
Inpatient
Pre-
Auth
Key
Opinion
Leaders
Research
Meta
Analysis
Clinical
Coding
Financial
Anti-
Fraud
Adverse
Events
Drug Development
Recruit
for Trials
5. RISK PREDICTION CASE STUDY: DETECTING SEPSIS
“Compared to previous work that only
used structured data such as vital signs
and demographic information, utilizing
free text drastically improves the
discriminatory ability (increase in AUC
from 0.67 to 0.86) of identifying
infection.”
6. COHORT SELECTION CASE STUDY: ONCOLOGY
“Using the combination of structured and
unstructured data, 8324 patients were
identified as having advanced NSCLC.
Of these patients, only 2472 were also in the
cohort generated using structured data only.
Further, 1090 patients would be included in the
structured data only cohort who should have
been excluded based on additional data.”
7. CONTENTS
1. THE IMPORTANCE OF NLP IN HEALTHCARE AI
2. NLP IS ULTRA DOMAIN SPECIFIC
3. STATE OF THE ART RESEARCH RESULTS
4. SPARK NLP: PRODUCTION GRADE & AT SCALE
8. WHAT MAKES LANGUAGE HARD
• Nuanced
– Sure / I agree / Absolutely! / Whatever / Yes sir / Just to see you smile ❤️
• Fuzzy
– Blue, New, Tall, Child, Tell, Do
• Contextual
– “Patient denies alcohol abuse”
• Medium specific
– “SGTM c u in 15”
• Domain specific
– All forward-looking statements included in this document are based on
information available to us on the date hereof, and we assume no obligation to
revise or publicly release any revision to any such forward-looking statement,
except as may otherwise be required by law.
9. We all speak many languages.
THE FIRST RULE OF NLP:
10. ED Triage Notes
states started last night, upper abd, took alka seltzer approx
0500, no relief. nausea no vomiting
Since yeatreday 10/10 "constant Tylenol 1 hr ago. +nausea.
diaphoretic. Mid abd radiates to back
Generalized abd radiating to lower x 3 days accompanied
by dark stools. Now with bloody stool this am. Denies dizzy,
sob, fatigue. Visiting from Japan on business.”
Features
Type of Pain
Intensity of Pain
Body part of region
Symptoms
Onset of symptoms
Attempted home remedy
EMERGENCY ROOM LANGUAGE
11. Different Vocabulary
Different Grammar
Different Context
Different Meaning
Different
Language Models
Tokenizer Normalizer
Lemmatizer Fact Extraction
Part of Speech Tagger Spell Checker
Coreference Resolution Dependency Parser
Sentence Splitting Negation Detection
Named Entity Recognition Sentiment Analysis
Intent Classification Summarization
Word Embeddings Emotion Detection
Question Answering Relevance Ranking
Best Next Action Translation
12. CONTENTS
1. THE IMPORTANCE OF NLP IN HEALTHCARE AI
2. NLP IS ULTRA DOMAIN SPECIFIC
3. STATE OF THE ART RESEARCH RESULTS
4. SPARK NLP: PRODUCTION GRADE & AT SCALE
16. “DEEP LEARNED” ENTITY RESOLUTION
“CNN-based ranking for biomedical entity normalization”.
Li et al., BMC Bioinformatics, October 2017.
F-Score Dataset Task
90.30%
ShARe /
CLEF
Disease & problem norm.
92.29% NCBI Disease norm. in literature
17. ASSERTION STATUS DETECTION
Prescribing sick days due to diagnosis of influenza. Positive
Jane complains about flu-like symptoms. Speculative
Jane’s RIDT came back clean. Negative
Jane is at risk for flu if she’s not vaccinated. Conditional
Jane’s older brother had the flu last month. Family history
Jane had a severe case of flu last year. Patient history
18. “DEEP LEARNED” ASSERTION STATUS DETECTION
“Improving Classification of Medical Assertions in Clinical Notes“
Kim et al., In Proceedings of the 49th Annual Meeting of the Association for Computational
Linguistics: Human Language Technologies, 2011.
Dataset Metric
94.17%
4th i2b2/VA
Mirco-averaged F1
79.76% Marco-averaged F1
20. BIOMEDICAL WORD EMBEDDINGS
“How to Train Good Word Embeddings for Biomedical NLP”.
Kim et al., In Proceedings of the 49th Annual Meeting of the Association for Computational
Linguistics: Human Language Technologies, 2011.
• Intrinsic measures (similarity between concepts)
• Extrinsic measures (improving NER)
• Hyperparameter optimization
• Sub-sampling
• Minimum-count
• Learning rate
• Vector dimension
• Context window size
• Available under an open license here
21. CONTENTS
1. THE IMPORTANCE OF NLP IN HEALTHCARE AI
2. NLP IS ULTRA DOMAIN SPECIFIC
3. STATE OF THE ART RESEARCH RESULTS
4. SPARK NLP: PRODUCTION GRADE & AT SCALE
22. NLP FOR APACHE SPARK
Data Sources API
Spark Core API (RDD’s, Project Tungsten)
Spark SQL API (DataFrame, Catalyst Optimizer)
Spark ML API (Pipeline, Transformer, Estimator)
Part of Speech Tagger
Named Entity Recognition
Sentiment Analysis
Spell Checker
Tokenizer
Stemmer
Lemmatizer
Entity Extraction
Topic Modeling
Word2Vec
TF-IDF
String distance calculation
N-grams calculation
Stop word removal
Train/Test & Cross-Validate
Ensembles
High Performance Natural Language Understanding at Scale
Design Goals
• State of the art Performance & Scale
• Frictionless Reuse
• Enterprise Grade
Built on the Spark ML API’s
Apache 2.0 Licensed
Active development & support
23. NLP FOR APACHE SPARK: COMBINED NLP & ML PIPELINES
pipeline = pyspark.ml.Pipeline(stages=[
document_assembler,
tokenizer,
stemmer,
normalizer,
stopword_remover,
tf,
idf,
lda])
topic_model = pipeline.fit(df)
Spark NLP annotators
Spark ML featurizers
Spark ML LDA implementation
Single execution plan for whole pipeline
24. PERFORMANCE BENCHMARKS
• Training was 80x faster to train on 2.6MB
• Training was 38x faster on 100k
• Training on 100k & 2.6MB took roughly the same
• Additional near-linear speedup on a cluster
• Prediction was 1.6x faster on 75MB
• Prediction was 1.4x faster on 15MB
• Adding NLP stages takes roughly the same
• Additional near-linear speedup on a cluster
25. HEALTHCARE EXTENSIONS
Data Sources API
Spark Core API (RDD’s, Project Tungsten)
Spark SQL API (DataFrame, Catalyst Optimizer)
Spark ML API (Pipeline, Transformer, Estimator)
Part of Speech Tagger
Named Entity Recognition
Sentiment Analysis
Spell Checker
Tokenizer
Stemmer
Lemmatizer
Entity Extraction
Topic Modeling
Word2Vec
TF-IDF
String distance calculation
N-grams calculation
Stop word removal
Train/Test & Cross-Validate
Ensembles
High Performance Natural Language Understanding at Scale
com.johnsnowlabs.nlp.clinical.*
Healthcare specific NLP
annotators for Spark in
Scala, Java or Python:
• Entity Recognition
• Value Extraction
• Word Embeddings
• Assertion Status
• Sentiment Analysis
• Spell Checking, …
data.johnsnowlabs.com/health
1,800+ Expert curated,
clean, linked, enriched &
always up to date data:
• Terminology
• Providers
• Demographics
• Clinical Guidelines
• Genes
• Measures, …
26. CASE STUDY: DEMAND FORECASTING OF ADMISSIONS FROM ED
Features from Structured Data
• How many patients will be admitted today?
• Data Source: EPIC Clarity data
Reason for visit
Age
Gender
Vital signs
Current wait time
Number of orders
Admit in past 30 days
Type of insurance
27. CASE STUDY: DEMAND FORECASTING OF ADMISSION FROM ED
Features from Natural Language Text
• A majority of the rich relevant content lies in unstructured notes that
are contributed by doctors and nurses from patient interactions.
• Data Source: Emergency Department Triage notes and other ED notes
Type of Pain
Intensity of Pain
Body part of region
Symptoms
Onset of symptoms
Attempted home remedy
Accuracy Baseline: Human manual prediction
ML with structured data
ML with NLP
28. USING SPARK NLP
• Homepage: https://nlp.johnsnowlabs.com
– Getting Started, Documentation, Examples, Videos, Blogs
– Join the Slack Community
• GitHub: https://github.com/johnsnowlabs/spark-nlp
– Open Issues & Feature Requests
– Contribute!
• The library has Scala and Python 2 & 3 API’s
• Get directly from maven-central or spark-packages
• Tested on all Spark 2.x versions
There is not one “language” – every vertical and communication channel has its own jargon that includes vocabulary, grammar, assumptions and semantics.
For example – in these ED triage notes, none of the sentences is in valid English, and the words “patient” and “pain” do not appear.