SearcharxivSearch

arXiv subjects

Matteo Salvador

Publications and source records attributed to Matteo Salvador.

At least 19 recordsLinked to original sources

Read, Write, Relax: Why Neural PDE Surrogates Need Both Global and Local Processing

Recent mesh-based simulation advances have, in no small part, relied on neural surrogates of two distinct families: global models that route information through a small set of latent tokens, and local models that perform message passing across mesh edges. Consistent with both classes is the inability to perform beyond low-dimensional problems and small-scale or oversimplified meshes, the simulation regimes where industrial problems reside. Our work shows this explicitly and presents a unified formulation. In global approaches, latent-token attention acts as a spatial low-pass filter, while local message passing lacks the global reach necessary to propagate information across large mesh spaces. Viewed through the error, the two operators are the halves of a multigrid cycle: one corrects errors at the lower end of the spectrum, the other at the higher end, and neither can do the other's job. We introduce Read-Write-Relax (RWR), which interleaves latent attention with message-passing relaxation under a unified formulation. The interleaved processor lowers error across the entire spectrum, making RWR the most accurate model in nearly every comparison across our industrial and public benchmarks. It is also markedly data-efficient in the scarce-data regimes, accurate on the engineering quantities of interest, and scales full-field predictions to challenging, large-scale problems.

cs.LG

Courant: a State-Adaptive Perceiver-Based Neural Surrogate with Local Support and Interpretable Field Decomposition

We introduce "Courant", a Perceiver-based encoder-processor-decoder surrogate model that has latent features exhibiting adaptive specialization and local support in the physical space, enabling functionality akin to an adaptive hp-refinement scheme, an attribute that is highly desirable in traditional numerical solvers and scientific machine learning broadly. The proposed architecture combines a shared random Fourier feature coordinate embedding, state-adapted latent queries, and a light-weight decoder. Courant is trained end-to-end with steady or transient simulation data and only a standard L_2 prediction loss in the physical space, achieving competitive accuracy on benchmarks. We demonstrate that Courant's inductive biases yield latents that are interpretable by design: they develop multiscale geometric specialization in the simulation domain and track coherent structures in the time-dependent case, acting analogously to time-evolving spatial basis functions and allowing for decoding a compact, geometry-anchored, partition-of-unity-like decomposition of the simulated field.

cs.LG

Neural active manifolds: nonlinear dimensionality reduction for uncertainty quantification

We present a new approach for nonlinear dimensionality reduction, specifically designed for computationally expensive mathematical models. We leverage autoencoders to discover a one-dimensional neural active manifold (NeurAM) capturing the model output variability, through the aid of a simultaneously learnt surrogate model with inputs on this manifold. Our method only relies on model evaluations and does not require the knowledge of gradients. The proposed dimensionality reduction framework can then be applied to assist outer loop many-query tasks in scientific computing, like sensitivity analysis and multifidelity uncertainty propagation. In particular, we prove, both theoretically under idealized conditions, and numerically in challenging test cases, how NeurAM can be used to obtain multifidelity sampling estimators with reduced variance by sampling the models on the discovered low-dimensional and shared manifold among models. Several numerical examples illustrate the main features of the proposed dimensionality reduction strategy and highlight its advantages with respect to existing approaches in the literature.

math.NA

Full-field surrogate modeling of cardiac function encoding geometric variability

Combining physics-based modeling with data-driven methods is critical to enabling the translation of computational methods to clinical use in cardiology. The use of rigorous differential equations combined with machine learning tools allows for model personalization with uncertainty quantification in time frames compatible with clinical practice. However, accurate and efficient surrogate models of cardiac function, built from physics-based numerical simulation, are still mostly geometry-specific and require retraining for different patients and pathological conditions. We propose a novel computational pipeline to embed cardiac anatomies into full-field surrogate models. We generate a dataset of electrophysiology simulations using a complex multi-scale mathematical model coupling partial and ordinary differential equations. We adopt Branched Latent Neural Maps (BLNMs) as an effective scientific machine learning method to encode activation maps extracted from physics-based numerical simulations into a neural network. Leveraging large deformation diffeomorphic metric mappings, we build a biventricular anatomical atlas and parametrize the anatomical variability of a small and challenging cohort of 13 pediatric patients affected by Tetralogy of Fallot. We propose a novel statistical shape modeling based z-score sampling approach to generate a new synthetic cohort of 52 biventricular geometries that are compatible with the original geometrical variability. This synthetic cohort acts as the training set for BLNMs. Our surrogate model demonstrates robustness and great generalization across the complex original patient cohort, achieving an average adimensional mean squared error of 0.0034. The Python implementation of our BLNM model is publicly available under MIT License at https://github.com/StanfordCBCL/BLNM.

