Language Models Are An Effective Patient Representation Learning Technique For Electronic Health Record Data

Ethan Steinberg, Ken Jung, Jason A. Fries, Conor K. Corbin, Stephen R. Pfohl, Nigam H. Shah

TL;DR

This paper introduces "Clinical Language Model-based Representations" (CLMBR), a novel method for learning patient representations from Electronic Health Records (EHRs) by adapting natural language processing techniques. CLMBR significantly improves the accuracy of clinical prediction models, especially when training data is scarce, achieving up to a 19% increase in AUROC compared to traditional methods.

What Problem Does This Paper Address?

Building accurate predictive models from Electronic Health Records (EHRs) is challenging due to the inherent complexity and sparsity of the data. A major hurdle is the limited number of patient records available for training models for specific clinical outcomes. This scarcity often leads to suboptimal model performance. Traditional machine learning approaches struggle to effectively utilize the rich, sequential, and high-dimensional nature of EHR data, often requiring manual feature engineering that is time-consuming and task-dependent. While deep learning has shown promise in other domains, its application to EHRs has not consistently yielded significant improvements over simpler methods. This paper aims to bridge this gap by developing a representation learning technique that can effectively transfer knowledge from a large patient population to improve predictions for specific clinical tasks, even with limited data.

Methods

The core innovation is the Clinical Language Model-based Representation (CLMBR). This approach treats a patient's EHR as a "document" composed of daily "words" (medical codes). A clinical language model is trained to predict the next day's codes given the patient's history. This language model, implemented using a Gated Recurrent Unit (GRU) architecture, learns to capture the sequential and temporal dynamics of patient care. After training, the learned representations from the GRU's internal state are extracted as fixed-length patient embeddings.

These CLMBR embeddings are then used as input for downstream clinical prediction tasks. The authors compare CLMBR against several baselines:

  • Count-based representations: Simple counts of medical codes, with and without ontology expansion and time binning.
  • Word2Vec: Adapting word embedding techniques to medical codes.
  • Latent Semantic Indexing (LSI): A dimensionality reduction technique.
  • End-to-end GRU models: Deep neural networks trained directly on raw EHR data for each specific outcome.

The predictive models used are L2-regularized logistic regression and gradient boosted trees (LightGBM).

Datasets

The study utilizes de-identified EHR data from Stanford Hospital and Lucile Packard Children's Hospital. This dataset spans from 1990 to 2018 and comprises 3.4 million patient records. The data includes diagnoses, procedures, medication orders, and laboratory test orders. For evaluation, the authors define five clinical outcomes: Inpatient Mortality, Long Admission, ICU Transfer, 30-day Readmission, and Abnormal HbA1c.

Key Insights and Ideas

  • Language modeling is a powerful tool for EHR representation: The paper strongly suggests that adapting language modeling principles, which excel at capturing sequential dependencies, is highly effective for understanding the complex temporal nature of EHR data.
  • Transfer learning is crucial for data scarcity: CLMBR demonstrates that pre-training a language model on a large EHR dataset allows for the transfer of valuable knowledge, significantly boosting performance on specific prediction tasks where data is limited.
  • CLMBR outperforms end-to-end models: Surprisingly, even in the large data regime, CLMBR-based representations performed better than end-to-end deep neural networks trained for each specific outcome. This suggests that general-purpose representations can be more robust.
  • Simpler models can shine with good representations: Logistic regression models, when paired with CLMBR representations, often performed as well as or better than more complex gradient boosted trees, potentially simplifying and accelerating model development.

Key Results

  • Significant improvement with CLMBR: CLMBR achieved a 3.5% mean improvement in AUROC across five prediction tasks compared to standard baselines when using the full dataset.
  • Dramatic gains with limited data: When only a small number of patient records were available for training, the average improvement in AUROC rose to 19% using CLMBR.
  • CLMBR superiority: CLMBR representations consistently outperformed Word2Vec, LSI, and even end-to-end GRU models across all tested outcomes.
  • Logistic regression advantage: With CLMBR, logistic regression models were often the best performers, sometimes outperforming gradient boosted trees, especially at smaller sample sizes.

Limitations and Future Work

  • Generalizability across institutions: The study's findings are based on data from a single institution. The authors acknowledge that the generalizability of CLMBR representations to data from other healthcare systems is an important area for future work.
  • Data volume trends: The authors note that as EHR data volume continues to increase, end-to-end models might regain some advantage, though CLMBR's benefits are shown to persist even with large datasets.
  • Computational cost: Training language models requires significant upfront computational resources, although the authors mention that recent work has focused on reducing these costs.
  • Exploration of other outcomes and sites: Future work could explore CLMBR's effectiveness on a wider range of clinical outcomes and across diverse patient populations and healthcare settings.

Summary updated

Abstract

Widespread adoption of electronic health records (EHRs) has fueled the development of using machine learning to build prediction models for various clinical outcomes. This process is often constrained by having a relatively small number of patient records for training the model. We demonstrate that using patient representation schemes inspired from techniques in natural language processing can increase the accuracy of clinical prediction models by transferring information learned from the entire patient population to the task of training a specific model, where only a subset of the population is relevant. Such patient representation schemes enable a 3.5% mean improvement in AUROC on five prediction tasks compared to standard baselines, with the average improvement rising to 19% when only a small number of patient records are available for training the clinical prediction model.
BibTeX
@article{steinberg2021language,
  author = {Ethan Steinberg and Ken Jung and Jason A. Fries and Conor K. Corbin and Stephen R. Pfohl and Nigam H. Shah},
  title = {{Language Models Are An Effective Patient Representation Learning Technique For Electronic Health Record Data}},
  journal = {J. Biomed. Informatics},
  year = {2021},
  url = {https://openreview.net/forum?id=Hik9OAD1RhK},
}
Figure