Papers
Topics
Authors
Recent
Search
2000 character limit reached

Electrocardiogram-Language Models (ELMs)

Updated 4 July 2026
  • Electrocardiogram-Language Models (ELMs) are a research framework that couples ECG signal tokenization and continuous embeddings with language-processing techniques.
  • They encompass diverse paradigms including multimodal generation, domain-adapted LLMs, and self-supervised ECG tokenization to handle clinical signals.
  • ELMs leverage varied methodologies—from vector quantization and segmentation to retrieval-augmented generation—ensuring precise, interpretable clinical reasoning.

Electrocardiogram-LLMs (ELMs) are a heterogeneous class of models that couple electrocardiographic signals, electrocardiographic knowledge, or both with language modeling, بحيث ECG data can be queried, summarized, classified, retrieved, or forecast in natural language. The term is used across at least three partially overlapping paradigms: multimodal systems that condition text generation on ECG signals, domain-specific LLMs adapted to electrocardiography, and self-supervised models that treat cardiac waveforms or rhythms as language-like token sequences (Tang et al., 2024, Ahrens et al., 21 Oct 2025, Wang et al., 26 Feb 2026). This terminological breadth is not incidental: it reflects a research area in which “language” may denote textual clinical reasoning, symbolic ECG tokenization, or joint ECG–text representation learning.

1. Conceptual scope and historical formation

The intellectual basis for ELMs predates current multimodal LLM practice. “ECG Language Processing (ELP)” explicitly framed an ECG record as a sequence of heartbeats analogous to sentences, with P-wave, QRS complex, T-wave, and U-wave morphologies serving as word-like units; that work clustered wave snippets into a vocabulary, embedded token sequences, and modeled them with CNNs or Bi-LSTM architectures for heartbeat classification and atrial fibrillation detection (Mousavi et al., 2020). Subsequent work extended the language analogy from symbolic sequence modeling to multimodal learning between ECGs and reports, including retrieval systems that aligned ECG images with clinical text through ViT–BERT-style architectures (Qiu et al., 2023).

A later generation of work consolidated the modern ELM label but did not converge on a single canonical architecture. Some papers define ELMs as multimodal foundation models that jointly represent raw ECG waveforms and generate natural-language interpretations or reports, as in few-shot ECG question answering and long-context forecasting (Tang et al., 2024, Velingker et al., 17 Feb 2026). Others use the term for domain-adapted LLMs specialized for electrocardiography literature and clinical knowledge rather than direct signal ingestion (Ahrens et al., 21 Oct 2025). A parallel line treats ECG as a structured language for self-supervised learning, with rhythm-aware tokenization and masked prediction objectives (Wang et al., 26 Feb 2026).

Family Representative papers Core formulation
Signal-as-language SSL (Mousavi et al., 2020, Jin et al., 15 Feb 2025, Wang et al., 26 Feb 2026) ECG waves, beats, or rhythms are tokenized and modeled with language-style objectives
Multimodal ECG-conditioned generation (Tang et al., 2024, Wan et al., 2024, Velingker et al., 17 Feb 2026) ECG embeddings or ECG tokens are fused with an LLM to answer questions or generate reports
Domain-adapted and retrieval-grounded ECG LLMs (Ahrens et al., 21 Oct 2025, Yu et al., 30 Apr 2025, Song et al., 30 Sep 2025) Textual ECG knowledge, rules, or retrieved documents ground ECG-oriented reasoning

This diversity suggests that ELM is best understood as a research program rather than a single model family. A plausible implication is that comparisons across papers require attention to what is being aligned: waveform-to-language, report-to-language, or cardiology text-to-language.

2. Representation strategies

