Knowledge-enhanced Multimodal ECG Representation Learning with Arbitrary-Lead Inputs

Che Liu, Cheng Ouyang, Zhongwei Wan, Haozhe Wang, Wenjia Bai, Rossella Arcucci · DOI

Introduction

Electrocardiograms (ECGs) are the primary diagnostic tool for assessing cardiac health, yet training deep learning models for automated interpretation remains a challenge due to the scarcity of expert-labeled data. Recent research has explored multimodal learning—aligning ECG signals with free-text clinical reports—to leverage larger, unlabeled datasets. However, these methods often struggle with the inherent noise of natural language and a rigid dependency on the standard 12-lead configuration, which is frequently unavailable in wearable or emergency settings.

This paper introduces K-MERL (Knowledge-enhanced Multimodal ECG Representation Learning), a framework designed to overcome these hurdles. By utilizing Large Language Models (LLMs) to extract structured medical knowledge and employing a lead-aware architecture, K-MERL achieves state-of-the-art performance and unprecedented robustness to missing input data.

Methodology

K-MERL introduces three primary innovations to improve the quality and flexibility of ECG representations:

LLM-Powered Knowledge Mining

Rather than aligning ECG signals with raw, grammatically complex clinical reports, K-MERL uses Llama 3.1 to extract specific cardiac entities. The researchers defined a hierarchy of 277 unique medical concepts (e.g., "atrial fibrillation" or "ST elevation"). By training the model to predict these structured labels, K-MERL filters out linguistic noise and forces the encoder to learn the underlying medical pathology directly.

Lead-Aware Architecture

Unlike traditional models that treat 12-lead ECGs as a single image or a flattened array, K-MERL utilizes lead-specific tokenization and spatial positional embeddings. This allows the model to recognize the unique spatial "viewpoint" of each lead (such as Lead V1 versus Lead II) while maintaining a shared understanding of the temporal signal across the heart.

Dynamic Masking Strategies

To ensure the model can handle arbitrary lead inputs, the authors implemented two masking techniques during training:

  1. Dynamic Lead Masking (DLM): Randomly hides entire leads to simulate partial-lead scenarios.
  2. Lead-independent Segment Masking (LSM): Randomly hides time segments within leads. These strategies train the model to reconstruct or classify cardiac conditions even when the available data is incomplete or fragmented.

Experimental Setup

The model was pre-trained on MIMIC-ECG, the largest public dataset of its kind, containing over 800,000 ECG-report pairs. To test its generalizability, the researchers evaluated K-MERL across six external datasets, including PTBXL, CPSC2018, and CSN. Evaluation metrics focused on zero-shot classification and linear probing performance.

Key Results and Insights

K-MERL demonstrated significant improvements over existing state-of-the-art (SOTA) models in several key areas:

  • Superior Representation Learning: K-MERL achieved the highest scores in zero-shot and linear probing across all test datasets, proving that structured knowledge alignment is more effective than raw text alignment.
  • The Single-Lead Breakthrough: In a striking result, K-MERL using only a single lead outperformed the previous SOTA model (MERL) that had access to the full 12-lead setup. This suggests that high-quality representation learning can effectively compensate for missing physical sensors.
  • Robustness to Missing Data: In tests involving arbitrary lead combinations, K-MERL provided an average 16% AUC improvement over existing methods, making it highly suitable for 1-lead or 3-lead wearable devices.
  • Spatial Awareness: By treating leads as distinct spatial entities, the model more accurately captures the three-dimensional electrical activity of the heart.

Limitations and Future Work

While K-MERL represents a major advancement, its performance is partially dependent on the LLM's ability to accurately extract entities from reports. Rare or highly specialized conditions may still be missed if the knowledge extraction phase is not perfectly tuned. Additionally, while the model is robust to missing leads, future research is needed to address real-world signal noise—such as patient movement or electrode interference—which can be more unpredictable than the masking used in this study.

Conclusion

K-MERL bridges the gap between raw signal processing and clinical expertise. By transforming messy clinical narratives into structured knowledge and adopting a lead-agnostic architecture, it provides a powerful, scalable framework for cardiac AI that remains effective in diverse, real-world clinical environments.

Summary updated

BibTeX
@misc{liu2025knowledge,
  author = {Che Liu and Cheng Ouyang and Zhongwei Wan and Haozhe Wang and Wenjia Bai and Rossella Arcucci},
  title = {{Knowledge-enhanced Multimodal ECG Representation Learning with Arbitrary-Lead Inputs}},
  year = {2025},
  eprint = {2502.17900},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.17900},
}
Figure