eess.IV

Liquid Fourier Latent Dynamics Networks for fast GPU-based numerical simulations in computational cardiology

Scientific Machine Learning (ML) is gaining momentum as a cost-effective alternative to physics-based numerical solvers in many engineering applications. In fact, scientific ML is currently being used to build accurate and efficient surrogate models starting from high-fidelity numerical simulations, effectively encoding the parameterized temporal dynamics underlying Ordinary Differential Equations (ODEs), or even the spatio-temporal behavior underlying Partial Differential Equations (PDEs), in appropriately designed neural networks. We propose an extension of Latent Dynamics Networks (LDNets), namely Liquid Fourier LDNets (LFLDNets), to create parameterized space-time surrogate models for multiscale and multiphysics sets of highly nonlinear differential equations on complex geometries. LFLDNets employ a neurologically-inspired, sparse, liquid neural network for temporal dynamics, relaxing the requirement of a numerical solver for time advancement and leading to superior performance in terms of tunable parameters, accuracy, efficiency and learned trajectories with respect to neural ODEs based on feedforward fully-connected neural networks. Furthermore, in our implementation of LFLDNets, we use a Fourier embedding with a tunable kernel in the reconstruction network to learn high-frequency functions better and faster than using space coordinates directly as input. We challenge LFLDNets in the framework of computational cardiology and evaluate their capabilities on two 3-dimensional test cases arising from multiscale cardiac electrophysiology and cardiovascular hemodynamics. This paper illustrates the capability to run Artificial Intelligence-based numerical simulations on single or multiple GPUs in a matter of minutes and represents a significant step forward in the development of physics-informed digital twins.

cs.LG

Improved multifidelity Monte Carlo estimators based on normalizing flows and dimensionality reduction techniques

We study the problem of multifidelity uncertainty propagation for computationally expensive models. In particular, we consider the general setting where the high-fidelity and low-fidelity models have a dissimilar parameterization both in terms of number of random inputs and their probability distributions, which can be either known in closed form or provided through samples. We derive novel multifidelity Monte Carlo estimators which rely on a shared subspace between the high-fidelity and low-fidelity models where the parameters follow the same probability distribution, i.e., a standard Gaussian. We build the shared space employing normalizing flows to map different probability distributions into a common one, together with linear and nonlinear dimensionality reduction techniques, active subspaces and autoencoders, respectively, which capture the subspaces where the models vary the most. We then compose the existing low-fidelity model with these transformations and construct modified models with an increased correlation with the high-fidelity model, which therefore yield multifidelity Monte Carlo estimators with reduced variance. A series of numerical experiments illustrate the properties and advantages of our approaches.

stat.ME

Two new calibration techniques of lumped-parameter mathematical models for the cardiovascular system

Cardiocirculatory mathematical models serve as valuable tools for investigating physiological and pathological conditions of the circulatory system. To investigate the clinical condition of an individual, cardiocirculatory models need to be personalized by means of calibration methods. In this study we propose a new calibration method for a lumped-parameter cardiocirculatory model. This calibration method utilizes the correlation matrix between parameters and model outputs to calibrate the latter according to data. We test this calibration method and its combination with L-BFGS-B (Limited memory Broyden - Fletcher - Goldfarb - Shanno with Bound constraints) comparing them with the performances of L-BFGS-B alone. We show that the correlation matrix calibration method and the combined one effectively reduce the loss function of the associated optimization problem. In the case of in silico generated data, we show that the two new calibration methods are robust with respect to the initial guess of parameters and to the presence of noise in the data. Notably, the correlation matrix calibration method achieves the best results in estimating the parameters in the case of noisy data and it is faster than the combined calibration method and L-BFGS-B. Finally, we present real test case where the two new calibration methods yield results comparable to those obtained using L-BFGS-B in terms of minimizing the loss function and estimating the clinical data. This highlights the effectiveness of the new calibration methods for clinical applications.

