<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Genet.</journal-id>
<journal-title>Frontiers in Genetics</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Genet.</abbrev-journal-title>
<issn pub-type="epub">1664-8021</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fgene.2021.638191</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Genetics</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Interpretable Feature Generation in ECG Using a Variational Autoencoder</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author">
<name><surname>Kuznetsov</surname> <given-names>V. V.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Moskalenko</surname> <given-names>V. A.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
</contrib>
<contrib contrib-type="author">
<name><surname>Gribanov</surname> <given-names>D. V.</given-names></name>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
</contrib>
<contrib contrib-type="author" corresp="yes">
<name><surname>Zolotykh</surname> <given-names>Nikolai Yu.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x0002A;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1162687/overview"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Institute of Information Technologies, Mathematics, and Mechanics, Lobachevsky State University of Nizhni Novgorod</institution>, <addr-line>Nizhni Novgorod</addr-line>, <country>Russia</country></aff>
<aff id="aff2"><sup>2</sup><institution>Mathematics of Future Technologies Center, Lobachevsky State University of Nizhni Novgorod</institution>, <addr-line>Nizhni Novgorod</addr-line>, <country>Russia</country></aff>
<aff id="aff3"><sup>3</sup><institution>Laboratory of Algorithms and Technologies for Networks Analysis, National Research University Higher School of Economics</institution>, <addr-line>Nizhni Novgorod</addr-line>, <country>Russia</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Alessio Martino, National Research Council (CNR), Italy</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Rajesh Kumar Tripathy, Birla Institute of Technology and Science, India; Jijun Tang, University of South Carolina, United States</p></fn>
<corresp id="c001">&#x0002A;Correspondence: Nikolai Yu. Zolotykh <email>nikolai.zolotykh&#x00040;itmm.unn.ru</email></corresp>
<fn fn-type="other" id="fn001"><p>This article was submitted to Statistical Genetics and Methodology, a section of the journal Frontiers in Genetics</p></fn></author-notes>
<pub-date pub-type="epub">
<day>01</day>
<month>04</month>
<year>2021</year>
</pub-date>
<pub-date pub-type="collection">
<year>2021</year>
</pub-date>
<volume>12</volume>
<elocation-id>638191</elocation-id>
<history>
<date date-type="received">
<day>05</day>
<month>12</month>
<year>2020</year>
</date>
<date date-type="accepted">
<day>01</day>
<month>03</month>
<year>2021</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x000A9; 2021 Kuznetsov, Moskalenko, Gribanov and Zolotykh.</copyright-statement>
<copyright-year>2021</copyright-year>
<copyright-holder>Kuznetsov, Moskalenko, Gribanov and Zolotykh</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). 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><p>We propose a method for generating an electrocardiogram (ECG) signal for one cardiac cycle using a variational autoencoder. Our goal was to encode the original ECG signal using as few features as possible. Using this method we extracted a vector of new 25 features, which in many cases can be interpreted. The generated ECG has quite natural appearance. The low value of the Maximum Mean Discrepancy metric, 3.83 &#x000D7; 10<sup>&#x02212;3</sup>, indicates good quality of ECG generation too. The extracted new features will help to improve the quality of automatic diagnostics of cardiovascular diseases. Generating new synthetic ECGs will allow us to solve the issue of the lack of labeled ECG for using them in supervised learning.</p></abstract>
<kwd-group>
<kwd>feature extraction</kwd>
<kwd>variational autoencoder</kwd>
<kwd>ECG</kwd>
<kwd>electrocardiography</kwd>
<kwd>deep learning</kwd>
<kwd>explainable AI</kwd>
</kwd-group>
<contract-num rid="cn001">075-15-2020-808</contract-num>
<contract-sponsor id="cn001">Ministry of Science and Higher Education of the Russian Federation<named-content content-type="fundref-id">10.13039/501100012190</named-content></contract-sponsor>
<counts>
<fig-count count="8"/>
<table-count count="0"/>
<equation-count count="1"/>
<ref-count count="20"/>
<page-count count="8"/>
<word-count count="3412"/>
</counts>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>1. Introduction</title>
<p>All the experience gained by the machine learning community shows that the quality of the decision rule largely depends on what features of samples are used. The better the feature description, the more accurately the problem can be solved. The features are used to require their interpretability, since it means the adequacy of the features to the real-world problem.</p>
<p>The traditional way to build a good feature description was to use an expert knowledge. Specialists in a particular subject area offer various methods for constructing the feature descriptions, which are then tested in solving practical problems. Another approach for constructing a good feature description is automatic feature extraction (also called dimensionality reduction).</p>
<p>There is a lot of methods for automatic feature extraction, such as principal component analysis, independent component analysis, principal graphs and manifolds, kernel methods, autoencoders, embeddings, etc. Among the most powerful and perspective approaches, we mention principal graphs and manifolds (Gorban et al., <xref ref-type="bibr" rid="B8">2008</xref>; Albergante et al., <xref ref-type="bibr" rid="B2">2020</xref>) and methods using deep learning (LeCun et al., <xref ref-type="bibr" rid="B16">2015</xref>; Goodfellow et al., <xref ref-type="bibr" rid="B6">2016</xref>).</p>
<p>Variational autoencoders (VAE) are neural networks which allow you to encode the source information and later, on the basis of the encoded information, to obtain a specific object, and further to generate similar objects but from a random set of coded characteristics (Kingma and Welling, <xref ref-type="bibr" rid="B15">2013</xref>; Rezende et al., <xref ref-type="bibr" rid="B18">2014</xref>; Doersch, <xref ref-type="bibr" rid="B4">2016</xref>). Here we examine this method for the problem of automatic electrocardiogram (ECG) generation.</p>
<p>The electrocardiogram is a record of the electrical activity of the heart, obtained with the help of electrodes placed on the human body. Electrocardiography is one of the most important methods in cardiology. Schematic representation of the main part of ECG is shown in <xref ref-type="fig" rid="F1">Figure 1</xref>. One cardiac cycle (the performance of the heart from the beginning of one heartbeat to the beginning of the next) contains P, T, U waves and QRS complex, consisting of Q, R, and S peaks. The size, shape, location of these parts give great diagnostic information about the work of the heart and about the presence/absence of certain diseases.</p>
<fig id="F1" position="float">
<label>Figure 1</label>
<caption><p>Schematic representation of main parts of the ECG signal for one cardiac cycle: P, T, U waves and QRS complex, consisting of Q, R, and S peaks.</p></caption>
<graphic xlink:href="fgene-12-638191-g0001.tif"/>
</fig>
<p>Recently, machine learning (especially deep learning) methods have been widely used for automatic ECG analysis; see the recent review by Hong et al. (<xref ref-type="bibr" rid="B10">2020</xref>). The application tasks include ECG segmentation, disease detection, sleep staging, biometric human identification, denoising, and the others (Hong et al., <xref ref-type="bibr" rid="B10">2020</xref>). A variety of classical and new methods are used. Among them there are discriminant analysis, decision trees, support vector machine, fully-connected and convolutional neural networks, recurrent neural networks, generative adversarial networks, autoencoders, etc. (Schl&#x000E4;pfer and Wellens, <xref ref-type="bibr" rid="B19">2017</xref>; Hong et al., <xref ref-type="bibr" rid="B10">2020</xref>).</p>
<p>The most interesting and fruitful directions in applying deep learning methods to ECG analysis are generating synthetic ECGs and automatic extracting new interpretable features. Delaney et al. (<xref ref-type="bibr" rid="B3">2019</xref>), Golany and Radinsky (<xref ref-type="bibr" rid="B5">2019</xref>), and Zhu et al. (<xref ref-type="bibr" rid="B20">2019</xref>) study the problem of ECG generation. The authors of those papers used different variants of generative adversarial networks (GANs) (Goodfellow et al., <xref ref-type="bibr" rid="B7">2014</xref>). The best results concerning the ECG generation were obtained by Delaney et al. (<xref ref-type="bibr" rid="B3">2019</xref>). The authors report on the Maximum Mean Discrepancy (MMD) metric equals to 1.05 &#x000D7; 10<sup>&#x02212;3</sup>.</p>
<p>Our approach in generating ECG is based on VAE. We propose a neural network architectures for an encoder and a decoder for generating synthetic ECGs and extracting new features. The generated synthetic ECGs look quite natural. MMD equals to 3.83 &#x000D7; 10<sup>&#x02212;3</sup>, which is worse than the value obtained by Delaney et al. (<xref ref-type="bibr" rid="B3">2019</xref>) using GAN, but we note that the comparison of these two metric values is not absolutely correct, since the values were obtained on different training sets and for solving similar, but different problems. Qualitatively, the results obtained by the VAE differ from the GAN, but our model is lighter and simpler, and the difference is not colossal. On the other hand, we use VAE, not a regular autoencoder, because VAE will generate signals from a random dataset, which will expand the training sample due to artificially generated ECGs.</p>
<p>The main advantage of our work is the proposal of the method for extracting new features. The goal is to encode data on the signal with the smallest possible number of features. Our experiments show that these features are quite interpretable. This fact allows us to hope that using these features will help to improve the quality of automatic diagnostics of cardiovascular diseases. Generating new synthetic ECGs will allow us to fix the issue of the lack of labeled ECG for using them in supervised learning.</p>
<p>We note that the RR interval is an extremely important parameter of the ECG. Nevertheless, the aim of the study was to generate one cardiac cycle. On the other hand, our approach allows one to generate an ECG and extract features for one cardiac cycle of any duration. Our model is not as large as for the whole signal, and it is convenient to use it in various subtasks related to ECG diagnostics.</p>
<p>Besides VAE, other autoencoders are also used for ECG analysis. In particular, Gyawali et al. (<xref ref-type="bibr" rid="B9">2019</xref>) uses f-SAE to capture relevant features from the 12-lead ECG for the downstream task of VT localization. The subject of the work is very different from ours. In our work, we want to use specifically VAE, which can be used for many tasks related to ECG analysis, including for solving our problem.</p>
</sec>
<sec id="s2">
<title>2. Algorithm</title>
<sec>
<title>2.1. Pre-processing</title>
<p>Our original ECG is a 10-s 12-lead signal with a frequency of 500 Hz. Using the segmentation algorithms described by Moskalenko et al. (<xref ref-type="bibr" rid="B17">2019</xref>), we determine beginnings and endings of all P and T waves and all the picks R. Then, we do the step forward and backward from the R pick at an equal distance. Thus, we obtain the set of cardiac cycles, each of which of vectors length is 400 (800 ms).</p>
</sec>
<sec>
<title>2.2. Neural Network Architecture: Encoder</title>
<p>A variational autoencoder (Kingma and Welling, <xref ref-type="bibr" rid="B15">2013</xref>; Doersch, <xref ref-type="bibr" rid="B4">2016</xref>) consists of an encoder and a decoder. We propose the following architecture for them. The encoder consists of a convolutional and a fully connected blocks. The architecture of the encoder is presented in <xref ref-type="fig" rid="F2">Figure 2</xref>. The input vector of length 400 is fed to the input of the encoder. The next step is branching into a fully connected and convolutional chains. This branching occurs immediately in order to simultaneously highlight small local features and features based on the entire signal. Otherwise, using only fully connected blocks, we would get smooth ideal signals, and using only convolutional ones&#x02014;signals close to a simple set of numbers.</p>
<fig id="F2" position="float">
<label>Figure 2</label>
<caption><p>Encoder architecture.</p></caption>
<graphic xlink:href="fgene-12-638191-g0002.tif"/>
</fig>
<p>The convolutional chain (at the top of the circuit in <xref ref-type="fig" rid="F2">Figure 2</xref>) consists of four series-connected blocks, each of which consists of a convolution layer, a batch normalization layer, a ReLU activation function and a MaxPooling layer. In addition, we have another convolution layer. At the output of this block we get 25 neurons.</p>
<p>The fully connected chain of the encoder (at the bottom of the circuit in <xref ref-type="fig" rid="F2">Figure 2</xref>) consists of three fully connected (dense) layers, interconnected by a batch normalization and ReLU activation functions. At the output of the last fully connected layer we have 25 neurons.</p>
<p>The outputs of the convolutional and fully connected chains are concatenated, which gives us a vector of length 50. Using two fully connected layers we get two 25-dimensional vectors which are interpreted as a vector of means and a vector of logarithms of variances for 25 normal distributions (or for one 25-dimensional normal distribution with a diagonal covariance matrix). The output of the encoder is a vector of length 25 in which each component is sampled from those normal distributions with specified means and variance.</p>
<p>We will interpret this 25-dimensional vector as a vector of new features sufficient to describe and restore with small error the one cardiac cycle. Note that with fewer features, the results were noticeably worse (the MMD metric was significantly higher). On the other hand, this number of features was enough to restore the signal with sufficient quality.</p>
<p>As the loss function, the Kullback&#x02013;Leibler distance</p>
<disp-formula id="E1"><label>(1)</label><mml:math id="M1"><mml:mtable class="eqnarray" columnalign="left"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>D</mml:mi></mml:mrow><mml:mrow><mml:mi>K</mml:mi><mml:mi>L</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mi>P</mml:mi><mml:mo>&#x02225;</mml:mo><mml:mi>Q</mml:mi></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>=</mml:mo><mml:mstyle displaystyle="true"><mml:msub><mml:mrow><mml:mo>&#x0222B;</mml:mo></mml:mrow><mml:mrow><mml:mi>X</mml:mi></mml:mrow></mml:msub></mml:mstyle><mml:mi>p</mml:mi><mml:mo class="qopname">log</mml:mo><mml:mfrac><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mi>q</mml:mi></mml:mrow></mml:mfrac><mml:mi>d</mml:mi><mml:mi>&#x003BC;</mml:mi></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<p>is used. Due to this fact those 25 new features are of normal distribution. In (1) &#x003BC; is any measure on <italic>X</italic> for which there exists a function absolutely continuous with respect to &#x003BC;: <inline-formula><mml:math id="M2"><mml:mi>p</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>d</mml:mi><mml:mi>P</mml:mi></mml:mrow><mml:mrow><mml:mi>d</mml:mi><mml:mi>&#x003BC;</mml:mi></mml:mrow></mml:mfrac></mml:math></inline-formula> and <inline-formula><mml:math id="M3"><mml:mi>q</mml:mi><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi>d</mml:mi><mml:mi>Q</mml:mi></mml:mrow><mml:mrow><mml:mi>d</mml:mi><mml:mi>&#x003BC;</mml:mi></mml:mrow></mml:mfrac></mml:math></inline-formula>, <italic>P</italic> is the initial distribution, <italic>Q</italic> is the new distribution we have obtained.</p>
</sec>
<sec>
<title>2.3. Neural Network Architecture: Decoder</title>
<p>The architecture of the decoder is presented in <xref ref-type="fig" rid="F3">Figure 3</xref>. As an input, the decoder accepts the 25-dimensional vector of features. Then, similarly to the encoder, branching into convolutional and fully connected chains occurs.</p>
<fig id="F3" position="float">
<label>Figure 3</label>
<caption><p>Decoder architecture.</p></caption>
<graphic xlink:href="fgene-12-638191-g0003.tif"/>
</fig>
<p>The fully connected chain (at the bottom of the circuit in <xref ref-type="fig" rid="F3">Figure 3</xref>) consists of four blocks, each of which contains a fully connected (dense) layer, batch normalization layer and the ReLU activation function.</p>
<p>The convolutional chain (at the top of the circuit in <xref ref-type="fig" rid="F3">Figure 3</xref>) performs a deconvolution. It consists of four blocks which include a convolutional layer, a batch normalization layer, and ReLU activation function, followed by an upsampling layer.</p>
<p>As a result of the convolutional and the fully connected chains, we get 400 neurons from each. Then, we concatenate two results, obtaining 800 neurons. Using a dense layer we get 400 neurons which represent the restored ECG.</p>
<p>As a loss function for the output of the decoder, we use the mean squared error.</p>
<p>The models for the encoder and the decoder can be downloaded from <ext-link ext-link-type="uri" xlink:href="https://github.com/VlaKuz/ecg_cycle_VAE">https://github.com/VlaKuz/ecg_cycle_VAE</ext-link>.</p>
</sec>
</sec>
<sec id="s3">
<title>3. Experimental Results</title>
<p>In our experiment, we use 2, 033 10-s ECG signals of frequency 500 Hz (Kalyakulina et al., <xref ref-type="bibr" rid="B13">2019</xref>, <xref ref-type="bibr" rid="B11">2020a</xref>,<xref ref-type="bibr" rid="B12">b</xref>). We process them according to the principles as described above (see section 2.1) and train our network on the obtained 252, 636 cardiac cycles. Examples of those real human cardiac cycles derived from ECG signals are presented in <xref ref-type="fig" rid="F4">Figure 4</xref>.</p>
<fig id="F4" position="float">
<label>Figure 4</label>
<caption><p>Examples of real cardiac cycles obtained from ECG signals and used in the training of VAE.</p></caption>
<graphic xlink:href="fgene-12-638191-g0004.tif"/>
</fig>
<p>To train the model we used 720 epochs of Adaptive Moment Estimation (Adam) algorithm proposed by Kingma and Ba (<xref ref-type="bibr" rid="B14">2014</xref>) and implemented in TensorFlow Framework (Abadi et al., <xref ref-type="bibr" rid="B1">2016</xref>). No data augmentation was not performed.</p>
<p>The trained network produce 25 features describing the cardiac cycle. The examples are shown in <xref ref-type="fig" rid="F5">Figure 5</xref>.</p>
<fig id="F5" position="float">
<label>Figure 5</label>
<caption><p>Examples of generated normal distribution features for obtaining a cardio cycle based on them.</p></caption>
<graphic xlink:href="fgene-12-638191-g0005.tif"/>
</fig>
<p>After having trained the network we may test the decoder by supplying random (generated according to the standard normal distribution) numbers to its input. The examples of the produced results are given in <xref ref-type="fig" rid="F6">Figure 6</xref>. These synthetic generated ECG looks quite natural.</p>
<fig id="F6" position="float">
<label>Figure 6</label>
<caption><p>Examples of generated heart cycles based on 25 features.</p></caption>
<graphic xlink:href="fgene-12-638191-g0006.tif"/>
</fig>
<p>To evaluate our results we calculated the Maximum Mean Discrepancy (MMD) metric (Delaney et al., <xref ref-type="bibr" rid="B3">2019</xref>) on the set of 3,000 generated ECG. The value of MMD is equal to 3.83 &#x000D7; 10<sup>&#x02212;3</sup>. Keep it in mind that the best value of MMD obtained by Delaney et al. (<xref ref-type="bibr" rid="B3">2019</xref>) by GAN is 1.05 &#x000D7; 10<sup>&#x02212;3</sup>. The value obtained by us is slightly less than the value from Delaney et al. (<xref ref-type="bibr" rid="B3">2019</xref>). However, it shouldn&#x00027;t be argued that this metric is a reference. There are no illustrations in Delaney et al. (<xref ref-type="bibr" rid="B3">2019</xref>) confirming the correctness of the result. We note that the comparison of these two metric values is not absolutely correct, since these values were obtained on different training sets and for solving similar, but different problems. Unfortunately, the papers (Golany and Radinsky, <xref ref-type="bibr" rid="B5">2019</xref>; Zhu et al., <xref ref-type="bibr" rid="B20">2019</xref>) don&#x00027;t contain (applicable to our problem) values of similar metrics.</p>
<p>Interesting results were obtained when generating ECG with a varying feature. Some generated ECG signals are presented in <xref ref-type="fig" rid="F7">Figure 7</xref>. Twenty-four features were fixed for each test when the remaining feature was changing. It was possible to find a parameter responsible, for example, for the height of the wave T, the depression of the ST wave, etc. Thus, in some cases, the extracted features may be interpreted, which also confirms the high quality of the constructed feature description. So, from the figures it can be seen that when fixing the 6th sign of changes in the behavior of the QRS complex. When the 14th feature changes, the amplitude of the P wave changes, and when the 24th feature changes, the behavior of the T wave changes. Other signs have a similar effect. In all cases, it can be seen that with an increase in the value of the feature, the peak rises up, and with a decrease, it goes down.</p>
<fig id="F7" position="float">
<label>Figure 7</label>
<caption><p>Examples of ECG generated when a parameter is varying. Each column correspond to the set of fixed 24 features and varying other feature (6, 14, and 24 feature, respectively).</p></caption>
<graphic xlink:href="fgene-12-638191-g0007.tif"/>
</fig>
<p>The variational autoencoder models for each lead were also trained. Examples of the results of trained models in the <xref ref-type="fig" rid="F8">Figure 8</xref>. The figure shows the leads I, II, III.</p>
<fig id="F8" position="float">
<label>Figure 8</label>
<caption><p>Examples of ECGs generated by a VAE that has been trained in only one lead (I, II, III).</p></caption>
<graphic xlink:href="fgene-12-638191-g0008.tif"/>
</fig>
</sec>
<sec id="s4">
<title>4. Conclusions and Further Research</title>
<p>In this paper, we proposed a neural network (variational autoencoder) architecture that is used to generate an ECG corresponding to a single cardiac cycle. Our method generates synthetic ECGs using rather small number (25) of features, with completely natural appearance, which can be used to augment the training sets in supervised learning problems involving ECG. Our method allowed us to extract new features that accurately characterize the ECG. Experiments show that the extracted features are usually amenable to good interpretation.</p>
<p>Our approach has both advantages and disadvantages.</p>
<p>The advantages include relative simplicity, lightness and small size of the system, which makes it very mobile and convenient; the information content of the extracted features by the encoder; the ability to obtain signals from a random distribution of a relatively small number of features; the ability to generate individual signals from a random distribution, as well as generating pathological signals.</p>
<p>The main of the disadvantages is inability to generate a whole ECG signal.</p>
<p>We plan to use our approach to generate the entire ECG, not just one cardiac cycle and, separately, for normal and pathological ECGs cases. We will also use the extracted features to improve the quality of automatic diagnosis of cardiovascular diseases.</p>
</sec>
<sec sec-type="data-availability-statement" id="s5">
<title>Data Availability Statement</title>
<p>Publicly available datasets were analyzed in this study. This data can be found here: <ext-link ext-link-type="uri" xlink:href="https://physionet.org/content/ludb/1.0.1/">https://physionet.org/content/ludb/1.0.1/</ext-link>.</p>
</sec>
<sec id="s6">
<title>Author Contributions</title>
<p>NZ conceived and supervised the study. VK and VM developed the method, performed the experiments and analysis. VK, NZ, and DG wrote the paper. All authors have read and agreed to the published version of the manuscript.</p>
</sec>
<sec sec-type="COI-statement" id="conf1">
<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>
</body>
<back>
<ref-list>
<title>References</title>
<ref id="B1">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Abadi</surname> <given-names>M.</given-names></name> <name><surname>Barham</surname> <given-names>P.</given-names></name> <name><surname>Chen</surname> <given-names>J.</given-names></name> <name><surname>Chen</surname> <given-names>Z.</given-names></name> <name><surname>Davis</surname> <given-names>A.</given-names></name> <name><surname>Dean</surname> <given-names>J.</given-names></name> <etal/></person-group>. (<year>2016</year>). <article-title>Tensorflow: a system for large-scale machine learning</article-title>, in <source>12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16)</source> (<publisher-loc>Savannah, GA</publisher-loc>), <fpage>265</fpage>&#x02013;<lpage>283</lpage>.</citation></ref>
<ref id="B2">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Albergante</surname> <given-names>L.</given-names></name> <name><surname>Mirkes</surname> <given-names>E.</given-names></name> <name><surname>Bac</surname> <given-names>J.</given-names></name> <name><surname>Chen</surname> <given-names>H.</given-names></name> <name><surname>Martin</surname> <given-names>A.</given-names></name> <name><surname>Faure</surname> <given-names>L.</given-names></name> <etal/></person-group>. (<year>2020</year>). <article-title>Robust and scalable learning of complex intrinsic dataset geometry via elpigraph</article-title>. <source>Entropy</source> <volume>22</volume>:<fpage>296</fpage>. <pub-id pub-id-type="doi">10.3390/e22030296</pub-id><pub-id pub-id-type="pmid">33286070</pub-id></citation></ref>
<ref id="B3">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Delaney</surname> <given-names>A. M.</given-names></name> <name><surname>Brophy</surname> <given-names>E.</given-names></name> <name><surname>Ward</surname> <given-names>T. E.</given-names></name></person-group> (<year>2019</year>). <article-title>Synthesis of realistic ECG using generative adversarial networks</article-title>. <source>arXiv</source> 1909.09150.</citation></ref>
<ref id="B4">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Doersch</surname> <given-names>C.</given-names></name></person-group> (<year>2016</year>). <article-title>Tutorial on variational autoencoders</article-title>. <source>arXiv</source> 1606.05908.</citation></ref>
<ref id="B5">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Golany</surname> <given-names>T.</given-names></name> <name><surname>Radinsky</surname> <given-names>K.</given-names></name></person-group> (<year>2019</year>). <article-title>Pgans: personalized generative adversarial networks for ECG synthesis to improve patient-specific deep ECG classification</article-title>, in <source>Proceedings of the AAAI Conference on Artificial Intelligence</source> (<publisher-loc>Honolulu, HI</publisher-loc>), <volume>Vol. 33</volume>, <fpage>557</fpage>&#x02013;<lpage>564</lpage>. <pub-id pub-id-type="doi">10.1609/aaai.v33i01.3301557</pub-id></citation></ref>
<ref id="B6">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Goodfellow</surname> <given-names>I.</given-names></name> <name><surname>Bengio</surname> <given-names>Y.</given-names></name> <name><surname>Courville</surname> <given-names>A.</given-names></name> <name><surname>Bengio</surname> <given-names>Y.</given-names></name></person-group> (<year>2016</year>). <source>Deep Learning</source>, <volume>Vol. 1</volume>. <publisher-loc>Cambridge, MA</publisher-loc>: <publisher-name>MIT Press</publisher-name>.</citation></ref>
<ref id="B7">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Goodfellow</surname> <given-names>I. J.</given-names></name> <name><surname>Pouget-Abadie</surname> <given-names>J.</given-names></name> <name><surname>Mirza</surname> <given-names>M.</given-names></name> <name><surname>Xu</surname> <given-names>B.</given-names></name> <name><surname>Warde-Farley</surname> <given-names>D.</given-names></name> <name><surname>Ozair</surname> <given-names>S.</given-names></name> <etal/></person-group>. (<year>2014</year>). <article-title>Generative adversarial networks</article-title>, in <source>Advances in Neural Information Processing Systems. arXiv [Preprint]</source> arXiv:1406.2661.</citation></ref>
<ref id="B8">
<citation citation-type="book"><person-group person-group-type="editor"><name><surname>Gorban</surname> <given-names>A. N.</given-names></name> <name><surname>K&#x000E9;gl</surname> <given-names>B.</given-names></name> <name><surname>Wunsch</surname> <given-names>D. C.</given-names></name> <name><surname>Zinovyev</surname> <given-names>A. Y.</given-names></name></person-group> (eds.). (<year>2008</year>). <article-title>Principal manifolds for Data visualization and dimension reduction</article-title>, in <source>Lecture Notes in Computational Science and Engineering</source> (<publisher-loc>Berlin</publisher-loc>: <publisher-name>Springer</publisher-name>), <volume>Vol. 58</volume>. <fpage>96</fpage>&#x02013;<lpage>130</lpage>.</citation>
</ref>
<ref id="B9">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Gyawali</surname> <given-names>P.</given-names></name> <name><surname>Li</surname> <given-names>Z.</given-names></name> <name><surname>Knight</surname> <given-names>C.</given-names></name> <name><surname>Ghimire</surname> <given-names>S.</given-names></name> <name><surname>Horacek</surname> <given-names>B. M.</given-names></name> <name><surname>Sapp</surname> <given-names>J.</given-names></name> <etal/></person-group>. (<year>2019</year>). <article-title>Improving disentangled representation learning with the beta bernoulli process</article-title>, in <source>2019 IEEE International Conference on Data Mining (ICDM)</source> (<publisher-loc>Beijing</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1078</fpage>&#x02013;<lpage>1083</lpage>. <pub-id pub-id-type="doi">10.1109/ICDM.2019.00127</pub-id></citation></ref>
<ref id="B10">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hong</surname> <given-names>S.</given-names></name> <name><surname>Zhou</surname> <given-names>Y.</given-names></name> <name><surname>Shang</surname> <given-names>J.</given-names></name> <name><surname>Xiao</surname> <given-names>C.</given-names></name> <name><surname>Sun</surname> <given-names>J.</given-names></name></person-group> (<year>2020</year>). <article-title>Opportunities and challenges of deep learning methods for electrocardiogram data: a systematic review</article-title>. <source>Comput. Biol. Med.</source> <volume>122</volume>:<fpage>103801</fpage>. <pub-id pub-id-type="doi">10.1016/j.compbiomed.2020.103801</pub-id><pub-id pub-id-type="pmid">32658725</pub-id></citation></ref>
<ref id="B11">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Kalyakulina</surname> <given-names>A.</given-names></name> <name><surname>Yusipov</surname> <given-names>I. I.</given-names></name> <name><surname>Moskalenko</surname> <given-names>V. A.</given-names></name> <name><surname>Nikolskiy</surname> <given-names>A. V.</given-names></name> <name><surname>Kozlov</surname> <given-names>A. A.</given-names></name> <name><surname>Kosonogov</surname> <given-names>K. A.</given-names></name> <etal/></person-group>. (<year>2020a</year>). <source>Lobachevsky University Electrocardiography Database (version 1.0.0)</source>. <publisher-loc>Cambridge, MA</publisher-loc>: <publisher-name>PhysioNet</publisher-name>.</citation></ref>
<ref id="B12">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kalyakulina</surname> <given-names>A. I.</given-names></name> <name><surname>Yusipov</surname> <given-names>I. I.</given-names></name> <name><surname>Moskalenko</surname> <given-names>V. A.</given-names></name> <name><surname>Nikolskiy</surname> <given-names>A. V.</given-names></name> <name><surname>Kosonogov</surname> <given-names>K. A.</given-names></name> <name><surname>Osipov</surname> <given-names>G. V.</given-names></name> <etal/></person-group>. (<year>2020b</year>). <article-title>Ludb: a new open-access validation tool for electrocardiogram delineation algorithms</article-title>. <source>IEEE Access</source> <volume>8</volume>, <fpage>186181</fpage>&#x02013;<lpage>186190</lpage>. <pub-id pub-id-type="doi">10.1109/ACCESS.2020.3029211</pub-id></citation></ref>
<ref id="B13">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kalyakulina</surname> <given-names>A. I.</given-names></name> <name><surname>Yusipov</surname> <given-names>I. I.</given-names></name> <name><surname>Moskalenko</surname> <given-names>V. A.</given-names></name> <name><surname>Nikolskiy</surname> <given-names>A. V.</given-names></name> <name><surname>Kozlov</surname> <given-names>A. A.</given-names></name> <name><surname>Zolotykh</surname> <given-names>N. Y.</given-names></name> <etal/></person-group>. (<year>2019</year>). <article-title>Finding morphology points of electrocardiographic-signal waves using wavelet analysis</article-title>. <source>Radiophys. Quant. Electron.</source> <volume>61</volume>, <fpage>689</fpage>&#x02013;<lpage>703</lpage>. <pub-id pub-id-type="doi">10.1007/s11141-019-09929-2</pub-id></citation></ref>
<ref id="B14">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kingma</surname> <given-names>D. P.</given-names></name> <name><surname>Ba</surname> <given-names>J.</given-names></name></person-group> (<year>2014</year>). <article-title>Adam: a method for stochastic optimization</article-title>. <source>arXiv</source> 1412.6980.</citation></ref>
<ref id="B15">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kingma</surname> <given-names>D. P.</given-names></name> <name><surname>Welling</surname> <given-names>M.</given-names></name></person-group> (<year>2013</year>). <article-title>Auto-encoding variational bayes</article-title>. <source>arXiv</source> 1312.6114.</citation></ref>
<ref id="B16">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>LeCun</surname> <given-names>Y.</given-names></name> <name><surname>Bengio</surname> <given-names>Y.</given-names></name> <name><surname>Hinton</surname> <given-names>G.</given-names></name></person-group> (<year>2015</year>). <article-title>Deep learning</article-title>. <source>Nature</source> <volume>521</volume>, <fpage>436</fpage>&#x02013;<lpage>444</lpage>. <pub-id pub-id-type="doi">10.1038/nature14539</pub-id></citation></ref>
<ref id="B17">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Moskalenko</surname> <given-names>V.</given-names></name> <name><surname>Zolotykh</surname> <given-names>N.</given-names></name> <name><surname>Osipov</surname> <given-names>G.</given-names></name></person-group> (<year>2019</year>). <article-title>Deep learning for ECG segmentation</article-title>, in <source>International Conference on Neuroinformatics</source> (<publisher-loc>Cham</publisher-loc>: <publisher-name>Springer</publisher-name>), <fpage>246</fpage>&#x02013;<lpage>254</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-030-30425-6_29</pub-id></citation></ref>
<ref id="B18">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Rezende</surname> <given-names>D. J.</given-names></name> <name><surname>Mohamed</surname> <given-names>S.</given-names></name> <name><surname>Wierstra</surname> <given-names>D.</given-names></name></person-group> (<year>2014</year>). <article-title>Stochastic backpropagation and approximate inference in deep generative models</article-title>. <source>arXiv</source> 1401.4082.</citation></ref>
<ref id="B19">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Schl&#x000E4;pfer</surname> <given-names>J.</given-names></name> <name><surname>Wellens</surname> <given-names>H. J.</given-names></name></person-group> (<year>2017</year>). <article-title>Computer-interpreted electrocardiograms: benefits and limitations</article-title>. <source>J. Am. Coll. Cardiol.</source> <volume>70</volume>, <fpage>1183</fpage>&#x02013;<lpage>1192</lpage>. <pub-id pub-id-type="doi">10.1016/j.jacc.2017.07.723</pub-id><pub-id pub-id-type="pmid">28838369</pub-id></citation></ref>
<ref id="B20">
<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> (<year>2019</year>). <article-title>Electrocardiogram generation with a bidirectional LSTM-CNN generative adversarial network</article-title>. <source>Sci. Rep.</source> <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-list>
<fn-group>
<fn fn-type="financial-disclosure"><p><bold>Funding.</bold> This work was supported by the Ministry of Science and Higher Education of the Russian Federation (agreement number 075-15-2020-808).</p>
</fn>
</fn-group>
</back>
</article>