Representation design is the defining architectural fault line in ELM research. One branch uses explicit symbolic tokenization. ELP clustered normalized wave snippets into a vocabulary with K=20K=20 total clusters and converted ECGs into sequences of integer tokens (Mousavi et al., 2020). HeartLang advanced this idea by introducing the QRS-Tokenizer, which centers segmentation on detected QRS complexes, forms heartbeat “words,” pads or truncates to a sentence length l=256l=256, and learns a vector-quantized vocabulary V\mathcal V with k=8192k=8\,192 entries of dimension d=128d=128, of which 53945\,394 were used in validation (Jin et al., 15 Feb 2025). RhythmBERT further imposed physiological structure by delineating P, QRS, and T segments, learning separate convolutional autoencoders with dP=dT=12d_P=d_T=12 and dQRS=24d_{QRS}=24, clustering latents into kP=13k_P=13, kQRS=11k_{QRS}=11, and l=256l=2560, and combining these discrete rhythm tokens with continuous morphology embeddings projected to l=256l=2561 (Wang et al., 26 Feb 2026).

A second branch relies on learned ECG encoders that produce continuous embeddings for an LLM. In the few-shot ECG question-answering ELM, a self-supervised ECG encoder outputs a sequence l=256l=2562, which is mapped by the trainable “Meta Mapper” into a prefix l=256l=2563 prepended to textual token embeddings for a frozen decoder-only LLM; the default mapper uses 4 attention layers, 8 heads, and dropout l=256l=2564 (Tang et al., 2024). MEIT likewise converts a l=256l=2565-lead, l=256l=2566 s ECG l=256l=2567 into ECG embeddings l=256l=2568 and injects them as keys and values in every causal-attention layer of the LLM, rather than adding a separate cross-modal head (Wan et al., 2024). CLIC uses a different multimodal design: a ResNet18-based ECG encoder produces a l=256l=2569-dimensional vector V\mathcal V0, a frozen ClinicalBERT text encoder produces a V\mathcal V1-dimensional V\mathcal V2, and the concatenated V\mathcal V3-dimensional representation is passed to an MLP classifier (Lucafo et al., 18 May 2026).

A third branch minimizes modality-specific machinery. ECG-Byte replaces a pretrained ECG encoder with an adapted byte-pair encoding tokenizer. One implementation quantizes ECGs into an alphabet of size V\mathcal V4, applies a default V\mathcal V5, obtains a final vocabulary of approximately V\mathcal V6, and reports a median encoded length of approximately V\mathcal V7 tokens per V\mathcal V8 s segment with a V\mathcal V9 compression ratio (Han et al., 2024). A later unified benchmark used k=8192k=8\,1920 merges on k=8192k=8\,1921 full preprocessed ECGs and reported a final vocabulary of size approximately k=8192k=8\,1922 (Han et al., 24 May 2025). ELF goes further by removing the ECG encoder entirely: a raw k=8192k=8\,1923-lead, k=8192k=8\,1924 s, k=8192k=8\,1925 Hz signal k=8192k=8\,1926 is flattened and mapped by a single linear projection k=8192k=8\,1927, and the resulting vector is inserted as a “<signal>” token embedding in the LLM input sequence (Han et al., 5 Jan 2026).

Image-based representations remain a viable but separate lineage. ECG retrieval work encoded denoised PTB-XL ECGs as Markov Transition Field, Gramian Angular Field, Recurrence Plot, or All-Grid images, then aligned them with reports using ViT and BERT projections into a k=8192k=8\,1928-dimensional normalized joint space (Qiu et al., 2023). The later unified representation benchmark found that symbolic representations achieved the greatest number of statistically significant wins over both signal and image inputs across six public datasets and five evaluation metrics (Han et al., 24 May 2025).

3. Learning objectives and adaptation regimes