math.NA

An integrated heart-torso electromechanical model for the simulation of electrophysiogical outputs accounting for myocardial deformation

When generating in-silico clinical electrophysiological outputs, such as electrocardiograms (ECGs) and body surface potential maps (BSPMs), mathematical models have relied on single physics, i.e. of the cardiac electrophysiology (EP), neglecting the role of the heart motion. Since the heart is the most powerful source of electrical activity in the human body, its motion dynamically shifts the position of the principal electrical sources in the torso, influencing electrical potential distribution and potentially altering the EP outputs. In this work, we propose a computational model for the simulation of ECGs and BSPMs by coupling a cardiac electromechanical model with a model that simulates the propagation of the EP signal in the torso, thanks to a flexible numerical approach, that simulates the torso domain deformation induced by the myocardial displacement. Our model accounts for the major mechano-electrical feedbacks, along with unidirectional displacement and potential couplings from the heart to the surrounding body. For the numerical discretization, we employ a versatile intergrid transfer operator that allows for the use of different Finite Element spaces to be used in the cardiac and torso domains. Our numerical results are obtained on a realistic 3D biventricular-torso geometry, and cover both cases of sinus rhythm and ventricular tachycardia (VT), solving both the electromechanical-torso model in dynamical domains, and the classical electrophysiology-torso model in static domains. By comparing standard 12-lead ECG and BSPMs, we highlight the non-negligible effects of the myocardial contraction on the EP-outputs, especially in pathological conditions, such as the VT.

math.NA

A Modular Framework for Implicit 3D-0D Coupling in Cardiac Mechanics

In numerical simulations of cardiac mechanics, coupling the heart to a model of the circulatory system is essential for capturing physiological cardiac behavior. A popular and efficient technique is to use an electrical circuit analogy, known as a lumped parameter network or zero-dimensional (0D) fluid model, to represent blood flow throughout the cardiovascular system. Due to the strong physical interaction between the heart and the blood circulation, developing accurate and efficient numerical coupling methods remains an active area of research. In this work, we present a modular framework for implicitly coupling three-dimensional (3D) finite element simulations of cardiac mechanics to 0D models of blood circulation. The framework is modular in that the circulation model can be modified independently of the 3D finite element solver, and vice versa. The numerical scheme builds upon a previous work that combines 3D blood flow models with 0D circulation models (3D fluid - 0D fluid). Here, we extend it to couple 3D cardiac tissue mechanics models with 0D circulation models (3D structure - 0D fluid), showing that both mathematical problems can be solved within a unified coupling scheme. The effectiveness, temporal convergence, and computational cost of the algorithm are assessed through multiple examples relevant to the cardiovascular modeling community. Importantly, in an idealized left ventricle example, we show that the coupled model yields physiological pressure-volume loops and naturally recapitulates the isovolumic contraction and relaxation phases of the cardiac cycle without any additional numerical techniques. Furthermore, we provide a new derivation of the scheme inspired by the Approximate Newton Method of Chan (1985), explaining how the proposed numerical scheme combines the stability of monolithic approaches with the modularity and flexibility of partitioned approaches.

math.NA

Branched Latent Neural Maps

We introduce Branched Latent Neural Maps (BLNMs) to learn finite dimensional input-output maps encoding complex physical processes. A BLNM is defined by a simple and compact feedforward partially-connected neural network that structurally disentangles inputs with different intrinsic roles, such as the time variable from model parameters of a differential equation, while transferring them into a generic field of interest. BLNMs leverage latent outputs to enhance the learned dynamics and break the curse of dimensionality by showing excellent generalization properties with small training datasets and short training times on a single processor. Indeed, their generalization error remains comparable regardless of the adopted discretization during the testing phase. Moreover, the partial connections significantly reduce the number of tunable parameters. We show the capabilities of BLNMs in a challenging test case involving electrophysiology simulations in a biventricular cardiac model of a pediatric patient with hypoplastic left heart syndrome. The model includes a 1D Purkinje network for fast conduction and a 3D heart-torso geometry. Specifically, we trained BLNMs on 150 in silico generated 12-lead electrocardiograms (ECGs) while spanning 7 model parameters, covering cell-scale and organ-level. Although the 12-lead ECGs manifest very fast dynamics with sharp gradients, after automatic hyperparameter tuning the optimal BLNM, trained in less than 3 hours on a single CPU, retains just 7 hidden layers and 19 neurons per layer. The resulting mean square error is on the order of $10^{-4}$ on a test dataset comprised of 50 electrophysiology simulations. In the online phase, the BLNM allows for 5000x faster real-time simulations of cardiac electrophysiology on a single core standard computer and can be used to solve inverse problems via global optimization in a few seconds of computational time.

