<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article article-type="research-article" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xml:lang="EN">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Digit. Health</journal-id>
<journal-title>Frontiers in Digital Health</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Digit. Health</abbrev-journal-title>
<issn pub-type="epub">2673-253X</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fdgth.2025.1558589</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Digital Health</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Deep conditional generative model for personalization of 12-lead electrocardiograms and cardiovascular risk prediction</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author"><name><surname>Sang</surname><given-names>Yuling</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref><uri xlink:href="https://loop.frontiersin.org/people/2994065/overview"/><role content-type="https://credit.niso.org/contributor-roles/data-curation/"/><role content-type="https://credit.niso.org/contributor-roles/investigation/"/><role content-type="https://credit.niso.org/contributor-roles/software/"/><role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/><role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/><role content-type="https://credit.niso.org/contributor-roles/formal-analysis/"/><role content-type="https://credit.niso.org/contributor-roles/methodology/"/><role content-type="https://credit.niso.org/contributor-roles/validation/"/><role content-type="https://credit.niso.org/contributor-roles/visualization/"/><role content-type="https://credit.niso.org/contributor-roles/writing-original-draft/"/></contrib>
<contrib contrib-type="author" corresp="yes"><name><surname>Banerjee</surname><given-names>Abhirup</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="corresp" rid="cor1">&#x002A;</xref><uri xlink:href="https://loop.frontiersin.org/people/1700405/overview" /><role content-type="https://credit.niso.org/contributor-roles/data-curation/"/><role content-type="https://credit.niso.org/contributor-roles/investigation/"/><role content-type="https://credit.niso.org/contributor-roles/software/"/><role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/><role content-type="https://credit.niso.org/contributor-roles/supervision/"/><role content-type="https://credit.niso.org/contributor-roles/funding-acquisition/"/></contrib>
<contrib contrib-type="author"><name><surname>Beetz</surname><given-names>Marcel</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref><uri xlink:href="https://loop.frontiersin.org/people/1813426/overview" /><role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/><role content-type="https://credit.niso.org/contributor-roles/data-curation/"/><role content-type="https://credit.niso.org/contributor-roles/investigation/"/><role content-type="https://credit.niso.org/contributor-roles/methodology/"/><role content-type="https://credit.niso.org/contributor-roles/supervision/"/><role content-type="https://credit.niso.org/contributor-roles/validation/"/><role content-type="https://credit.niso.org/contributor-roles/visualization/"/><role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/><role content-type="https://credit.niso.org/contributor-roles/software/"/></contrib>
<contrib contrib-type="author"><name><surname>Grau</surname><given-names>Vicente</given-names></name>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref><uri xlink:href="https://loop.frontiersin.org/people/727141/overview" /><role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/><role content-type="https://credit.niso.org/contributor-roles/funding-acquisition/"/><role content-type="https://credit.niso.org/contributor-roles/investigation/"/><role content-type="https://credit.niso.org/contributor-roles/methodology/"/><role content-type="https://credit.niso.org/contributor-roles/project-administration/"/><role content-type="https://credit.niso.org/contributor-roles/resources/"/><role content-type="https://credit.niso.org/contributor-roles/supervision/"/><role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/><role content-type="https://credit.niso.org/contributor-roles/data-curation/"/></contrib>
</contrib-group>
<aff id="aff1"><label><sup>1</sup></label><institution>Centre for Computational Biology, Duke-NUS Medical School</institution>, <addr-line>Singapore</addr-line>, <country>Singapore</country></aff>
<aff id="aff2"><label><sup>2</sup></label><institution>Institute of Biomedical Engineering, Department of Engineering Science, University of Oxford</institution>, <addr-line>Oxford</addr-line>, <country>United Kingdom</country></aff>
<aff id="aff3"><label><sup>3</sup></label><institution>Division of Cardiovascular Medicine, Radcliffe Department of Medicine, University of Oxford</institution>, <addr-line>Oxford</addr-line>, <country>United Kingdom</country></aff>
<author-notes>
<fn fn-type="edited-by"><p><bold>Edited by:</bold> Xiaofeng Li, Heilongjiang International University, China</p></fn>
<fn fn-type="edited-by"><p><bold>Reviewed by:</bold> Heyam A. Marzog, Al-Furat Al-Awsat Technical University, Iraq</p>
<p>Katya Arquilla, University of Colorado Boulder, United States</p></fn>
<corresp id="cor1"><label>&#x002A;</label><bold>Correspondence:</bold> Abhirup Banerjee <email>abhirup.banerjee@eng.ox.ac.uk</email></corresp>
</author-notes>
<pub-date pub-type="epub"><day>16</day><month>04</month><year>2025</year></pub-date>
<pub-date pub-type="collection"><year>2025</year></pub-date>
<volume>7</volume><elocation-id>1558589</elocation-id>
<history>
<date date-type="received"><day>10</day><month>01</month><year>2025</year></date>
<date date-type="accepted"><day>25</day><month>03</month><year>2025</year></date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2025 Sang, Banerjee, Beetz and Grau.</copyright-statement>
<copyright-year>2025</copyright-year><copyright-holder>Sang, Banerjee, Beetz and Grau</copyright-holder><license license-type="open-access" xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License (CC BY)</ext-link>. The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract><sec><title>Background</title>
<p>12-lead electrocardiograms (ECGs) are a cornerstone for diagnosing and monitoring cardiovascular diseases (CVDs). They play a key role in detecting abnormalities such as arrhythmias and myocardial infarction, enabling early intervention and risk stratification. However, traditional analysis relies heavily on manual interpretation, which is time-consuming and expertise-dependent. Moreover, existing machine learning models often lack personalization, as they fail to integrate subject-specific anatomical and demographic information. Advances in deep generative models offer an opportunity to overcome these challenges by synthesizing personalized ECGs and extracting clinically relevant features for improved risk assessment.</p>
</sec><sec><title>Methods</title>
<p>We propose a conditional Variational Autoencoder (cVAE) framework to generate realistic, subject-specific 12-lead ECGs by incorporating demographic metadata, anatomical heart features, and ECG electrodes&#x2019; positions as conditioning factors. This allows for physiologically consistent and personalized ECG synthesis. Furthermore, we introduce a revised Cox proportional-hazards regression model that utilizes the latent embeddings learned by the cVAE to predict future CVD risk. This approach not only enhances the interpretability of ECG-derived risk factors but also demonstrates the potential of deep generative models in personalized cardiac assessment.</p>
</sec><sec><title>Results</title>
<p>Our model is trained and validated on the UK Biobank dataset and <italic>in silico</italic> simulation data. By incorporating heart position and electrodes&#x2019; positions, the generated ECGs demonstrate strong consistency with <italic>in silico</italic> simulations, providing insights into the relationship between cardiac anatomy and ECG morphology. Furthermore, our CVD risk prediction model achieves a C-index of 0.65, indicating that ECG signals, together with demographic and anatomical information, contain valuable prognostic information for stratifying subjects based on future cardiovascular risk.</p>
</sec><sec><title>Conclusion</title>
<p>This work marks a significant advancement in ECG analysis by providing a conditional VAE framework that not only improves ECG generation but also enriches our understanding of the relationship between ECG patterns and subject-specific information. Importantly, our approach enables clinically significant information to be extracted from 12-lead ECGs, providing valuable insights for predicting future CVD risks.</p>
</sec>
</abstract>
<kwd-group>
<kwd>cardiac MRI</kwd>
<kwd>cardiovascular disease</kwd>
<kwd>cardiovascular risk prediction</kwd>
<kwd>ECG electrodes</kwd>
<kwd>ECG generation</kwd>
<kwd>variational autoencoder</kwd>
</kwd-group><counts>
<fig-count count="5"/>
<table-count count="2"/><equation-count count="104"/><ref-count count="31"/><page-count count="13"/><word-count count="0"/></counts><custom-meta-wrap><custom-meta><meta-name>section-at-acceptance</meta-name><meta-value>Health Informatics</meta-value></custom-meta></custom-meta-wrap>
</article-meta>
</front>
<body><sec id="s1" sec-type="intro"><label>1</label><title>Introduction</title>
<p>The electrocardiogram (ECG) is a well established, non-invasive diagnostic tool that records the electrical activity of the heart over time (<xref ref-type="bibr" rid="B1">1</xref>). However, the manual analysis of ECG data can be a time-consuming and labor-intensive process, requiring significant expertise in interpreting complex patterns and abnormalities in the heart&#x2019;s electrical activity. With the increasing use of wearable devices and other monitoring technologies, large volumes of ECG data can be generated on a daily basis (<xref ref-type="bibr" rid="B2">2</xref>), further exacerbating the challenge of manual analysis. As a result, there is a need for automatic techniques to facilitate the efficient diagnosis of heart diseases using the ECG.</p>
<p>Machine learning has emerged as a powerful tool for enabling automated analysis in a wide range of ECG-based tasks (<xref ref-type="bibr" rid="B3">3</xref>&#x2013;<xref ref-type="bibr" rid="B9">9</xref>). While machine learning techniques have shown great promise, many of these methods require large amounts of labeled data to effectively train the model. This poses a significant challenge as obtaining and annotating large datasets can be time-consuming, expensive, and resource-intensive. Also, class imbalance is another common issue in ECG datasets, as certain cardiac abnormalities may be relatively rare compared to normal ECG patterns, which can lead to biased model performance (<xref ref-type="bibr" rid="B10">10</xref>). Furthermore, preserving patient privacy is another critical aspect of medical data sharing and usage, especially in the context of ECG data, which may contain personally identifiable and sensitive health information (<xref ref-type="bibr" rid="B11">11</xref>).</p>
<p>Researchers have tried to solve these problems through data augmentation. Classic data augmentation methods such as performing translation and adding noise can only obtain limited new additional information, which may lead to overfitting during the training process. In order to truly augment the dataset, deep generative models have attracted attention in recent years for the generation of high-quality synthetic medical data, and been applied successfully in ECG research. Previous deep generative models (<xref ref-type="bibr" rid="B12">12</xref>&#x2013;<xref ref-type="bibr" rid="B14">14</xref>) have mainly focused on only single-lead ECG generation and lack the introduction of subject characteristics. 12-lead ECGs are the clinical gold standard, providing comprehensive spatial information about cardiac conduction, and incorporation of demographic and physiological features is crucial for understanding the relationship between ECG morphology and subject information. The inability to generate physiologically consistent multi-lead signals significantly restricts the applicability of these models in personalized cardiac assessments, as key inter-lead relationships and subject-specific variations are not considered.</p>
<p>Traditional simulation methods, such as the Extracellular-Membrane-Intracellular (EMI) model or the work of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>), which utilized computer simulation with torso-ventricular anatomical models to investigate the impacts of ventricular and torso anatomy on 12-lead ECGs, hypothesize that geometrical factors, including ventricular anatomy, heart orientation, location, and torso anatomy, differentially influence QRS complexes in 12-lead ECGs. Although these traditional biophysically-based models can be very precise, they are computationally intensive, with simulations requiring up to several hours (<xref ref-type="bibr" rid="B16">16</xref>), whereas generative models can synthesize ECG signals in milliseconds per sample.</p>
<p>Our study aims to bridge these gaps by introducing a conditional Variational Autoencoder (cVAE) framework that generates 12-lead ECGs conditioned on anatomical features. In our previous work (<xref ref-type="bibr" rid="B17">17</xref>), we included subject metadata and anatomical characteristics, such as heart positions and orientations, from cardiac Magnetic Resonance Imaging (MRI) to develop a cVAE model that can generate realistic 12-lead ECGs with ability to capture useful features from different conditions. However, the generated conditional ECGs only partially align with the <italic>in silico</italic> data, likely due to the absence of torso structural information in the model.</p>
<p>To address this limitation, in this study, we incorporate ECG electrode locations as additional input features. A widely used configuration for ECG measurement involves 10 electrodes: 4 electrodes placed on the limbs [left arm (LA), right arm (RA), left leg (LL), and right leg (RL)] and 6 electrodes positioned on the chest (V1 to V6). These chest electrodes provide detailed spatial information about the heart&#x2019;s electrical activity, enabling the formation of 12 leads and establishing a strong connection between the torso structure and ECG signals. With the recent development of automated 3D torso reconstruction (<xref ref-type="bibr" rid="B18">18</xref>, <xref ref-type="bibr" rid="B19">19</xref>), we are able to obtain the precise electrodes&#x2019; positions from each subject&#x2019;s clinical MRI. This additional information provides valuable constraints to the model, allowing it to generate ECGs that are not only realistic but also anatomically and physiologically consistent.</p>
<p>In order to demonstrate the efficacy of the latent representation achieved from the VAE architecture, we extend the model to perform future cardiovascular disease (CVD) risk prediction. The majority of contemporary algorithms focusing on CVD risk prediction are based on a limited set of subject attributes, e.g., age, smoking history, and blood pressure. Recently, efforts have been made to investigate a broader range of risk predictors, encompassing interaction terms and employing more sophisticated machine learning techniques to model CVD risk (<xref ref-type="bibr" rid="B20">20</xref>). However, these studies have only considered tabular data, neglecting other potential information sources such as ECG or MRI. Recent studies (<xref ref-type="bibr" rid="B21">21</xref>&#x2013;<xref ref-type="bibr" rid="B23">23</xref>) have increasingly shown that ECG abnormalities are a promising predictor of CVD risk, making the direct use of ECG signals an attractive direction for risk stratification. However, most previous approaches have relied solely on ECG data without incorporating the underlying anatomical context. Specifically, variations in heart position and orientation can substantially alter ECG morphology by shifting the electrical axis and modifying the amplitude and duration of key waveforms (<xref ref-type="bibr" rid="B15">15</xref>, <xref ref-type="bibr" rid="B19">19</xref>). If these anatomical effects are not accounted for, normal variations in heart position may be misinterpreted as pathological changes or, conversely, true abnormalities might be obscured. By incorporating heart position and orientation, our model can disentangle these anatomical influences from disease-related signals. Therefore, our work explores the novel integration of heart data with ECG signals, aiming not only to generate more realistic ECGs but also to enhance the accuracy of CVD risk prediction by incorporating critical anatomical context.</p>
<p>Our study makes the following key contributions:
<list list-type="simple">
<list-item><label>1.</label>
<p>We develop a novel cVAE framework capable of generating 12-lead ECGs and incorporate patient-specific conditions.</p></list-item>
<list-item><label>2.</label>
<p>We demonstrate that incorporating heart position and electrodes placement significantly improves the fidelity of synthetic ECG signals, capturing inter-lead dependencies and individual variability.</p></list-item>
<list-item><label>3.</label>
<p>We introduce a revised Cox proportional-hazards model, leveraging ECG-derived latent embeddings to enhance CVD risk prediction.</p></list-item>
<list-item><label>4.</label>
<p>ECG signals, combined with anatomical context, can stratify subjects based on their future cardiovascular risk (C-index <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM1"><mml:mo>=</mml:mo></mml:math></inline-formula> 0.65), providing valuable insights for personalized cardiac assessments.</p></list-item>
</list></p>
</sec>
<sec id="s2" sec-type="methods"><label>2</label><title>Materials and methods</title>
<sec id="s2a"><label>2.1</label><title>ECG dataset</title>
<p>Our research has been conducted using the UK Biobank Resource under Application Number &#x201C;40161&#x201D; (<xref ref-type="bibr" rid="B24">24</xref>). In total, we have ECG files from 37,508 volunteers, together with their personal information including age, sex, BMI, and their clinical imaging information.</p>
<p>Each ECG file in the UK Biobank dataset contains a 10-s sample recorded at 500 Hz with 5,000 data points per lead. Additionally, UK Biobank provides a median beat waveform, which is computed by extracting individual heartbeats from the 10-s segment, aligning them, and calculating the median waveform across all beats. This median beat contains approximately 600 data points and serves as a representative single heartbeat, The majority of our experiments are performed on the shorter median data, since the averaging process can help to reduce noise and artifacts in the signal, providing a cleaner and accurate representation of the cardiac activity. It not only allows us to focus on specific features of the ECG, such as the QRS complex, without the confounding effects of beats variability in the longer recording, but requires less computational power and time as well. The ECG data require some additional pre-processing to remove artifacts like baseline drift, which was removed using a finite impulse response band-pass filter between 3&#x2013;45 Hz, inspired by an entry to the Computing in Cardiology (CinC) 2017 challenge (<xref ref-type="bibr" rid="B25">25</xref>).</p>
<p>The age and sex information of the subjects are included in the UK Biobank ECG files. The BMI can be located within the &#x201C;Body Size Measures&#x201D; category in the UK Biobank, accessible through each subject&#x2019;s unique identification number.</p>
<p>The UK Biobank dataset we use includes 21,083 cardiac MRI cases in total, and they were acquired at the same date as the ECG acquisitions (<xref ref-type="bibr" rid="B26">26</xref>). These cardiac MRI are used to calculate subject-specific information, including heart positions, orientations and electrode positions.</p>
</sec>
<sec id="s2b"><label>2.2</label><title>CVD risk prediction dataset</title>
<p>In this project, we define CVD as a composite of any of the following ICD-10 diagnosis codes: I20 (angina pectoris), I21 (acute myocardial infarction), I22 (subsequent myocardial infarction), I23 (certain current complications following acute myocardial infarction), I24 (other acute ischaemic heart diseases), I25 (chronic ischaemic heart disease), and I50 (heart failure). This is similar to the research of Alaa et al. (<xref ref-type="bibr" rid="B20">20</xref>), but we exclude I60&#x2013;I69 (cerebrovascular diseases), as we assume that the link between ECG and cerebrovascular disease is relatively weak. We also exclude vascular dementia, since at the time of our study we do not have access to its ICD-10 code. We apply our model only on the cases whose CVD event date is posterior to the ECG acquisition date, which we refer as incident cases. We identify all subjects for which a CVD event was recorded before ECG acquisition as prevalent CVD cases (<xref ref-type="bibr" rid="B27">27</xref>). The diagram of our dataset preparation is shown in <xref ref-type="fig" rid="F1">Figure&#x00A0;1</xref>.</p>
<fig id="F1" position="float"><label>Figure 1</label>
<caption><p>CVD risk prediction dataset preparation diagram.</p></caption>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="fdgth-07-1558589-g001.tif"/>
</fig>
<p>In total, we have 37,508 subjects with successful ECG recordings. As detailed in <xref ref-type="sec" rid="s2a">Section 2.1</xref>, a finite impulse response band-pass filter is applied to correct baseline drift in the signals. However, this method does not address short peak artifacts, which can significantly affect our model training. To mitigate this issue, we remove all signals with absolute amplitudes exceeding 800 mV/100 in any lead, resulting in the exclusion of 853 subjects. A further 25 subjects are excluded due to missing CVD diagnoses. Next, we exclude 2,917 subjects with prevalent CVD diagnosis from our dataset leaving 33,713 subjects. Among them, we separately have 925 cases with incident CVD diagnosis and 32,788 healthy subjects with no CVD records at the time of this study.</p>
<p>We allocate 80&#x0025; of each healthy and CVD group into the training set and the remaining 20&#x0025; into the test set for CVD risk prediction. This stratification was applied separately to each of the 7 CVD subtypes, ensuring that their proportions remained consistent across both sets. By maintaining balanced representation, we reduce the potential for certain diseases to be over- or under-represented, thereby improving model accuracy and generalizability.</p>
</sec>
<sec id="s2c"><label>2.3</label><title>Heart position and orientation</title>
<p>The heart position and orientation data are calculated using information from the cardiac MRI. In general, a standard cardiac MRI acquisition includes a stack of 2D short-axis (SAX) slices, which cover the left and right ventricles from apex to base, as well as a 2-chamber long axis (LAX) slice and a 4-chamber LAX slice (<xref ref-type="bibr" rid="B28">28</xref>). As shown in <xref ref-type="fig" rid="F2">Figure&#x00A0;2A</xref>, we define the heart position as the intersection between three planes: 2-chamber LAX plane, 4-chamber LAX plane, and the middle plane of the SAX view stack. The definition of a plane is 3D space is given by <xref ref-type="disp-formula" rid="disp-formula1">Equation 1</xref>:<disp-formula id="disp-formula1"><label>(1)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM1"><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">X</mml:mi></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mi>P</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></disp-formula>where:
<list list-type="simple">
<list-item><label>&#x2022;</label>
<p><inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM2"><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:mrow><mml:mn>3</mml:mn></mml:msup></mml:math></inline-formula> is the normal vector of the plane;</p></list-item>
<list-item><label>&#x2022;</label>
<p><inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM3"><mml:mrow><mml:mi mathvariant="bold">X</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x2208;</mml:mo><mml:msup><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow></mml:mrow><mml:mn>3</mml:mn></mml:msup></mml:math></inline-formula> is an arbitrary point on the plane; and</p></list-item>
<list-item><label>&#x2022;</label>
<p><inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM4"><mml:mi>P</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi>x</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi>y</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>P</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is a known point on the plane, extracted from the DICOM metadata.</p></list-item>
</list>The specific plane equations for the three anatomical planes are shown in <xref ref-type="disp-formula" rid="disp-formula2">Equations 2</xref>&#x2013;<xref ref-type="disp-formula" rid="disp-formula4">4</xref>:<disp-formula id="disp-formula2"><label>(2)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM2"><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>SAX</mml:mtext></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">X</mml:mi></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:msup><mml:mi>P</mml:mi><mml:mtext>SAX</mml:mtext></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></disp-formula><disp-formula id="disp-formula3"><label>(3)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM3"><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>2CH</mml:mtext></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">X</mml:mi></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:msup><mml:mi>P</mml:mi><mml:mtext>2CH</mml:mtext></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></disp-formula><disp-formula id="disp-formula4"><label>(4)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM4"><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>4CH</mml:mtext></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">X</mml:mi></mml:mrow><mml:mo>&#x2212;</mml:mo><mml:msup><mml:mi>P</mml:mi><mml:mtext>4CH</mml:mtext></mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM5"><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>SAX</mml:mtext></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>2CH</mml:mtext></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>4CH</mml:mtext></mml:msub></mml:math></inline-formula> are the normal vectors of the SAX, 2-chamber LAX, and 4-chamber LAX planes, respectively. <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM6"><mml:msup><mml:mi>P</mml:mi><mml:mtext>SAX</mml:mtext></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi>P</mml:mi><mml:mtext>2CH</mml:mtext></mml:msup><mml:mo>,</mml:mo><mml:msup><mml:mi>P</mml:mi><mml:mtext>4CH</mml:mtext></mml:msup></mml:math></inline-formula> are the image position points for each plane. By solving this system of three linear equations, we obtain the heart&#x0027;s center position, as shown in <xref ref-type="disp-formula" rid="disp-formula5">Equation 5</xref>:<disp-formula id="disp-formula5"><label>(5)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM5"><mml:msub><mml:mi>P</mml:mi><mml:mtext>heart</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>y</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>h</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:mtext>Intersection</mml:mtext><mml:mo stretchy="false">(</mml:mo><mml:mtext>SAX, 2CH, 4CH</mml:mtext><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula>The heart orientation is defined relative to the standard anatomical coordinate system using a new heart-specific coordinate system based on the SAX and 4-chamber LAX planes. This coordinate system is denoted as <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM7"><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Z</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Y</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>. The new <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM8"><mml:mi>X</mml:mi></mml:math></inline-formula>-axis is computed as the normalized intersection vector between the SAX and 4-chamber LAX planes:<disp-formula id="disp-formula6"><label>(6)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM6"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mfrac><mml:msub><mml:mrow><mml:mi mathvariant="bold">L</mml:mi></mml:mrow><mml:mtext>SAX-4CH</mml:mtext></mml:msub><mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">L</mml:mi></mml:mrow><mml:mtext>SAX-4CH</mml:mtext></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo></mml:mrow></mml:mfrac></mml:mrow></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM9"><mml:msub><mml:mrow><mml:mi mathvariant="bold">L</mml:mi></mml:mrow><mml:mtext>SAX-4CH</mml:mtext></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>SAX</mml:mtext></mml:msub><mml:mo>&#x00D7;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>4CH</mml:mtext></mml:msub></mml:math></inline-formula> is the direction vector of the line formed by the intersection of the SAX and 4-chamber LAX planes. <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM10"><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">L</mml:mi></mml:mrow><mml:mtext>SAX-4CH</mml:mtext></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo></mml:math></inline-formula> is the vector norm, ensuring <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM11"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub></mml:math></inline-formula> is a unit vector.</p>
<fig id="F2" position="float"><label>Figure 2</label>
<caption><p>Overall pipeline for utilizing heart and torso information in conditional ECG generation and CVD risk prediction. <bold>(A)</bold> Heart position is calculated by the intersection of 2-chamber view, 4-chamber view, and middle short-axis view. <bold>(B)</bold> Heart orientation is represented by Euler angles between heart coordinate system and anatomical coordinate system. <bold>(C)</bold> Electrodes&#x2019; positions are achieved from cardiac MRI (<xref ref-type="bibr" rid="B18">18</xref>) and transformed to heart coordinate system. <bold>(D)</bold> The conditional VAE architecture with the heart and torso information as additional condition inputs added to the first fully-connected layer of encoder and latent space. <bold>(E)</bold> The CVD risk prediction model. An additional predictor is concatenated to the latent embedding, which provides the risk score to realize the revised Cox proportional hazard regression model. <bold>(F)</bold> The conditional ECG generation is performed by trained decoder, which takes random sampling from normal distribution and condition inputs.</p></caption>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="fdgth-07-1558589-g002.tif"/>
</fig>
<p>The new <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM12"><mml:mi>Z</mml:mi></mml:math></inline-formula>-axis is chosen to be perpendicular to the 4-chamber LAX plane, while ensuring it remains orthogonal to <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM13"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub></mml:math></inline-formula>:<disp-formula id="disp-formula7"><label>(7)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM7"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Z</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>4CH</mml:mtext></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>4CH</mml:mtext></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM14"><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>4CH</mml:mtext></mml:msub></mml:math></inline-formula> is the normal vector of the 4-chamber LAX plane. The term <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM15"><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>4CH</mml:mtext></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub></mml:math></inline-formula> removes the component of <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM16"><mml:msub><mml:mrow><mml:mi mathvariant="bold">n</mml:mi></mml:mrow><mml:mtext>4CH</mml:mtext></mml:msub></mml:math></inline-formula> that is parallel to <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM17"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub></mml:math></inline-formula>, ensuring orthogonality.</p>
<p>The new <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM18"><mml:mi>Y</mml:mi></mml:math></inline-formula>-axis is computed as the cross-product of <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM19"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub></mml:math></inline-formula> and <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM20"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Z</mml:mi></mml:msub></mml:math></inline-formula>:<disp-formula id="disp-formula8"><label>(8)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM8"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Y</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo>&#x00D7;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Z</mml:mi></mml:msub></mml:math></disp-formula><xref ref-type="disp-formula" rid="disp-formula6">Equations 6</xref>&#x2013;<xref ref-type="disp-formula" rid="disp-formula8">8</xref> ensure that <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM21"><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Y</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Z</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> forms a right-handed orthonormal coordinate system. The Euler angles describe the rotation between the heart coordinate system (<inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM22"><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Y</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Z</mml:mi></mml:msub></mml:math></inline-formula>) and the standard anatomical coordinate system (<inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM23"><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mi mathvariant="bold">y</mml:mi></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow></mml:math></inline-formula>), as described in <xref ref-type="disp-formula" rid="disp-formula9">Equations 9</xref>&#x2013;<xref ref-type="disp-formula" rid="disp-formula11">11</xref>:<disp-formula id="disp-formula9"><label>(9)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM9"><mml:mi>&#x03B1;</mml:mi><mml:mo>=</mml:mo><mml:msup><mml:mi>cos</mml:mi><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mspace width="0.2em"/><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo></mml:mrow></mml:mfrac></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula><disp-formula id="disp-formula10"><label>(10)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM10"><mml:mi>&#x03B2;</mml:mi><mml:mo>=</mml:mo><mml:mo>&#x2212;</mml:mo><mml:msup><mml:mi>cos</mml:mi><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mspace width="0.2em"/><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Z</mml:mi></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>Z</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo></mml:mrow></mml:mfrac></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula><disp-formula id="disp-formula11"><label>(11)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM11"><mml:mi>&#x03B3;</mml:mi><mml:mo>=</mml:mo><mml:mo>&#x2212;</mml:mo><mml:msup><mml:mi>cos</mml:mi><mml:mrow><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup><mml:mspace width="0.2em"/><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mfrac><mml:mrow><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo>&#x22C5;</mml:mo><mml:mrow><mml:mi mathvariant="bold">N</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="bold">e</mml:mi></mml:mrow><mml:mi>X</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mrow><mml:mi mathvariant="bold">N</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo></mml:mrow></mml:mfrac></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM24"><mml:mrow><mml:mi mathvariant="bold">N</mml:mi></mml:mrow></mml:math></inline-formula> is the normal vector of the anatomical XOY plane.</p>
</sec>
<sec id="s2d"><label>2.4</label><title>Electrode positions</title>
<p>We use the work of Smith et al. (<xref ref-type="bibr" rid="B19">19</xref>) for estimating the electrodes&#x2019; positions for each subject. The method applies a U-net deep learning network for automated torso segmentation and contour extraction from the localizer and scout cardiac MRI from the UK Biobank dataset (<xref ref-type="bibr" rid="B18">18</xref>). The undesired section including head, neck, and arms and potential artifacts such as shadow regions are removed using a preprocessing algorithm. Finally, a statistical shape model is used over sparse 3D contours to generate 3D torso meshes, with the electrodes&#x2019; positions estimated on the 3D torso meshes.</p>
<p>Due to the relative slow speed of this algorithm, which usually takes 30&#x2013;60 min for one case, we reconstruct a total of 1,834 3D torso meshes, and measure the ten electrodes&#x2019; positions for standard 12-lead ECGs, which include four limb electrodes including left arm, right arm, left leg, and right leg, and six precordial electrodes corresponding to six precordial leads. <xref ref-type="fig" rid="F2">Figure&#x00A0;2C</xref> presents electrodes&#x2019; locations of ten sample cases from our training set.</p>
<p>The electrodes generated from torso meshes are 3D variables located in the anatomical coordinate system presented in <xref ref-type="fig" rid="F2">Figure&#x00A0;2B</xref>. In order for each subject&#x2019;s location information to be more accurately comparable and representative of the anatomical characteristics of the heart, we utilize the heart position and orientation calculated before, to transfer the locations from anatomical coordinate system to heart coordinate system. In this way we capture the corresponding relationship between the electrode coordinates and the heart coordinates while treating the heart coordinates as the origin. Therefore, the electrodes&#x2019; positions information is able to contain both torso and heart features.</p>
</sec>
<sec id="s2e"><label>2.5</label><title>Conditional VAE architecture</title>
<p>Assuming that the original data set is <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM25"><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow></mml:math></inline-formula>, the encoder produces a hidden variable <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM26"><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow></mml:math></inline-formula> and the decoder produces the reconstructed dataset <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM27"><mml:mrow><mml:mover><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula>. The VAE aims to learn the marginal likelihood of the input through this generative process, as defined in <xref ref-type="disp-formula" rid="disp-formula12">Equation 12</xref>:<disp-formula id="disp-formula12"><label>(12)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM12"><mml:munder><mml:mo movablelimits="true" form="prefix">max</mml:mo><mml:mrow><mml:mi>&#x03D5;</mml:mi><mml:mo>,</mml:mo><mml:mi>&#x03B8;</mml:mi></mml:mrow></mml:munder><mml:msub><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">E</mml:mi></mml:mrow></mml:mrow><mml:mrow><mml:msub><mml:mi>q</mml:mi><mml:mi>&#x03D5;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:msub><mml:mo stretchy="false">[</mml:mo><mml:mi>log</mml:mi><mml:mspace width="0.2em"/><mml:msub><mml:mi>p</mml:mi><mml:mi>&#x03B8;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM28"><mml:mi>&#x03D5;</mml:mi></mml:math></inline-formula>, <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM29"><mml:mi>&#x03B8;</mml:mi></mml:math></inline-formula> parameterize the distributions of the VAE encoder and decoder respectively. Here, <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM30"><mml:msub><mml:mi>q</mml:mi><mml:mi>&#x03D5;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is the approximate posterior distribution of the latent variable <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM31"><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow></mml:math></inline-formula> given the input <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM32"><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow></mml:math></inline-formula>, and <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM33"><mml:msub><mml:mi>p</mml:mi><mml:mi>&#x03B8;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> represents the likelihood of the input given the latent variable, modeled by the decoder. Based on the evidence lower bound (ELBO), the training process of VAE uses the loss function as <xref ref-type="disp-formula" rid="disp-formula13">Equation 13</xref>:<disp-formula id="disp-formula13"><label>(13)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM13"><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">E</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>log</mml:mi><mml:mspace width="0.2em"/><mml:msub><mml:mi>p</mml:mi><mml:mi>&#x03B8;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mi>K</mml:mi><mml:mi>L</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>q</mml:mi><mml:mi>&#x03D5;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM34"><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">E</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>log</mml:mi><mml:mspace width="0.2em"/><mml:msub><mml:mi>p</mml:mi><mml:mi>&#x03B8;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula> in our experiment is chosen as the mean-squared error between the original <bold>x</bold> and the reconstructed <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM35"><mml:mrow><mml:mover><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow></mml:math></inline-formula>, denoted as <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM36"><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">recons</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula>. <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM37"><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mi>K</mml:mi><mml:mi>L</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>q</mml:mi><mml:mi>&#x03D5;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> represents the Kullback-Leibler (KL) divergence between predefined posterior <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM38"><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x223C;</mml:mo><mml:mrow><mml:mi mathvariant="script">N</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>&#x03BC;</mml:mi><mml:mo>,</mml:mo><mml:mi>&#x03C3;</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> and the latent space distribution <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM39"><mml:msub><mml:mi>q</mml:mi><mml:mi>&#x03D5;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo>&#x223C;</mml:mo><mml:mrow><mml:mi mathvariant="script">N</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>&#x03BC;</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>&#x03C3;</mml:mi><mml:mi>z</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> produced by our network, denoted as <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM40"><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mi>K</mml:mi><mml:mi>L</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. The posterior <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM41"><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is set as a standard normal distribution for easy computation.</p>
<p>The structure of the cVAE is similar to VAE, except that category information <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM42"><mml:mrow><mml:mi mathvariant="bold">y</mml:mi></mml:mrow></mml:math></inline-formula> is added as part of the input data, which is used to control sample generation for specified categories. The modified objective function of cVAE is presented in <xref ref-type="disp-formula" rid="disp-formula14">Equation 14</xref>:<disp-formula id="disp-formula14"><label>(14)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM14"><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mo>=</mml:mo><mml:mo>&#x2212;</mml:mo><mml:mrow><mml:mrow><mml:mi mathvariant="double-struck">E</mml:mi></mml:mrow></mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mi>log</mml:mi><mml:mspace width="0.2em"/><mml:msub><mml:mi>p</mml:mi><mml:mi>&#x03B8;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mi mathvariant="bold">y</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">]</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>D</mml:mi><mml:mrow><mml:mi>K</mml:mi><mml:mi>L</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>q</mml:mi><mml:mi>&#x03D5;</mml:mi></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo fence="false" stretchy="false">|</mml:mo><mml:mrow><mml:mi mathvariant="bold">x</mml:mi></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mi mathvariant="bold">y</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo fence="false" stretchy="false">&#x2016;</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></disp-formula><xref ref-type="fig" rid="F2">Figure&#x00A0;2D</xref> shows the revised cVAE network architecture. In the encoder part, the ECG data, with the dimension of <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM43"><mml:mn>1</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:mn>12</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:mn>400</mml:mn></mml:math></inline-formula>, is treated as the input, followed by two convolutional blocks, each of which includes a 2-dimensional convolution layer, a batch normalization layer, and an Exponential Linear Unit (ELU) activation function. Next, we have an Average Pooling layer and the output is flattened. We use two fully-connected layers to produce two 64-dimensional vectors: one is interpreted as the mean, while the other one is considered as the logarithms of the variance of 64 normal distributions. In the final stage, a sampling layer is used to get a 64-dimensional latent space sampled from the distributions mentioned above. The decoder part is symmetrical to the encoder part, which uses upsampling layers and 2-dimensional deconvolution layers, to reconstruct the 12 lead ECGs.</p>
<p>Physiologically, heart position, orientation, and electrode locations define the spatial relationship between the heart&#x2019;s electrical activity and the recording leads, thereby affecting ECG waveform morphology. To ensure that the generative model learns these dependencies, in the encoder, the conditional information is concatenated to the first fully connected layer, ensuring that the learned latent representation <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM44"><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow></mml:math></inline-formula> captures the variability introduced by anatomical differences. In the decoder, the same conditional inputs are incorporated alongside <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM45"><mml:mrow><mml:mi mathvariant="bold">z</mml:mi></mml:mrow></mml:math></inline-formula> to modulate ECG generation, enforcing physiological consistency by reconstructing ECG waveforms that align with the given heart position, orientation, and electrode locations. Its dimension <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM46"><mml:mi>c</mml:mi></mml:math></inline-formula> depends on the information category: for heart position and orientation, these are three-dimensional coordinates and angles respectively, and for electrodes&#x2019; positions are <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM47"><mml:mn>10</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:mn>3</mml:mn></mml:math></inline-formula> dimensional coordinates.</p>
<p>The model is implemeted in Python3 using PyTorch. Adam optimizer (<xref ref-type="bibr" rid="B29">29</xref>) is used with a learning rate of 0.001. For each VAE, we assigned 80&#x0025; of the dataset as the training set and the rest as test set. The batch size is set as 64, and the training process is performed for 80 epochs. We run all experiments on NVIDIA A100 Tensor Core GPU.</p>
</sec>
<sec id="s2f"><label>2.6</label><title>Risk prediction model architecture</title>
<p>The revised network presented in <xref ref-type="fig" rid="F2">Figure&#x00A0;2E</xref> is the addition of an extra predictor connected to the latent space so that we are able to analyze the representations and features contained in latent space and achieve a risk score output. For the predictor, we perform all experiments on a single fully connected layer, with 64 latent space dimension as input, and one dimensional risk score as output, obtained using a sigmoid function.</p>
<p>The loss function of this predictor network consists of three parts. The first two parts are the same as previous sections, i.e., <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM48"><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mi>K</mml:mi><mml:mi>L</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM49"><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">recons</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula>, as shown in <xref ref-type="disp-formula" rid="disp-formula13">Equations 13</xref> and <xref ref-type="disp-formula" rid="disp-formula14">14</xref>. We use the Cox proportional hazard regression model to realize the last survival loss part. Typically in a linear Cox model, the hazard function has the form defined in <xref ref-type="disp-formula" rid="disp-formula15">Equation 15</xref>:<disp-formula id="disp-formula15"><label>(15)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM15"><mml:mi>h</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mi>exp</mml:mi><mml:mspace width="0.2em"/><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>+</mml:mo><mml:mo>&#x22EF;</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM50"><mml:msub><mml:mi>h</mml:mi><mml:mn>0</mml:mn></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is the baseline hazard function, which would correspond to a hypothetical subject whose covariate values are all zeros. The <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM51"><mml:mi>exp</mml:mi><mml:mspace width="0.2em"/><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mo>+</mml:mo><mml:mo>&#x22EF;</mml:mo><mml:mo>+</mml:mo><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mi>m</mml:mi></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> is called the relative risk of a subject. Predictor covariate variables, <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM52"><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> , are weighted by <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM53"><mml:msub><mml:mi>&#x03B2;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula>, to adjust this baseline hazard function for each subject. These weights, <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM54"><mml:msup><mml:mi>&#x03B2;</mml:mi><mml:mo>&#x2032;</mml:mo></mml:msup></mml:math></inline-formula>, are estimated by maximising the Cox proportional hazards partial likelihood function:<disp-formula id="disp-formula16"><label>(16)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM16"><mml:mi>log</mml:mi><mml:mspace width="0.2em"/><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>&#x03B2;</mml:mi><mml:mo stretchy="false">)</mml:mo><mml:mo>=</mml:mo><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mi>n</mml:mi></mml:munderover><mml:msub><mml:mi>&#x03B4;</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msup><mml:mi>&#x03B2;</mml:mi><mml:mo>&#x2032;</mml:mo></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mi>log</mml:mi><mml:mspace width="0.2em"/><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mspace width=".1em"/><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>R</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:msup><mml:mi>&#x03B2;</mml:mi><mml:mo>&#x2032;</mml:mo></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM55"><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is the vector of predictor covariate variables, <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM56"><mml:msub><mml:mi>&#x03B4;</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is a boolean variable indicating event status, and <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM57"><mml:mi>R</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is the set of subjects yet to have an event or be censored at time <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM58"><mml:mi>t</mml:mi></mml:math></inline-formula> for subject <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM59"><mml:mi>i</mml:mi></mml:math></inline-formula>. <xref ref-type="disp-formula" rid="disp-formula16">Equation 16</xref> can be adapted for a neural network by replacing <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM60"><mml:msup><mml:mi>&#x03B2;</mml:mi><mml:mo>&#x2032;</mml:mo></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> with the output of a network.</p>
<p>Therefore, in order to optimize our VAE network training for survival analysis, we replace <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM61"><mml:msup><mml:mi>&#x03B2;</mml:mi><mml:mo>&#x2032;</mml:mo></mml:msup><mml:msub><mml:mi>x</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> with the output of our predictor, as shown in <xref ref-type="disp-formula" rid="disp-formula17">Equation 17</xref>, to form our survival loss function:<disp-formula id="disp-formula17"><label>(17)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM17"><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">surv</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mfrac><mml:mn>1</mml:mn><mml:mi>N</mml:mi></mml:mfrac></mml:mrow><mml:munderover><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn></mml:mrow><mml:mi>N</mml:mi></mml:munderover><mml:msub><mml:mi>&#x03B4;</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>&#x2212;</mml:mo><mml:mi>log</mml:mi><mml:mspace width="0.2em"/><mml:munder><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mspace width=".1em"/><mml:mi>j</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>R</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:munder><mml:msup><mml:mi>e</mml:mi><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mspace width=".1em"/><mml:mi>j</mml:mi></mml:mrow></mml:msub></mml:mrow></mml:msup><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula>where <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM62"><mml:mi>N</mml:mi></mml:math></inline-formula> is our batch size and <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM63"><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:math></inline-formula> is the sigmoid of the output of the model, i.e., the log-hazard ratio of subject <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM64"><mml:mi>i</mml:mi></mml:math></inline-formula>. Preliminary work with the survival model showed that the exponent term in <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM65"><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">surv</mml:mi></mml:mrow></mml:mrow></mml:msub></mml:math></inline-formula> can cause the untrained predictor head to exponentiate large numbers leading to numerical instability. To prevent this, we apply a sigmoid function to the output of the model, both ensuring that large exponents are not possible and keeping the relative order of risk for subjects unchanged, since the sigmoid is monotonically increasing.</p>
<p>Therefore, the loss for our overall model is written as:<disp-formula id="disp-formula18"><label>(18)</label><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="DM18"><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">total</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">recons</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mi>K</mml:mi><mml:mi>L</mml:mi></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mrow><mml:mi mathvariant="script">L</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mi mathvariant="normal">surv</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>.</mml:mo></mml:math></disp-formula>As this study represents an initial investigation, the three loss terms in <xref ref-type="disp-formula" rid="disp-formula18">Equation 18</xref> are assigned equal weights. In the future, techniques such as grid search or other hyperparameter optimization methods can be utilized to systematically determine the optimal weight configuration.</p>
</sec>
</sec>
<sec id="s3" sec-type="results"><label>3</label><title>Results</title>
<sec id="s3a"><label>3.1</label><title>ECG conditioned on heart position and orientation</title>
<p>We used all 21,083 UK Biobank cases that include both ECG and MRI data to train our model. After training, by modifying the conditioning inputs (i.e., heart position and orientation), we generated synthetic ECGs reflecting various cardiac poses, which we then compared with the simulation trends reported by Minchol&#x00E9; et al. The conditional ECG generation is performed by the pre-trained decoder which takes random samples from a normal distribution and conditional inputs, shown in <xref ref-type="fig" rid="F2">Figure&#x00A0;2F</xref>.</p>
<p><xref ref-type="fig" rid="F3">Figures&#x00A0;3</xref> and <xref ref-type="fig" rid="F4">4</xref> show the results that reflect the learned effect of heart rotation and translation, respectively. For rotation, we first rotate the heart along the long axis, which is the <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM66"><mml:mi>Z</mml:mi></mml:math></inline-formula> axis of the heart coordinate system, and then left-to-right ventricle axis, which is the <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM67"><mml:mi>Y</mml:mi></mml:math></inline-formula> axis of the heart coordinate system. For translation, we move the heart along the lateral and cranio-caudal directions, which would be represented as the heart position coordinate <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM68"><mml:mo stretchy="false">(</mml:mo><mml:mi>x</mml:mi><mml:mo>,</mml:mo><mml:mi>y</mml:mi><mml:mo>,</mml:mo><mml:mi>z</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> changes, so that moving along the lateral direction and cranio-caudal direction means changing the value of <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM69"><mml:mi>x</mml:mi></mml:math></inline-formula> and <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM70"><mml:mi>z</mml:mi></mml:math></inline-formula> respectively.</p>
<fig id="F3" position="float"><label>Figure 3</label>
<caption><p>The comparison of ECG changes between previous work (<xref ref-type="bibr" rid="B15">15</xref>) and proposed cVAE model in leads I, II, and V1 to V6 when heart rotates around long axis <bold>(A)</bold> and around left-to-right axis <bold>(B)</bold> in 40, 20, 0, <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM71"><mml:mo>&#x2212;</mml:mo><mml:mn>20</mml:mn></mml:math></inline-formula>, 40&#x00B0; separately.</p></caption>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="fdgth-07-1558589-g003.tif"/>
</fig>
<fig id="F4" position="float"><label>Figure 4</label>
<caption><p>The comparison of ECG changes between previous work (<xref ref-type="bibr" rid="B15">15</xref>) and proposed cVAE model in leads I, II, and V1 to V6 when heart moves along the lateral direction <bold>(A)</bold> and along the cranio-caudal direction <bold>(B)</bold> in 4, 2, 0, <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM72"><mml:mo>&#x2212;</mml:mo><mml:mn>2</mml:mn></mml:math></inline-formula>, <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM73"><mml:mo>&#x2212;</mml:mo><mml:mn>4</mml:mn></mml:math></inline-formula> cm separately.</p></caption>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="fdgth-07-1558589-g004.tif"/>
</fig>
<p>We compare our generated ECGs with the work of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>). As shown in <xref ref-type="fig" rid="F3">Figure&#x00A0;3A</xref>(b), rotation along the long axis influences R, S, and T waves in almost all the ECG leads. The heart rotated more counterclockwise results in an increase in the amplitude of these waves. After comparison, we find only lead V4 completely agrees with the result of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) [<xref ref-type="fig" rid="F3">Figure&#x00A0;3A</xref>(a)], while leads V1 to V3 have the same change on R wave but the opposite on S wave. The rest of the leads show different features, for in results of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) long axis rotation exerts a limited influence on leads I, V5, and V6.</p>
<p><xref ref-type="fig" rid="F3">Figure&#x00A0;3B</xref>(b) shows the amplitude of R and S waves increase in lead II and V1&#x2013;V3 when we rotate more counterclockwise along the left-to-right ventricular axis. More clockwise rotation affects the morphology of S wave in leads V2 and V3. Five leads I, II, V2, V3, and V5 in our work share the same amplitude features with results of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>). Our results also reflect the influence on the morphology, but the degree of change is not as prominent as <xref ref-type="fig" rid="F3">Figure&#x00A0;3B</xref>(a).</p>
<p>In <xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(b), when the heart moves more to the left-hand direction, the R wave and T wave amplitudes increase in leads I, II and V4-V6, while the S wave amplitude increases in all precordial leads. After comparison, we find only leads V5 and V6 agree with the findings of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) [<xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(a)], while other leads reflect the opposite influence.</p>
<p>Finally, we analyze the translation along the cranio-caudal direction. <xref ref-type="fig" rid="F4">Figure&#x00A0;4B</xref>(b) shows that translation along this direction mainly affects the amplitude of T wave of leads V2-V4. We also notice an increase after translating the heart more to the inferior direction in leads V4-V6. Compared to the work of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) [<xref ref-type="fig" rid="F4">Figure&#x00A0;4B</xref>(a)], only lead II completely agrees. While our V4 and V5 have similar response to this translation, the degree of change in work of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) are much greater.</p>
</sec>
<sec id="s3b"><label>3.2</label><title>ECG conditioned by electrode positions</title>
<p>While the previous results demonstrate that our network successfully extracts valuable and relevant features from the ECGs, incorporating only heart position and orientation may present certain limitations. For instance, only considering absolute heart coordinates without accounting for their relative positions in the torso structure may reduce comparability across subjects, as the anatomical coordinate origin is determined by the scanner. This highlights the potential benefits of incorporating additional factors, such as torso structure, to enhance the accuracy and generalizability of our approach. We include the ten electrode positions to fix our torso structure when we perform the heart position translation. Each electrode position is transformed from anatomical coordinate system to heart coordinate system using heart position and orientation Euler angles. Therefore, when evaluating the influence of heart information, the electrodes&#x2019; positions are the only condition inputs to the model, which contain both heart position, orientation, and torso information.</p>
<p>For the analysis <xref ref-type="fig" rid="F4">Figures&#x00A0;4A</xref>(c),<xref ref-type="fig" rid="F4">B</xref>(c), we use a subset of 1,834 real cases that include electrode position information. By fixing the electrode positions to control for torso influence and modifying heart position inputs, we generate ECGs that are compared with the morphological trends observed in Minchol&#x00E9;&#x2019;s work. From <xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>, in general, the generated ECGs using ten electrodes have the same quality as the results using only heart positions, except with more noise in the generated leads V1 and V2 signals. This increased noise may result from the mismatch between the 3D nature of electrode positions and the 1D latent space used in our model, which introduces additional complexity in the decoding process.</p>
<p>The overall impact of heart information on the generated signals are more obvious than the one using electrodes, with more clear difference when we move the heart. However, if we treat the simulated signals in <xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(a) as the standard, we can discover more accurate features or trends presented in the electrodes based model. When we look at leads I and II, <xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(b,c) reacts to the position change in a completely opposite way. While R peak amplitude increases with the right to left movement of the heart in <xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(b), it decreases in <xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(c). When it comes to precordial leads, in leads V1 and V4 our electrodes&#x2019; results of <xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(c) also have more consistency with the simulated results than ones with heart-position only [<xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(b)]. When the heart moves more to the left, the S wave peak of lead V1 increases, while in lead V4, the R wave peak increases and the S wave peak decreases. Those characteristics are exhibited in the opposite direction in <xref ref-type="fig" rid="F4">Figure&#x00A0;4A</xref>(b).</p>
<p>In <xref ref-type="fig" rid="F4">Figure&#x00A0;4B</xref>, more noise can be found in leads V1 and V2 in the model with electrodes&#x2019; positions. Compared to <xref ref-type="fig" rid="F4">Figure&#x00A0;4B</xref>(b), the influence of <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM74"><mml:mi>Z</mml:mi></mml:math></inline-formula> direction change is revealed more clearly using electrodes. Especially in leads I and II of the model with electrodes&#x2019; positions [<xref ref-type="fig" rid="F4">Figure&#x00A0;4B</xref>(c)], when the heart moves towards the head direction, the R wave amplitude will get increased, which is also reflected by the simulated results in <xref ref-type="fig" rid="F4">Figure&#x00A0;4B</xref>(a). As comparison, the heart movement in <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM75"><mml:mi>Z</mml:mi></mml:math></inline-formula> direction has little influence on the final generated signals in our model with heart information only [<xref ref-type="fig" rid="F4">Figure&#x00A0;4B</xref>(b)]. Regarding the precordial leads V1&#x2013;V6, our two networks in <xref ref-type="fig" rid="F4">Figures&#x00A0;4B</xref>(b),<xref ref-type="fig" rid="F4">B</xref>(c) do not reveal large differences about the reaction to the heart position change. In leads V2&#x2013;V6, the R and S wave amplitudes get larger if we move the heart more towards the feet. In general, the features in both <xref ref-type="fig" rid="F4">Figures&#x00A0;4B</xref>(b),<xref ref-type="fig" rid="F4">B</xref>(c) demonstrate more consistent results with simulated results in <xref ref-type="fig" rid="F4">Figure&#x00A0;4B</xref>(a), except lead V6 which shows the opposite.</p>
</sec>
<sec id="s3c"><label>3.3</label><title>CVD risk prediction</title>
<p>We plot the Kaplan&#x2013;Meier estimate curve of the full dataset before any stratification, as shown in <xref ref-type="fig" rid="F5">Figure&#x00A0;5A</xref>. During seven years of follow-up observation, 5.5&#x0025; of our total subjects have been diagnosed with CVD.</p>
<fig id="F5" position="float"><label>Figure 5</label>
<caption><p><bold>(A)</bold> Kaplan&#x2013;Meier plot of the full dataset before stratification, showing survival probabilities for all subjects. <bold>(B)</bold> Kaplan&#x2013;Meier plot of the test set, divided into low-risk (blue line) and high-risk (orange line) groups based on risk scores predicted by our model. The shaded areas represent the 95&#x0025; confidence intervals (CIs).</p></caption>
<graphic xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="fdgth-07-1558589-g005.tif"/>
</fig>
<p>We train our network and achieve the score for each subject&#x2019;s future CVD risk in our test set, and accordingly divide them into two groups: low CVD risk and high CVD risk, using the median risk as threshold. <xref ref-type="fig" rid="F5">Figure&#x00A0;5B</xref> reveals the Kaplan&#x2013;Meier estimate of both groups of our test set. In <xref ref-type="fig" rid="F5">Figure&#x00A0;5B</xref>, we can notice a clear difference between low CVD risk and high CVD risk groups. The CVD event occurs in 2&#x0025; of subjects in the low risk group, and 6&#x0025; of subjects in the high risk group over a nearly 7-years observation period.</p>
<p>Instead of considering the absolute survival times for each occurrence, survival analysis frequently uses the relative risk of an event (<xref ref-type="bibr" rid="B30">30</xref>, <xref ref-type="bibr" rid="B31">31</xref>). To evaluate this, we use the concordance index (C-index), a widely used metric in survival analysis. Unlike classification metrics such as AUC-ROC, sensitivity, and specificity, which require binary labels, the C-index assesses how well the predicted risk scores preserve the correct ranking of event times. This makes it particularly suitable for our task, where the goal is quantifying relative CVD risk rather than classifying individuals into discrete risk categories.</p>
<p>Our model achieves a C-index of 0.63, indicating that ECG-derived risk scores successfully rank individuals based on their future CVD risk with performance significantly above random chance (C-index <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM76"><mml:mo>=</mml:mo></mml:math></inline-formula> 0.5). While existing CVD risk models often achieve higher C-index values by incorporating comprehensive clinical and lifestyle factors (e.g., blood pressure, cholesterol, and smoking history), our study focuses specifically on evaluating the prognostic value of ECG morphology alone.</p>
<p>We also explore whether the additional information can improve the performance of the network. Therefore, we first introduce the sex and age to the encoder and next the electrodes&#x2019; positions. The idea was that sex and age are directly predictive of incident CVD, while the electrodes&#x2019; positions could be used by the network to contextualize the shape of the ECG and refine the prediction. For the prediction model including sex and age, we use the same training set and test set as in the previous sections. The first row of <xref ref-type="table" rid="T1">Table&#x00A0;1</xref> shows the result of our baseline model with C-index of 0.63. The inclusion of heart position information resulted in an increase of 3&#x0025; in the concordance index, indicating an improvement in the model&#x2019;s ability to correctly rank individuals by CVD risk.</p>
<table-wrap id="T1" position="float"><label>Table 1</label>
<caption><p>C-index result for ECG baseline prediction model and model with additional demographic information.</p></caption>
<table frame="hsides" rules="groups">
<colgroup>
<col align="left"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th valign="top" align="left">Model</th>
<th valign="top" align="center">C-index</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Baseline</td>
<td valign="top" align="center">0.63</td>
</tr>
<tr>
<td valign="top" align="left">Baseline <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM77"><mml:mo>+</mml:mo></mml:math></inline-formula> sex <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM78"><mml:mo>+</mml:mo></mml:math></inline-formula> age</td>
<td valign="top" align="center">0.65</td>
</tr>
</tbody>
</table>
</table-wrap>
<p>For the model including electrodes&#x2019; positions, due to the limited size of our processed dataset as discussed in <xref ref-type="sec" rid="s2d">Section 2.4</xref>, we include 1,600 healthy cases and 100 cases with CVD diagnosed and maintain the same group proportion as in the previous experiment. From the results presented in <xref ref-type="table" rid="T2">Table&#x00A0;2</xref>, we find that the baseline model only achieves the C-index of 0.58. The addition of sex and age information increases the baseline model result to 0.61, with a 5&#x0025; improvement. By incorporating electrodes&#x2019; positions relative to heart coordinate system, the revised model provides a 1.7&#x0025; increase in C-index, from 0.58 to 0.59. However, including the electrodes&#x2019; position along with sex and age information do not further improve the predictive performance.</p>
<table-wrap id="T2" position="float"><label>Table 2</label>
<caption><p>C-index result for ECG baseline model, model with demographic information, and electrodes&#x2019; positions.</p></caption>
<table frame="hsides" rules="groups">
<colgroup>
<col align="left"/>
<col align="center"/>
</colgroup>
<thead>
<tr>
<th valign="top" align="left">Model</th>
<th valign="top" align="center">C-index</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top" align="left">Baseline</td>
<td valign="top" align="center">0.58</td>
</tr>
<tr>
<td valign="top" align="left">Baseline <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM79"><mml:mo>+</mml:mo></mml:math></inline-formula> electrode positions</td>
<td valign="top" align="center">0.59</td>
</tr>
<tr>
<td valign="top" align="left">Baseline <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM80"><mml:mo>+</mml:mo></mml:math></inline-formula> sex <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM81"><mml:mo>+</mml:mo></mml:math></inline-formula> age</td>
<td valign="top" align="center">0.61</td>
</tr>
<tr>
<td valign="top" align="left">Baseline <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM82"><mml:mo>+</mml:mo></mml:math></inline-formula> sex <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM83"><mml:mo>+</mml:mo></mml:math></inline-formula> age <inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM84"><mml:mo>+</mml:mo></mml:math></inline-formula> electrode positions</td>
<td valign="top" align="center">0.61</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
</sec>
<sec id="s4"><label>4</label><title>Discussions</title>
<p>In this work, we have developed a conditional VAE model to generate 12-lead ECGs, which takes heart position, orientation, and electrodes&#x2019; positions as conditions. The results of our cVAE model show that the heart position and orientation have a significant impact on the generated ECGs, which is consistent with previous research (<xref ref-type="bibr" rid="B15">15</xref>). However, the influence of heart position and orientation on the generated ECGs is not as prominent as the simulated results. One possible explanation is that our position definition is not accurate enough because we only calculate the intersection of three cardiac MRI planes. An alternative explanation is in the work of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) the torso structure was fixed for simulation, while in our research the torso of each subject can vary. Additionally, after comparison we find that some rotation degree and translation distance in the work of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) are too large to the extent that they do not occur in real subjects.</p>
<p>When we include electrodes&#x2019; positions as input, they should also contain heart position and orientation information. During training, electrode positions help capture the influence of torso anatomy on ECG morphology. During generation, fixing electrodes&#x2019; positions allows us to control for torso-related variability, ensuring that observed ECG changes are primarily driven by modifications in heart position and orientation. Therefore, in this experiment we are able to reduce the influence of torso on our final generated results. From <xref ref-type="fig" rid="F4">Figure&#x00A0;4</xref>, we can notice with the addition of electrodes&#x2019; positions, the consistency between our generated signals and simulated <italic>in silico</italic> signals of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) gets improved. This illustrates that our model including the electrodes&#x2019; positions is capable of capturing useful features that represent the individual characteristics well, though there is more noise in the final generated signals. A potential explanation for this issue lies in the difference between the 3D nature of the electrodes&#x2019; positions (<inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM85"><mml:mn>3</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:mn>10</mml:mn></mml:math></inline-formula> coordinates) and the 1D latent space (64 dimensions) used in our experiments. This mismatch introduces additional complexity, which may challenge the decoder&#x2019;s ability to effectively interpret and reconstruct the information. To address this, further parameter tuning or introduction of a separate encoder for electrodes&#x2019; positions could help achieve better results.</p>
<p>While comparing our generated outcomes with the work of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>), it is important to acknowledge that the comparison is largely qualitative in nature, given that their work does not provide actual values to enable a more comprehensive, quantitative comparison. Thus, although this comparison provides some initial insights into the relative performance of our model, further quantitative analysis would be required to provide a more definitive evaluation of the model&#x2019;s performance. Additionally, the work of Minchol&#x00E9; et al. (<xref ref-type="bibr" rid="B15">15</xref>) mainly focused on the QRS complex of the ECG, while the other crucial components of the ECG waveform, such as the P and T waves, have not been examined. To address this limitation, our future work will focus on integrating detailed biophysical parameters into our generative model, enabling a more precise quantitative comparison between our synthesized ECGs and simulation-based results.</p>
<p>About the CVD risk prediction model, the results from <xref ref-type="fig" rid="F5">Figure&#x00A0;5</xref> suggest that our cVAE with predictor successfully learned to stratify subjects by CVD risk using features extracted from 12-lead ECG signals. This indicates that there is useful information related to their future CVD risk contained in ECG recordings, and our model has the ability to capture it. The baseline model in the current study attained a C-index of 0.63, suggesting a moderate predictive performance that necessitates further refinement. Although the C-index provides a useful quantification of model performance, its standalone value might not fully encapsulate the model&#x2019;s clinical applicability. The future works could further explore the ECG of the subjects defined as high risk group by our network, and analyze their ECG measurements in detail in order to find common characteristics for certain diseases.</p>
<p>When we include additional demographic information to our prediction network, as shown in <xref ref-type="table" rid="T1">Tables&#x00A0;1</xref> and <xref ref-type="table" rid="T2">2</xref>, it improves the C-index by 3&#x0025; and 5&#x0025;. This is consistent with previous findings of Alaa et al. (<xref ref-type="bibr" rid="B20">20</xref>), which highlighted the importance of age and sex in CVD risk evaluation. While this suggests that sex and age contribute to risk prediction, the relatively modest increase reflects the fact that ECG waveforms already encode physiological characteristics associated with these demographic factors. Our future work will explore the inclusion of additional subject information commonly used in traditional risk evaluation methods, such as the Framingham Risk Score factors (e.g., smoking history, blood pressure), to assess whether incorporating a broader range of clinical variables could further enhance model performance.</p>
<p>In <xref ref-type="table" rid="T2">Table&#x00A0;2</xref>, we notice that the addition of electrodes&#x2019; positions does not improve the C-index. One possible explanation is that the relationship between electrodes&#x2019; positions and CVD risk is already partially captured within the ECG waveforms themselves. Since ECG morphology inherently encodes subject-specific anatomical and physiological characteristics, some of the variability introduced by differences in electrode positioning may have already been learned by the model. Due to the high dimensionality of the electrode position data (<inline-formula><mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" id="IM86"><mml:mn>3</mml:mn><mml:mo>&#x00D7;</mml:mo><mml:mn>10</mml:mn></mml:math></inline-formula> coordinates), the single fully connected layer in our current model may not be expressive enough to fully map these features into the latent space for risk prediction. A more complex network architecture could be explored in future to better leverage electrode position information for improved prediction performance.</p>
<p>While our study investigates general CVD risk prediction, further work is needed to explore how changes in ECG amplitude and duration, resulting from variations in heart position and electrode placement, impact the prediction of specific cardiovascular diseases. Certain ECG-derived biomarkers, such as ST-segment deviations or QRS complex amplitudes, are directly influenced by these factors and play a crucial role in diagnosing conditions such as myocardial infarction or hypertrophy. A future extension of our work could involve evaluating how disease-specific classification models respond to these anatomical influences, improving the interpretability and robustness of ECG-based prediction methods.</p>
</sec>
<sec id="s5" sec-type="conclusions"><label>5</label><title>Conclusion</title>
<p>In this work, we have developed a cVAE-based ECG generation model, incorporating the electrodes&#x2019; positions to include torso information. This approach has markedly improved the consistency between our generated signals and previous <italic>in silico</italic> studies, surpassing the performance of models that relied solely on heart position and orientation. Through the meaningful latent space representation learned by our cVAE model, we highlight the ability of ECG signals alone to predict future CVD risk. Furthermore, by incorporating additional conditioning factors such as age, sex, and electrodes&#x2019; positions, we demonstrate that these structured inputs provide additional guidance, further refining risk estimation. Our findings underscore the potential of generative approaches to extract clinically relevant features from 12-lead ECG signals, supporting the development of more personalized and data-driven CVD risk assessment models.</p>
</sec>
</body>
<back>
<sec id="s6" sec-type="data-availability"><title>Data availability statement</title>
<p>The data supporting the conclusions of this article will be made available by the authors upon reasonable request.</p>
</sec>
<sec id="s7" sec-type="ethics-statement"><title>Ethics statement</title>
<p>Ethical approval was not required for the study involving humans in accordance with the local legislation and institutional requirements. Written informed consent to participate in this study was not required from the participants or the participants&#x2019; legal guardians/next of kin in accordance with the national legislation and the institutional requirements.</p>
</sec>
<sec id="s8" sec-type="author-contributions"><title>Author contributions</title>
<p>YS: Data curation, Investigation, Software, Writing &#x2013; review &#x0026; editing, Conceptualization, Formal analysis, Methodology, Validation, Visualization, Writing &#x2013; original draft; AB: Data curation, Investigation, Software, Writing &#x2013; review &#x0026; editing, Supervision, Funding acquisition; MB: Conceptualization, Data curation, Investigation, Methodology, Supervision, Validation, Visualization, Writing &#x2013; review &#x0026; editing, Software; VG: Conceptualization, Funding acquisition, Investigation, Methodology, Project administration, Resources, Supervision, Writing &#x2013; review &#x0026; editing, Data curation.</p>
</sec>
<sec id="s9" sec-type="funding-information"><title>Funding</title>
<p>The author(s) declare that financial support was received for the research and/or publication of this article. AB is supported by the Royal Society University Research Fellowship (Grant No. URF\R1\221314).</p>
</sec>
<ack><title>Acknowledgments</title>
<p>This work used the facilities of High Performance Computing (HPC) of the Institute of Biomedical Engineering (IBME), University of Oxford and the HPC of the Advanced Research Computing (ARC) service of the University of Oxford. This research has been conducted using the UK Biobank Resource under Application Number &#x201C;40161&#x201D;.</p>
</ack>
<sec id="s10" sec-type="COI-statement"><title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
<sec id="s11" sec-type="ai-statement"><title>Generative AI statement</title>
<p>The author(s) declare that no Generative AI was used in the creation of this manuscript.</p>
</sec>
<sec id="s12" sec-type="disclaimer"><title>Publisher&#x0027;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<ref-list><title>References</title>
<ref id="B1"><label>1.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Waller</surname><given-names>AD</given-names></name></person-group>. <article-title>A demonstration on man of electromotive changes accompanying the heart&#x2019;s beat</article-title>. <source>J Physiol (Lond)</source>. (<year>1887</year>) <volume>8</volume>:<fpage>229</fpage>&#x2013;<lpage>34</lpage>. <pub-id pub-id-type="doi">10.1113/jphysiol.1887.sp000257</pub-id></citation></ref>
<ref id="B2"><label>2.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>George</surname><given-names>S</given-names></name><name><surname>Rodriguez</surname><given-names>I</given-names></name><name><surname>Ipe</surname><given-names>D</given-names></name><name><surname>Sager</surname><given-names>PT</given-names></name><name><surname>Gussak</surname><given-names>I</given-names></name><name><surname>Vajdic</surname><given-names>B</given-names></name></person-group>. <article-title>Computerized extraction of electrocardiograms from continuous 12-lead holter recordings reduces measurement variability in a thorough QT study</article-title>. <source>J Clin Pharmacol</source>. (<year>2012</year>) <volume>52</volume>:<fpage>1891</fpage>&#x2013;<lpage>900</lpage>. <pub-id pub-id-type="doi">10.1177/0091270011430505</pub-id><pub-id pub-id-type="pmid">22187440</pub-id></citation></ref>
<ref id="B3"><label>3.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Beetz</surname><given-names>M</given-names></name><name><surname>Banerjee</surname><given-names>A</given-names></name><name><surname>Grau</surname><given-names>V</given-names></name></person-group>. <article-title>Multi-domain variational autoencoders for combined modeling of MRI-based biventricular anatomy and ECG-based cardiac electrophysiology</article-title>. <source>Front Physiol</source>. (<year>2022</year>) <volume>13</volume>:<fpage>886723</fpage>. <pub-id pub-id-type="doi">10.3389/fphys.2022.886723</pub-id><pub-id pub-id-type="pmid">35755443</pub-id></citation></ref>
<ref id="B4"><label>4.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Beetz</surname><given-names>M</given-names></name><name><surname>Banerjee</surname><given-names>A</given-names></name><name><surname>Sang</surname><given-names>Y</given-names></name><name><surname>Grau</surname><given-names>V</given-names></name></person-group>. <article-title>Combined generation of electrocardiogram and cardiac anatomy models using multi-modal variational autoencoders</article-title>. <comment>In: <italic>2022 IEEE 19th International Symposium on Biomedical Imaging (ISBI)</italic> (2022). p. 1&#x2013;4</comment>.</citation></ref>
<ref id="B5"><label>5.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Benali</surname><given-names>R</given-names></name><name><surname>Bereksi Reguig</surname><given-names>F</given-names></name><name><surname>Hadj Slimane</surname><given-names>Z</given-names></name></person-group>. <article-title>Automatic classification of heartbeats using wavelet neural network</article-title>. <source>J Med Syst</source>. (<year>2012</year>) <volume>36</volume>:<fpage>883</fpage>&#x2013;<lpage>92</lpage>. <pub-id pub-id-type="doi">10.1007/s10916-010-9551-7</pub-id><pub-id pub-id-type="pmid">20703646</pub-id></citation></ref>
<ref id="B6"><label>6.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kampouraki</surname><given-names>A</given-names></name><name><surname>Manis</surname><given-names>G</given-names></name><name><surname>Nikou</surname><given-names>C</given-names></name></person-group>. <article-title>Heartbeat time series classification with support vector machines</article-title>. <source>IEEE Trans Inf Technol Biomed</source>. (<year>2008</year>) <volume>13</volume>:<fpage>512</fpage>&#x2013;<lpage>8</lpage>. <pub-id pub-id-type="doi">10.1109/TITB.2008.2003323</pub-id><pub-id pub-id-type="pmid">19273030</pub-id></citation></ref>
<ref id="B7"><label>7.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Li</surname><given-names>L</given-names></name><name><surname>Camps</surname><given-names>J</given-names></name><name><surname>Banerjee</surname><given-names>A</given-names></name><name><surname>Beetz</surname><given-names>M</given-names></name><name><surname>Rodriguez</surname><given-names>B</given-names></name><name><surname>Grau</surname><given-names>V</given-names></name></person-group>. <article-title>Deep computational model for the inference of ventricular activation properties</article-title>. <comment>In: <italic>Statistical Atlases and Computational Models of the Heart. Regular and CMRxMotion Challenge Papers: 13th International Workshop, STACOM 2022, Held in Conjunction with MICCAI 2022, Singapore, September 18, 2022, Revised Selected Papers</italic>. Springer (2023). p. 369&#x2013;80</comment>.</citation></ref>
<ref id="B8"><label>8.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Li</surname><given-names>L</given-names></name><name><surname>Camps</surname><given-names>J</given-names></name><name><surname>Jenny Wang</surname><given-names>Z</given-names></name><name><surname>Beetz</surname><given-names>M</given-names></name><name><surname>Banerjee</surname><given-names>A</given-names></name><name><surname>Rodriguez</surname><given-names>B</given-names></name></person-group>, et al. <article-title>Toward enabling cardiac digital twins of myocardial infarction using deep computational models for inverse inference</article-title>. <source>IEEE Trans Med Imaging</source>. (<year>2024</year>) <volume>43</volume>:<fpage>2466</fpage>&#x2013;<lpage>78</lpage>. <pub-id pub-id-type="doi">10.1109/TMI.2024.3367409</pub-id><pub-id pub-id-type="pmid">38373128</pub-id></citation></ref>
<ref id="B9"><label>9.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Zhang</surname><given-names>L</given-names></name><name><surname>Peng</surname><given-names>H</given-names></name><name><surname>Yu</surname><given-names>C</given-names></name></person-group>. <article-title>An approach for ECG classification based on wavelet feature extraction and decision tree</article-title>. <comment>In: <italic>2010 International Conference on Wireless Communications &#x0026; Signal Processing (WCSP)</italic>. IEEE (2010). p. 1&#x2013;4</comment>.</citation></ref>
<ref id="B10"><label>10.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Chen</surname><given-names>C</given-names></name><name><surname>Li</surname><given-names>L</given-names></name><name><surname>Beetz</surname><given-names>M</given-names></name><name><surname>Banerjee</surname><given-names>A</given-names></name><name><surname>Gupta</surname><given-names>R</given-names></name><name><surname>Grau</surname><given-names>V</given-names></name></person-group>. <article-title>Large language model-informed ECG dual attention network for heart failure risk prediction</article-title>. <comment><italic>arXiv</italic> [Preprint]. <italic>arXiv:2403.10581</italic> (2024)</comment>.</citation></ref>
<ref id="B11"><label>11.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>McLachlan</surname><given-names>S</given-names></name><name><surname>Dube</surname><given-names>K</given-names></name><name><surname>Gallagher</surname><given-names>T</given-names></name></person-group>. <article-title>Using the caremap with health incidents statistics for generating the realistic synthetic electronic healthcare record</article-title>. <comment>In: <italic>2016 IEEE International Conference on Healthcare Informatics (ICHI)</italic>. IEEE (2016). p. 439&#x2013;48</comment>.</citation></ref>
<ref id="B12"><label>12.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Esteban</surname><given-names>C</given-names></name><name><surname>Hyland</surname><given-names>SL</given-names></name><name><surname>R&#x00E4;tsch</surname><given-names>G</given-names></name></person-group>. <article-title>Real-valued (medical) time series generation with recurrent conditional gans</article-title>. <comment><italic>arXiv</italic> [Preprint]. <italic>arXiv:1706.02633</italic> (2017)</comment>.</citation></ref>
<ref id="B13"><label>13.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Kuznetsov</surname><given-names>V</given-names></name><name><surname>Moskalenko</surname><given-names>V</given-names></name><name><surname>Zolotykh</surname><given-names>NY</given-names></name></person-group>. <article-title>Electrocardiogram generation and feature extraction using a variational autoencoder</article-title>. <comment><italic>arXiv</italic> [Preprint]. <italic>arXiv:2002.00254</italic> (2020)</comment>.</citation></ref>
<ref id="B14"><label>14.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zhu</surname><given-names>F</given-names></name><name><surname>Ye</surname><given-names>F</given-names></name><name><surname>Fu</surname><given-names>Y</given-names></name><name><surname>Liu</surname><given-names>Q</given-names></name><name><surname>Shen</surname><given-names>B</given-names></name></person-group>. <article-title>Electrocardiogram generation with a bidirectional LSTM-CNN generative adversarial network</article-title>. <source>Sci Rep</source>. (<year>2019</year>) <volume>9</volume>:<fpage>6734</fpage>. <pub-id pub-id-type="doi">10.1038/s41598-019-42516-z</pub-id><pub-id pub-id-type="pmid">31043666</pub-id></citation></ref>
<ref id="B15"><label>15.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Minchol&#x00E9;</surname><given-names>A</given-names></name><name><surname>Zacur</surname><given-names>E</given-names></name><name><surname>Ariga</surname><given-names>R</given-names></name><name><surname>Grau</surname><given-names>V</given-names></name><name><surname>Rodriguez</surname><given-names>B</given-names></name></person-group>. <article-title>MRI-based computational torso/biventricular multiscale models to investigate the impact of anatomical variability on the ECG QRS complex</article-title>. <source>Front Physiol</source>. (<year>2019</year>) <volume>10</volume>:<fpage>458916</fpage>. <pub-id pub-id-type="doi">10.3389/fphys.2019.01103</pub-id></citation></ref>
<ref id="B16"><label>16.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>J&#x00E6;ger</surname><given-names>KH</given-names></name><name><surname>Tveito</surname><given-names>A</given-names></name></person-group>. <article-title>Deriving the bidomain model of cardiac electrophysiology from a cell-based model; properties and comparisons</article-title>. <source>Front Physiol</source>. (<year>2022</year>) <volume>12</volume>:<fpage>811029</fpage>. <pub-id pub-id-type="doi">10.3389/fphys.2021.811029</pub-id></citation></ref>
<ref id="B17"><label>17.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Sang</surname><given-names>Y</given-names></name><name><surname>Beetz</surname><given-names>M</given-names></name><name><surname>Grau</surname><given-names>V</given-names></name></person-group>. <article-title>Generation of 12-lead electrocardiogram with subject-specific, image-derived characteristics using a conditional variational autoencoder</article-title>. <comment>In: <italic>2022 IEEE 19th International Symposium on Biomedical Imaging (ISBI)</italic>. IEEE (2022). p. 1&#x2013;5</comment>.</citation></ref>
<ref id="B18"><label>18.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Smith</surname><given-names>HJ</given-names></name><name><surname>Banerjee</surname><given-names>A</given-names></name><name><surname>Choudhury</surname><given-names>RP</given-names></name><name><surname>Grau</surname><given-names>V</given-names></name></person-group>. <article-title>Automated torso contour extraction from clinical cardiac MR slices for 3D torso reconstruction</article-title>. <comment>In: <italic>2022 44th Annual International Conference of the IEEE Engineering in Medicine &#x0026; Biology Society (EMBC)</italic>. IEEE (2022). p. 3809&#x2013;13</comment>.</citation></ref>
<ref id="B19"><label>19.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Smith</surname><given-names>HJ</given-names></name><name><surname>Rodriguez</surname><given-names>B</given-names></name><name><surname>Sang</surname><given-names>Y</given-names></name><name><surname>Beetz</surname><given-names>M</given-names></name><name><surname>Choudhury</surname><given-names>R</given-names></name><name><surname>Grau</surname><given-names>V</given-names></name></person-group>, et al. <article-title>Anatomical basis of sex differences in human post-myocardial infarction ECG phenotypes identified by novel automated torso-cardiac 3D reconstruction</article-title>. <comment><italic>arXiv</italic> [Preprint]. <italic>arXiv:2312.13976</italic> (2023)</comment>.</citation></ref>
<ref id="B20"><label>20.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Alaa</surname><given-names>AM</given-names></name><name><surname>Bolton</surname><given-names>T</given-names></name><name><surname>Di Angelantonio</surname><given-names>E</given-names></name><name><surname>Rudd</surname><given-names>JH</given-names></name><name><surname>Van der Schaar</surname><given-names>M</given-names></name></person-group>. <article-title>Cardiovascular disease risk prediction using automated machine learning: a prospective study of 423,604 UK Biobank participants</article-title>. <source>PLoS ONE</source>. (<year>2019</year>) <volume>14</volume>:<fpage>e0213653</fpage>. <pub-id pub-id-type="doi">10.1371/journal.pone.0213653</pub-id><pub-id pub-id-type="pmid">31091238</pub-id></citation></ref>
<ref id="B21"><label>21.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Emdin</surname><given-names>CA</given-names></name><name><surname>Wong</surname><given-names>CX</given-names></name><name><surname>Hsiao</surname><given-names>AJ</given-names></name><name><surname>Altman</surname><given-names>DG</given-names></name><name><surname>Peters</surname><given-names>SA</given-names></name><name><surname>Woodward</surname><given-names>M</given-names></name></person-group>, et al. <article-title>Atrial fibrillation as risk factor for cardiovascular disease and death in women compared with men: systematic review and meta-analysis of cohort studies</article-title>. <source>BMJ</source>. (<year>2016</year>) <volume>352</volume>:<fpage>h7013</fpage>. <pub-id pub-id-type="doi">10.1136/bmj.h7013</pub-id></citation></ref>
<ref id="B22"><label>22.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Turnbull</surname><given-names>I</given-names></name><name><surname>Camm</surname><given-names>C</given-names></name><name><surname>Halsey</surname><given-names>J</given-names></name><name><surname>Du</surname><given-names>H</given-names></name><name><surname>Chen</surname><given-names>Z</given-names></name><name><surname>Clarke</surname><given-names>R</given-names></name></person-group>. <article-title>Population prevalence of ECG abnormalities and risk of incident CVD outcomes: 5-year follow-up of 25,000 Chinese adults</article-title>. <source>Eur Heart J</source>. (<year>2023</year>) <volume>44</volume>:<fpage>ehad655&#x2013;2380</fpage>. <pub-id pub-id-type="doi">10.1093/eurheartj/ehad655.2380</pub-id></citation></ref>
<ref id="B23"><label>23.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wu</surname><given-names>G</given-names></name><name><surname>Wu</surname><given-names>J</given-names></name><name><surname>Lu</surname><given-names>Q</given-names></name><name><surname>Cheng</surname><given-names>Y</given-names></name><name><surname>Mei</surname><given-names>W</given-names></name></person-group>. <article-title>Association between cardiovascular risk factors and atrial fibrillation</article-title>. <source>Front Cardiovasc Med</source>. (<year>2023</year>) <volume>10</volume>:<fpage>1110424</fpage>. <pub-id pub-id-type="doi">10.3389/fcvm.2023.1110424</pub-id><pub-id pub-id-type="pmid">37753167</pub-id></citation></ref>
<ref id="B24"><label>24.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sudlow</surname><given-names>C</given-names></name><name><surname>Gallacher</surname><given-names>J</given-names></name><name><surname>Allen</surname><given-names>N</given-names></name><name><surname>Beral</surname><given-names>V</given-names></name><name><surname>Burton</surname><given-names>P</given-names></name><name><surname>Danesh</surname><given-names>J</given-names></name></person-group>, et al. <article-title>UK Biobank: an open access resource for identifying the causes of a wide range of complex diseases of middle and old age</article-title>. <source>PLoS Med</source>. (<year>2015</year>) <volume>12</volume>:<fpage>e1001779</fpage>. <pub-id pub-id-type="doi">10.1371/journal.pmed.1001779</pub-id><pub-id pub-id-type="pmid">25826379</pub-id></citation></ref>
<ref id="B25"><label>25.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Natarajan</surname><given-names>A</given-names></name><name><surname>Chang</surname><given-names>Y</given-names></name><name><surname>Mariani</surname><given-names>S</given-names></name><name><surname>Rahman</surname><given-names>A</given-names></name><name><surname>Boverman</surname><given-names>G</given-names></name><name><surname>Vij</surname><given-names>S</given-names></name></person-group>, et al. <article-title>A wide and deep transformer neural network for 12-lead ECG classification</article-title>. <comment>In: <italic>2020 Computing in Cardiology</italic>. IEEE (2020). p. 1&#x2013;4</comment>.</citation></ref>
<ref id="B26"><label>26.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Petersen</surname><given-names>SE</given-names></name><name><surname>Matthews</surname><given-names>PM</given-names></name><name><surname>Francis</surname><given-names>JM</given-names></name><name><surname>Robson</surname><given-names>MD</given-names></name><name><surname>Zemrak</surname><given-names>F</given-names></name><name><surname>Boubertakh</surname><given-names>R</given-names></name></person-group>, et al. <article-title>UK Biobank&#x2019;s cardiovascular magnetic resonance protocol</article-title>. <source>J Cardiovasc Magn Reson</source>. (<year>2015</year>) <volume>18</volume>:<fpage>1</fpage>&#x2013;<lpage>7</lpage>. <pub-id pub-id-type="doi">10.1186/s12968-016-0227-4</pub-id></citation></ref>
<ref id="B27"><label>27.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Strain</surname><given-names>T</given-names></name><name><surname>Wijndaele</surname><given-names>K</given-names></name><name><surname>Sharp</surname><given-names>SJ</given-names></name><name><surname>Dempsey</surname><given-names>PC</given-names></name><name><surname>Wareham</surname><given-names>N</given-names></name><name><surname>Brage</surname><given-names>S</given-names></name></person-group>. <article-title>Impact of follow-up time and analytical approaches to account for reverse causality on the association between physical activity and health outcomes in UK Biobank</article-title>. <source>Int J Epidemiol</source>. (<year>2020</year>) <volume>49</volume>:<fpage>162</fpage>&#x2013;<lpage>72</lpage>. <pub-id pub-id-type="doi">10.1093/ije/dyz212</pub-id><pub-id pub-id-type="pmid">31651957</pub-id></citation></ref>
<ref id="B28"><label>28.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Banerjee</surname><given-names>A</given-names></name><name><surname>Camps</surname><given-names>J</given-names></name><name><surname>Zacur</surname><given-names>E</given-names></name><name><surname>Andrews</surname><given-names>CM</given-names></name><name><surname>Rudy</surname><given-names>Y</given-names></name><name><surname>Choudhury</surname><given-names>RP</given-names></name></person-group>, et al. <article-title>A completely automated pipeline for 3D reconstruction of human heart from 2D cine magnetic resonance slices</article-title>. <source>Philos Trans R Soc A</source>. (<year>2021</year>) <volume>379</volume>:<fpage>20200257</fpage>. <pub-id pub-id-type="doi">10.1098/rsta.2020.0257</pub-id></citation></ref>
<ref id="B29"><label>29.</label><citation citation-type="other"><person-group person-group-type="author"><name><surname>Kingma</surname><given-names>DP</given-names></name><name><surname>Ba</surname><given-names>J</given-names></name></person-group>. <article-title>Adam: a method for stochastic optimization</article-title>. <comment><italic>arXiv</italic> [Preprint]. <italic>arXiv:1412.6980</italic> (2014)</comment>.</citation></ref>
<ref id="B30"><label>30.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Harrell Jr</surname><given-names>FE</given-names></name><name><surname>Lee</surname><given-names>KL</given-names></name><name><surname>Califf</surname><given-names>RM</given-names></name><name><surname>Pryor</surname><given-names>DB</given-names></name><name><surname>Rosati</surname><given-names>RA</given-names></name></person-group>. <article-title>Regression modelling strategies for improved prognostic prediction</article-title>. <source>Stat Med</source>. (<year>1984</year>) <volume>3</volume>:<fpage>143</fpage>&#x2013;<lpage>52</lpage>. <pub-id pub-id-type="doi">10.1002/sim.4780030207</pub-id><pub-id pub-id-type="pmid">6463451</pub-id></citation></ref>
<ref id="B31"><label>31.</label><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pencina</surname><given-names>MJ</given-names></name><name><surname>D&#x2019;agostino</surname><given-names>RB</given-names></name></person-group>. <article-title>Overall c as a measure of discrimination in survival analysis: model specific population value and confidence interval estimation</article-title>. <source>Stat Med</source>. (<year>2004</year>) <volume>23</volume>:<fpage>2109</fpage>&#x2013;<lpage>23</lpage>. <pub-id pub-id-type="doi">10.1002/sim.1802</pub-id><pub-id pub-id-type="pmid">15211606</pub-id></citation></ref></ref-list>
</back>
</article>