Deep Metric Learning for the Hemodynamics Inference with Electrocardiogram Signals

Hyewon Jeong, Collin M. Stultz, Marzyeh Ghassemi

Introduction

Monitoring intracardiac pressures is a cornerstone of managing heart failure and other cardiovascular conditions. Specifically, the mean pulmonary capillary wedge pressure (mPCWP) serves as a critical indicator of cardiac health. However, the current gold standard for measuring mPCWP is right heart catheterization—an invasive, expensive, and risky procedure that requires threading a sensor directly into the heart. This complexity limits its use to acute clinical settings, leaving a significant gap in routine or outpatient monitoring.

Researchers from MIT have proposed a novel solution: using Deep Metric Learning (DML) to non-invasively estimate mPCWP from standard 12-lead electrocardiogram (ECG) signals. By leveraging massive unlabeled datasets and sophisticated embedding techniques, this framework not only improves prediction accuracy but also addresses a persistent challenge in medical AI: algorithmic bias across demographic subgroups.

The Challenge: Data Scarcity and Algorithmic Bias

While the ECG is a ubiquitous and non-invasive tool, using it to infer complex hemodynamics like mPCWP presents two primary hurdles:

  1. Label Scarcity: High-quality datasets that pair ECG signals with ground-truth invasive pressure measurements are rare. Most clinical records contain ECGs without corresponding catheterization data.
  2. Performance Disparities: Standard machine learning models often exhibit "algorithmic bias," performing significantly better on majority groups (e.g., male patients) than on under-represented subgroups (e.g., women or younger patients). In healthcare, these disparities can lead to inequitable treatment and outcomes.

Methodology: Deep Metric Learning (DML)

To overcome these barriers, the authors moved away from traditional classification and regression architectures in favor of Deep Metric Learning. Instead of mapping an ECG directly to a pressure value, DML learns a high-dimensional "embedding space" where patients with similar physiological states are positioned close together.

Supervised DML with Continuous Mining

The team adapted the triplet loss function—typically used for categorical data—for a regression task. They developed a "Continuous Label Based Mining" strategy that selects "positive" and "negative" examples based on the numerical proximity of their mPCWP values. This allows the model to learn the subtle gradients of cardiac pressure rather than just broad categories.

Self-Supervised DML and DTW

To utilize a massive corpus of 5.4 million unlabeled ECGs, the researchers implemented a self-supervised pre-training phase. They used signal-processing metrics, specifically Dynamic Time Warping (DTW) and Euclidean distance, to identify similar ECG waveforms. By training the model to recognize these patterns without clinical labels, the system learns the fundamental "physics" of the heart signal before it ever encounters an invasive pressure measurement.

Hard Negative Mining

To further refine the embedding space, the framework employs "semihard" and "softhard" mining. These techniques force the model to focus on the most difficult and ambiguous examples, ensuring that the resulting representations are robust and discriminative.

Data and Experimental Design

The study utilized data from Massachusetts General Hospital and Brigham and Women’s Hospital, comprising two distinct sets:

  • Labeled Dataset: 8,172 12-lead ECGs matched with mPCWP values obtained via catheterization between 2010 and 2020.
  • Unlabeled Dataset: Over 5.4 million ECGs from a general patient population, used for self-supervised learning.

Results: Accuracy and Equity

The DML framework demonstrated superior performance across multiple metrics compared to standard supervised baselines and popular contrastive learning methods like SimCLR.

  • Predictive Accuracy: The supervised DML model achieved a Root Mean Square Error (RMSE) of 7.15, outperforming the standard supervised baseline (7.45). This indicates a more precise estimation of mPCWP across the patient cohort.
  • Closing the Fairness Gap: Perhaps the most significant finding was the impact on fairness. Standard models showed an 8.1-point AUC gap between gender subgroups. The DML approach reduced this gap to 1.8 points. Remarkably, the self-supervised DTW model achieved a near-perfect 0.0 gap, suggesting that learning from the raw geometry of the signal naturally promotes demographic equity.
  • Representation Quality: Using the Recall@1 metric, the authors confirmed that the DML embedding space was significantly better at clustering patients with similar clinical conditions than traditional models.

Discussion and Future Work

The study suggests that the geometry of the embedding space is a key factor in both accuracy and fairness. By focusing on the relative similarity between patients, DML creates a more uniform representation that generalizes better across diverse populations.

However, the authors note several areas for future exploration. The current study is based on data from a single hospital system, necessitating external validation on more diverse, global datasets. Additionally, while the focus here was on mPCWP, the framework could potentially be expanded to other hemodynamic variables or the detection of conditions like silent myocardial infarction. Ultimately, this research paves the way for integrating sophisticated hemodynamic monitoring into wearable devices, enabling continuous, non-invasive care for heart failure patients.

Summary updated

BibTeX
@inproceedings{jeong2023deep,
  author = {Hyewon Jeong and Collin M. Stultz and Marzyeh Ghassemi},
  title = {{Deep Metric Learning for the Hemodynamics Inference with Electrocardiogram Signals}},
  booktitle = {MLHC},
  year = {2023},
  url = {https://openreview.net/forum?id=2j2cKE6mWO},
}
Figure