Skip to main content
UKPMC Funders Author Manuscripts logoLink to UKPMC Funders Author Manuscripts
. Author manuscript; available in PMC: 2022 Jan 27.
Published in final edited form as: Funct Imaging Model Heart. 2021 Jun 18;2021:650–658. doi: 10.1007/978-3-030-78710-3_62

Learning atrial fiber orientations and conductivity tensors from intracardiac maps using physics-informed neural networks

Thomas Grandits 1,2, Simone Pezzuto 3, Francisco Sahli Costabal 4,5,6, Paris Perdikaris 7, Thomas Pock 1,2, Gernot Plank 2,8, Rolf Krause 3
PMCID: PMC7612271  EMSID: EMS140791  PMID: 35098259

Abstract

Electroanatomical maps are a key tool in the diagnosis and treatment of atrial fibrillation. Current approaches focus on the activation times recorded. However, more information can be extracted from the available data. The fibers in cardiac tissue conduct the electrical wave faster, and their direction could be inferred from activation times. In this work, we employ a recently developed approach, called physics informed neural networks, to learn the fiber orientations from electroanatomical maps, taking into account the physics of the electrical wave propagation. In particular, we train the neural network to weakly satisfy the anisotropic eikonal equation and to predict the measured activation times. We use a local basis for the anisotropic conductivity tensor, which encodes the fiber orientation. The methodology is tested both in a synthetic example and for patient data. Our approach shows good agreement in both cases and it outperforms a state of the art method in the patient data. The results show a first step towards learning the fiber orientations from electroanatomical maps with physics-informed neural networks.

1. Introduction

The fiber structure of the cardiac tissue has a prominent role on its function. From an electrophysiological viewpoint, electrical conduction along the fiber direction is generally higher than the cross-fiber direction [4]. The overall propagation of the action potential is therefore anisotropic, with preferential pathways in the activation. In the atria, fiber orientations and the resulting conductivity are however known only with large uncertainty, rendering the construction of accurate computational models more difficult [12].

Electroanatomical mapping, a keystone diagnostic tool in cardiac electrophysiology studies, can provide high-density maps of the local electric activation. Since conduction properties of the tissue and the activation times are physiologically correlated, electroanatomical maps (EAMs) can be potentially the basis for a parameter identification procedure of the former [10]. Subsequently, local fiber orientations may be extrapolated from the fastest conductivity direction.

The problem of identifying the conductivity of the tissue from point-wise recordings of the activation time has been already addressed by others. Local approaches estimate the front velocity at every point of the domain only by using the local geometrical and electrical information, that is the location and the activation time of neighboring points [16]. Local fiber direction can be estimated from multiple pacing sequences by comparing the velocity in the propagation directions [13]. Similarly, the EAM may be interpolated into a smooth activation map, e.g., with linear or radial basis functions [6]. Local methods are general and do not account for the physics: there is no guarantee that activation and conduction will satisfy a given model. Moreover, they may fail at those locations where activation is not differentiable, such as collision lines and breakthroughs. Model-based approaches are not novel either [7,2]. In these methods, the mismatch between observed and simulated (by the model) activation is minimized by optimizing the local conduction velocity of the tissue.

In this work, we solve the problem of learning the anisotropic structure of the conductivity tensor from electroanatomical maps by imposing to the identification problem a physiological constraint, encoded in the anisotropic eikonal equation. Here, we extend our recent work into this problem [14,8] by combining Physics-informed Neural Networks (PINNs) and the anisotropic eikonal equation. In this approach, a set of neural networks representing the conductivity tensor and the activation times are fitted to the data by weakly imposing the eikonal model through a penalization term. PINNs are particularly suitable for recovering complex functions from sparse and scarce data, as in the present case [11]. Moreover, the weak imposition of the model does not require its explicit solution. We can also omit boundary conditions, which for the eikonal model are the sites of early activation, usually unknown. The proposed method, fully implemented in TensorFlow,performed well with synthetic data, being able to recover ground-truth fiber orientations in limited regions, just with a single activation sequence. Additionally, we applied the method to EAMs from a patient who underwent a mapping procedure prior ablation, with promising results. Both models were compared to our previous classical optimization approach [8] and performed comparably in all cases.