cs.LG

lifex-ep: a robust and efficient software for cardiac electrophysiology simulations

Simulating the cardiac function requires the numerical solution of multi-physics and multi-scale mathematical models. This underscores the need for streamlined, accurate, and high-performance computational tools. Despite the dedicated endeavors of various research teams, comprehensive and user-friendly software programs for cardiac simulations are still in the process of achieving full maturity within the scientific community. This work introduces lifex-ep, a publicly available software for numerical simulations of the electrophysiology activity of the cardiac muscle, under both physiological and pathological conditions. lifex-ep employs the monodomain equation to model the heart's electrical activity. It incorporates both phenomenological and second-generation ionic models. These models are discretized using the Finite Element method on tetrahedral or hexahedral meshes. Additionally, lifex-ep integrates the generation of myocardial fibers based on Laplace-Dirichlet Rule-Based Methods, previously released in Africa et al., 2023, within lifex-fiber. This paper provides a concise overview of the mathematical models and numerical methods underlying lifex-ep, along with comprehensive implementation details and instructions for users. lifex-ep features exceptional parallel speedup, scaling efficiently when using up to thousands of cores, and its implementation has been verified against an established benchmark problem for computational electrophysiology. We showcase the key features of lifex-ep through various idealized and realistic simulations. lifex-ep offers a user-friendly and flexible interface. lifex-ep provides easy access to cardiac electrophysiology simulations for a wide user community. It offers a computational tool that integrates models and accurate methods for simulating cardiac electrophysiology within a high-performance framework, while maintaining a user-friendly interface.

math.NA

Real-time whole-heart electromechanical simulations using Latent Neural Ordinary Differential Equations

Cardiac digital twins provide a physics and physiology informed framework to deliver predictive and personalized medicine. However, high-fidelity multi-scale cardiac models remain a barrier to adoption due to their extensive computational costs and the high number of model evaluations needed for patient-specific personalization. Artificial Intelligence-based methods can make the creation of fast and accurate whole-heart digital twins feasible. In this work, we use Latent Neural Ordinary Differential Equations (LNODEs) to learn the temporal pressure-volume dynamics of a heart failure patient. Our surrogate model based on LNODEs is trained from 400 3D-0D whole-heart closed-loop electromechanical simulations while accounting for 43 model parameters, describing single cell through to whole organ and cardiovascular hemodynamics. The trained LNODEs provides a compact and efficient representation of the 3D-0D model in a latent space by means of a feedforward fully-connected Artificial Neural Network that retains 3 hidden layers with 13 neurons per layer and allows for 300x real-time numerical simulations of the cardiac function on a single processor of a standard laptop. This surrogate model is employed to perform global sensitivity analysis and robust parameter estimation with uncertainty quantification in 3 hours of computations, still on a single processor. We match pressure and volume time traces unseen by the LNODEs during the training phase and we calibrate 4 to 11 model parameters while also providing their posterior distribution. This paper introduces the most advanced surrogate model of cardiac function available in the literature and opens new important venues for parameter calibration in cardiac digital twins.

math.NA

Latent Dynamics Networks (LDNets): learning the intrinsic dynamics of spatio-temporal processes

