ECG-LENS: Lead-Aware Clinical Context Enriched ECG Report Generation and Evaluation

arXiv:2608.05893 · cs.AI · Submitted 2026-08-06 · Read on arXiv

Akanta Das, Tasinul Islam Ahon, Ahmed Mahir Sultan Rumi, Md Mahbubur Rahman, Tausif Amim Shadly, Tanzima Hashem

Bangladesh University of Engineering and Technology · Samsung Research America · National Health Service

cs.AI

Submitted: 2026-08-06

License: http://creativecommons.org/licenses/by/4.0/

Importance score: 65/100

The gist: The paper, authored by Akanta Das, Tasinul Islam Ahon, Ahmed Mahir Sultan Rumi, Md Mahbubur Rahman, Tausif Amim Shadly, and Tanzima Hashem, addresses the challenge of automated electrocardiography

Terminology

Summary

The paper, authored by Akanta Das, Tasinul Islam Ahon, Ahmed Mahir Sultan Rumi, Md Mahbubur Rahman, Tausif Amim Shadly, and Tanzima Hashem, addresses the challenge of automated electrocardiography (ECG) report generation. The authors note that Electrocardiography (ECG) is one of the most widely used non-invasive tools for diagnosing cardiovascular disease, but transforming multi-lead ECG recordings into reliable clinical reports remains challenging. They argue that automating ECG report generation could reduce clinicians' interpretive workload, improve diagnostic efficiency, and expand access to cardiac assessment in rural and underserved communities.

The paper emphasizes that ECG interpretation differs fundamentally from image-based domains like chest X-ray reporting: ECG interpretation requires the analysis of subtle temporal morphologies, lead-specific abnormalities, and inter-lead relationships, followed by coherent diagnostic reasoning expressed in dense clinical terminology. The authors identify three major limitations in existing work: (1) most ECG–language systems compress the complete recording into a single representation before decoding, suffering loss of lead-specific evidence since early aggregation can dilute localized evidence (e.g., ST elevation in leads II, III, and aVF conveys a specific diagnostic pattern indicative of inferior myocardial infarction); (2) directly conditioning a language model on a global signal embedding provides no explicit diagnostic plan and suffers from weak clinical grounding and supervision; and (3) traditional metrics like BLEU, ROUGE, and METEOR quantify lexical overlap but cannot reliably distinguish valid paraphrases from fluent reports that omit, alter, or hallucinate clinically important findings.

The authors propose ECG-LENS (Lead-aware Enrichment with Context Narrative Synthesis), a lightweight lead-aware ECG report generation framework with clinical context enrichment. ECG-LENS "preserves individual-lead morphology through lead-specific encoders, models global inter-lead relationships using a global encoder, constructs a clinical context-enriched text prompt as an intermediate clinical representation to guide a GPT-2 text decoder."

The main contributions are: lead-aware local and global representation learning; clinically focused report preprocessing; structured clinical context-guided generation; a new ECG-specific evaluation metric (F1-ECGBERT); and comprehensive evaluation showing consistent improvements over state-of-the-art methods in both textual quality and diagnostic consistency.

The input is a 12-lead ECG recording X ∈ R(L×T), where L is the number of leads and T is the number of samples per lead (12 × 5000 for 500 Hz PTB-XL). Each lead is processed independently using a one-dimensional (1D) version of the ResNet-18 encoder, rather than aggregating all leads at the input stage. Each lead produces a pooled representation z l, projected to a common embedding dimension d. This design prevents diagnostically relevant patterns from being obscured by premature inter-lead aggregation, since many important patterns "are localized across specific lead groups; for example, ischemic changes associated with inferior myocardial injury are primarily reflected in leads II, III, and aVF, whereas anterior and lateral changes are observed predominantly in leads V1–V4 and leads I, aVL, V5, and V6, respectively."

ECG-LENS additionally employs a global one-dimensional ResNet-18 encoder that jointly processes the complete ECG recording with leads arranged as temporally aligned input channels, allowing its convolutional filters to jointly capture temporal patterns and inter-lead dependencies. The final encoder output is H ECG = Stack(h1,..., hL, h global) ∈ R((L+1)×d). The authors note that the combination of global and local encoding in ECG-LENS can successfully differentiate between the various diagnostic categories, as shown via t-SNE plots.

ECG-LENS conditions the decoder on a textual prompt containing preliminary diagnostic information. It uses the publicly available highly accurate pretrained ECG classifier, MERL as an external, frozen classifier to obtain multi-label classification predictions across four diagnostic categories k: superclass, subclass, rhythm, and form. Only high-confidence predictions are included, with category-specific thresholds determined via grid search in the validation set. Each retained condition is mapped to a normalized, condition-specific phrase commonly used in ECG interpretation following the international SCP-ECG standard. An example prompt: The ECG is suggestive of inferior myocardial infarction. Non-specific ST-segment elevation is present, and atrial fibrillation is also indicated. The authors state that Conditioning the text decoder on a prompt with diagnostic context significantly increases the report quality.

