An Efficient Contrastive Unimodal Pretraining Method for EHR Time Series Data

Ryan King, Shivesh Kodali, Conrad Krueger, Tianbao Yang, Bobak J. Mortazavi · DOI

Abstract

Electronic Health Record (EHR) time series data are characterized by irregular sampling and high rates of missing values, making supervised learning challenging due to the scarcity of labeled clinical data. We present a self-supervised pretraining framework that integrates masked value imputation with contrastive learning. By employing a specialized gradient estimator, our method achieves high-performance contrastive learning with small batch sizes, ensuring computational efficiency for long clinical sequences. Evaluated on MIMIC-III and eICU datasets, our approach demonstrates superior performance in mortality prediction and phenotyping, particularly in low-data regimes.

Introduction

Clinical predictive modeling using EHR data is often hindered by the "irregularly sampled" nature of vitals and the significant effort required for expert labeling. While Deep Neural Networks (DNNs) are capable of modeling such complexity, they typically require large labeled datasets. Self-supervised learning (SSL) provides a solution by utilizing unlabeled data through proxy tasks. However, standard contrastive learning methods often demand large batch sizes that exceed GPU memory limits when processing long clinical time series. This research introduces a computationally efficient SSL method tailored for the unique constraints of EHR data.

Methods

The proposed architecture treats clinical measurements as discrete tokens, similar to Natural Language Processing. The pretraining objective consists of two primary components:

  1. Triplet Embedding: Each measurement is represented as a triplet (time, value, measurement_type), allowing the model to handle irregular sampling without biased imputation.
  2. Masked Imputation (Triplet-Level): The model learns local physiological relationships by predicting masked values within the sequence.
  3. Global Contrastive Loss (Sequence-Level): The model aligns a "global view" of a patient stay with a "local cropped view" while distinguishing them from other patients' records.
  4. Stochastic Gradient Estimator: To maintain efficiency, a variance-reducing gradient estimator is used for the contrastive term, enabling the simulation of large batch sizes within limited memory.
Overview of the proposed pretraining framework showing the integration of masked imputation (Global View) and contrastive learning (Local View).

Results

The model was pretrained on the MIMIC-III dataset and evaluated on tasks including In-Hospital Mortality and Phenotyping.

Performance in Low-Data Regimes

A key strength of the method is its performance when labels are scarce. As shown in the results table, the "Combined" (Masked + Contrastive) model significantly outperforms the baseline and other specialized architectures like STraTS when only 1% or 5% of labels are available.

Performance comparison of various models across In-Hospital Mortality, Phenotype, and Imputation tasks on the MIMIC-III dataset.

Key Findings

  • Superior Accuracy: The Combined method achieved an AUC-ROC of 0.852 for mortality prediction on MIMIC-III, surpassing standard LSTMs (0.839).
  • Effective Imputation: The model demonstrated high accuracy in predicting missing values (MSE of 0.409), suggesting its utility as a clinical estimation tool.
  • Generalizability: External validation on the eICU database confirmed that the learned features generalize well across different hospital systems, with the contrastive method reaching 0.775 AUC-ROC for mortality compared to 0.633 for the baseline.

Discussion and Conclusion

This work establishes a scalable blueprint for building foundation models in the ICU. By treating measurements as tokens and optimizing for memory efficiency, the proposed method allows high-performance modeling even with limited labeled data. Future research may involve expanding the task variety beyond mortality and phenotyping and integrating multi-modal data such as clinical notes. Despite its strengths, the sensitivity of linear evaluation to initialization remains a challenge for future refinement.

Summary updated

BibTeX
@inproceedings{king2024efficient,
  author = {Ryan King and Shivesh Kodali and Conrad Krueger and Tianbao Yang and Bobak J. Mortazavi},
  title = {{An Efficient Contrastive Unimodal Pretraining Method for EHR Time Series Data}},
  booktitle = {IEEE BHI'24},
  year = {2024},
  url = {https://openreview.net/forum?id=ZN5vbwMpgX},
}
Figure