Predicting the evolution of systems that exhibit spatio-temporal dynamics in response to external stimuli is a key enabling technology fostering scientific innovation. Traditional equations-based approaches leverage first principles to yield predictions through the numerical approximation of high-dimensional systems of differential equations, thus calling for large-scale parallel computing platforms and requiring large computational costs. Data-driven approaches, instead, enable the description of systems evolution in low-dimensional latent spaces, by leveraging dimensionality reduction and deep learning algorithms. We propose a novel architecture, named Latent Dynamics Network (LDNet), which is able to discover low-dimensional intrinsic dynamics of possibly non-Markovian dynamical systems, thus predicting the time evolution of space-dependent fields in response to external inputs. Unlike popular approaches, in which the latent representation of the solution manifold is learned by means of auto-encoders that map a high-dimensional discretization of the system state into itself, LDNets automatically discover a low-dimensional manifold while learning the latent dynamics, without ever operating in the high-dimensional space. Furthermore, LDNets are meshless algorithms that do not reconstruct the output on a predetermined grid of points, but rather at any point of the domain, thus enabling weight-sharing across query-points. These features make LDNets lightweight and easy-to-train, with excellent accuracy and generalization properties, even in time-extrapolation regimes. We validate our method on several test cases and we show that, for a challenging highly-nonlinear problem, LDNets outperform state-of-the-art methods in terms of accuracy (normalized error 5 times smaller), by employing a dramatically smaller number of trainable parameters (more than 10 times fewer).

cs.LG

A matrix-free high-order solver for the numerical solution of cardiac electrophysiology

We propose a matrix-free solver for the numerical solution of the cardiac electrophysiology model consisting of the monodomain nonlinear reaction-diffusion equation coupled with a system of ordinary differential equations for the ionic species. Our numerical approximation is based on the high-order Spectral Element Method (SEM) to achieve accurate numerical discretization while employing a much smaller number of Degrees of Freedom than first-order Finite Elements. We combine vectorization with sum-factorization, thus allowing for a very efficient use of high-order polynomials in a high performance computing framework. We validate the effectiveness of our matrix-free solver in a variety of applications and perform different electrophysiological simulations ranging from a simple slab of cardiac tissue to a realistic four-chamber heart geometry. We compare SEM to SEM with Numerical Integration (SEM-NI), showing that they provide comparable results in terms of accuracy and efficiency. In both cases, increasing the local polynomial degree $p$ leads to better numerical results and smaller computational times than reducing the mesh size $h$. We also implement a matrix-free Geometric Multigrid preconditioner that results in a comparable number of linear solver iterations with respect to a state-of-the-art matrix-based Algebraic Multigrid preconditioner. As a matter of fact, the matrix-free solver proposed here yields up to 45$\times$ speed-up with respect to a conventional matrix-based solver.

math.NA

Fast and robust parameter estimation with uncertainty quantification for the cardiac function

Parameter estimation and uncertainty quantification are crucial in computational cardiology, as they enable the construction of digital twins that faithfully replicate the behavior of physical patients. Robust and efficient mathematical methods must be designed to fit many model parameters starting from a few, possibly non-invasive, noisy observations. Moreover, the effective clinical translation requires short execution times and a small amount of computational resources. In the framework of Bayesian statistics, we combine Maximum a Posteriori estimation and Hamiltonian Monte Carlo to find an approximation of model parameters and their posterior distributions. To reduce the computational effort, we employ an accurate Artificial Neural Network surrogate of 3D cardiac electromechanics model coupled with a 0D cardiocirculatory model. Fast simulations and minimal memory requirements are achieved by using matrix-free methods, automatic differentiation and automatic vectorization. Furthermore, we account for the surrogate modeling error and measurement error. We perform three different in silico test cases, ranging from the ventricular function to the entire cardiovascular system, involving whole-heart mechanics, arterial and venous circulation. The proposed method is robust when high levels of signal-to-noise ratio are present in the quantities of interest in combination with a random initialization of the model parameters in suitable intervals. As a matter of fact, by employing a single central processing unit on a standard laptop and a few hours of computations, we attain small relative errors for all model parameters and we estimate posterior distributions that contain the true values inside the 90% credibility regions. With these benefits, our approach meets the requirements for clinical exploitation, while being compliant with Green Computing practices.

math.NA

A comprehensive and biophysically detailed computational model of the whole human heart electromechanics