The decoder is a lightweight GPT-2–style autoregressive decoder trained from scratch, without initialization from pretrained GPT-2 weights. A domain-specific tokenizer is constructed from the complete collection of preprocessed PTB-XL reports to handle the specialized and abbreviation-rich language of ECG interpretations. The model factorizes P Θ(R X, p) = ∏ P Θ(w t w<t, H ECG, p), and is optimized in a single end-to-end training setup minimizing the autoregressive negative log-likelihood of the target reports, with gradients propagated jointly through the decoder, projection layers, and both ECG encoding pathways, while MERL participates only in the forward pass.

The authors employ a few-shot prompting strategy with GPT-5.5 to extract the principal diagnostic content from each report, explicitly instructing the model on statements to discard and clinically important information to preserve. This process removes repetitive, noninformative, or record-specific content like isolated voltage measurements, irrelevant patient information, administrative text, redundant statements, and routine phrases. Since PTB-XL is a multilingual dataset, the process also translates reports using standardized clinical statements. The instruction is explicitly ... not to introduce, remove, or alter any diagnosis supported by the original report, and the resulting reports are reviewed by a trained cardiologist to verify that the clinically relevant findings are preserved.

The paper introduces F1-ECGBERT, a BERT-based evaluation metric that measures agreement between the diagnostic content of generated and reference reports, inspired by ChexBert. Four independent report-to-label BERT classifiers are trained, corresponding to the diagnostic superclass, diagnostic subclass, rhythm, and form categories, each trained separately using binary cross-entropy. Each classifier extracts binary label vectors from both the reference report R and generated report R̂, and their agreement is measured by calculating the F1-score. A high score indicates that the generated report preserves the diagnostic conditions expressed in the reference report, providing a more clinically meaningful assessment than lexical similarity alone.

Training and experiments use PTB-XL, which provides 21,799 10-second 12-lead recordings from 18,869 patients, with the official strat fold split (folds 1–8 train, 9 validation, 10 test), plus MIMIC-IV-ECG... for cross-domain evaluation. Baselines include MEIT, ECG-aBcDe, BiECG-LLM, ECG-Chat, and HeartLLM. Implementation details: Each of the lead-specific encoders and the global encoder is a 1-D ResNet-18 (convolution kernels [9, 7, 7, 5], stem kernel 9) with embedding dimension D=512, and the decoder is a GPT-2–style transformer trained from scratch with 12 layers, 8 attention heads, hidden size 512, and dropout 0.5, trained on a single NVIDIA GeForce RTX 4090 GPU with 24 GB of memory.

ECG-LENS achieves the highest score across every reported metric. On BLEU-1/2/3, ROUGE-1/L, and METEOR, ECG-LENS scores 0.651, 0.569, 0.501, 0.729, 0.686, and 0.714 respectively (vs. the strongest baselines, e.g., BiECG-LLM at 0.521/0.441/–/0.713/0.601/0.682). The authors highlight absolute gains of 12.8% in BLEU-2 and 12.6% in BLEU-3 over the second best method, and improvements in ROUGE-L and METEOR by 8.5% and 3.2%, respectively. On the proposed F1-ECGBERT, ECG-LENS obtains the highest score for every diagnostic category, and exceeds the strongest baseline by 10.9% for diagnostic superclass category, with consistent improvements in diagnostic subclass and rhythm.

ECG-LENS maintains the highest performance across all six metrics under cross-domain evaluation and achieves comparable scores in all metrics, with respect to PTB-XL instead of domain shift. The paper reports a performance gain of 4% in METEOR and even larger gain of more than 10% in BLEU scores, demonstrating that ECG-LENS generalizes the ECG signal characteristics, and it both learns ECG report phrases and stronger semantic correspondence with the reference reports. According to the abstract, overall gains are 4.0%, 6.3%, and 11.5% in METEOR, ROUGE-L, and F1-ECGBERT, respectively, over the strongest baselines.

A randomly selected subset of the generated reports was reviewed by a trained cardiologist, who judged 67% to be fully clinically correct and nearly all remaining reports to be partially correct. Qualitative examples show ECG-LENS accurately preserving lead-specific findings (e.g., sinus rhythm waves leads III aVF suggesting old inferior myocardial infarction wave abnormality aVL suggesting ischemia heart disease) that competing methods may omit or misidentify, such as HeartLLM, which in one example reported depression in i, ii, avl, v4,5,6 instead of the correct leads III aVF.