This manuscript is organized as follows: In Section 2 we formulate the problem of estimating conductivities as a physics-informed neural network, and we introduce its numerical solution. In Section 3, we show two numerical experiments to test the accuracy of the method. We end this manuscript with a discussion and future directions in Section 4.

2. Methods

2.1. Anisotropic eikonal model for cardiac activation

The cardiac tissue is electrically active, in the sense that a sufficiently strong stimulus can trigger the propagation of a travelling wave, called action potential. The time of first arrival of the action potential, usually set as the point of crossing of a threshold potential, is called activation time. Herein, we denote as ϕ: Ω → ℝ the activation map in a embedding domain Ω ⊂ ℝ3 (e.g., a box containing the atria), that is ϕ(x) is the activation time at xΩ. Under rather general circumstances [5], the activation map may be well described by the anisotropic eikonal equation, which reads as follows:

D(x)ϕ(x)ϕ(x)=1,xΩ, (1)

where DC(Ω¯;P(3)) is a continuous tensor field from Ω̄ to P(3), the set of 3×3 symmetric positive-definite real matrices. The eikonal equation is not explicitly solved, hence there is no need to enforce boundary conditions. We rather consider the model residual:

Rm[ϕ](x)max{D(x)ϕ(x)ϕ(x),ε}1, (2)

for a sufficiently small ε > 0 to avoid infeasible gradients, as a metric of pointwise model discrepancy for a given pair of activation ϕ and conductivity tensor D.

2.2. Representation of the conductivity tensor

The conductivity tensor D shall be defined through a parameter vector in a way that ensures its symmetry, positive-definiteness, and zero velocity orthogonal to the atrial surface SΩ in all cases. Analogous to our previous method in [8], we therefore consider the parameter vector d(x) = [d 1(x), d 2(x), d 3(x)] and define D through d as follows:

D(x)eP(x)D2(x)P(x),D2(x)[d1(x)d2(x)d2(x)d3(x)] (3)

where P(x) ∈ ℝ3×2 is a matrix whose columns contain two orthonormal vectors in the tangent plane at xS, computed using the vector heat method [15]. Please note that we consider the matrix exponential in Eq. (3) rather than component-wise exponentiation. This choice corresponds to the Log-Euclidean metric of the space P(3) [1].

The fiber direction is defined as the direction of fastest propagation, that is the eigenvector associated to the largest eigenvalue of D. By the definition of matrix exponential, such direction is also the maximum eigenvector of PD 2 P .

2.3. Physics-informed neural network

In the considered experiments, we are given a set of points, each composed by a location xi and a recorded activation time ϕ^i:ΓSforΓSS representing the EAM locations and timings of the recordings. The objective is therefore to identify a conductivity tensor field D such that the corresponding activation map ϕ, as resulting from Eq. (1), will closely reproduce the observed data.