While ventricular electromechanics is extensively studied, four-chamber heart models have only been addressed recently; most of these works however neglect atrial contraction. Indeed, as atria are characterized by a complex physiology influenced by the ventricular function, developing computational models able to capture the physiological atrial function and atrioventricular interaction is very challenging. In this paper, we propose a biophysically detailed electromechanical model of the whole human heart that considers both atrial and ventricular contraction. Our model includes: i) an anatomically accurate whole-heart geometry; ii) a comprehensive myocardial fiber architecture; iii) a biophysically detailed microscale model for the active force generation; iv) a 0D closed-loop model of the circulatory system; v) the fundamental interactions among the different core models; vi) specific constitutive laws and model parameters for each cardiac region. Concerning the numerical discretization, we propose an efficient segregated-intergrid-staggered scheme and we employ recently developed stabilization techniques that are crucial to obtain a stable formulation in a four-chamber scenario. We are able to reproduce the healthy cardiac function for all the heart chambers, in terms of pressure-volume loops, time evolution of pressures, volumes and fluxes, and three-dimensional cardiac deformation, with unprecedented matching (to the best of our knowledge) with the expected physiology. We also show the importance of considering atrial contraction, fibers-stretch-rate feedback and suitable stabilization techniques, by comparing the results obtained with and without these features in the model. The proposed model represents the state-of-the-art electromechanical model of the iHEART ERC project and is a fundamental step toward the building of physics-based digital twins of the human heart.

math.NA

The role of mechano-electric feedbacks and hemodynamic coupling in scar-related ventricular tachycardia

Mechano-electric feedbacks (MEFs), which model how mechanical stimuli are transduced into electrical signals, have received sparse investigation by considering electromechanical simulations in simplified scenarios. In this paper, we study the effects of different MEFs modeling choices for myocardial deformation and nonselective stretch-activated channels (SACs) in the monodomain equation. We perform numerical simulations during ventricular tachycardia (VT) by employing a biophysically detailed and anatomically accurate 3D electromechanical model for the left ventricle (LV) coupled with a 0D closed-loop model of the cardiocirculatory system. We model the electromechanical substrate responsible for scar-related VT with a distribution of infarct and peri-infarct zones. Our mathematical framework takes into account the hemodynamic effects of VT due to myocardial impairment and allows for the classification of their hemodynamic nature, which can be either stable or unstable. By combining electrophysiological, mechanical and hemodynamic models, we observe that all MEFs may alter the propagation of the action potential and the morphology of the VT. In particular, we notice that the presence of myocardial deformation in the monodomain equation may change the VT basis cycle length and the conduction velocity but do not affect the hemodynamic nature of the VT. Finally, nonselective SACs may affect wavefront stability, by possibly turning a hemodynamically stable VT into a hemodynamically unstable one and vice versa.

math.NA

A machine learning method for real-time numerical simulations of cardiac electromechanics

We propose a machine learning-based method to build a system of differential equations that approximates the dynamics of 3D electromechanical models for the human heart, accounting for the dependence on a set of parameters. Specifically, our method permits to create a reduced-order model (ROM), written as a system of Ordinary Differential Equations (ODEs) wherein the forcing term, given by the right-hand side, consists of an Artificial Neural Network (ANN), that possibly depends on a set of parameters associated with the electromechanical model to be surrogated. This method is non-intrusive, as it only requires a collection of pressure and volume transients obtained from the full-order model (FOM) of cardiac electromechanics. Once trained, the ANN-based ROM can be coupled with hemodynamic models for the blood circulation external to the heart, in the same manner as the original electromechanical model, but at a dramatically lower computational cost. Indeed, our method allows for real-time numerical simulations of the cardiac function. We demonstrate the effectiveness of the proposed method on two relevant contexts in cardiac modeling. First, we employ the ANN-based ROM to perform a global sensitivity analysis on both the electromechanical and hemodynamic models. Second, we perform a Bayesian estimation of two parameters starting from noisy measurements of two scalar outputs. In both these cases, replacing the FOM of cardiac electromechanics with the ANN-based ROM makes it possible to perform in a few hours of computational time all the numerical simulations that would be otherwise unaffordable, because of their overwhelming computational cost, if carried out with the FOM. As a matter of fact, our ANN-based ROM is able to speedup the numerical simulations by more than three orders of magnitude.

math.NA