Abstract
Background: Laboratory values are fundamental to medical diagnosis and management, but acquiring these values can be costly, invasive, and time-consuming. While electrocardiogram (ECG) patterns have been linked to certain laboratory abnormalities, the comprehensive modeling of these relationships remains underexplored. Methods: We utilize the MIMIC-IV dataset to develop multimodal deep-learning models to demonstrate the feasibility of estimating (real-time) and monitoring (predicting at future intervals) laboratory value abnormalities from ECG waveforms, demographics, biometrics, and vital signs. Results: The models exhibit strong predictive performance with AUROC scores above 0.70 for 23 laboratory values in the estimation setting and up to 26 values in the monitoring setting. Notably, accurately predictable values encompass diverse physiological categories such as cardiac, renal, hematological, metabolic, immunological, and coagulation. For example, the model achieved an AUROC of 0.882 for NTproBNP (>353 pg/mL) in estimation, and for monitoring, it reached 0.851 for Urea nitrogen at 30 minutes and 0.821 for hemoglobin at 120 minutes. Conclusions: This study provides evidence for the feasibility of using ECG data alongside clinical routine data for real-time estimation and monitoring of laboratory abnormalities, offering a non-invasive, cost-effective supplement to traditional testing.
Introduction
In clinical settings, laboratory values—such as electrolyte levels, blood counts, and kidney function markers—are the gold standard for diagnosis. However, obtaining these values is inherently "high-friction," requiring invasive needle sticks and significant processing time. In rapidly evolving scenarios like the ICU, a two-hour delay for lab results can be critical.
While the electrocardiogram (ECG) is a ubiquitous, non-invasive tool primarily used to check heart health, it contains a wealth of "hidden" systemic information. Changes in blood chemistry alter the electrical properties of the heart and its conduction pathways. This study introduces CardioLab, a multimodal deep learning framework that seeks to bridge the gap between electrical signals and chemical values, essentially turning the ECG into a "virtual laboratory."
Methods
The CardioLab architecture is designed to handle both high-dimensional waveform data and structured clinical metadata.
Model Architecture
The core components include:
- S4 Classifier: For raw ECG waveforms, a Structured State Space (S4) model is utilized. S4 models are designed to handle long sequences more efficiently than traditional CNNs or RNNs.
- Tabular Encoder: A three-layer Multi-Layer Perceptron (MLP) processes static patient metadata, including demographics (age, gender, race), biometrics (BMI, height, weight), and vital signs (heart rate, temperature, blood pressure, and oxygen saturation).
- Late Fusion: Features from the ECG waveforms and tabular data are concatenated at the final stage for binary classification.
Task Framing
The model is trained to solve two distinct problems:
- Abnormality Prediction: Estimating if a lab value is currently abnormal (within ±60 minutes of the ECG).
- Abnormality Forecasting: Predicting if a lab value will become abnormal within a 30, 60, or 120-minute future horizon.
Datasets
The study leverages the MIMIC-IV database, integrating three subsets: MIMIC-IV-ECG (raw waveforms), MIMIC-IV (clinical labs and vitals), and MIMIC-IV-ICD (data splitting). The final dataset includes 385,480 samples from 127,994 patients, covering 102 unique laboratory values.
Results
The model demonstrated strong performance across a wide array of lab values. The top performer was NTproBNP (a marker for heart failure), predicted with an AUROC of 0.903. Other high-accuracy markers included Hemoglobin (0.870), Albumin (0.859), and Hematocrit (0.821). In total, 24 different lab abnormalities were predicted with an AUROC > 0.70.
Performance remained remarkably stable across time horizons. For instance, Urea Nitrogen prediction actually improved slightly at the 120-minute forecasting horizon (AUROC 0.84) compared to the 30-minute horizon (AUROC 0.793).
Discussion
The most profound insight from this work is that the heart's electrical activity acts as a sensitive biosensor for the entire body. CardioLab successfully identified abnormalities not just in cardiac markers, but in renal, hematological, and metabolic categories. The ability to forecast abnormalities up to two hours in advance suggests that physiological shifts are reflected in the ECG before they reach standard blood test thresholds.
Limitations and Future Work
Currently, the model uses median-derived thresholds to define "abnormal" rather than patient-specific ranges. Furthermore, it performs binary classification rather than predicting exact numerical values. Future work using Explainable AI (XAI) could help clinicians understand which ECG segments drive specific lab predictions, and testing on general outpatient populations is necessary for broader clinical adoption.
Summary updated