Five configurations were evaluated. ResNet global encoding (row a: B-1 0.475, MET 0.556) consistently outperformed the Transformer global encoder (row b: B-1 0.462, MET 0.543). Progressively incorporating components yields significant gains: adding report preprocessing (row c: B-1 0.558, MET 0.598), adding lead-specific encoders (row d: B-1 0.572, MET 0.650), and the final model with clinical prompting (row e: B-1 0.651, MET 0.714). The authors conclude that Each subsequent component provides significant further gains across almost all metrics and that ECG-LENS derives its performance from the coordinated integration of the principles introduced across these components.

The authors state: ECG-LENS represents a significant step toward reliable and clinically grounded automated ECG report generation. They emphasize that our proposed model is lightweight with very fast inference time of around 30ms, making it suitable for resource constrained settings. Limitations acknowledged include that computational constraints prevented a systematic investigation of larger-capacity encoders and decoders and that although ECG-LENS substantially reduces clinical inconsistencies, it still occasionally hallucinates or makes mistakes in a small number of cases. Future work should therefore explore larger architectures and hallucination-mitigation strategies.

Improvements for AI systems

Improvements:

  • Use lead-specific 1D ResNet encoders for each ECG lead instead of pooling all leads into one representation early, preserving localized diagnostic evidence (e.g., inferior ST elevation in II, III, aVF).

  • Add a global 1D ResNet encoder that processes the 12 leads as aligned channels to capture inter-lead relationships, then concatenate local and global embeddings before decoding.

  • Inject structured clinical context as a text prompt derived from a frozen, high-accuracy ECG classifier (e.g., MERL) with category-specific confidence thresholds, mapping predictions to standardized SCP-ECG phrases.

  • Preprocess raw reports using a few-shot LLM prompt to extract only clinically relevant content, remove administrative/repetitive text, translate multilingual reports, and verify with clinician review.

  • Train a lightweight GPT-2-style decoder from scratch with a domain-specific tokenizer built from ECG report text, conditioned jointly on the lead-aware ECG embeddings and the clinical text prompt.

  • Replace lexical-only evaluation with F1-ECGBERT: train four BERT-based classifiers (superclass, subclass, rhythm, form) to convert both reference and generated reports into label vectors, then compute F1 scores to measure diagnostic agreement.

What the improved AI system can do:

  • Generate clinically accurate ECG reports that preserve lead-specific findings (e.g., inferior, anterior, or lateral myocardial infarction localization) rather than blurring them into generic descriptions.

  • Produce reports with higher BLEU, ROUGE, METEOR, and diagnostic F1 scores than previous ECG-to-text systems, with absolute gains like +12.8% BLEU-2 and +11.5% F1-ECGBERT over strong baselines.

  • Generalize across different ECG datasets (e.g., PTB-XL to MIMIC-IV-ECG) without significant performance drop, maintaining semantic and diagnostic consistency across hospital systems and device variations.

  • Run efficiently in resource-constrained settings with ~30 ms inference time per recording on a single RTX 4090, making it deployable for rural or low-resource cardiac screening.

  • Support cardiologist triage by generating reports that are 67% fully clinically correct on expert review, with most remaining reports partially correct—reducing interpretive workload and improving diagnostic consistency.

  • Provide a clinically meaningful evaluation framework that flags when a generated report omits, alters, or hallucinates diagnostic findings, unlike BLEU/ROUGE which only check lexical overlap.

Abstract

Electrocardiography (ECG) is one of the most widely used non-invasive tools for diagnosing cardiovascular disease, but transforming multi-lead ECG recordings into reliable clinical reports remains challenging. Automating ECG report generation could reduce clinicians' interpretive workload, improve diagnostic efficiency, and expand access to cardiac assessment in underserved communities. Unlike image-based report-generation tasks, ECG interpretation requires the analysis of subtle temporal morphologies, followed by coherent diagnostic reasoning expressed in dense clinical terminology. Existing systems predominantly focus on classification, while current report-generation methods often produce outputs that remain inadequate for practical clinical use. To address these challenges, we propose ECG-LENS, an end-to-end ECG report-generation framework that jointly integrates multi-lead signal modeling, diagnosis-aware representations, and clinically grounded text generation. ECG-LENS combines lead-wise encoders that preserve localized waveform morphology with a global encoder that captures inter-lead dependencies. To guide report generation, we fuse signal representations with clinically enriched textual prompts that condition a GPT-2 decoder. We further introduce an ECG-specific report-preprocessing strategy that helps the model focus on clinically meaningful findings. Finally, because lexical metrics may under- or overestimate report quality, we propose F1-ECGBERT, a BERT-based, ECG-specific metric that measures agreement between diagnostic labels extracted from generated and reference reports. In-domain experiments on PTB-XL and cross-domain evaluation on MIMIC-IV-ECG show that ECG-LENS consistently outperforms state-of-the-art methods, with absolute gains of 4.0%, 6.3%, and 11.5% in METEOR, ROUGE-L, and F1-ECGBERT, respectively, over the strongest baselines.

Sources

Related papers