Training strategies in ELMs range from classic masked modeling to instruction tuning, meta-learning, retrieval conditioning, and curriculum learning. In domain-specific textual adaptation, ECG-LLM fine-tuned open-weight Llama 3.1 k=8192k=8\,1929B and d=128d=1280B models on approximately d=128d=1281 synthetic question–answer pairs generated from d=128d=1282 ECG-focused journal articles and textbooks. Fine-tuning used LoRA adapters on attention, feed-forward, and output projections, covering approximately d=128d=1283 of model parameters, with AdamW and paged-32 quantization, cosine decay from d=128d=1284 to d=128d=1285, batch size d=128d=1286 examples per H100 GPU, d=128d=1287 epochs, weight decay d=128d=1288, global norm clipping d=128d=1289, and cross-entropy on answer tokens only: 53945\,3940 The reported best LoRA setting was 53945\,3941 (Ahrens et al., 21 Oct 2025).

Few-shot multimodal ELMs use a different regime. The meta-learning QA model freezes the LLM backbone, trains only the fusion module, and optimizes under MAML with inner-loop task adaptation

53945\,3942

and outer-loop meta-optimization

53945\,3943

This setup is explicitly designed for tasks with limited labeled ECG-question-answer triples and unseen attribute–answer classes (Tang et al., 2024).

Instruction tuning dominates report-generation ELMs. MEIT converts each ECG–report pair into a chat-style template and computes autoregressive cross-entropy only on the target report tokens, masking the prompt and ECG positions. The paper states that no separate contrastive or additional alignment loss is used; alignment is induced through shared cross-attention fusion and the autoregressive objective. Fine-tuning employs LoRA with rank 53945\,3944, alpha 53945\,3945, dropout 53945\,3946, batch size 53945\,3947 with gradient accumulation 53945\,3948, sequence length 53945\,3949, dP=dT=12d_P=d_T=120 epochs, and a linear learning-rate schedule with dP=dT=12d_P=d_T=121 warm-up (Wan et al., 2024).

Self-supervised ECG-language pretraining has increasingly become multi-objective. ESI pairs ECGs with LLM-generated, textbook-anchored text and combines a symmetric InfoNCE contrastive loss with a captioning loss over approximately dP=dT=12d_P=d_T=122k pairs from PTB-XL, Chapman-Shaoxing, and MIMIC-IV-ECG (Yu et al., 2024). MELP extends this to three scales—token, beat, and rhythm—by combining captioning, local contrastive alignment, and global contrastive alignment in

dP=dT=12d_P=d_T=123

with default dP=dT=12d_P=d_T=124 and dP=dT=12d_P=d_T=125, trained on dP=dT=12d_P=d_T=126k high-quality ECG–text pairs from MIMIC-IV-ECG (Wang et al., 11 Jun 2025). RhythmBERT, by contrast, uses a standard BERT-style masked language modeling objective on dP=dT=12d_P=d_T=127 of discrete rhythm tokens after pretraining the tokenizer and transformer on dP=dT=12d_P=d_T=128 MIMIC-IV-ECG recordings (Wang et al., 26 Feb 2026). HeartLang separates form-level pretraining from rhythm-level pretraining through vector-quantized heartbeat reconstruction followed by masked ECG sentence prediction (Jin et al., 15 Feb 2025).

The most elaborate curriculum appears in CAMEL. Its frozen MedGemma-4B backbone is adapted with LoRA modules of rank dP=dT=12d_P=d_T=129 through five stages: ECG autoencoding on over dQRS=24d_{QRS}=240 billion dQRS=24d_{QRS}=241 s segments, multiple choice and short answer instruction tuning on dQRS=24d_{QRS}=242 M examples, statistics questions, dQRS=24d_{QRS}=243K multi-turn dialogues, and a forecasting stage with dQRS=24d_{QRS}=244K examples from Icentia11k (Velingker et al., 17 Feb 2026). This suggests that, in the ELM literature, language-style supervision is increasingly used not only to map ECGs to text but also to scaffold clinical reasoning behaviors.

4. Tasks, evaluation methodology, and empirical performance

