Improved Patient Classification with Language Model Pretraining Over Clinical Notes.

Jonas Kemp, Alvin Rajkomar, Andrew M. DaiarXiv 2019

TL;DR

Researchers at Google Health developed SHiP (Sequential, Hierarchical, and Pretraining), a deep learning model that significantly improves patient diagnosis classification by effectively "reading" messy, unstructured clinical notes. By combining a hierarchical attention architecture with unsupervised language model pretraining, the model captures nuances and context that traditional bag-of-words approaches miss.

What Problem Does This Paper Address?

Electronic Health Records (EHRs) are a goldmine of information, but much of that data is locked away in free-text clinical notes. These notes are notoriously difficult for machines to parse: clinicians use non-standard abbreviations, ambiguous shorthand, and unpredictable formatting.

Historically, researchers have either ignored these notes in favor of structured data (like lab results) or reduced them to a "Bag-of-Words" (BOW)—a simple count of terms that completely ignores word order and context. For example, a BOW model might struggle to distinguish between "patient has a history of pneumonia" and "discharge diagnosis: pneumonia." The authors aim to bridge this gap by creating a model that treats clinical text as a sequential, hierarchical narrative rather than a jumbled pile of words.

Methods

The authors propose the SHiP model, which stands for Sequential, Hierarchical, and Pretraining. Its architecture consists of several key layers:

  1. Sequential & Hierarchical Processing: Instead of aggregating words immediately, the model uses a Long Short-Term Memory (LSTM) network to process words in their original order. A Hierarchical Attention Network (HAN) then assigns different weights to specific words and phrases, allowing the model to focus on the most clinically relevant parts of a note.
  2. Language Model Pretraining: This is the core innovation. Before being trained on specific medical tasks, the LSTM is "pretrained" on a large corpus of clinical notes using an unsupervised objective: predicting the next word in a sequence. This allows the model to learn the underlying "language" of clinical notes—including its weird abbreviations and jargon—before it ever sees a diagnosis label.
  3. Integrated Gradients: To understand why the model makes certain decisions, the authors used an attribution technique called path-integrated gradients. This helps visualize which specific words in a note drove the final prediction.

Datasets

The study utilized the MIMIC-III (Medical Information Mart for Intensive Care III) dataset, a widely used benchmark containing de-identified data from over 40,000 patients. The researchers represented patient histories using the FHIR (Fast Healthcare Interoperability Resources) specification to standardize the diverse data types.

Key Insights and Ideas

  • Pretraining is the "Secret Sauce": The authors found that while hierarchical models are intuitive, they don't always outperform simple baselines on their own. However, adding language model pretraining provides a massive boost. This suggests that the model needs a baseline understanding of clinical prose to effectively utilize its hierarchical structure.
  • Context is King: Qualitative analysis using attribution (Figure 1) revealed that SHiP is much better at identifying context than BOW models. While a BOW model might get distracted by any mention of a disease (like in a family history section), SHiP learns to focus on phrases following "discharge diagnoses."
Figure 1: Visualization of integrated gradients attribution over excerpts from patient discharge summaries (primary diagnosis shown at left). For each excerpt, the left column shows attribution from the BOW baseline, and the right column shows attribution from the SHiP model. Below each word is the value of the attribution computed for that word, where a higher absolute value indicates greater importance. Red boxes highlight the patient’s stated diagnosis in the text, while blue boxes indicate relevant pieces of nearby context.

Key Results

The SHiP model was evaluated on three tasks: mortality prediction, primary CCS diagnosis, and all ICD-9 discharge codes. The results, summarized in Table 1, show clear advantages for diagnosis tasks:

  • Primary CCS Diagnosis: The best SHiP model improved Top-1 recall by 7.9 percentage points and Top-5 recall by 4.8 percentage points over the best BOW baselines.
  • ICD-9 Prediction: The Area Under the Precision-Recall Curve (AUPRC) increased by 2.1 percentage points.
  • Mortality Prediction: Interestingly, the architectural improvements provided negligible benefit for mortality prediction 24 hours after admission, though pretraining still offered a slight statistical edge.
Table 1: Model performance results on the tasks of interest. Best values for each metric are bolded.

Limitations and Future Work

  • Task Specificity: The lack of significant improvement in mortality prediction suggests that the "richness" of clinical notes might be more critical for identifying specific diagnoses than for predicting general outcomes like death, which may be better captured by structured physiological data.
  • Computational Constraints: Due to memory limits, the researchers had to truncate notes to the most recent 2,500 tokens. Future work could explore architectures like Transformers (e.g., BERT variants) that might handle longer sequences or more complex dependencies more efficiently.
  • Generalization: While MIMIC-III is a standard benchmark, it represents data from a single center. Testing SHiP across different hospital systems with varying note-taking cultures would be a logical next step.

Summary updated

BibTeX
@misc{kemp2019improved,
  author = {Jonas Kemp and Alvin Rajkomar and Andrew M. Dai},
  title = {{Improved Patient Classification with Language Model Pretraining Over Clinical Notes.}},
  year = {2019},
  eprint = {1909.03039},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1909.03039},
}
Figure