The major part of all problem statements for digital signal processing has been reduced to the solution with the same template; the input data is sequentially processed with several filters or transformations, and that pipeline provides another signal or list of extracted features as the output. The quality and accuracy of the pipeline are determined by mathematical properties of its steps, and such an approach poorly considers our a priori knowledge about the process of data generation or physical reasons for noise.
On the contrary, supervised machine learning approaches fully rely on structures and properties of data used for training. Unfortunately, it is very difficult to register the input and output data together for some physical process.
In this study, we analyzed the properties of the alternative approach and tried to train neural networks on data that was generated by computer models of the physical process. Neural networks can approximate any possible transformation of the data. Thus, we have fewer restrictions on the desired output of processing. Furthermore, the training dataset indirectly provides for the neural network a lot of a priori information about the input signal, which may improve the quality of processing. This study focuses on the application of the neural networks to a phase mapping.
The phase mapping is an approach for processing data registered from the cardiac surface. In the beginning, phase mapping was widely used in biological in vitro experiments for processing signals from optical mapping cameras and electrode arrays [2, 12, 17]. Lately, the phase mapping approach was translated to clinical practice [10, 20, 4]. Signals for the phase mapping registered from the cardiac surface with unipolar electrodes. Usually, there is data obtained with a unipolar catheter in clinical practice during the electrophysiological study of the myocardium (cardiac muscle tissue), or data obtained with microelectrode array from biological preparation in ex vivo biological experiments.
Phase mapping is required for visualization of periodic and non-stationary periodic activity of the myocardium. This activity is usually observed during the reentry ventricular tachycardia or atrial flutter. The basic phase map processing (Fig. 1(top row)) includes the transformation of each signal to a phase signal and then processes those phase signals from many points of registration for searching of rotor cores (center of spiral waves in other terminology) across a studied region of the myocardium. The current study focuses on the first part (see Fig. 1(A)) which is the filtering of the input signal and its transformation to the phase signal.
Our study used the following design. In the beginning, we define phase-like transformation (PLT) that is similar to the usual phase transformation but has a more simple shape. Then, we generate training datasets using computer models of 1D myocardial strands. Computer models provide one dataset for atrial myocardium and one dataset for ventricular myocardium. After that, we train the neural network (NN) on each generated dataset. Finally, we verify NN for ventricular myocardium on the test dataset that is obtained from a more complex and detailed model of the human heart electrophysiology.
Fig. 2 presents idea of PLT. We have analyzed the properties of phase signals from different approaches [2, 12, 17, 10, 20, 4]. In our opinion, methods of phase processing are suitable for unipolar signal processing because of good robustness to noise and clear representation of phase front and rotor core. The visualization may be obtained with signal breaks relating to upstrokes of the transmembrane potential in cardiomyocytes under the electrode position . The value of the signals should decrease between two upstrokes. We also suppose that the real range of signal and specific waveforms between upstrokes is insignificant for the following visualization and search of rotor cores. Thus, the signal, after phase transformation, may be replaced with the sawtooth signal with [0,1] range of values. This idea is illustrated in Fig. 2. We denote this transformation as a phase-like transformation (PLT) and their output as the PLT signal.
Approaches to the generation of training datasets for processing with machine learning methods also may be founded in one recent study .
Idealized 1D models of myocardial tissue were computed with monodomain equation . The 1D strand contained 1024 points and the activation point was located in 128 nodes from one side of the strands. Courtenmance98  and TNNP06  described electrophysiological activity of atrial and ventricular cardiomyocytes respectively.
Unipolar electrograms from 1D strand were obtained with the following formula :
where is the transmembrane potential in point , is an extracellular potential or signal from a unipolar catheter, is the height of the catheter above the 1D strand, and is an electrode position.
The coefficient and a voltage in absolute physical values are not important for our study because we normalized results using the division of each signal to their maximal absolute amplitude.
Training and validation datasets were generated with a variation of the following model parameters: the stimulation frequency ( Hz), conduction velocity (), height of electrode over the strand () and position of electrode along the strand (). Generation of dataset for the atrial and ventricular dataset were separated. Parameters of the cardiomyocytes were taken from the original articles [16, 3]
without changes. PLT signals for training were computed with simple heuristic algorithms in accordance with the moment of time when the action potential crossed the 0 mV threshold level. Examples of PTL signals are shown in Figure3. Thus, the full datasets of simple model results contained 300 signals with 4096 ms lengths and 1000 Hz frequency of discretization. The training and validation datasets respectively contain 150 (50%) and 150 (50%) signals.
The test dataset was generated by a detailed personalized finite element model of two ventricles and the torso. Model geometry was based on computed tomography data of one patient. The torso includes regions of the heart, lungs, blood in heart chambers, and spinal cord. Each torso region had realistic conductivity, according to . The heart included realistic conduction anisotropy that was introduced with a rule-based approach  and realistic heterogeneity of current transmembrane densities . The TNNP06 model  performed a realistic simulation of cardiomyocytes electrophysiology. A bidomain model with bath described excitation wave propagation and the torso electrophysiology. We initiate a spiral wave using the S1S2 protocol to provide realistic extracellular potential for ventricular arrhythmia of the reentry type. Each point of the heart surface mesh provides one signal for the test dataset. Thus, the entire model provides 34354 signals with 4096 ms length.
The described approach is one of the most realistic ways for the simulation of electrophysiology in both ventricles and the torso. In particular, this approach correctly includes the far-field effect. The used model was verified against clinical data of electrocardiography with 224 leads during activation of the myocardium from a point . We suppose that model complexity and a wide representation of physiological features make the model suitable for the generation of the test dataset. This dataset were used only with the neural network that is trained to process of the signals from the ventricular myocardium.
Convolutional neural network for processing was adapted from U-Net architecture for biomedical image segmentation 
. NN takes the signal of the electrogram as an image with a height of 1 px and a width of 4096 px. All convolution kernels, pooling, and upsampling windows were replaced from 3x3 size to 3x1 size. The number of neurons in all layers was proportionally increased for the processing of vectors with a 4096 element size. The size of the pooling layers was replaced from 2x2 to 4x1 with an aim to increase the perception field of NN. Furthermore, we add Dropout (30%) and Gaussian noise layer (mean=0, std.=0.2) before the U-Net narrow layer for improving NN robustness to white noise. The loss function was a sum of the mean absolute error and mean squared error with equal weights. We used the ADAM method of optimization with learning rate reduction on plateau of validation loss. NN provides a PLT signal as an output.
The model of cardiac tissue provides a set of excitation waves for a normal healthy myocardium (Fig. 3(A-B)) and additionally provide cases with the action potential alternances (Fig. 3(D-F)). The last ones appeared under high stimulation frequency at the 1D strand of atrial tissue (Courtenmance98 model ).
Idealized models provide a set of unipolar electrograms with significant differences between cases. The majority of signals were similar to clinically observed electrophysiological behaviour for sino-atrial rhythm (Figure 3(A,C), ), atrial flutter and atrial fibrillation (Figure 3(B,D–F), ). However, some signals look atypical, and we suppose that the dataset covers both real and unobtainable cases of electrogram signals.
|Num. of cases||Atriums||Ventricles|
Metrics of neural network performance at 150 epoch. Mean absolute error (MAE), mean square error (MSE).
NN training requires 100+ epochs for reaching of a loss plateau. Figure 5 and Table I shows the training process and final value of loss respectively. We manually analyzed shapes of the sawtooth signals and counted a number of wrongly detected action potential upstrokes in the validation dataset. Only 10 out of 859 (1.16%) upstrokes were incorrectly detected.
Qualitative analysis of NN outputs are presented in Figure 3. NN perfectly processes any periodic signals and the major part of non-stationary periodic signals (see 3(A–E)). However, the model makes an error with some non-stationary periodic signals that contain double peaks with close placement (see 3(F)). The model cannot reach zero levels in zones without electrophysiological activity and in the ends of the sawtooth shapes.
The result of the NN application on the realistic personalized model of human electrophysiology is presented in Figure 4. There are extracellular potential, transmembrane potential and phase map based on the proposed signal processing approach. As can be seen, the obtained quality of the phase map clearly reveals the rotor core and the front of the excitation waves. However, the value of the mean absolute error metric here is at three and half times higher than the ones for 1D strand models (see Table I).
Iv Discussion and Conclusion
In our study, we propose phase-like transformation (PLT) for processing unipolar electrogram and the method of its definition via the convolutional neural network that is trained on a set of generated data from the numerical experiments.
The proposed transformation provides signals with desirable properties as we planned in the beginning. It can reveal complex non-stationary periodic behavior in the myocardium (see Fig. 5), and is applicable for the building of phase maps (see Fig. 4).
Our approach to transformation definition significantly differs from the method that was proposed before. It does not require manual choose of signal transformations and filters with good basic properties. Instead of that, they require proper choice and tuning of several models of the physiological process. Loss functions here is a direct way for assessment of the algorithm ability to process complex data.
The proposed approach to processing has several advantages. It does not require a lot of hyper-parameters as in the other approaches: the size of the window , time delay for phase transformation, correction coefficient for the shift of phase plane origin , and so on. The used NN architecture provides strong robustness to noise and signal distortions, because of two noise layers that work in training. In conclusion, one neural network can replace a multistage pipeline of data processing.
We suppose that the proposed approach has a wide area of application. It may be applied to the processing of unipolar electrograms from unipolar catheter, multi-leads catheter, and balloons, microelectrode arrays, an invasive and non-invasive systems of cardiac mapping [5, 13].
At the same time, the proposed approach has several disadvantages and limitations. It is significantly more computationally expensive in application than the previously proposed approaches [2, 12, 17, 10, 20, 4]. In contrary to good robustness, application of NN has some issues. Neural networks application in stream mode requires some strategy for outline processing because NN requires normalized data as the input. Also, the proposed approach does not have a good basic theory for the analysis of their properties.
-  (2012) A novel rule-based algorithm for assigning myocardial fiber orientation to computational heart models. Annals of biomedical engineering 40 (10), pp. 2243–2254. Cited by: §II.
-  (2002) Considerations in phase plane analysis for nonstationary reentrant cardiac behavior. Physical Review E 65 (5), pp. 051902. Cited by: §I, §I, §IV, §IV.
-  (1998) Ionic mechanisms underlying human atrial action potential properties: insights from a mathematical model. American Journal of Physiology-Heart and Circulatory Physiology 275 (1), pp. H301–H321. Cited by: §II, §II, §III.
-  (2016) Electrocardiographic imaging and phase mapping approach for atrial fibrillation: a simulation study. In Computing in Cardiology Conference (CinC), 2016, pp. 117–120. Cited by: §I, §I, §IV.
-  (2019) Solving the inverse problem of electrocardiography on the endocardium using a single layer source. Frontiers in physiology 10, pp. 58. Cited by: §IV.
-  (2009) Mathematical physiology 1: cellular physiology. Vol. 2, Springer. Cited by: §I, §II.
-  (2010) Ranking the influence of tissue conductivities on forward-calculated ecgs. IEEE Transactions on Biomedical Engineering 57 (7), pp. 1568–1576. Cited by: §II.
-  (2012) Influence of heterogeneities on the genesis of the t-wave: a computational evaluation. IEEE Transactions on Biomedical Engineering 59 (2), pp. 311–322. Cited by: §II.
-  (1997) Configuration of unipolar atrial electrograms during electrically induced atrial fibrillation in humans. Circulation 95 (5), pp. 1231–1241. Cited by: §III.
-  (2015) Reconstruction of instantaneous phase of unipolar atrial contact electrogram using a concept of sinusoidal recomposition and hilbert transform. IEEE transactions on biomedical engineering 62 (1), pp. 296–302. Cited by: §I, §I, §IV.
-  (2019) A modeling and machine learning approach to ecg feature engineering for the detection of ischemia using pseudo-ecg. PloS one 14 (8). Cited by: §I.
-  (2006) Evidence for multiple mechanisms in human ventricular fibrillation. Circulation 114 (6), pp. 536–542. Cited by: §I, §I, §IV.
-  (2015) Validation of the mapping accuracy of a novel non-invasive epicardial and endocardial electrophysiology system. Europace, pp. euu339. Cited by: §IV.
-  (2015) U-net: convolutional networks for biomedical image segmentation. In International Conference on Medical image computing and computer-assisted intervention, pp. 234–241. Cited by: §II.
-  (2011) Recording and interpreting unipolar electrograms to guide catheter ablation. Heart Rhythm 8 (5), pp. 791–796. Cited by: §III.
-  (2006) Alternans and spiral breakup in a human ventricular tissue model. American Journal of Physiology-Heart and Circulatory Physiology 291 (3), pp. H1088–H1100. Cited by: §II, §II, §II.
-  (2010) Phase mapping of cardiac fibrillation. Circulation: Arrhythmia and Electrophysiology 3 (1), pp. 105–114. Cited by: §I, §I, §IV.
-  (2018) In silico comparison of phase maps based on action potential and extracellular potential. In 2018 Computing in Cardiology Conference (CinC), Vol. 45, pp. 1–4. Cited by: §IV.
-  (2018) Role of myocardial properties and pacing lead location on ecg in personalized paced heart models. Age 67, pp. 56. Cited by: §II.
-  (2016) Methodology considerations in phase mapping of human cardiac arrhythmias. Circulation: Arrhythmia and Electrophysiology 9 (11), pp. e004409. Cited by: §I, §I, §IV.
-  (2008) Representation of collective electrical behavior of cardiac cell sheets. Biophysical journal 95 (3), pp. 1138–1150. Cited by: §II.