ELM evaluation is unusually heterogeneous. ECG-LLM explicitly uses a four-layer evaluation stack: multiple-choice accuracy on Full (dQRS=24d_{QRS}=245 MCQs), Special (dQRS=24d_{QRS}=246), and Checked (dQRS=24d_{QRS}=247) sets; automatic text similarity with BLEU-4, ROUGE-1/2/L F1, and BERTScore F1; LLM-as-judge using Deepseek R1 on question–candidate–reference triples; and human expert review on dQRS=24d_{QRS}=248 factual and dQRS=24d_{QRS}=249 complex questions with graded labels from kP=13k_P=130 to kP=13k_P=131, with kP=13k_P=132-replicate bootstrapping and kP=13k_P=133 confidence intervals (Ahrens et al., 21 Oct 2025). Under this protocol, Llama 3.1 kP=13k_P=134B + FT scored kP=13k_P=135, kP=13k_P=136, and kP=13k_P=137 on Special, Full, and Checked multiple-choice sets, respectively; its text-similarity scores were ROUGE-1 kP=13k_P=138, ROUGE-2 kP=13k_P=139, ROUGE-L kQRS=11k_{QRS}=110, BLEU-4 kQRS=11k_{QRS}=111, and BERTScore kQRS=11k_{QRS}=112. Yet in LLM-as-judge Claude 3.7 answered kQRS=11k_{QRS}=113 of kQRS=11k_{QRS}=114 questions correctly versus kQRS=11k_{QRS}=115 for kQRS=11k_{QRS}=116B+FT, and human expert review on complex questions favored RAG kQRS=11k_{QRS}=117B, base kQRS=11k_{QRS}=118B, and Claude 3.7, while kQRS=11k_{QRS}=119B+FT incurred a slight drop with l=256l=25600 errors (Ahrens et al., 21 Oct 2025).

Few-shot ECG QA uses task-centric meta-test protocols rather than broad generative evaluation. The multimodal meta-learning ELM reports, in the l=256l=25601-way l=256l=25602-shot setting with LLaMA-3.1-8B, accuracies of l=256l=25603, l=256l=25604, and l=256l=25605 on Single-Verify, Single-Choose, and Single-Query question types, respectively. Cross-domain adaptation from PTB-XL to MIMIC-IV-ECG improves from l=256l=25606 without meta-adapt to l=256l=25607 with meta-adapt in the l=256l=25608-way l=256l=25609-shot setting (Tang et al., 2024).

Report-generation benchmarks stress lexical and semantic overlap metrics. MEIT, trained on PTB-XL and MIMIC-IV-ECG, evaluated nine open-source decoder-only LLMs with nine metrics. On MIMIC-IV-ECG, LLaMA-2 and Mistral-Instruct led most metrics, with BLEU-4 approximately l=256l=25610, METEOR approximately l=256l=25611, ROUGE-L approximately l=256l=25612, and BERTScore-F1 approximately l=256l=25613. Zero-shot instruction-tuned models retained approximately l=256l=25614 of their PTB-XL fine-tuned performance and outperformed “no-IT” by approximately l=256l=25615–l=256l=25616 averaged over BLEU-3, BLEU-4, METEOR, and ROUGE-L (Wan et al., 2024).

Open-source RAG studies focus on grounded natural language generation. The RAG pipeline for ELMs reports, on ECG-Chat Instruct, an ECG-Byte baseline BLEU-4 of l=256l=25617 and Accuracy l=256l=25618, improving to BLEU-4 l=256l=25619 and Accuracy l=256l=25620 with RAG. On ECG-QA MIMIC-IV, BLEU-4 rises from l=256l=25621 to l=256l=25622 and Accuracy from l=256l=25623 to l=256l=25624. The ablations show that RAG only at inference yields BLEU-4 l=256l=25625 and Accuracy l=256l=25626, RAG only at training degrades below baseline to l=256l=25627 and l=256l=25628, and using RAG at both training and inference gives the best result (Song et al., 30 Sep 2025).

