Kai Yang, Massimo Hong, Jiahuan Zhang, Yizhen Luo, Suyuan Zhao, Ou Zhang, Xiaomao Yu, Jiawen Zhou, Liuqing Yang, Ping Zhang, Mu Qiao, Zaiqing Nie
{"title":"ECG-LM: Understanding Electrocardiogram with a Large Language Model.","authors":"Kai Yang, Massimo Hong, Jiahuan Zhang, Yizhen Luo, Suyuan Zhao, Ou Zhang, Xiaomao Yu, Jiawen Zhou, Liuqing Yang, Ping Zhang, Mu Qiao, Zaiqing Nie","doi":"10.34133/hds.0221","DOIUrl":null,"url":null,"abstract":"<p><p><b>Background:</b> The electrocardiogram (ECG) is a valuable, noninvasive tool for monitoring heart-related conditions, providing critical insights. However, the interpretation of ECG data alongside patient information demands substantial medical expertise and resources. While deep learning methods help streamline this process, they often fall short in integrating patient data with ECG readings and do not provide the nuanced clinical suggestions and insights necessary for accurate diagnosis. <b>Methods:</b> Although recent advancements in multi-modal large language modeling have propelled their application scope beyond the natural language processing domain, their applicability to ECG processing remains largely unexplored, partly due to the lack of text-ECG data. To this end, we develop ECG-Language Model (ECG-LM), the first multi-modal large language model able to process natural language and understand ECG signals. The model employs a specialized ECG encoder that transforms raw ECG signals into a high-dimensional feature space, which is then aligned with the textual feature space derived from the large language model. To address the scarcity of text-ECG data, we generated text-ECG pairs by leveraging detailed ECG pattern descriptions from medical guidelines, creating a robust dataset for pre-training ECG-LM. Additionally, we fine-tune ECG-LM with public clinical conversation datasets and build an additional supervised fine-tuning dataset based on real clinical data from the hospital, aiming to provide a more comprehensive and customized user experience. <b>Results:</b> ECG-LM outperforms existing few-shot and zero-shot solutions in cardiovascular disease detection across all 3 tasks (diagnostic, rhythm, and form) while also demonstrating strong potential in ECG-related question answering. <b>Conclusions:</b> The results across various tasks demonstrate that ECG-LM effectively captures the intricate features of ECGs, showcasing its versatility in applications such as disease prediction and advanced question answering.</p>","PeriodicalId":73207,"journal":{"name":"Health data science","volume":"5 ","pages":"0221"},"PeriodicalIF":0.0000,"publicationDate":"2025-02-04","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11791404/pdf/","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Health data science","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.34133/hds.0221","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"2025/1/1 0:00:00","PubModel":"eCollection","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0
Abstract
Background: The electrocardiogram (ECG) is a valuable, noninvasive tool for monitoring heart-related conditions, providing critical insights. However, the interpretation of ECG data alongside patient information demands substantial medical expertise and resources. While deep learning methods help streamline this process, they often fall short in integrating patient data with ECG readings and do not provide the nuanced clinical suggestions and insights necessary for accurate diagnosis. Methods: Although recent advancements in multi-modal large language modeling have propelled their application scope beyond the natural language processing domain, their applicability to ECG processing remains largely unexplored, partly due to the lack of text-ECG data. To this end, we develop ECG-Language Model (ECG-LM), the first multi-modal large language model able to process natural language and understand ECG signals. The model employs a specialized ECG encoder that transforms raw ECG signals into a high-dimensional feature space, which is then aligned with the textual feature space derived from the large language model. To address the scarcity of text-ECG data, we generated text-ECG pairs by leveraging detailed ECG pattern descriptions from medical guidelines, creating a robust dataset for pre-training ECG-LM. Additionally, we fine-tune ECG-LM with public clinical conversation datasets and build an additional supervised fine-tuning dataset based on real clinical data from the hospital, aiming to provide a more comprehensive and customized user experience. Results: ECG-LM outperforms existing few-shot and zero-shot solutions in cardiovascular disease detection across all 3 tasks (diagnostic, rhythm, and form) while also demonstrating strong potential in ECG-related question answering. Conclusions: The results across various tasks demonstrate that ECG-LM effectively captures the intricate features of ECGs, showcasing its versatility in applications such as disease prediction and advanced question answering.