CardioLab: Laboratory Values Estimation from Electrocardiogram Features - An Exploratory Study

Juan Miguel Lopez Alcaraz, Nils Strodthoff

Abstract

Traditional laboratory blood tests are essential for clinical diagnosis but are limited by their invasive nature, cost, and intermittent frequency. This exploratory study introduces CardioLab, a machine-learning framework designed to estimate abnormal laboratory values using non-invasive electrocardiogram (ECG) features and patient demographics. Utilizing the MIMIC-IV dataset, the researchers employed XGBoost models to predict 25 different lab markers, achieving AUROCs as high as 0.901. The results suggest that ECG data contains systemic signatures of health beyond cardiac rhythm, offering a potential path toward continuous, non-invasive patient monitoring.

Introduction

In modern clinical medicine, laboratory tests (blood work) serve as the "gold standard" for diagnosis and monitoring. However, these tests possess three major drawbacks: they are invasive, expensive, and provide only a temporal "snapshot" of a patient's condition. In acute care settings, a patient’s status can deteriorate rapidly between scheduled blood draws, potentially leading to missed windows for early intervention.

While ECGs are primarily used to monitor heart rhythm, the heart’s electrical activity is deeply influenced by the body’s overall chemical and metabolic environment. This paper investigates whether it is possible to "reverse-engineer" blood test results from ECG data, effectively transforming a standard heart monitor into a continuous, non-invasive diagnostic tool.

Methodology

The researchers framed the challenge as a binary classification task: predicting whether a specific lab value falls into an "abnormal" range (either high or low) based on the patient's physiological state.

Model and Features

The study utilized XGBoost, a gradient-boosting tree algorithm known for its high performance on tabular data. The model integrated several categories of input features:

  • ECG Features: Specific intervals and axes derived from the heart's electrical cycle (e.g., RR interval, QRS duration, P-wave onset).
  • Demographics: Age, gender, and race.
  • Vital Signs: Real-time data including temperature, heart rate, respiratory rate, and blood pressure.

Data Source and Evaluation

The study utilized the MIMIC-IV and MIMIC-IV-ECG datasets, which contain de-identified electronic health records from the Beth Israel Deaconess Medical Center. To ensure a robust ground truth, the researchers matched ECG readings with corresponding laboratory results recorded within a 60-minute window. Performance was measured using the Area Under the Receiver Operating Characteristic curve (AUROC), with 95% confidence intervals calculated via bootstrapping.

Key Insights: The Heart as a Sensor

The most significant insight from this research is that the ECG contains "hidden" signatures of systemic health. While it is clinically expected that electrolytes (like potassium) affect the heart, the model successfully predicted markers for liver function (Albumin) and oxygen transport (Hemoglobin).

This suggests a high degree of cross-system utility, where the model showed predictive power across multiple organ systems:

  • Cardiovascular function: NTproBNP, Hemoglobin
  • Renal function: Urea Nitrogen, Creatinine
  • Immune response: Monocytes, Basophils
  • Metabolic/Endocrine states: Cholesterol, Vitamin D

Furthermore, the study highlights the feasibility of tabular data. Unlike many recent "black box" deep learning approaches that require raw ECG waveforms, this study demonstrates that hand-crafted features (wave timings) and metadata are highly effective for this task.

Results

The CardioLab model achieved impressive results across 25 different laboratory values. Some of the top-performing estimations by AUROC include:

  • Albumin (>5.2 g/dL): 0.901
  • Hemoglobin (>17.5 g/dL): 0.881
  • NTproBNP (>353.0 pg/mL): 0.866 (a key marker for heart failure)
  • Acetaminophen (>30.0 ug/mL): 0.857
  • Hematocrit (>51.0%): 0.847

Even for complex markers like Creatinine (kidney function) and Bilirubin (liver function), the model maintained AUROCs in the 0.73–0.75 range, suggesting that significant predictive signals for these organs are present in the ECG.

Limitations and Future Work

While the results are promising, the authors identify several areas for further development:

  • External Validation: The study relied entirely on the MIMIC dataset. To ensure clinical utility, these models must be validated against different hospital populations.
  • Fixed Thresholds: The study used static "abnormal" thresholds. Future work could benefit from patient-specific thresholds adjusted for age and gender.
  • Waveforms vs. Features: Moving from tabular features to raw ECG waveforms using Deep Learning might capture subtle patterns that hand-crafted features miss.
  • Explainability: Integrating methods like SHAP (Shapley Additive Explanations) is a planned next step to help clinicians understand the physiological basis for the model's predictions.

Conclusion

CardioLab demonstrates that the ECG can serve as more than just a heart monitor; it can act as a non-invasive window into a patient's systemic health. By providing continuous estimation of laboratory values, this technology could significantly enhance early detection and patient monitoring in clinical settings.

Summary updated

BibTeX
@inproceedings{alcaraz2024cardiolab,
  author = {Juan Miguel Lopez Alcaraz and Nils Strodthoff},
  title = {{CardioLab: Laboratory Values Estimation from Electrocardiogram Features - An Exploratory Study}},
  booktitle = {Computing},
  year = {2024},
  doi = {10.22489/cinc.2024.112},
}
Figure