Forecasting widens the task definition of ELMs beyond interpretation. CAMEL reports zero-shot evaluation over l=256l=25629 tasks and l=256l=25630 datasets, with an absolute l=256l=25631 average gain on ECGBench over prior SOTA ELMs and l=256l=25632 over fully supervised models on ECGForecastBench, including l=256l=25633 macro-F1 at l=256l=25634 s and l=256l=25635 s, compared with l=256l=25636 for XGB, l=256l=25637 for CNN, and l=256l=25638 for GPT-5.2 (Velingker et al., 17 Feb 2026). This broadening of scope implies that “ELM performance” cannot be reduced to a single benchmark family.

5. Retrieval, grounding, explainability, and deployment

Grounding mechanisms are central because free-form clinical language generation is vulnerable to hallucination. ECG-LLM implements a RAG pipeline over the same ECG literature used for fine-tuning, using recursive l=256l=25639-token chunks with l=256l=25640-token overlap, PubMedBERT embeddings of dimension l=256l=25641, a Chroma vector database with approximate HNSW indexing, cosine similarity, retrieval of the top-l=256l=25642 chunks, and reranking to top-l=256l=25643 via dual-encoder rescoring (Ahrens et al., 21 Oct 2025). The open-source RAG study generalizes this design space by indexing ECG features and reports in FAISS IndexIVFFlat, retrieving top-l=256l=25644 nearest neighbors under l=256l=25645 or cosine similarity, and showing that l=256l=25646 to l=256l=25647 is sufficient, while larger l=256l=25648 adds noise (Song et al., 30 Sep 2025).

ALFRED adds a more explicit diagnostic scaffold. It defines an ELM as the set l=256l=25649Feature-Extraction Module + Rule Module + Retrieval Module + LLM Headl=256l=25650, uses an expert-curated knowledge base split into l=256l=25651-character chunks, indexes l=256l=25652-dimensional embeddings in Milvus HNSW with l=256l=25653 and l=256l=25654, retrieves l=256l=25655 passages for features and l=256l=25656 for disease terms with a similarity threshold l=256l=25657, and prompts GPT-4o-Mini to emit a JSON diagnosis over the five PTB-XL superclasses with explanations grounded in features and retrieved definitions (Yu et al., 30 Apr 2025). On PTB-XL fold l=256l=25658, the proposed ELM attained PPV l=256l=25659, NPV l=256l=25660, sensitivity l=256l=25661, and specificity l=256l=25662, versus l=256l=25663, l=256l=25664, l=256l=25665, and l=256l=25666 for the base framework without rules (Yu et al., 30 Apr 2025). This architecture makes interpretability procedural rather than purely post hoc.

Textual context itself can function as a grounding modality. CLIC converts acquisition-time metadata into language either through a deterministic template or through an LLM-guided paragraph, then fuses the resulting text embedding with ECG features. On PTB-XL, ECG-Only achieved Accuracy l=256l=25667 and Macro-F1 l=256l=25668, ECG+Attr reached l=256l=25669 and l=256l=25670, CLIC-DET reached l=256l=25671 and l=256l=25672, and CLIC-LLM reached l=256l=25673 and l=256l=25674; for the minority CD class, Fl=256l=25675 improved from l=256l=25676 in ECG-Only to l=256l=25677 in CLIC-DET (Lucafo et al., 18 May 2026). The result indicates that controlled clinical text can be a stronger anchor than linguistically richer but more variable LLM-generated context under frozen text-encoder settings.

Explainability has also been explored through signal-to-token formulations. For intracardiac EGMs, tokenization into l=256l=25678 discrete bins, vocabulary extension with signal and AFib label tokens, and joint MLM plus classification training enabled attention visualization, integrated gradients, and counterfactual analyses. Clinical Longformer achieved sensitivity l=256l=25679, specificity l=256l=25680, PPV l=256l=25681, NPV l=256l=25682, and accuracy l=256l=25683 on AFib classification in the reported internal dataset (Han et al., 2024). Although EGMs are not standard surface ECGs, this line of work suggests that language-style tokenization can expose token-level interpretability not available in dense latent connectors.

