Abstract
Cardiac digital twins provide a physics and physiology informed framework to deliver personalized medicine. However, high-fidelity multi-scale cardiac models remain a barrier to adoption due to their extensive computational costs. Artificial Intelligence-based methods can make the creation of fast and accurate whole-heart digital twins feasible. We use Latent Neural Ordinary Differential Equations (LNODEs) to learn the pressure-volume dynamics of a heart failure patient. Our surrogate model is trained from 400 simulations while accounting for 43 parameters describing cell-to-organ cardiac electromechanics and cardiovascular hemodynamics. LNODEs provide a compact representation of the 3D-0D model in a latent space by means of an Artificial Neural Network that retains only 3 hidden layers with 13 neurons per layer and allows for numerical simulations of cardiac function on a single processor. We employ LNODEs to perform global sensitivity analysis and parameter estimation with uncertainty quantification in 3 hours of computations, still on a single processor.
Similar content being viewed by others
Introduction
Cardiac digital twins integrate physiological and pathological patient-specific data to monitor, analyze and forecast patient disease progression and outcomes. High-fidelity multi-scale and anatomically accurate models are available but require extensive high-performance computing resources to run, which limit their clinical translation1. Over the past years, these mathematical models evolved from an electromechanical description of the human ventricular activity in idealized shapes2,3 and realistic geometries4,5,6,7, while also addressing diseased conditions8,9,10,11,12, to whole-heart function13,14,15,16,17,18. Nevertheless, running many electromechanical simulations still entail high computational costs, hindering the development and application of cardiac digital twins. The use of Machine Learning tools, such as Gaussian Processes Emulators19 and Artificial Neural Networks (ANNs)20,21, allows to create efficient surrogate models that can be employed in many-query applications22, such as sensitivity analysis and parameter inference23,24,25. In the framework of digital twinning and personalized medicine, bridging the chasm between the need for a supercomputer26,27,28,29 and performing accurate numerical simulations on a standard computer30,31,32,33 would have a tremendous impact on the clinical adoption of computational cardiology.
In this work, we develop a Scientific Machine Learning method to build a comprehensive surrogate model involving both cardiac and cardiovascular function. Specifically, we train a system of Latent Neural Ordinary Differential Equations (LNODEs)20,34,35 that learns the pressure-volume transients of a heart failure patient while varying 43 model parameters that describe cardiac electrophysiology, active and passive mechanics, and cardiovascular fluid dynamics, by employing 400 3D-0D closed-loop electromechanical training simulations. We design a suitable loss function that is minimized during the tuning process of the ANN parameters, which entails small relative errors of LNODEs, i.e., from 2% to 6%, when the number of training samples is small compared to the dimensionality of the parameter space and the explored model variability. These LNODEs enable four-chamber heart numerical simulations on a standard computer by encoding pressure-volume dynamics while spanning electro-mechano-fluid model parameters throughout the cardiovascular system. Furthermore, they can be easily trained on a single central processing unit (CPU).
We use the trained LNODEs to perform global sensitivity analysis (GSA) and robust parameter estimation with uncertainty quantification (UQ)23,24. For the former, we observe how model parameters impact the variability of scalar quantities of interest (QoIs) retrieved from the pressure-volume time traces, by considering both first-order and high-order interactions via Sobol indices36. For the latter, we combine two Bayesian statistics methods, i.e., Maximum a Posteriori (MAP) estimation and Hamiltonian Monte Carlo (HMC)34,37,38, where we exploit efficient matrix-free adjoint-based methods, automatic differentiation and vectorization34. In particular, we design several test cases where we calibrate tens of model parameters by matching the pressure and volume time traces, that are time-dependent QoIs, coming from 5 unseen 3D-0D numerical simulations for the trained ANN. GSA and parameter estimation with UQ can be carried out in 3 hours of computations by using a single core standard laptop.
Results
We display the whole computational pipeline in Fig. 1.
-
Top-left: we use a database of Nsims = 405 electromechanical simulations generated by a personalized anatomy four-chamber heart model from a heart failure patient (see Supplementary Material 1), where we vary \({N}_{{{{\mathcal{P}}}}}=43\) parameters that describe cell, tissue, whole-heart and cardiovascular system material properties and boundary conditions. For all the numerical simulations, we run 5 heartbeats in sinus rhythm and we perform our analysis on the pressure and volume transients of the last cardiac cycle. We refer to Supplementary Material 2 for all the details about the four-chamber physics-based mathematical model and the numerical settings of these simulations. All the information regarding model parameters can be found in Supplementary Material 3.
-
Bottom-left: we employ Ntrain, valid = 400 simulations to tune the LNODEs hyperparameters. This surrogate model learns the atrial and ventricular pressure-volume temporal dynamics of the last cardiac cycle only, while receiving time and model parameters as inputs. We perform K-fold cross validation with K = 10 for the training-validation splitting. We detail the whole optimization process to get the final values of the LNODEs hyperparameters in Supplementary Material 4. We evaluate the accuracy of the trained LNODEs on a testing dataset consisting of the remaining Ntest = 5 numerical simulations.
-
Bottom-right: we employ the trained LNODEs to perform GSA.
-
Top-right: we estimate model parameters with UQ on Ntest = 5 numerical simulations by means of the trained LNODEs.
Learning atrial and ventricular pressure-volume loops
Automatic hyperparameters tuning with K-fold cross validation leads to an optimal ANN architecture comprising 3 hidden layers and 13 neurons per hidden layer. The optimal number of states is set to Nz = 8, i.e., no latent variables are selected. This is motivated by the trade-off between the size of the training set Ntrain, valid with respect to the number of parameters \({N}_{{{{\mathcal{P}}}}}\), i.e., a thrifty system of LNODEs with no additional hidden variables zlatent(t) is selected to avoid overfitting. More details regarding LNODEs training and hyperparameters tuning are given in Supplementary Material 4.
In Table 1, we report the Normalized Root Mean Square Error (NRMSE) and R2 coefficients associated with the LA, LV, RA, and RV pressure-volume time traces provided by LNODEs. These values are obtained by considering a test set comprised of Ntest = 5 electromechanical simulations. The accuracy obtained by our surrogate model in reproducing the cardiac outputs is high, manifesting testing errors that approximately range from 2% to 6% for all time-dependent QoIs. The good match between models \({{{{\mathcal{M}}}}}_{3{{{\rm{D}}}}{{\mbox{-}}}0{{{\rm{D}}}}}\) and \({{{{\mathcal{M}}}}}_{{{{\rm{ANN}}}}}\) is also confirmed by Fig. 2, where atrial and ventricular pressure-volume traces present a good overlap on the whole testing set.
Global sensitivity analysis
Figure 3 shows the total-effect Sobol indices. We consider a parameter to be relevant if the associated Sobol indices are greater than 10−1 for at least one QoI. We notice that, as expected from a physiological point of view, some model parameters are compartmentalized, i.e., cell-to-organ level values coming from a certain compartment of the cardiocirculatory system mostly explain the variability of QoIs that are specific to that region. Indeed, some parameters of the CRN-Land model, such as atrial calcium/troponin complex when 50% of crossbridges are blocked \(per{m}_{{{{\rm{50}}}}}^{{{{\rm{CRN-Land}}}}}\), atrial Ca2+-troponin cooperativity \(TRP{N}_{{{{\rm{n}}}}}^{{{{\rm{CRN-Land}}}}}\) and atrial reference Ca2+ sensitivity \(c{a}_{{{{\rm{50}}}}}^{{{{\rm{CRN-Land}}}}}\), or of the Guccione model, such as atrial stiffness in the transverse plane \({b}_{{{{\rm{t}}}}}^{{{{\rm{atria}}}}}\), have an important role in determining atrial behavior. Similar considerations occur for the ventricular part of the heart, where the most important parameters are related to the ToRORd-Land model. Nevertheless, it is important to notice the interplay between some ventricular parameters of the ToRORd-Land model at the cellular scale, such as ventricular steady-state duty ratio drToRORd-Land, ventricular calcium/troponin complex when 50% of crossbridges are blocked \(per{m}_{{{{\rm{50}}}}}^{{{{\rm{ToRORd-Land}}}}}\) and ventricular reference Ca2+ sensitivity \(c{a}_{{{{\rm{50}}}}}^{{{{\rm{ToRORd-Land}}}}}\) and the atrial function. This is a particularly interesting insight into cardiac physiology that can be clearly unraveled using this type of comprehensive sensitivity analysis. We highlight that, as expected, some model parameters, such as atrioventricular delay AVdelay, systemic resistance Rsys and pulmonary resistance Rpulm strongly affect all QoIs, whereas others, such as the pericardial coefficient kperi, as well as aorta parameters (length Aol, stiffness kArt), have a minor role in determining all QoIs.
Finally, we remark that Sobol indices are affected by the amplitude of the ranges in which the parameters are varied. In particular, the wider the range associated with a parameter, the greater the associated Sobol indices will be, as the parameter in question potentially generates greater variability in the QoI. Therefore, we stress that our results are valid for the specific ranges we used.
Robust parameter estimation
In the context of parameter calibration, a preliminary GSA allows to determine the identifiability of model parameters according to the provided QoIs. Based on the results obtained from global sensitivity analysis, we design 4 in silico test cases to show the robustness and flexibility of our parameter calibration process, which is driven by a combined use of MAP estimation and HMC starting from time-dependent QoIs. In Table 2, we report the observed pressure-volume time traces and estimated model parameters for each test case. In \({{{{\mathcal{T}}}}}_{{{{\rm{LV}}}}}\) and \({{{{\mathcal{T}}}}}_{{{{\rm{ventricles}}}}}\), we estimate model parameters related to the ventricular and cardiovascular function starting from time-dependent QoIs localized in the ventricles. In \({{{{\mathcal{T}}}}}_{{{{\rm{atria}}}}}\), we calibrate model parameters over the whole cardiac function and cardiocirculatory network by only considering atrial observations. Finally, we challenge our surrogate model by taking all cardiac pressures and volumes over time and by estimating 11 model parameters.
We perform parameter estimation with UQ on Ntest = 5 electromechanical simulations that are unseen by the trained LNODEs. Figure 4 shows some two-dimensional views of the posterior distribution for each test case and for all Ntest numerical simulations. We notice that the true parameter values are contained inside the 95% credibility regions. Moreover, by using Bayesian statistics we are able to capture relationships among model parameters. In particular, in Fig. 4 we consider different pairs of model parameters for each test case and numerical simulation to maximize the number of interactions. For instance, pulmonary resistance scaling factor Rpulm and ventricular steady-state duty ratio drToRORd-Land are positively correlated with systemic resistance scaling factor Rsys and ventricular reference Ca2+ sensitivity \(c{a}_{{{{\rm{50}}}}}^{{{{\rm{ToRORd-Land}}}}}\), respectively, while ventricular steady-state duty ratio drToRORd-Land and ventricular reference Ca2+ sensitivity \(c{a}_{{{{\rm{50}}}}}^{{{{\rm{ToRORd-Land}}}}}\) are negatively correlated with fast endocardial layer scaling factor kFEC and ventricular calcium/troponin complex when 50% of crossbridges are blocked \(per{m}_{{{{\rm{50}}}}}^{{{{\rm{ToRORd-Land}}}}}\), respectively. We notice that, in some cases, cell-based atrial and ventricular parameters may be correlated, as it happens for atrial Ca2+-troponin cooperativity \(TRP{N}_{{{{\rm{n}}}}}^{{{{\rm{CRN-Land}}}}}\) and ventricular calcium/troponin complex when 50% of crossbridges are blocked \(per{m}_{{{{\rm{50}}}}}^{{{{\rm{ToRORd-Land}}}}}\), while in most situations, such as with ventricular steady-state duty ratio drToRORd-Land and atrial Ca2+-troponin cooperativity \(TRP{N}_{{{{\rm{n}}}}}^{{{{\rm{CRN-Land}}}}}\), there is no interaction. We also remark that this kind of relationships may be unraveled among different physical problems. For instance, this occurs between cardiovascular hemodynamics (systemic resistance scaling factor Rsys) and the ventricular cell tension model (ventricular steady-state duty ratio drToRORd-Land). The aforementioned interactions among model parameters can be quite interesting and surprising from a physiological perspective, especially when they involve very different cardiovascular compartments of this complex multiscale and multiphysics mathematical model. For the sake of completeness, in Table 3, we report the identified parameter values of ventricular steady-state duty ratio drToRORd-Land, systemic resistance scaling factor Rsys and pulmonary resistance scaling factor Rpulm for all test cases, with respect to the first testing simulation. We see that the true values of the parameters are always contained inside the interval defined by median plus/minus interquartile range. We refer to Supplementary Material 6 for the tables containing similar results and comparisons for all test cases (\({{{{\mathcal{T}}}}}_{{{{\rm{LV}}}}}\), \({{{{\mathcal{T}}}}}_{{{{\rm{ventricles}}}}}\), \({{{{\mathcal{T}}}}}_{{{{\rm{atria}}}}}\) and \({{{{\mathcal{T}}}}}_{{{{\rm{all}}}}}\)) with all the relevant model parameters over the Ntest electromechanical simulations.
Discussion
In this work, we propose a surrogate model based on LNODEs to learn the pressure-volume temporal dynamics of 3D-0D closed-loop four-chamber heart electromechanical simulations23. The geometry is retrieved from a heart failure patient and some functional aspects have been incorporated in the electromechanical simulations. Specifically, we get QRS duration from 12-lead electrocardiograms, ventricle reference tension for active contraction and heart rate, in order to achieve pressure-volume loops that are consistent with measured peak pressure and pressure transient duration25. In particular, starting from 400 numerical simulations, we create an anatomy-specific surrogate model by leveraging LNODEs. These are defined by a lightweight feedforward fully-connected ANN containing 3 hidden layers and 13 neurons per layer. LNODEs retain the variability of 43 model parameters that describe electrophysiology, active and passive mechanics, and hemodynamics, both at the cell level and organ scale, and covering a wide range of pressure and volume values (see Figures in Supplementary Material 2). Indeed, LNODEs allows to capture complex dynamics with a small number of tunable parameters. This paradigm, opposed to large machine learning models that work in the overparameterization regime, has proven to be very effective and robust, showing great generalization properties. Some other examples are given by Latent Dynamics Networks39 or Liquid Neural Networks40, which are built on top of LNODEs to account for complex space-time processes exhibiting abrupt changes by using very simple architectures and small latent spaces.
The generation of such a comprehensive training dataset poses an incredible technological challenge itself in the scientific community25, and in recent years different surrogate models of cardiac electromechanics based on emulators have been proposed in the literature to provide fast and accurate evaluations based on computationally expensive physics-based mathematical models19,25,41,42,43. These emulators are built on a collection of pre-computed numerical simulations obtained by sampling the parameter space, similarly to what has been done in this work. However, they only fit a static map between model parameters and pointwise QoIs extracted from the numerical simulations. On the other hand, LNODEs present a higher representational power, because they encode time dependent electromechanical simulations instead of pointwise QoIs, while also requiring a smaller amount of data to reach a prescribed accuracy23. This is why this paper provides a comprehensive surrogate model embracing cardiac and cardiovascular function.
The choice of 400 numerical simulations for the training of LNODEs allows to get consistently low validation and testing errors, in the order of 2% to 6%, even in areas of the parameter space that are sparsely covered by the training samples (see Figure in Supplementary Material 3). The error remains within these bounds even if we increase the dimension of the testing set while decreasing the one of the training set (see Supplementary Material 9). In addition, LNODEs provide better generalization properties compared to Gaussian processes emulators, especially for ventricular function (see Supplementary Material 8).
LNODEs require a small amount of computational resources and enable several applications of interest in a very fast and accurate manner. Indeed, as reported in Table 4, running the training phase of the ANN along with GSA and robust parameter estimation on a single core standard laptop just requires 13 h of computations. We remark that this time can be reduced with a multi-core implementation. On the other hand, employing the 3D-0D model \({{{{\mathcal{M}}}}}_{3{{{\rm{D}}}}{{\mbox{-}}}0{{{\rm{D}}}}}\) for the same computational pipeline would entail very significant costs. The overall speed-up with the surrogate model \({{{{\mathcal{M}}}}}_{{{{\rm{ANN}}}}}\) is equal to 1718x. Furthermore, after the parameter calibration process, a whole-heart electromechanical simulation can run via high-performance computing with the estimated model parameters, showing all relevant space-time fields, such as transmembrane potential, active contraction, displacement and stresses. This would provide relevant insights across the whole high-fidelity cardiac model.
It is interesting to note that several model parameters related to electrophysiology, mechanics, and hemodynamics at the cell-to-organ scale have a significant impact on the pressure-volume loops. These model parameters can be inferred from the pressure-volume relationships using Bayesian parameter estimation with UQ, i.e., their true values are contained within the 95% credibility regions of the posterior distribution. In addition, bayesian statistics provides important insights by capturing cross-correlations between model parameters. This occurs even between different cardiovascular compartments, such as the systemic circulation and ventricular electromechanics. Our approach could be applied in a clinical setting by using clinically measured rather than computational pressure-volume loops to infer protein and cell-to-organ function directly from clinical data.
Even though this paper focuses on a single anatomy, it represents an important milestone towards the construction of emulators incorporating geometric variability. Indeed, the presented approach can be extended to cover patient variability, by incorporating statistical shape modeling44,45 or other ANN-based methods, such as Universal Solution Manifold Networks46 or generative deep learning techniques based on Signed Distance Fields47,48, within LNODEs, to encode different geometrical parameterizations. Furthermore, multiple pathological conditions and diagnoses can be taken into account by providing specific one-hot vectors as additional inputs to the ANN47. In this manner, we would run the numerical simulations with the biophysically detailed and anatomically accurate mathematical model just once and we would train an ANN that generalizes on multiple patients, while effectively capturing multi-physics and multi-scale knowledge. Moreover, even though patient-specific pressure-volume loops have not been considered in this work, we aim at adding this information as part of our computational pipeline for parameter calibration with UQ. The proposed method paves the way to extensions incorporating different anatomies and pathological conditions, which would potentially allow for a universal whole-heart simulator that might be readily deployed in clinical practice for fast and reliable personalized parameter calibration based on patient-specific data.
Methods
Ethics statement
The clinical data used in this study were collected as part of a clinical trial (REC reference: 14/WM/1069) approved by the West Midlands-Coventry & Warwickshire Research Ethics Committee.
Learning atrial and ventricular pressure-volume loops
Following the model learning approach introduced in ref. 20, we build a system of LNODEs, i.e., a set of ordinary differential equations whose right hand side is represented by a feedforward fully-connected ANN, that learns the pressure-volume temporal dynamics of the 3D-0D closed-loop electromechanical model \({{{{\mathcal{M}}}}}_{3{{{\rm{D}}}}{{\mbox{-}}}0{{{\rm{D}}}}}\) in a latent space. All details regarding cardiac anatomy and the model \({{{{\mathcal{M}}}}}_{3{{{\rm{D}}}}{{\mbox{-}}}0{{{\rm{D}}}}}\), as well as the coupling to pressure-volume loops, are reported in Supplementary Material 1 and 2, respectively. In this framework, the four-chamber heart surrogate model \({{{{\mathcal{M}}}}}_{{{{\rm{ANN}}}}}\) reads:
where z0 is the vector of initial conditions. The ANN, with weights and biases encoded in \({{{\bf{w}}}}\in {{\mathbb{R}}}^{{N}_{w}}\), is defined by \({{{\mathcal{ANN}}}}:{{\mathbb{R}}}^{{N}_{z}+2+{N}_{{{{\mathcal{P}}}}}}\to {{\mathbb{R}}}^{{N}_{z}}\). Vector \({{{\boldsymbol{\theta }}}}\in {{{\boldsymbol{\Theta }}}}\subset {{\mathbb{R}}}^{{N}_{{{{\mathcal{P}}}}}}\) defines the model \({{{{\mathcal{M}}}}}_{3{{{\rm{D}}}}{{\mbox{-}}}0{{{\rm{D}}}}}\) parameters. Some examples of θ could be conductances of different ionic channels, myocardial conductivity, atrial and ventricular active tension or passive stiffness, and resistances of the systemic and pulmonary circulation. The reduced state vector \({{{\bf{z}}}}(t)\in {{\mathbb{R}}}^{{N}_{z}}\) contains the time-dependent pressure and volume variables of the left atrium (LA), right atrium (RA), left ventricle (LV) and right ventricle (RV), as well as additional latent variables without a direct physical interpretation, that is \({{{\bf{z}}}}(t)=[{{{{\bf{z}}}}}_{{{{\rm{physical}}}}}(t),{{{{\bf{z}}}}}_{{{{\rm{latent}}}}}(t)]={[{p}_{{{{\rm{LA}}}}}(t),{p}_{{{{\rm{LV}}}}}(t),{p}_{{{{\rm{RA}}}}}(t),{p}_{{{{\rm{RV}}}}}(t),{V}_{{{{\rm{LA}}}}}(t),{V}_{{{{\rm{LV}}}}}(t),{V}_{{{{\rm{RA}}}}}(t),{V}_{{{{\rm{RV}}}}}(t),{{{{\bf{z}}}}}_{{{{\rm{latent}}}}}(t)]}^{T}\). The ANN receives Nz state variables, \({N}_{{{{\mathcal{P}}}}}\) scalar parameters, and two periodic inputs. Indeed, even though LNODEs are just trained on the last cardiac cycle, the cosine and sine terms account for the heartbeat period THB and the atrioventricular delay AVdelay of whole-heart electromechanical simulations (see Supplementary Material 2 for further details). On the other hand, the vector of physics-based model parameters θ, which involves cardiac electromechanics and cardiovascular hemodynamics, is not related to the time variable, as is the case for THB and AVdelay, and is given directly as input neurons to the ANN. We stress that, differently from ref. 23, the initial reduced state vector z0 contains different sets of initial conditions for pressures, volumes and latent variables. Pressure and volume initial values are determined by model \({{{{\mathcal{M}}}}}_{3{{{\rm{D}}}}{{\mbox{-}}}0{{{\rm{D}}}}}\). Following49, latent variables are initialized to zero and these initial conditions act as additional tunable parameters along with the weights and biases of the ANN.
The loss function that we minimize during the ANN optimization process reads:
with α = β = γ = η = 0.1. The loss function aims at finding an optimal set of weights \(\widehat{{{{\bf{w}}}}}\) for the ANN. It comprises the normalized mean square error between ANN pressure-volume predictions zphysical(t) and observations \({\tilde{\bf{z}}}_{{{{\rm{physical}}}}}(t)\), as well as a weak penalization of the physical state vector time derivatives, maximum and minimum values for t ∈ [T − THB, T]. Indeed, given the small ratio between the dimensionality of the training dataset and the number of parameters θ of model \({{{{\mathcal{M}}}}}_{3{{{\rm{D}}}}{{\mbox{-}}}0{{{\rm{D}}}}}\), we notice that these three additional terms reduce the generalization errors of the ANN. The penultimate weakly enforced condition on zlatent(t) favors a periodic solution for all the hidden latent variables. The last term of the loss function prescribes the L2 regularization of the ANN weights and ι is one of the automatically tuned LNODEs hyperparameters (see Supplementary Material 4).
Global sensitivity analysis
We employ the Saltelli’s method to perform a variance-based sensitivity analysis50. We compute both first-order Sobol indices and total-effect Sobol indices for each combination of quantity of interest and model parameter36. These two indices define how much varying a single parameter affects a specific QoI and how higher-order interactions among model parameters influences the model outputs, respectively. All mathematical details regarding the computation of Sobol indices and Saltelli’s sampling are given in Supplementary Material 5, along with first-order Sobol indices computed using model \({{{{\mathcal{M}}}}}_{{{{\rm{ANN}}}}}\).
Robust parameter estimation
We perform parameter calibration with inverse UQ following a two-stage approach. First, given a set of time-dependent QoIs related to four-chamber heart pressure and volume traces, we solve a bounded and constrained optimization problem by employing model \({{{{\mathcal{M}}}}}_{{{{\rm{ANN}}}}}\) to obtain the pointwise MAP estimation for a predefined set of model parameters \({{{\boldsymbol{\theta }}}}\in {{{\boldsymbol{\Theta }}}}\subset {{\mathbb{R}}}^{{N}_{{{{\mathcal{P}}}}}}\). Second, we initialize HMC based on the MAP estimation and we build an approximation for the posterior distribution of θ37, while accounting for the measurement and surrogate modeling errors via Gaussian Processes24. We provide all the mathematical and numerical details regarding the optimal control problem we solve, MAP estimation, HMC, and how we account for the different sources of error during inverse UQ in Supplementary Material 6.
Software libraries
All 3D-0D closed-loop electromechanical simulations run with the Cardiac Arrhythmia Research Package (CARP)13,51. We train model \({{{{\mathcal{M}}}}}_{{{{\rm{ANN}}}}}\) by using an in-house high-performance Python library based on Tensorflow52. We perform GSA by means of the open source Python library SALib53. Parameter estimation with UQ is carried out by combining the open source Python libraries JAX54 and NumPyro55.
Reporting summary
Further information on research design is available in the Nature Research Reporting Summary linked to this article.
Data availability
The four-chamber heart pressure-volume loops used to train and test LNODEs are available at: https://github.com/MatteoSalvador/cardioEM-4CH.
Code availability
The code to train LNODEs, to perform GSA and to do Bayesian parameter estimation with uncertainty quantification is publicly available at: https://github.com/MatteoSalvador/cardioEM-4CH.
References
Niederer, S. A., Lumens, J. & Trayanova, N. A. Computational models in cardiology. Nat. Rev. Cardiol. 16, 100–111 (2019).
Landajuela, M. et al. Numerical approximation of the electromechanical coupling in the left ventricle with inclusion of the Purkinje network. Int. J. Numer. Methods Biomed. Eng. 34, e2984 (2018).
Salvador, M., Dede’, L. & Quarteroni, A. An intergrid transfer operator using radial basis functions with application to cardiac electromechanics. Comput. Mech. 66, 491–511 (2020).
Augustin, C. M. et al. A computationally efficient physiologically comprehensive 3D-0D closed-loop model of the heart and circulation. Comput. Methods Appl. Mech. Eng. 386, 114092 (2021).
Regazzoni, F. et al. A cardiac electromechanical model coupled with a lumped-parameter model for closed-loop blood circulation. J. Comput. Phys. 457, 111083 (2022).
Piersanti, R. et al. 3D-0D closed-loop model for the simulation of cardiac biventricular electromechanics. Comput. Methods Appl. Mech. Eng. 391, 114607 (2022).
Sainte-Marie, J. et al. Modeling and estimation of the cardiac electromechanical activity. Comput. Struct. 84, 1743–1759 (2006).
Asner, L. et al. Patient-specific modeling for left ventricular mechanics using data-driven boundary energies. Comput. Methods Appl. Mech. Eng. 314, 269–295 (2017).
Liu, H. et al. The impact of myocardial compressibility on organ-level simulations of the normal and infarcted heart. Sci. Rep. 11, 13466 (2021).
Mittal, R. et al. Computational modeling of cardiac hemodynamics: current status and future outlook. J. Comput. Phys. 305, 1065–1082 (2016).
Salvador, M. et al. Electromechanical modeling of human ventricles with ischemic cardiomyopathy: numerical simulations in sinus rhythm and under arrhythmia. Comput. Biol. Med. 136, 104674 (2021).
Schwarz, E. L., Pegolotti, L., Pfaller, M. R. & Marsden, A. L. Beyond CFD: emerging methodologies for predictive simulation in cardiovascular health and disease. Biophys. Rev. 4, 011301 (2023).
Augustin, C. M. et al. Anatomically accurate high resolution modeling of human whole heart electromechanics: A strongly scalable algebraic multigrid solver method for nonlinear deformation. J. Comput. Phys. 305, 622–646 (2016).
Fedele, M. et al. A comprehensive and biophysically detailed computational model of the whole human heart electromechanics. Comput. Methods Appl. Mech. Eng. 410, 115983 (2023).
Gerach, T. et al. Electro-mechanical whole-heart digital twins: a fully coupled multi-physics approach. Mathematics 9, 1247 (2021).
Pfaller, M. et al. The importance of the pericardium for cardiac biomechanics: from physiology to computational modeling. Biomech. Model. Mechanobiol. 18, 503–529 (2019).
Peirlinck, M. et al. Precision medicine in human heart modeling. Biomech. Model. Mechanobiol. 20, 803–831 (2021).
Strocchi, M. et al. A publicly available virtual cohort of four-chamber heart meshes for cardiac electro-mechanics simulations. PLoS One 15, 1–26 (2020).
Longobardi, S. et al. Predicting left ventricular contractile function via Gaussian process emulation in aortic-banded rats. Philos. Trans. R. Soc. A 378, 20190334 (2020).
Regazzoni, F., Dede’, L. & Quarteroni, A. Machine learning for fast and reliable solution of time-dependent differential equations. J. Comput. Phys. 397, 108852 (2019).
Salvador, M., Dede’, L. & Manzoni, A. Non intrusive reduced order modeling of parametrized pdes by kernel pod and neural networks. Comput. Math. Appl. 104, 1–13 (2021).
Quarteroni, A., Manzoni, A. & Negri, F. Reduced Basis Methods for Partial Differential Equations. An Introduction, Vol. 92 (Springer, 2016).
Regazzoni, F., Salvador, M., Dede’, L. & Quarteroni, A. A machine learning method for real-time numerical simulations of cardiac electromechanics. Comput. Methods Appl. Mech. Eng. 393, 114825 (2022).
Salvador, M., Regazzoni, F., Dede’, L. & Quarteroni, A. Fast and robust parameter estimation with uncertainty quantification for the cardiac function. Comput. Methods Progr. Biomed. 231, 107402 (2023).
Strocchi, M. et al. Cell to whole organ global sensitivity analysis on a four-chamber electromechanics model using Gaussian processes emulators. PLOS Comput. Biol. 19, e1011257 (2023).
Marchesseau, S. et al. Personalization of a cardiac electromechanical model using reduced order unscented Kalman filtering from regional volumes. Med. Image Anal. 17, 816–829 (2013).
Marx, L. et al. Personalization of electro-mechanical models of the pressure-overloaded left ventricle: fitting of windkessel-type afterload models. Philos. Trans. R. Soc. A 378, 20190342 (2020).
Sermesant, M. et al. Patient-specific electromechanical models of the heart for the prediction of pacing acute effects in CRT: a preliminary clinical validation. Med. Image Anal. 16, 201–215 (2012).
Strocchi, M. et al. Simulating ventricular systolic motion in a four-chamber heart model with spatially varying robin boundary conditions to model the effect of the pericardium. J. Biomech. 101, 109645 (2020).
Cicci, L., Fresca, S., Manzoni, A. & Quarteroni, A. Efficient approximation of cardiac mechanics through reduced order modeling with deep learning-based operator approximation. arXiv:2202.03904 (2022).
Jung, A., Gsell, M. A. F., Augustin, C. M. & Plank, G. An integrated workflow for building digital twins of cardiac electromechanics-a multi-fidelity approach for personalising active mechanics. Mathematics 10, 823 (2022).
Regazzoni, F. & Quarteroni, A. Accelerating the convergence to a limit cycle in 3D cardiac electromechanical simulations through a data-driven 0D emulator. Comput. Biol. Med. 135, 104641 (2021).
Schiavazzi, D. E. et al. Patient-specific parameter estimation in single-ventricle lumped circulation models under uncertainty. Int. J. Numer. Methods Biomed. Eng. 33, 3 (2017).
Chen, R. T. Q., Rubanova, Y., Bettencourt, J. & Duvenaud, D. Neural ordinary differential equations. arXiv:1806.07366 (2019).
Rubanova, Y., Chen, R. T. Q. & Duvenaud, D. K. Latent ordinary differential equations for irregularly-sampled time series. In Advances in Neural Information Processing Systems, vol. 32 (Curran Associates, Inc., 2019).
Sobol’, I. M. On sensitivity estimation for nonlinear mathematical models. Matematicheskoe Modelirovanie 2, 112–118 (1990).
Betancourt, M. & Girolami, M. A conceptual introduction to Hamiltonian Monte Carlo. arXiv:1701.02434 (2017).
Homan, M. D. & Gelman, A. The No-U-Turn sampler: adaptively setting path lengths in Hamiltonian Monte Carlo. J. Mach. Learn. Res. 15, 1593–1623 (2014).
Regazzoni, F., Pagani, S., Salvador, M., Dede’, L. & Quarteroni, A. Learning the intrinsic dynamics of spatio-temporal processes through latent dynamics networks. Nat. Commun. 15, 1834 (2024).
Hasani, R. M., Lechner, M., Amini, A., Rus, D. & Grosu, R. Liquid time-constant networks. In AAAI Conference on Artificial Intelligence (2020).
Di Achille, P. et al. Gaussian process regressions for inverse problems and parameter searches in models of ventricular mechanics. Front. Physiol. 9, 1002 (2018).
Dabiri, Y. et al. Prediction of left ventricular mechanics using machine learning. Front. Phys. 7, 117 (2019).
Cai, L. et al. Surrogate models based on machine learning methods for parameter estimation of left ventricular myocardium. R. Soc. Open Sci. 8, 201121 (2021).
Rodero, C. et al. Linking statistical shape models and simulated function in the healthy adult human heart. PLOS Comput. Biol. 17, 1–28 (2021).
Rodero, C. et al. Calibration of cohorts of virtual patient heart models using Bayesian history matching. Ann. Biomed. Eng. 51, 241–252 (2023).
Regazzoni, F., Pagani, S. & Quarteroni, A. Universal solution manifold networks (USM-Nets): non-intrusive mesh-free surrogate models for problems in variable domains. J. Biomech. Eng. 144, 121004 (2022).
Kong, F. et al. Sdf4chd: Generative modeling of cardiac anatomies with congenital heart defects. arXiv:2311.00332 (2023).
Verhülsdonk, J. et al. Sdf4chd: Generative modeling of cardiac anatomies with congenital heart defects. arXiv:2308.16568 (2023).
Regazzoni, F., Chapelle, D. & Moireau, P. Combining data assimilation and machine learning to build data-driven models for unknown long time dynamics–applications in cardiovascular modeling. Int. J. Numer. Methods Biomed. Eng. 37, e3471 (2021).
Saltelli, A. Making best use of model evaluations to compute sensitivity indices. Comput. Phys. Commun. 145, 280–297 (2002).
Vigmond, E. J., Hughes, M., Plank, G. & Leon, L. J. Computational tools for modeling electrical activity in cardiac tissue. J. Electrocardiol. 36, 69–74 (2003).
Abadi, M. et al. TensorFlow: Large-scale machine learning on heterogeneous distributed systems. arXiv:1603.04467 (2016).
Herman, J. & Usher, W. SALib: An open-source Python library for sensitivity analysis. J. Open Sour. Softw. 2, 97 (2017).
Bradbury, J. et al. JAX: composable transformations of Python+NumPy programs. http://github.com/google/jax (2018).
Phan, D., Pradhan, N. & Jankowiak, M. Composable effects for flexible and accelerated probabilistic programming in NumPyro. arXiv:1912.11554 (2019).
Acknowledgements
This project has been funded by the Italian Ministry of University and Research (MIUR) within the PRIN (Research projects of relevant national interest 2017 “Modeling the heart across the scales: from cardiac cells to the whole organ” Grant Registration number 2017AXL54F). This project has also been supported by the INdAM GNCS Project CUP E55F22000270001. SAN acknowledges NIH R01-HL152256, ERC PREDICT-HF 453 (864055), BHF (RG/20/4/34803), EPSRC (EP/P01268X/1, EP/X012603/1), EPSRC Grant EP/X03870X/1 and The Alan Turing Institute. LD acknowledges the support by the FAIR (Future Artificial Intelligence Research) project, funded by the NextGenerationEU program within the PNRR-PE-AI scheme (M4C2, investment 1.3, line on Artificial Intelligence), Italy, the membership to the GNCS-Gruppo Nazionale per il Calcolo Scientifico (National Group for Scientific Computing, Italy), and the initiative “Dipartimento di Eccellenza 2023–2027”, Italian Ministry of University and Research (MUR), Italy.
Author information
Authors and Affiliations
Contributions
Matteo Salvador: conceptualization, data curation, formal analysis, investigation, methodology, visualization, writing-original draft, writing-review & editing. Marina Strocchi: data curation, investigation, writing-original draft, writing-review & editing. Francesco Regazzoni: formal analysis, investigation, methodology, writing-original draft, writing-review & editing. Christoph M. Augustin: writing-original draft, writing-review & editing. L. Dede’: supervision, funding acquisition, writing-original draft, writing-review & editing. Steven A. Niederer: supervision, funding acquisition, writing-original draft, writing-review & editing. Alfio Quarteroni: supervision, funding acquisition, writing-original draft, writing-review & editing.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary information
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Salvador, M., Strocchi, M., Regazzoni, F. et al. Whole-heart electromechanical simulations using Latent Neural Ordinary Differential Equations. npj Digit. Med. 7, 90 (2024). https://doi.org/10.1038/s41746-024-01084-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41746-024-01084-x
This article is cited by
-
On the applications of neural ordinary differential equations in medical image analysis
Artificial Intelligence Review (2024)