Electrocardiogram-based diagnosis of liver diseases: an externally validated and explainable machine learning
Juan Miguel Lopez Alcaraz1, Wilhelm Haverkamp2,3, Nils Strodthoff1
1AI4Health Division, Carl von Ossietzky Universität Oldenburg, Oldenburg, Germany.
Background:
Liver diseases present a significant global health challenge and often require costly, invasive diagnostics. Electrocardiography (ECG), a widely available and non-invasive tool, can enable the detection of liver disease by capturing cardiovascular-hepatic interactions.
Methods:
We trained tree-based machine learning models on ECG features to detect liver diseases using two large datasets: MIMIC-IV-ECG (467,729 patients, 2008-2019) and ECG-View II (775,535 patients, 1994-2013). The task was framed as binary classification, with performance evaluated via the area under the receiver operating characteristic curve (AUROC). To improve interpretability, we applied explainability methods to identify key predictive features.
Findings:
The models showed strong predictive performance with good generalizability. For example, AUROCs for alcoholic liver disease (K70) were 0.8025 (95% confidence interval (CI), 0.8020-0.8035) internally and 0.7644 (95% CI, 0.7641-0.7649) externally; for hepatic failure (K72), scores were 0.7404 (95% CI, 0.7389-0.7415) and 0.7498 (95% CI, 0.7494-0.7509), respectively. The explainability analysis consistently identified age and prolonged QTc intervals (corrected QT, reflecting ventricular repolarization) as key predictors. Features linked to autonomic regulation and electrical conduction abnormalities were also prominent, supporting known cardiovascularliver connections and suggesting QTc as a potential biomarker.
Interpretation:
ECG-based machine learning offers a promising, interpretable approach for liver disease detection, particularly in resource-limited settings. By revealing clinically relevant biomarkers, this method supports non-invasive diagnostics, early detection, and risk stratification prior to targeted clinical assessments.
Funding:
This research received no external funding.
Related Concept Videos
Electrocardiogram Fundamentals
An electrocardiogram (ECG) is a diagnostic tool for identifying cardiac conditions such as arrhythmias, conduction abnormalities, and myocardial ischemia.
Definition
An electrocardiogram (ECG) visualizes the heart's electrical activity by tracing the electrical movement associated with each heartbeat on a graph or monitor. As the heart beats, an electrical wave passes through it, correlating with the cardiac cycle events.
Parts of an ECG
An ECG utilizes electrodes on the skin...
Electrocardiogram
Three major waveforms are present in a typical ECG recording: the P wave, the QRS complex, and...
Ultrasound II: Endoscopic Ultrasound and FibroScan
Endoscopic Ultrasound (EUS):