Deployment concerns are unusually salient in ECG settings because local inference is often feasible. ECG-LLM reports that all fine-tuned and RAG models can be containerized on premise on NVIDIA A100/H100 hardware, with no PHI stored, retrieval over an encrypted vector database, optional ephemeral RAG contexts, static l=256l=25684B+FT inference at approximately l=256l=25685 ms/token on A100, an additional approximately l=256l=25686 ms/query for vector search and embedding in the RAG pipeline, resource requirements of l=256l=25687A100 l=256l=25688 GB or l=256l=25689H100 for l=256l=25690B+FT, and a single l=256l=25691 GB GPU for l=256l=25692B+RAG (Ahrens et al., 21 Oct 2025). This makes privacy-preserving, locally deployable ELMs a distinct practical objective rather than a secondary implementation detail.

6. Limitations, misconceptions, and open directions

A common misconception is that high ELM benchmark scores necessarily imply strong ECG grounding. ELF directly challenges this assumption. On PTB-XL, training and inference with real ECG, zero tensors, or text only changed accuracy only modestly, from l=256l=25693 to l=256l=25694 to l=256l=25695, and training on text alone while inferring on real ECG increased accuracy to l=256l=25696 (Han et al., 5 Jan 2026). Similar perturbation behavior was observed for other models. This suggests that current benchmarks often permit substantial reliance on language priors, benchmark artifacts, or answer-format regularities rather than waveform-derived understanding.

A second misconception is that automatic metrics provide a stable ordering of systems. ECG-LLM shows strong disagreement across evaluation layers: fine-tuning dominates multiple-choice and text-overlap metrics, whereas human expert evaluation on complex questions prefers Claude 3.7 and RAG variants (Ahrens et al., 21 Oct 2025). The few-shot meta-learning paper likewise notes that generative answers evaluated by overlap metrics may miss clinical correctness nuances (Tang et al., 2024). These results suggest that ELM assessment requires task-specific triangulation rather than a single proxy score.

A third misconception is that more elaborate natural-language context is always better. CLIC demonstrates the opposite under its frozen-ClinicalBERT setup: deterministic template text outperforms LLM-generated contextual descriptions on both Accuracy and Macro-F1 (Lucafo et al., 18 May 2026). A plausible implication is that lexical consistency and controlled semantics may matter more than narrative richness when the downstream fusion mechanism is simple concatenation.

Open directions in the literature are correspondingly diverse. RhythmBERT identifies multi-lead extension, dynamic rhythm generation, fine-grained interpretability aligning learned tokens with expert-defined morphologies, and cross-modal integration with metadata as key next steps (Wang et al., 26 Feb 2026). MELP points toward external medical knowledge bases and more explicit clinically interpretable token-level objectives (Wang et al., 11 Jun 2025). The few-shot multimodal ELM proposes multi-ECG comparison, additional modalities such as echo and X-ray, lightweight adapters or prompt tuning, and uncertainty quantification with human-in-the-loop verification (Tang et al., 2024). CAMEL emphasizes longer context windows, alternative tokenization, and multimodal prognostication with other continuous vitals or structured records (Velingker et al., 17 Feb 2026).

Taken together, these papers indicate that the field is moving in two simultaneous directions. One direction seeks stronger physiological inductive bias through rhythm-aware tokenization, multi-scale supervision, and longer temporal context. The other seeks stronger clinical grounding through retrieval, rules, metadata text, and privacy-preserving local deployment. Whether these strands ultimately converge into a single dominant ELM paradigm remains unresolved, but the literature already establishes that electrocardiography can be modeled as language at the levels of signal structure, clinical knowledge, and interactive reasoning.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (17)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Electrocardiogram-Language Models (ELMs).