For this purpose, we approximate both the activation map ϕ(x) and the conductivity vector d(x) with a feed-forward neural network NN n,m, θ : ℝ n → ℝ m with n inputs to m outputs and characterized by a vector θ containing weights and biases, as was initially promoted in [11]. The used architecture of the networks is shown in Fig. 1. Specifically, we have ϕ(x) ≈ ϕ NN(x, θ ϕ ) = NN3,1, θ ϕ (x) and d(x) ≈ d NN(x, θ d ) = d max · tanh (NN3,3, θ d (x). where tanh is meant component-wise, and d max is an upper limit for the components of d NN, meant to avoid over- and underflows in the numerical calculations. This construction of ϕ and d enables us to use standard machine learning methods and frameworks to efficiently calculate the gradients ∇ϕ and ∇d, used in the chosen PDE model (2) and inverse regularization. The usage of these gradients in the optimization necessitates at least second order smooth activation functions in the neurons, achieved by the use of tanh functions.

Fig. 1.

Fig. 1

Structural view of the proposed PINN architecture, containing the two NNs ϕ NN and d NN. Nodes containing a curve indicate a tanh activation function. The final layer of ϕ NN is a linear layer. D is computed using (3). ∇ϕ and ∇d can be obtained by means of backpropagation (reverse arrows). The bold rectangular boxes show the three major loss terms from (4): Data fidelity, eikonal (PDE) and TV loss (top to bottom).

Similar to the original PINN algorithms in [11], we define a loss function to train our model as the sum of a data fidelity, a PDE model fidelity term and two regularization terms:

L(θϕ,θd)ΓS(ϕNN(x)ϕ^(x))2dx+αmS(Rm[ϕNN](x))2dx+αθ(θϕ2+θd2)+αdSHδ(dNN(x))dx, (4)

for the three weighting parameters αm , α d , αθ . Regularization is both applied to the weights of the networks as well as on the inverse parameter estimation. The latter regularization term is an Huber-type, approximated Total Variation regularization for the conductivity vector parameters d. Specifically,

Hδ(x)={12δx2,ifxδ,x12δ,otherwise (5)

with δ = 5 · 10−2 for our experiments. Note that by construction, D has zero velocity in directions normal to the manifold (see Sec. 2.2) and thus allows us to neglect the additional normal penalization used in [14].

2.4. Numerical implementation

The domain S is discretized using a triangular mesh, usually obtained directly from the mapping system, along with point-wise evaluations of the activation times, that is ΓS={x1,,xN}. In all experiments, the integrals were approximated using a point-wise evaluation for both domains: On the vertices for the approximation of S and on the discrete measurements for ΓS.

For the optimization, we experimentally selected the hyper-parameters as α m = 104 for the model atria and α m = 103 for the EAM. The other two hyperparameters are the same for both experiments: αθ = 10−4, α d = 10−3. The two neural networks for ϕ and d had 7 and 5 hidden fully connected layers respectively. All hidden layers consisted of 20 neurons for ϕ NN and 5 neurons for dNN . A regression layer has been added to ϕ NN. Optimization is performed by first using the ADAM [9] optimizer for 104 epochs with a learning rate of 10−3, followed by a L-BFGS optimization [3] until convergence to a local minimum is achieved.

3. Numerical experiments

Herein, we consider two experiments: a synthetic example, with ground-truth on a realistic anatomy of the left atrium, and an example with patient-specific geometry and data. The first example is optimized and tested against different levels of i.i.d. normal noise: ϕ˜(x)=ϕ^(x)+N(0,σN). We measure the performance of the synthetic model in terms of the root-mean-square error (RMSE) over the whole surface here denoted as RMSES. Errors directly on the measurement points, employed in the optimization, are used to compute RMSE O . In the patient specific example, we randomly split ΓS into ΓO , used for optimization/training, and ΓT , for testing.

The results of our method on the model atria, and a comparison to PIEMAP [8], are presented in Tab. 1. Both methods are comparable in terms of RMSE, with both methods achieving less than 5ms of RMSE for all levels of noise. Additionally, we tested the presented PINN on an EAM, achieving a RMSE of the activation times on the test set of RMSET ≈ 5.59 ms. The RMSE on the measurements used in the optimization was only slightly lower at RMSE O ≈ 4.82 ms, indicating that α m was chosen in a proper range to avoid overfitting to the data. In the patient-specific test, our method was able to outperform PIEMAP, which reported RMSET ≈ 6.89ms and RMSE O ≈ 1.18ms on test and optimization/training set respectively, showing a slight overfit to the data used in the optimization.

Fig. 2 shows the qualitative results of using this method on the two chosen models (the model atria in the noise-less case). We can nicely fit the activation encountered at the surface and create an eikonal-like activation. The initiation sites are automatically deduced by the PINN algorithm with only soft eikonal and data constraints. The smooth basis generated with the vector heat method, together with the TV regularization give us a smooth, fiber field.

Fig. 2.

Fig. 2

Results of the PINN method on an in-silico and an in-vivo EAM model with the overlayed measurements as points and fibers as arrows. The underlying contour lines and colors on the mesh itself represents the activation of the PINN, sampled at each vertex.

4. Discussion and outlook

In this work, we present a novel approach to the recovery of fiber orientations from activation time measurements. We train a neural network that aims to approximate the data while also satisfy the eikonal equation. In this way, we can identify the conductivity tensor that best explains the data. Our approach has some advantages compared to methods that exactly solve the forward problem of the eikonal equation. First, we only weakly enforce the solution of the PDE, which may be convenient when the model is not exactly satisfied. Here the eikonal equation is an approximation to the much complex process of cardiac electrophysiology. Second, we do not need to impose boundary conditions, or define the number of early activation sites, which are unknown beforehand. Third, our approach scales wells both with the number of measurements and the size of the mesh. We take advantage of mini-batch optimization strategies to utilize all the data while keeping the computational cost manageable. Finally, the implementation is compact and easily portable, taking advantage of the automatic differentiation capabilities of modern machine learning languages.

Our work also has some limitations and disadvantages. First, the PINN optimization in (4) is highly non-linear and exposes many local minima. A direct use of a simple convex optimization algorithm is therefore often not advised as usually only very poor local minima are found. ADAM can overcome some of these minima, but the final solution is very dependent on the initialization. This could be mitigated by training multiple neural networks at a negligible cost, which at the same time can be used to quantify uncertainty [14]. Future research could mitigate some of these problems by using different loss functionals, or alternative optimization algorithms. Second, our method showed worse performance in terms of error when compared to PIEMAP in a synthetic example. However, this trend was reversed when we used activation times coming from a patient. This indicates that further testing is necessary, with a larger dataset, to determine the accuracy of this method. Finally, our approach introduces multiple hyper-parameters that need to be tuned. In the future, we plan to use a more systematic approach to determine these parameters.

Overall, our work represent a first step to learning the fiber orientations from activation times in cardiac electrophysiology with physics-informed neural networks.

Table 1. Evaluation of the presented PINN approach compared to PIEMAP [8] for different levels of noise (given in standard deviation and signal-to-noise ratio) on the model atria.

RMSES /RMSEO PINN RMSES /RMSEO PIEMAP
σN /PSNR 0ms/∞ dB 2.20/1.38 1.04/0.83
0.1 ms/64.1 dB 4.28/2.08 1.02/0.83
1 ms/43.9 dB 3.32/1.39 1.09/0.83
5ms/29.9 dB 3.76/1.85 1.90/0.84

Contributor Information

Thomas Grandits, Email: thomas.grandits@icg.tugraz.at.

Simone Pezzuto, Email: simone.pezzuto@usi.ch.

Francisco Sahli Costabal, Email: fsc@ing.puc.cl.

Paris Perdikaris, Email: pgp@seas.upenn.edu.

Thomas Pock, Email: pock@icg.tugraz.at.

Gernot Plank, Email: gernot.plank@medunigraz.at.

Rolf Krause, Email: rolf.krause@usi.ch.

References

  • 1.Arsigny V, Fillard P, Pennec X, Ayache N. Geometric Means in a Novel Vector Space Structure on Symmetric Positive-Definite Matrices. SIAM J Matrix Anal Appl. 2007;29(1):328–347. [Google Scholar]
  • 2.Barone A, Carlino MG, Gizzi A, Perotto S, Veneziani A. Efficient estimation of cardiac conductivities: A proper generalized decomposition approach. J Comp Phys. 2020;423:109810 [Google Scholar]
  • 3.Byrd RH, Lu P, Nocedal J, Zhu C. A limited memory algorithm for bound constrained optimization. SIAM Journal on scientific computing. 1995;16(5):1190–1208. [Google Scholar]
  • 4.Clerc L. Directional differences of impulse spread in trabecular muscle from mammalian heart. J Physiol. 1976;255(2):335–346. doi: 10.1113/jphysiol.1976.sp011283. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 5.Colli Franzone P, Guerri L, Rovida S. Wavefront propagation in an activation model of the anisotropic cardiac tissue: asymptotic analysis and numerical simulations. J Math Biol. 1990;28(2):121–176. doi: 10.1007/BF00163143. [DOI] [PubMed] [Google Scholar]
  • 6.Coveney S, Corrado C, Roney CH, O’Hare D, Williams SE, O’Neill MD, Niederer SA, Clayton RH, Oakley JE, Wilkinson RD. Gaussian process manifold interpolation for probabilistic atrial activation maps and uncertain conduction velocity. Phil Trans R Soc A. 2020;378(2173):20190345. doi: 10.1098/rsta.2019.0345. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 7.Grandits T, Gillette K, Neic A, Bayer J, Vigmond E, Pock T, Plank G. An inverse Eikonal method for identifying ventricular activation sequences from epicardial activation maps. J Comp Phys. 2020;419:109700. doi: 10.1016/j.jcp.2020.109700. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 8.Grandits T, Pezzuto S, Lubrecht JM, Pock T, Plank G, Krause R. In: Statistical Atlases and Computational Models of the Heart. M&Ms and EMIDEC Challenges. Puyol Anton E, Pop M, Sermesant M, Campello V, Lalande A, Lekadir K, Suinesiaputra A, Camara O, Young A, editors. Vol. 12592. Springer; Cham: 2021. PIEMAP: Personalized Inverse Eikonal Model from cardiac Electro-Anatomical Maps; pp. 76–86. (Lecture Notes in Computer Science). [Google Scholar]
  • 9.Kingma DP, Ba J. Adam: A method for stochastic optimization. arXiv preprint. 2014:arXiv:1412.6980 [Google Scholar]
  • 10.Maagh P, Christoph A, Dopp H, Mueller MS, Plehn G, Meissner A. High-density Mapping in Ventricular Tachycardia Ablation: A Pentaray®Study. Cardiol Res. 2017;8(6):293–303. doi: 10.14740/cr636w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 11.Raissi M, Perdikaris P, Karniadakis GE. Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations. J Comp Phys. 2019;378:686–707. [Google Scholar]
  • 12.Roney CH, Bendikas R, Pashakhanloo F, Corrado C, Vigmond EJ, McVeigh ER, Trayanova NA, Niederer SA. Constructing a Human Atrial Fibre Atlas. Ann Biomed Eng. 2021;49(1):233–250. doi: 10.1007/s10439-020-02525-w. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 13.Roney CH, Whitaker J, Sim I, O’Neill L, Mukherjee RK, Razeghi O, Vigmond EJ, Wright M, O’Neill MD, Williams SE, Niederer SA. A technique for measuring anisotropy in atrial conduction to estimate conduction velocity and atrial fibre direction. Comput Biol Med. 2019;104:278–290. doi: 10.1016/j.compbiomed.2018.10.019. [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 14.Sahli Costabal F, Yang Y, Perdikaris P, Hurtado DE, Kuhl E. Physics-Informed Neural Networks for Cardiac Activation Mapping. Front Phys. 2020;8:42. [Google Scholar]
  • 15.Sharp N, Soliman Y, Crane K. The vector heat method. ACM Trans Graph. 2019;38(3) [Google Scholar]
  • 16.Verma B, Oesterlein T, Loewe A, Luik A, Schmitt C, Dössel O. Regional conduction velocity calculation from clinical multichannel electrograms in human atria. Comput Biol Med. 2018;92:188–196. doi: 10.1016/j.compbiomed.2017.11.017. [DOI] [PubMed] [Google Scholar]

RESOURCES