ECG-LENS: Lead-Aware Clinical Context Enriched ECG Report Generation and Evaluation
Abstract
Electrocardiography (ECG) is one of the most widely used non-invasive tools for diagnosing cardiovascular disease, but turning multi-lead 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 such as chest X-ray reporting, ECG interpretation requires analyzing subtle temporal morphologies, lead-specific abnormalities, and inter-lead relationships, followed by coherent diagnostic reasoning in dense clinical terminology. Existing systems focus predominantly on classification, while current report-generation methods produce outputs that remain inadequate for practical clinical use. We propose ECG-LENS, an end-to-end framework that integrates lead-specific and global ECG representations with structured diagnostic context to generate clinically faithful reports. It combines lead-wise encoders that preserve localized waveform morphology with a global encoder that captures inter-lead dependencies, and fuses these 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, focusing the model on clinically meaningful findings. Finally, lexical metrics may not reflect clinical fidelity, as equivalent reports can differ in wording. We therefore devise F1-ECGBERT, a BERT-based evaluation procedure that measures diagnostic-label agreement between 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 9.9\%, 8.5\%, and 10.9\% in METEOR, ROUGE-L, and F1-ECGBERT over the strongest baselines. The anonymized code repository is available at https://anonymous.4open.science/r/ECG-LENS-E49E.