Paper deep dive
ECG-LENS: Lead-Aware Clinical Context Enriched ECG Report Generation and Evaluation
Akanta Das, Tasinul Islam Ahon, Ahmed Mahir Sultan Rumi, Md Mahbubur Rahman, Tausif Amim Shadly, Tanzima Hashem
Intelligence
Status: succeeded | Model: Gemma-4-26B-A4B | Prompt: intel-v1 | Confidence: 92%
Last extracted: 8/8/2026, 4:23:35 AM
Summary
The paper introduces ECG-LENS, an end-to-end framework for automated ECG report generation that integrates lead-specific and global signal encoders with clinically enriched textual prompts to guide a GPT-2 decoder. It also proposes F1-ECGBERT, a BERT-based metric for evaluating diagnostic agreement, demonstrating superior performance over state-of-the-art methods on PTB-XL and MIMIC-IV-ECG datasets.
Entities (9)
Relation Signals (7)
ECG-LENS → evaluatedon → PTB-XL
confidence 95% · 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
ECG-LENS → evaluatedon → MIMIC-IV-ECG
confidence 95% · 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
F1-ECGBERT → proposedby → ECG-LENS
confidence 95% · we propose F1-ECGBERT, a BERT-based, ECG-specific metric that measures agreement between diagnostic labels extracted from generated and reference reports.
ECG-LENS → uses → ResNet-18
confidence 95% · We combine lead-wise ResNet-18 encoders that retain localized waveform morphology with a global encoder that captures inter-lead relationships
ECG-LENS → uses → GPT-2
confidence 95% · fuse signal representations with clinically enriched textual prompts that condition a GPT-2 decoder.
ECG-LENS → outperforms → State-of-the-Art Methods
confidence 90% · 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
ECG-LENS → uses → MERL
confidence 90% · We first employ the publicly available highly accurate pretrained ECG classifier, MERL (Liu et al. 2024b), to obtain multi-label classifiation predictions
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
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.
Tags
Links
- Source: https://arxiv.org/abs/2608.05893v1
- Canonical: https://arxiv.org/abs/2608.05893v1
Trouble viewing inline? Open PDF directly →
Full Text
44,156 characters extracted from source content.
Expand or collapse full text
ECG-LENS: Lead-Aware Clinical Context Enriched ECG Report Generation and Evaluation Akanta Das1, Tasinul Islam Ahon1, Ahmed Mahir Sultan Rumi1, Md Mahbubur Rahman2, Tausif Amim Shadly3, Tanzima Hashem1 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 rural and underserved communities. Unlike image-based report generation tasks such as 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. 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 models multi-lead signals, diagnosis-aware representations, and clinically grounded report 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 removes repetitive and non-informative text, encouraging the model to focus on clinically meaningful findings. Because clinically correct ECG reports can differ in wording, lexical metrics alone may under- or overestimate report quality. We therefore propose F1-ECGBERT, a BERT-based ECG-specific metric that measures agreement between diagnostic labels extracted from generated and reference reports. 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. Introduction Cardiovascular diseases (CVDs) remain among the most serious public health burdens worldwide, making timely and accessible cardiac assessment essential for preventing avoidable complications. Electrocardiography (ECG) is central to this effort because it is non-invasive, inexpensive, rapid, and routinely available. Although ECG acquisition is straightforward, its interpretation requires substantial expertise. A standard 12-lead ECG is a multivariate time series in which the limb and precordial leads observe cardiac electrical activity from complementary perspectives. Diagnostic evidence is therefore encoded not only in temporal morphology, such as rhythm, intervals, and ST/T-wave patterns, but also in the spatial distribution of abnormalities across specific leads. A cardiologist or trained physician must inspect waveform morphology, integrate evidence across leads, and translate the findings into a concise diagnostic report. This process is time-consuming and access to specialists may be limited in rural and underprivileged communities. Automated ECG report generation could consequently reduce reporting workload and broaden access to cardiac assessment. Deep learning has achieved strong performance in automated ECG analysis, particularly in disease classification (Hannun et al. 2019; Ribeiro et al. 2020; Strodthoff et al. 2021). More recent research has progressed from self-supervised ECG representation learning and ECG–text alignment (Na et al. 2024a; Jin et al. 2025b; Liu et al. 2024a) to multimodal and instruction-tuned language models for report generation (Wan et al. 2025b; Qiang et al. 2025b; Xia et al. 2026; Yang et al. 2026a). However, classification produces isolated labels rather than an integrated account of rhythm, axis, conduction, ST/T changes, affected leads, and overall interpretation required in clinical reporting. Moreover, although automated report generation has achieved substantial progress in image-based domains such as radiology, comparable advances in ECG report generation remain limited. Unlike medical images, ECG recordings are multivariate time-series signals whose interpretation requires jointly modeling subtle temporal morphology and lead-specific relationships. This inherent complexity contributes to the comparatively limited clinical fidelity of existing ECG report-generation systems and also limits the direct transfer of radiology-report generation methods. Despite recent progress, major limitations remain. First, most ECG–language systems compress the complete recording into a single representation before decoding, suffering loss of lead-specific evidence. Because different leads provide distinct electrical views, early aggregation can dilute localized evidence; for example, ST elevation in leads I, I, and aVF conveys a specific diagnostic pattern indicative of inferior myocardial infarction rather than a generic global abnormality (Thygesen et al. 2018; Wagner et al. 2009). Second, directly conditioning a language model on a global signal embedding provides no explicit diagnostic plan, while abbreviated, multilingual, and inconsistently phrased reference reports introduce ambiguity into the learning targets. It suffers from weak clinical grounding and supervision. Finally, traditional metric 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. It deems clinically incomplete evaluation. Evaluation should therefore measure preservation of diagnostic content in addition to surface similarity. To address these limitations, we 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. Our main contributions are: • Lead-aware local and global representation learning. We combine lead-wise ResNet-18 encoders that retain localized waveform morphology with a global encoder that captures inter-lead relationships across the 12-lead recording. • Clinically focused report preprocessing. We refine multilingual and abbreviated ECG reports into consistent clinical language, suppressing routine or non-informative content and reducing ambiguity in the generation targets. • Structured clinical context-guided generation. We predict diagnostic labels using a pretrained state-of-the-art classifier, utilize them to construct a clinical prompt, and integrate it with ECG features to provide the decoder with an explicit diagnostic plan for coherent report generation. • ECG-specific clinical evaluation metric. We introduce F1-ECGBERT, a BERT-based metric that evaluates diagnostic agreement between clinically equivalent ECG reports beyond lexical similarity. • Comprehensive evaluation. Extensive experiments on PTB-XL and cross-domain evaluation on MIMIC-IV-ECG show consistent improvements over state-of-the-art methods in both textual quality and diagnostic consistency. Figure 1: Overview of ECG-LENS. Lead-specific and global encoders capture intra and inter-lead context. Predicted diagnostic labels form a structured clinical prompt that guides decoding, while LLM-refined reference reports provide clinically focused training targets. Related Work ECG classification and representation learning have advanced substantially, whereas automated ECG report generation remains comparatively underexplored. This section reviews representation-learning methods, recent ECG report-generation frameworks, and clinical evaluation metrics for assessing generated reports. ECG Classification and Representation Learning Early deep-learning approaches formulated automated ECG interpretation primarily as a supervised classification problem, predicting one or more diagnostic labels directly from ECG signals (Hannun et al. 2019; Ribeiro et al. 2020; Strodthoff et al. 2021; Huang et al. 2024). Although such models have achieved strong performance in screening and triage, their outputs provide limited explanation of the underlying rhythm, morphology, and lead-specific abnormalities. Subsequent self-supervised methods learn ECG representations from unlabeled recordings, reducing the need for costly expert annotations while providing initialization for downstream tasks. ST-MEM (Na et al. 2024b) explicitly models the spatio-temporal structure of 12-lead ECG recordings through masked representation learning, whereas HeartLang (Jin et al. 2025a) interprets heartbeats as words and rhythms as sentences to learn representations at both morphological and rhythm levels. Multimodal representation-learning methods leverage clinical reports to incorporate high-level diagnostic semantics into ECG representations. MERL (Liu et al. 2024b) jointly performs cross-modal ECG–report alignment and ECG-specific uni-modal alignment, enabling zero-shot classification by matching ECG representations with clinically enriched text prompts. D-BETA (Pham et al. 2025) further combines masked reconstruction and contrastive ECG–text alignment to learn transferable representations for classification. Collectively, these studies demonstrate the value of clinically informed ECG representations for downstream classification tasks. However, classification outputs are typically limited to diagnostic labels and do not provide coherent clinical narratives describing the underlying ECG findings. ECG Report Generation Recent work has begun to connect ECG representations with large language models for automated report generation. Existing methods broadly follow two strategies. Embedding-based approaches encode continuous ECG signals into latent representations or pseudo-tokens that condition a language model. MEIT (Wan et al. 2025a) formulates ECG reporting as multimodal instruction following and introduces an attention-based fusion mechanism for integrating ECG representations with multiple LLM backbones. BiECG-LLM (Qiang et al. 2025a) jointly performs classification and report generation by fusing information from ECG signals and rendered ECG images, while ECG-Chat (Zhao et al. 2025) extends ECG–language interaction toward diagnostic dialogue. Tokenization-based approaches instead convert continuous ECG recordings into discrete symbols that can be processed more naturally by language models (Yang et al. 2026b; Xia et al. 2025). Although these methods establish the feasibility of generating clinical text from ECG recordings, their representations do not preserve explicit lead-specific diagnostic context or provide the decoder with a structured diagnostic plan. Effective report generation requires extracting appropriate diagnostic information from the time series data, consistent training targets, and coordinated modelling of local lead-specific and global cardiac evidence, which is not present in the existing approaches. There has been a more significant advancement in related domains such as radiology report generation but it may not always provide useful principles for addressing these challenges because ECGs are multivariate time-series signals whose interpretation depends on temporal morphology and relationships across leads rather than spatial image features alone. Clinical Evaluation ECG report-generation studies commonly use BLEU, ROUGE, METEOR, and BERTScore (Zhang et al. 2020) as evaluation metrics; however, these metrics primarily assess textual similarity. They provide only a partial assessment of report quality and do not explicitly evaluate whether reports preserve clinically correct diagnostic information. In summary, existing studies have advanced ECG representation learning, report generation, and evaluation; however, these efforts remain insufficient to address the challenges of generating clinically reliable ECG reports. A comprehensive framework that integrates clinically informative ECG representations, diagnostically grounded report generation, and ECG-specific evaluation remains an open challenge. Methodology ECG-LENS comprises four principal components: (i) a lead-aware encoding module that combines lead-specific encoders with a global encoder that jointly models all ECG leads; (i) a clinical context enrichment module that constructs a clinical text prompt using diagnostic labels predicted by a pretrained classifier, which supplement the ECG representations provided to the decoder; (i) a report preprocessing scheme that produces clinically focused training targets; and (iv) a GPT-2 decoder that generates the final report. An overview of the framework is presented in Figure 1. Rather than relying on a single innovation, ECG-LENS derives its performance from the coordinated integration of the principles introduced across these components, collectively improving the diagnostic consistency of the generated reports. Architecture of the Encoding Module Input Representation Let an ECG recording be denoted by X∈ℝL×TX ^L× T, where L is the number of leads and T is the number of samples per lead. For a standard 12-lead ECG, L=12L=12. In the 500 Hz PTB-XL setting, each 10-second recording contains T=5000T=5000 samples per lead, giving an input of shape 12×500012× 5000. The signal is written as X=X1,X2,…,XL,X=\X_1,X_2,…,X_L\, (1) where XlX_l is the time-series signal of the l-th lead. Because each lead captures a different projection of cardiac electrical activity, the input representation explicitly keeps the lead dimension rather than flattening all leads into one sequence. The signal is normalized so that amplitude differences caused by acquisition conditions do not dominate the representation. Lead-Specific Feature Extraction ECG-LENS processes each lead independently using a one-dimensional (1D) version of the ResNet-18 encoder, rather than aggregating all leads at the input stage. The resulting feature map is temporally pooled and passed through a learnable linear projection layer: zl z_l =GAP(fResNet(l)(Xl;θl))∈ℝdr, =GAP\! (f_ResNet^(l)(X_l; _l) ) ^d_r, (2) hl h_l =Wpzl+bp∈ℝd,l=1,2,…,L. =W_pz_l+b_p ^d, l=1,2,…,L. where fResNet(l)(⋅;θl)f_ResNet^(l)(·; _l) denotes the ResNet-18 encoder for the l-th lead, GAP(⋅)GAP(·) denotes global average pooling, and zlz_l is the resulting pooled representation. A Linear projection layer with parameters Wp∈ℝd×drW_p ^d× d_r and bp∈ℝdb_p ^d map each ResNet representation to the common embedding dimension d required by the subsequent fusion and generation modules. This design prevents diagnostically relevant patterns from being obscured by premature inter-lead aggregation. Many diagnostically important ECG patterns are localized across specific lead groups; for example, ischemic changes associated with inferior myocardial injury are primarily reflected in leads I, I, and aVF, whereas anterior and lateral changes are observed predominantly in leads V1–V4 and leads I, aVL, V5, and V6, respectively. Preserving an explicit representation for each lead therefore allows the model to retain both localized waveform morphology and its associated lead identity. We also evaluated transformer-based encoder architectures but ResNet encoders consistently achieved stronger performance in our experiments (see Ablation Study section). Global Cardiac Context Learning Although lead-specific encoders preserve localized waveform morphology, they cannot independently model diagnostic relationships across leads. ECG-LENS therefore employs a global one-dimensional ResNet-18 encoder that jointly processes the complete ECG recording. For an L-lead ECG, the individual signals are arranged as temporally aligned input channels: Xch=Stack(X1,X2,…,XL)∈ℝL×T,X_ch=Stack(X_1,X_2,…,X_L) ^L× T, The global encoder operates directly on XchX_ch, allowing its convolutional filters to jointly capture temporal patterns and inter-lead dependencies. zglobal z_global =GAP(fResNetglobal(Xch;θglobal))∈ℝdg, =GAP\! (f_ResNet^global(X_ch; _global) ) ^d_g, (3) hglobal h_global =Wgzglobal+bg∈ℝd. =W_gz_global+b_g ^d. The lead-specific and global representations are subsequently combined into a single encoder output: HECG=Stack(h1,h2,…,hL,hglobal)∈ℝ(L+1)×d.H_ECG=Stack (h_1,h_2,…,h_L,h_global ) ^(L+1)× d. Importantly, the global representation is learned directly from the original multi-channel ECG rather than through late fusion of the lead-specific embeddings, enabling the two encoding pathways to provide complementary local and global cardiac information. As we can observe in Figure 2, the combination of global and local encoding in ECG-LENS can successfully differentiate between the various diagnostic categories, which eventually produces more clinically accurate reports. Figure 3 further illustrates the ability of ECG-LENS to accurately preserve lead-specific findings that competing methods may omit or misidentify. Figure 2: t-SNE plots of ECG representations by diagnostic superclasses. ECG-LENS produces the most distinguishable clusters. Figure 3: Examples of reports demonstrating accurate lead specific abnormality detection of ECG-LENS. Clinical Context-Enriched Prompt Generation The text decoder in our pipeline generates reports by jointly conditioning on ECG embeddings and a textual prompt. Rather than using a generic prompt, we provide clinical context containing preliminary diagnostic information. We first employ the publicly available highly accurate pretrained ECG classifier, MERL (Liu et al. 2024b), to obtain multi-label classifiation predictions across several diagnostic categories. The resulting label confidence scores are then used to construct the clinical prompt. MERL serves as an external, frozen classifier, its parameters are not updated, and no classification or contrastive objective is included in our training process. Zero-Shot Classification MERL (Liu et al. 2024b) was pretrained on paired ECG recordings and clinical reports using Cross-Modal Alignment, which aligns ECG and report representations, together with Uni-Modal Alignment, which improves the discriminative structure of the ECG embedding space. It performs zero-shot classification by comparing the ECG representation with textual embeddings of candidate diagnostic conditions and using their similarity scores as classification confidences. Given a complete 12-lead ECG, MERL produces confidence scores pc(k)∈[0,1]p_c^(k)∈[0,1] for each candidate condition c for each candidate condition c across four diagnostic categories k: superclass (common high level clinical conditions), subclass (specific diagnostic categories), rhythm, and form.. These predictions provide additional ECG-grounded guidance for the subsequent report-generation process. Notably, MERL can be replaced with any other pretrained ECG classifier, or a diagnostic prediction head can be attached to the ECG-LENS encoder and trained independently and used as a classifier in the pipeline, which we will explore in the future. Prompt Construction ECG reports are typically concise and diagnosis-centric, with particular conditions frequently expressed through recurring clinical phrases (Wan et al. 2025a). Rather than conditioning the GPT-2 decoder on a generic instruction , we transform reliable MERL predictions into a compact paragraph that provides preliminary diagnostic context. Only high-confidence predictions are included in the prompt. Because the appropriate confidence cutoff may differ across superclass, subclass, rhythm, and form categories, we determine category-specific thresholds using metric specific optimization using grid search in the validation set, which are applied during testing and cross-domain evaluation. Each retained condition is mapped to a normalized, condition-specific phrase commonly used in ECG interpretation following the international SCP-ECG standard by the prompt-construction function and then organized into a short and coherent clinical paragraph. For example, high-confidence predictions of myocardial infarction (superclass), inferior myocardial infarction (subclass), non-specific ST elevation (form), and atrial fibrillation (rhythm) may produce the following prompt: The ECG is suggestive of inferior myocardial infarction. Non-specific ST-segment elevation is present, and atrial fibrillation is also indicated. Conditioning the text decoder on a prompt with diagnostic context significantly increases the report quality. Consequently, the decoder receives both direct morphological evidence from the ECG encoders and explicit contextual guidance regarding the most probable conditions, improving the diagnostic grounding and overall quality of the generated report. Examples of some prompts and results regarding performance gain are presented in Supplementary Section 4. Report Generation Using Text Decoder ECG-LENS uses a lightweight GPT-2–style autoregressive decoder (Radford et al. 2019) trained from scratch, without initialization from pretrained GPT-2 weights. To represent the specialized and abbreviation-rich language of ECG interpretations, we construct a domain-specific tokenizer from the complete collection of preprocessed PTB-XL reports. The resulting ECG vocabulary is used to tokenize both the clinical prompts and target reports, allowing the decoder to represent recurring diagnostic terms and condition-specific phrases consistently. Let ECGT_ECG denote the custom tokenizer and R=(w1,w2,…,wN)=ECG(Rtext)R=(w_1,w_2,…,w_N)=T_ECG(R_text) denote a tokenized target report. Given the combined local–global ECG representation HECGH_ECG and clinical prompt p, the decoder models PΘ(R∣X,p)=∏t=1NPΘ(wt∣w<t,HECG,p)P_ (R X,p)= _t=1^NP_ (w_t w_<t,H_ECG,p ) (4) Thus, each generated token is conditioned on the preceding report tokens, lead-specific and global ECG features, and the preliminary diagnostic context provided by the prompt. ECG-LENS is optimized in a single end-to-end training setup. Let Θ=θlead,θglobal,θproj,θdec = \ _lead, _global, _proj, _dec \ denote the trainable parameters of the lead-specific encoders, global encoder, linear projection layers, and text decoder, respectively. For each training sample (X(i),R(i))(X^(i),R^(i)), we generate the clinical prompt using the frozen MERL model with parameters ϕMERL _MERL during the forward pass: p(i)=gprompt(fMERL(X(i);ϕMERL))p^(i)=g_prompt (f_MERL (X^(i); _MERL ) ). The complete trainable model minimizes the autoregressive negative log-likelihood of the target reports: ℒgen(Θ)=−1M∑i=1M∑t=1NilogPΘ(wt(i)∣w<t(i),HECG(i),p(i))L_gen( )=- 1M _i=1^M _t=1^N_i P_ (w_t^(i) w_<t^(i),H_ECG^(i),p^(i) ) (5) Gradients are propagated jointly through the decoder, projection layers, and both ECG encoding pathways. In contrast, MERL participates only in the forward pass for prompt generation and remains excluded from backpropagation. Clinically Focused Report Preprocessing Raw ECG reports frequently contain repetitive, non-informative, or record-specific content that does not generalize across patients. Examples include isolated voltage measurements, irrelevant patient information, administrative text, redundant statements, and routine phrases that provide little diagnostic value. Training directly on such reports can introduce spurious variation into the generation targets and distract the model from clinically meaningful findings. We therefore employ a few-shot prompting strategy with GPT-5.5 to extract the principal diagnostic content from each report. The prompt explicitly lists and instructs on statements to discard and clinically important information to preserve. and contains several representative pairs of original and refined reports, demonstrating how to remove irrelevant information while preserving rhythm, morphology, diagnostic conditions, finding–lead associations, and other clinically significant observations. The refinement process is explicitly instructed not to introduce, remove, or alter any diagnosis supported by the original report. Moreover, PTB-XL is a multilingual dataset and we use this process to translate the reports using standardized clinical statements. The resulting reports are reviewed by a trained cardiologist to verify that the clinically relevant findings are preserved and that no unsupported information is introduced. These concise and standardized reports are subsequently used as the generation targets for ECG-LENS. Further details and the prompt used are shown in Supplementary Section 3. ECG-Specific Clinical Evaluation Conventional lexical metrics such as BLEU, ROUGE, and METEOR primarily measure word or phrase overlap and may therefore fail to assess the clinical consistency of a generated ECG report. We therefore introduce F1-ECGBERT, a BERT-based evaluation metric that measures agreement between the diagnostic content of generated and reference reports, inspired by ChexBert (Smit et al. 2020) metric used in radiology. As illustrated in Figure 4, we train four independent report-to-label BERT classifiers corresponding to the diagnostic superclass, diagnostic subclass, rhythm, and form categories. Each model takes a text report as input and predicts the probabilities of the conditions belonging to its diagnostic category. The four classifiers are trained separately using binary cross-entropy and remain fixed during report evaluation. For each diagnostic category, the corresponding classifier extracts binary label vectors from both the reference report R and generated report R R. Their agreement is measured by calculating the F1-score. A high F1-ECGBERT 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. We perform rigorous validation of the proposed metric on an extensive set of example reports, demonstrating its effectiveness in capturing ECG semantics and superiority over conventional metrics. Details are provided in Supplementary Section 1. Figure 4: F1-ECGBERT evaluation. The reference report R and the generated report R R are passed through the BERT evaluator (one per diagnostic category) to extract the appropriate labels for the reports.F1F_1 score between the classification results measures whether the generated report preserves the diagnostic content of the reference. Experiments & Results Experiment Setup Datasets We use PTB-XL (Wagner et al. 2020) for training and experiments, which provides 21,799 10-second 12-lead recordings from 18,869 patients. We use the 500 Hz signals (12×500012× 5000) and the official strat_fold split (folds 1–8 train, 9 validation, 10 test). Then, MIMIC-IV-ECG (Gow et al. 2023) is used for cross-domain evaluation, that is to test whether the model learns robust ECG–report relationships rather than PTB-XL-specific wording. Baselines We compare against ECG report generation methods MEIT (Wan et al. 2025a), ECG-aBcDe (Xia et al. 2025), BiECG-LLM (Qiang et al. 2025a), ECG-Chat (Zhao et al. 2025), and HeartLLM (Yang et al. 2026b). Evaluation Metrics We use widely used NLP metrics BLEU (Papineni et al. 2002), ROUGE (Lin 2004), METEOR (Banerjee and Lavie 2005), and our newly defined F1-ECGBERT over the superclass, subclass, rhythm, and form categories. Implementation Details Each of the lead-specific encoders and the global encoder is a 1-D ResNet-18 (convolution kernels [9,7,7,5][9,7,7,5], stem kernel 99) with embedding dimension D=512D=512. The decoder is a GPT-2–style transformer trained from scratch with 1212 layers, 88 attention heads, hidden size 512512, and dropout 0.50.5, over a domain vocabulary built from the preprocessed reports. MERL remains frozen and used for classification. We minimize the report-generation loss with Adam (encoder learning rate 4×10−44×10^-4, decoder 1×10−41×10^-4), batch size 3232, gradient clipping 55, and learning-rate decay ×0.8× 0.8 after 88 epochs without improvement, for up to 200200 epochs with early stopping (patience 3030). Models are implemented in PyTorch and trained on a single NVIDIA GeForce RTX 4090 GPU with 24 GB of memory. Results In-Domain Results on PTB-XL We first test ECG-LENS and the baselines in PTB-XL official test split. Table 1 compares ECG-LENS with existing ECG report-generation methods using standard NLP metrics. Method B-1 B-2 B-3 R-1 R-L MET MEIT 0.371 0.356 0.343 0.557 0.518 0.490 ECG-aBcDe 0.388 0.365 – – 0.521 0.421 BiECG-LLM !250.521 !250.441 – !250.713 !250.601 !250.682 HeartLLM 0.496 0.434 !250.375 0.595 0.592 0.539 ECG-LENS 0.651 0.569 0.501 0.729 0.686 0.714 Table 1: PTB-XL in-domain text-generation results. B, R, and MET denote BLEU, ROUGE, and METEOR, respectively. Higher values are better. A dash denotes a result that was not reported in the original publication and could not be reproduced because no public implementation was available. Bold indicates the best result, gray shading indicates the second-best result. ECG-LENS achieves the highest score across every reported metric. Significant improvements over BLEU scores, specifically absolute gains of 12.8% in BLEU-2 and 12.6% in BLEU-3 over the second best method, demonstrates good lexical overlap in the generated reports. It also improves ROUGE-L and METEOR by 8.5% and 3.2%, respectively, indicating stronger structural alignment and semantic consistency with the reference reports. We further evaluate diagnostic consistency using the four independently trained F1-ECGBERT evaluators (only for the methods with publicly available implementations). As shown in Table 2, ECG-LENS obtains the highest score for every diagnostic category. Specifically, ECG-LENS exceeds the strongest baseline by 10.9% for diagnostic superclass category. Consistent improvements in diagnostic subclass and rhythm further demonstrate its ability to preserve clinically relevant findings. Method Superclass Subclass Rhythm Form ECG-Chat 0.653 !250.678 0.635 0.613 HeartLLM !250.659 0.669 !250.667 !250.689 MEIT 0.523 0.587 0.556 0.532 ECG-LENS 0.768 0.745 0.732 0.702 Table 2: F1-ECGBERT scores on the PTB-XL test set across four diagnostic categories. Method B-1 B-2 B-3 R-1 R-L MET MEIT 0.352 0.331 0.281 0.521 0.496 0.472 ECG-aBcDe 0.388 0.365 0.314 0.548 0.521 0.421 BiECG-LLM !250.506 !250.429 !250.367 !250.618 !250.589 !250.661 ECG-LENS 0.628 0.562 0.472 0.634 0.612 0.701 Table 3: Cross-domain evaluation on MIMIC-IV-ECG. 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. Performance gain of 4% in METEOR and even larger gain of more than 10% in BLEU scores proves that ECG-LENS generalizes the ECG signal characteristics, and it both learns ECG report phrases and stronger semantic correspondence with the reference reports. Cardiologist Evaluation and Qualitative Analysis 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. Further details are provided in Supplementary Section 5. We further qualitatively examine the generated reports against ground truth reports for preserved diagnoses, lead-specific findings, rare disease identification, and missing abnormalities. ECG-LENS successfully captures the conditions in most of the cases and successfully identify rare cases in a lot of scenarios. Representative comparisons with reference reports, together with a detailed analysis of common failure modes, are provided in Supplementary Section 2. Ablation Study We evaluate five configurations under identical data splits, tokenizer, decoder capacity, and optimization settings. Rows (a) and (b) compare the ResNet and Transformer global encoders, whereas rows (c)-(e) trace the progressive development of ECG-LENS by successively incorporating report preprocessing, lead-specific encoding, and clinical prompting into the ResNet baseline. Configuration B-1 B-2 B-3 R-1 R-L MET (a) Global encoding only (ResNet-1D) 0.475 0.392 0.328 0.588 0.572 0.556 (b) Global encoding only (Transformer) 0.462 0.388 0.318 0.578 0.552 0.543 (c) (a) + report preprocessing 0.558 0.468 0.398 0.617 0.625 0.598 (d) (c) + lead-specific encoders 0.572 0.502 0.437 0.684 0.652 0.650 (e) Final model ((d) + clinical prompt) 0.651 0.569 0.501 0.729 0.686 0.714 Table 4: Ablation study on the PTB-XL test set. Rows (a)-(b) compare encoder alternatives, while rows (c)-(e) progressively incorporate the proposed components. The ResNet global encoder consistently outperforms its Transformer counterpart and is therefore adopted in all subsequent stages of the study. Each subsequent component provides significant further gains across almost all metrics. Conclusion We introduced ECG-LENS, an end-to-end ECG report-generation framework that integrates lead-specific and global signal encoding, clinically enriched prompting, focused report preprocessing, and autoregressive text generation. These complementary innovations span the complete ECG-to-report pipeline and collectively improve both the linguistic quality and clinical reliability of generated reports. Across in-domain and cross-domain evaluations, ECG-LENS achieves improvements of 4%, 6.3%, and 11.5% in METEOR, ROUGE-L, and F1-ECGBERT, respectively, over the strongest corresponding baselines. We also introduce F1-ECGBERT, an ECG-specific evaluation metric that assesses diagnostic agreement beyond surface-level lexical similarity. Moreover, our proposed model is lightweight with very fast inference time of around 30ms, making it suitable for resource constrained settings. Despite these promising results, some limitations remain. First, computational constraints prevented a systematic investigation of larger-capacity encoders and decoders, which may improve representation learning and report quality. Second, although ECG-LENS substantially reduces clinical inconsistencies, it still occasionally hallucinates or makes mistakes in a small number of cases, as illustrated in Supplementary Section 2. Therefore, future work should explore larger architectures and hallucination-mitigation strategies. Overall, ECG-LENS represents a significant step toward reliable and clinically grounded automated ECG report generation. References S. Banerjee and A. Lavie (2005) METEOR: An Automatic Metric for MT Evaluation with Improved Correlation with Human Judgments. In Proceedings of the ACL Workshop on Intrinsic and Extrinsic Evaluation Measures for Machine Translation and/or Summarization, p. 65–72. Cited by: Evaluation Metrics. B. Gow, T. Pollard, L. A. Nathanson, A. Johnson, B. Moody, C. Fernandes, N. Greenbaum, J. W. Waks, P. Eslami, T. Carbonati, A. Chaudhari, E. Herbst, D. Moukheiber, S. Berkowitz, R. Mark, and S. Horng (2023) MIMIC-IV-ECG: Diagnostic Electrocardiogram Matched Subset. Note: PhysioNet, Version 1.0DOI: 10.13026/4nqg-sb35 Cited by: Datasets. A. Y. Hannun, P. Rajpurkar, M. Haghpanahi, G. H. Tison, C. Bourn, M. P. Turakhia, and A. Y. Ng (2019) Cardiologist-Level Arrhythmia Detection and Classification in Ambulatory Electrocardiograms Using a Deep Neural Network. Nature Medicine 25 (1), p. 65–69. Cited by: Introduction, ECG Classification and Representation Learning. W. Huang, N. Wang, P. Feng, H. Wang, Z. Wang, and B. Zhou (2024) A Multiresolution Mutual Learning Network for Multi-Label ECG Classification. External Links: 2406.16928 Cited by: ECG Classification and Representation Learning. J. Jin, H. Wang, H. Li, J. Li, J. Pan, and S. Hong (2025a) Reading Your Heart: Learning ECG Words and Sentences via Pre-Training ECG Language Model. In International Conference on Learning Representations (ICLR), Cited by: ECG Classification and Representation Learning. J. Jin, H. Wang, H. Li, J. Li, J. Pan, and S. Hong (2025b) Reading your heart: learning ECG words and sentences via pre-training ECG language model. In International Conference on Learning Representations, External Links: Link Cited by: Introduction. C. Lin (2004) ROUGE: A Package for Automatic Evaluation of Summaries. In Text Summarization Branches Out, p. 74–81. Cited by: Evaluation Metrics. C. Liu, Z. Wan, C. Ouyang, A. Shah, W. Bai, and R. Arcucci (2024a) Zero-shot ECG classification with multimodal learning and test-time clinical knowledge enhancement. In Proceedings of the 41st International Conference on Machine Learning, Proceedings of Machine Learning Research, Vol. 235, p. 31949–31963. External Links: Link Cited by: Introduction. C. Liu, Z. Wan, C. Ouyang, A. Shah, W. Bai, and R. Arcucci (2024b) Zero-Shot ECG Classification with Multimodal Learning and Test-Time Clinical Knowledge Enhancement. In International Conference on Machine Learning (ICML), Cited by: ECG Classification and Representation Learning, Zero-Shot Classification, Clinical Context-Enriched Prompt Generation. Y. Na, M. Park, Y. Tae, and S. Joo (2024a) Guiding masked representation learning to capture spatio-temporal relationship of electrocardiogram. In International Conference on Learning Representations, External Links: Link Cited by: Introduction. Y. Na, M. Park, Y. Tae, and S. Joo (2024b) Guiding Masked Representation Learning to Capture Spatio-Temporal Relationship of Electrocardiogram. In International Conference on Learning Representations (ICLR), Cited by: ECG Classification and Representation Learning. K. Papineni, S. Roukos, T. Ward, and W. Zhu (2002) BLEU: A Method for Automatic Evaluation of Machine Translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics (ACL), p. 311–318. Cited by: Evaluation Metrics. H. M. Pham, A. Saeed, and D. Ma (2025) Boosting Masked ECG-Text Auto-Encoders as Discriminative Learners. In International Conference on Machine Learning (ICML), Cited by: ECG Classification and Representation Learning. Y. Qiang, X. Dong, X. Liu, F. Hu, and R. Wang (2025a) BiECG-LLM: An Approach to ECG Classification and Report Generation Using a Fine-Tuned LLM with Bi-Modal ECG. In Proceedings of the IEEE International Conference on Bioinformatics and Biomedicine (BIBM), p. 7476–7483. Cited by: ECG Report Generation, Baselines. Y. Qiang, X. Dong, X. Liu, F. Hu, and R. Wang (2025b) BiECG-LLM: an approach to ECG classification and report generation using a fine-tuned LLM with bi-modal ECG. In 2025 IEEE International Conference on Bioinformatics and Biomedicine (BIBM), p. 7476–7483. External Links: Document, Link Cited by: Introduction. A. Radford, J. Wu, R. Child, D. Luan, D. Amodei, and I. Sutskever (2019) Language Models Are Unsupervised Multitask Learners. OpenAI Technical Report. Cited by: Report Generation Using Text Decoder. A. H. Ribeiro, M. H. Ribeiro, G. M. M. Paixão, D. M. Oliveira, P. R. Gomes, J. A. Canazart, M. P. S. Ferreira, C. R. Andersson, P. W. Macfarlane, W. Meira Jr., T. B. Schön, and A. L. P. Ribeiro (2020) Automatic Diagnosis of the 12-Lead ECG Using a Deep Neural Network. Nature Communications 11 (1), p. 1760. Cited by: Introduction, ECG Classification and Representation Learning. A. Smit, S. Jain, P. Rajpurkar, A. Pareek, A. Y. Ng, and M. P. Lungren (2020) CheXbert: Combining Automatic Labelers and Expert Annotations for Accurate Radiology Report Labeling Using BERT. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), p. 1500–1519. Cited by: ECG-Specific Clinical Evaluation. N. Strodthoff, P. Wagner, T. Schaeffter, and W. Samek (2021) Deep Learning for ECG Analysis: Benchmarks and Insights from PTB-XL. IEEE Journal of Biomedical and Health Informatics 25 (5), p. 1519–1528. Cited by: Introduction, ECG Classification and Representation Learning. K. Thygesen, J. S. Alpert, A. S. Jaffe, et al. (2018) Fourth universal definition of myocardial infarction (2018). Circulation 138 (20), p. e618–e651. Cited by: Introduction. G. S. Wagner, P. Macfarlane, H. Wellens, et al. (2009) AHA/accf/hrs recommendations for the standardization and interpretation of the electrocardiogram: part vi: acute ischemia/infarction. Circulation 119 (10), p. e262–e270. Cited by: Introduction. P. Wagner, N. Strodthoff, R. Bousseljot, D. Kreiseler, F. I. Lunze, W. Samek, and T. Schaeffter (2020) PTB-XL, a Large Publicly Available Electrocardiography Dataset. Scientific Data 7 (1), p. 154. Cited by: Datasets. Z. Wan, C. Liu, X. Wang, C. Tao, H. Shen, J. Xiong, R. Arcucci, H. Yao, and M. Zhang (2025a) MEIT: Multimodal Electrocardiogram Instruction Tuning on Large Language Models for Report Generation. In Findings of the Association for Computational Linguistics: ACL 2025, p. 14510–14527. Cited by: ECG Report Generation, Prompt Construction, Baselines. Z. Wan, C. Liu, X. Wang, C. Tao, H. Shen, J. Xiong, R. Arcucci, H. Yao, and M. Zhang (2025b) MEIT: multimodal electrocardiogram instruction tuning on large language models for report generation. In Findings of the Association for Computational Linguistics: ACL 2025, Vienna, Austria, p. 14510–14527. External Links: Document, Link Cited by: Introduction. Y. Xia, J. Li, Y. Sun, and J. Bu (2025) ECG-aBcDe: Overcoming Model Dependence, Encoding ECG into a Universal Language for Any LLM. External Links: 2509.12625 Cited by: ECG Report Generation, Baselines. Y. Xia, J. Li, Y. Sun, J. Bu, and K. Wang (2026) ECG-aBcDe: overcoming model dependence, encoding ECG into a universal language for any large language model. Computers in Biology and Medicine 202, p. 111439. External Links: Document, Link Cited by: Introduction. J. Yang, W. Sun, and W. Shi (2026a) HeartLLM: discretized ECG tokenization for LLM-based diagnostic reasoning. Proceedings of the AAAI Conference on Artificial Intelligence 40 (40), p. 34250–34258. External Links: Document, Link Cited by: Introduction. W. Yang, W. Sun, and W. Shi (2026b) HeartLLM: Discretized ECG Tokenization for LLM Based Diagnostic Reasoning. External Links: 2508.15338 Cited by: ECG Report Generation, Baselines. T. Zhang, V. Kishore, F. Wu, K. Q. Weinberger, and Y. Artzi (2020) BERTScore: Evaluating Text Generation with BERT. In International Conference on Learning Representations (ICLR), Cited by: Clinical Evaluation. Y. Zhao, J. Kang, T. Zhang, P. Han, and T. Chen (2025) ECG-Chat: A Large ECG-Language Model for Cardiac Disease Diagnosis. In Proceedings of the IEEE International Conference on Multimedia and Expo (ICME), p. 1–6. Cited by: ECG Report Generation, Baselines.