The heart's contractions are triggered by action potential waves, which propagate through the cardiac muscle and exhibit diverse spatio-temporal dynamics during different heart rhythms. The dynamics are modeled with partial differential equations (PDEs) in cardiac electrophysiology simulations. However, fitting such models to measurement data to develop digital twins or patient-specific computer models is challenging. Here, we introduce differentiable cardiac electrophysiology simulations that can be fitted automatically to spatio-temporal measurement data of action potential waves in cardiac tissue. By comparing the simulated dynamics with the observation data, we define a loss function that is minimized via gradient-based optimization. Backpropagating the loss gradient through the differentiable PDE solver enables us to learn the parameters and recover the full dynamics, even with sparse, noisy, or partial observations. Implemented using both the finite-difference and smoothed particle hydrodynamics methods, our simulation framework can be applied to pixel-, voxel-, or point-based data, such as 2D or 3D slabs, or arbitrary shapes, such as the heart's ventricles. Using this method
Building personalized cardiac electrophysiology (EP) digital twins requires identifying the appropriate model structure for each patient, not merely fitting parameters. Traditional methods rely on experts to manually prescribe hybrid physics-neural architectures, which requires deep domain expertise and does not transfer across patients. Recent works have applied large language models (LLMs) to generate or act as hybrid models. However, despite their promising generalization capacity, these LLM-based methods lack the structural priors needed for stable cardiac simulations. Hence, we propose LEADS, a framework that formulates cardiac EP domain knowledge as a structured action space and utilizes an LLM agent to discover hybrid models. The agent follows an iterative reasoning-and-action loop to select, combine, and refine hybrid models, whilst gradient descent handles parameter fitting. The proposed LEADS designs every candidate model towards physically grounded, interpretable, and numerically stable, while allowing open-ended architectural discovery. We validate LEADS on synthetic data with three ground-truth reaction models and on real cardiac EP data, demonstrating that it outperfo
Solving inverse problems in cardiac electrophysiology consists in the recovery of physiological parameters from surface electrocardiogram (ECG) measurements, a task which is often computationally unfeasible due to the severe ill-posedness and the prohibitive computational complexity of PDE-constrained optimization. In this work, we introduce a data-driven framework leveraging Latent Dynamics Networks (LDNets) to construct efficient surrogate models of the forward operator. By mapping low-dimensional parameters, representing ectopic activation sites or ischemic region descriptors, to the ECG signals via latent dynamics governed by neural ordinary differential equations, our approach circumvents the computational burden of evaluating high-fidelity cardiac models during iterative parameter estimation. The surrogate is trained offline on high-fidelity data, enabling rapid and robust inversion. We validate the proposed framework through rigorous numerical experiments with synthetic data across both 2d and 3d geometries. Results show that the LDNet-based surrogate achieves precise reconstruction of cardiac parameters while drastically reducing computational overhead, thereby enabling nea
This work presents a novel agglomeration-based multilevel preconditioner designed to accelerate the convergence of iterative solvers for linear systems arising from the discontinuous Galerkin discretization of the monodomain model in cardiac electrophysiology. The proposed approach exploits general polytopic grids at coarser levels, obtained through the agglomeration of elements from an initial, potentially fine, mesh. By leveraging a robust and efficient agglomeration strategy, we construct a nested hierarchy of grids suitable for multilevel solver frameworks. The effectiveness and performance of the methodology are assessed through a series of numerical experiments on two- and three-dimensional domains, involving different ionic models and realistic unstructured geometries. The results demonstrate strong solver effectiveness and favorable scalability with respect to both the polynomial degree of the discretization and the number of levels selected in the multigrid preconditioner.
Cardiac electrophysiology (CEP) simulations are increasingly used for understanding cardiac arrhythmias and guiding clinical decisions. However, these simulations typically require high-performance computing resources with numerous CPU cores, which are often inaccessible to many research groups and clinicians. To address this, we present TorchCor, a high-performance Python library for CEP simulations using the finite element method on general-purpose GPUs. Built on PyTorch, TorchCor significantly accelerates CEP simulations, particularly for large 3D meshes. The accuracy of the solver is verified against manufactured analytical solutions and the $N$-version benchmark problem. TorchCor is freely available for both academic and commercial use without restrictions.
Physics-Informed Neural Networks (PINNs) are fast becoming an important tool to solve differential equations rapidly and accurately, and to identify the systems parameters that best agree with a given set of measurements. PINNs have been used for cardiac electrophysiology (EP), but only in simple 1D and 2D geometries and for sinus rhythm or single rotor dynamics. Here, we demonstrate how PINNs can be used to accurately reconstruct the propagation of cardiac action potential in more complex geometries and dynamical regimes. These include 3D spherical geometries and spiral break-up conditions that model cardiac fibrillation, with a mean RMSE $< 5.1\times 10^{-2}$ overall. We also demonstrate that PINNs can be used to reliably parameterise cardiac EP models with some biological detail. We estimate the diffusion coefficient and parameters related to ion channel conductances in the Fenton-Karma model in a 2D setup, achieving a mean relative error of $-0.09\pm 0.33$. Our results are an important step towards the deployment of PINNs to realistic cardiac geometries and arrhythmic conditions.
Simulations of Cardiac Electrophysiology are gaining momentum beyond basic mechanistic studies, as an approach for supporting clinical decision making. The potential for in silico technologies observed from the research community is immense, with studies demonstrating significantly improved therapeutical outcome with little to no additional burden for patients. Two main factors hinder the translation of these technologies from pure research to applications: virtually no reproducibility of results, and lack of standardized procedures. Inspired by a previously published virtual induction study by Arevalo et al. (2016), We address the issues of reproducibility and standardization providing autoVARP, a framework for standardization of virtual arrhythmia inducibility studies, built upon openCARP and the carputils framework. Standardization relies on the previously published forCEPSS framework and is ensured by defining the whole induction study with input files that can be easily shared. Our approach also ensures numerical efficiency by separating the induction study into four stages: (i) pre-pacing with forCEPSS, (ii) S1 pacing tor each steady state, (iii) S2 induction with different e
The eikonal equation has become an indispensable tool for modeling cardiac electrical activation accurately and efficiently. In principle, by matching clinically recorded and eikonal-based electrocardiograms (ECGs), it is possible to build patient-specific models of cardiac electrophysiology in a purely non-invasive manner. Nonetheless, the fitting procedure remains a challenging task. The present study introduces a novel method, Geodesic-BP, to solve the inverse eikonal problem. Geodesic-BP is well-suited for GPU-accelerated machine learning frameworks, allowing us to optimize the parameters of the eikonal equation to reproduce a given ECG. We show that Geodesic-BP can reconstruct a simulated cardiac activation with high accuracy in a synthetic test case, even in the presence of modeling inaccuracies. Furthermore, we apply our algorithm to a publicly available dataset of a biventricular rabbit model, with promising results. Given the future shift towards personalized medicine, Geodesic-BP has the potential to help in future functionalizations of cardiac models meeting clinical time constraints while maintaining the physiological accuracy of state-of-the-art cardiac models.
Physics-informed neural networks (PINNs) are extensively used to represent various physical systems across multiple scientific domains. The same can be said for cardiac electrophysiology, wherein fully-connected neural networks (FCNNs) have been employed to predict the evolution of an action potential in a 2D space following the two-parameter phenomenological Aliev-Panfilov (AP) model. In this paper, the training behaviour of PINNs is investigated to determine optimal hyperparameters to predict the electrophysiological activity of the myocardium in 3D according to the AP model, with the inclusion of boundary and material parameters. An FCNN architecture is employed with the governing partial differential equations in their strong form, which are scaled consistently with normalization of network inputs. The finite element (FE) method is used to generate training data for the network. Numerical examples with varying spatial dimensions and parameterizations are generated using the trained models. The network predicted fields for both the action potential and the recovery variable are compared with the respective FE simulations. Network losses are weighed with individual scalar values.
Accurately simulating systems governed by PDEs, such as voltage fields in cardiac electrophysiology (EP) modelling, remains a significant modelling challenge. Traditional numerical solvers are computationally expensive and sensitive to discretisation, while canonical deep learning methods are data-hungry and struggle with chaotic dynamics and long-term predictions. Physics-Informed Neural Networks (PINNs) mitigate some of these issues by incorporating physical constraints in the learning process, yet they remain limited by mesh resolution and long-term predictive stability. In this work, we propose a Physics-Informed Neural Operator (PINO) approach to solve PDE problems in cardiac EP. Unlike PINNs, PINO models learn mappings between function spaces, allowing them to generalise to multiple mesh resolutions and initial conditions. Our results show that PINO models can accurately reproduce cardiac EP dynamics over extended time horizons and across multiple propagation scenarios, including zero-shot evaluations on scenarios unseen during training. Additionally, our PINO models maintain high predictive quality in long roll-outs (where predictions are recursively fed back as inputs), and
Background: Computer models for simulating cardiac electrophysiology are valuable tools for research and clinical applications. Traditional reaction-diffusion (RD) models used for these purposes are computationally expensive. While eikonal models offer a faster alternative, they are not well-suited to study cardiac arrhythmias driven by reentrant activity. The present work extends the diffusion-reaction eikonal alternant model (DREAM), incorporating conduction velocity (CV) restitution for simulating complex cardiac arrhythmias. Methods: The DREAM modifies the fast iterative method to model cyclical behavior, dynamic boundary conditions, and frequency-dependent anisotropic CV. Additionally, the model alternates with an approximated RD model, using a detailed ionic model for the reaction term and a triple-Gaussian to approximate the diffusion term. The DREAM and monodomain models were compared, simulating reentries in 2D manifolds with different resolutions. Results: The DREAM produced similar results across all resolutions, while experiments with the monodomain model failed at lower resolutions. CV restitution curves obtained using the DREAM closely approximated those produced by t
Learning neural operators on heterogeneous and irregular geometries remains a fundamental challenge, as existing approaches typically rely on structured discretisations or explicit mappings to a shared reference domain. We propose a unified framework for geometry-independent operator learning that reformulates the learning problem in an intrinsic coordinate space defined on the underlying manifold. By expressing both inputs and outputs in this shared coordinate domain, the framework decouples operator learning from mesh discretisation and geometric variability, while preserving meaningful spatial organisation and enabling faithful reconstruction on the original geometry. We demonstrate the framework on cardiac electrophysiology, a particularly challenging setting due to extreme anatomical variability across heart geometries. Leveraging a GPU-accelerated simulation pipeline, we generate large-scale datasets of high-fidelity electrophysiology simulations across diverse patient-specific anatomies and train customised neural operators to predict full-field local activation time maps. The proposed approach outperforms established neural operators on both atrial and ventricular geometrie
Fully explicit stabilized multirate (mRKC) methods are well-suited for the numerical solution of large multiscale systems of stiff ordinary differential equations thanks to their improved stability properties. To demonstrate their efficiency for the numerical solution of stiff, multiscale, nonlinear parabolic PDE's, we apply mRKC methods to the monodomain equation from cardiac electrophysiology. In doing so, we propose an improved version, specifically tailored to the monodomain model, which leads to the explicit exponential multirate stabilized (emRKC) method. Several numerical experiments are conducted to evaluate the efficiency of both mRKC and emRKC, while taking into account different finite element meshes (structured and unstructured) and realistic ionic models. The new emRKC method typically outperforms a standard implicit-explicit baseline method for cardiac electrophysiology. Code profiling and strong scalability results further demonstrate that emRKC is faster and inherently parallel without sacrificing accuracy.
Objective: The most relevant source of signal contamination in the cardiac electrophysiology (EP) laboratory is the ubiquitous powerline interference (PLI). To reduce this perturbation, algorithms including common fixed bandwidth and adaptive notch filters have been proposed. Although such methods have proven to add artificial fractionation to intra atrial electrograms (EGMs), they are still frequently used. However, such morphological alteration can conceal the accurate interpretation of EGMs, specially to evaluate the mechanisms supporting atrial fibrillation (AF), which is the most common cardiac arrhythmia. Given the clinical relevance of AF, a novel algorithm aimed at reducing PLI on highly contaminated bipolar EGMs and, simultaneously, preserving their morphology is proposed. Approach: The method is based on the wavelet shrinkage and has been validated through customized indices on a set of synthesized EGMs to accurately quantify the achieved level of PLI reduction and signal morphology alteration. Visual validation of the algorithms performance has also been included for some real EGM excerpts. Main results: The method has outperformed common filtering-based and wavelet base
In this paper, we consider the monodomain model of cardiac electrophysiology. After an analysis of the well-posedness of the forward problem, we show that perfectly insulating regions (modeling ischemic regions in the cardiac tissue) can be uniquely determined by partial boundary measurements of the potential.
A digital twin (DT) of a patient-specific heart offers significant potential in personalized medicine. However, its rapid and dynamic adaptation to an individual's live data and its predictive capability after adaptation remains central challenges. We examine this challenge from its two building blocks: DT formulation where mechanistic and data-driven models show competing merits and limitations, and DT optimization strategies that are largely driven by a reconstruction objective leading to un-identifiable models. We address both bottlenecks via HAPI -- an AI framework for building hybrid, adaptive, and predictive DTs with three key enablers. First, HAPI constructs a physics-integrated gray-box model in which an interpretable mechanistic backbone is augmented by a neural component that models its residual to the observed data. Second, rather than attempting to pre-encode all possible variations in a static hybrid model, HAPI enables rapid on-the-fly adaptation of the hybrid model to few-shot live data, achieved by feedforward meta-learners realizing amortized inference of both mechanistic and neural parameters of the hybrid model trained with predictive objectives. Finally, we show
Cardiac arrhythmias, particularly atrial fibrillation, represent a major cardiovascular health burden and underscore the need for efficient and integrated strategies for electrical mapping and targeted therapy. Cardiac electrophysiology procedures depend on accurate identification of arrhythmogenic substrates followed by timely catheter ablation, but conventional diagnostic and therapeutic devices remain separate, often requiring repeated catheter exchanges and multiple access routes. Here, we report an adaptable strategy for functionalizing hollow-core sheaths with EP mapping capabilities, integrating multielectrode recording and ablation catheter delivery within a single compact platform. The device leverages thermal drawing to enable complex geometric fabrication, miniaturization, rapid prototyping, and scalable manufacturing of ultrathin electrode splines arranged circumferentially at the distal end to form an adjustable basket. The mapping sheath exhibited mechanical and electrophysiological properties suitable for intracardiac navigation and electrogram recording in bench-top evaluations, an in vitro left atrial phantom study, and ex vivo Langendorff-perfused porcine heart te
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 i
Mathematical models of the human heart are increasingly playing a vital role in understanding the working mechanisms of the heart, both under healthy functioning and during disease. The aim is to aid medical practitioners diagnose and treat the many ailments affecting the heart. Towards this, modelling cardiac electrophysiology is crucial as the heart's electrical activity underlies the contraction mechanism and the resulting pumping action. The governing equations and the constitutive laws describing the electrical activity in the heart are coupled, nonlinear, and involve a fast moving wave front, which is generally solved by the finite element method. The simulation of this complex system as part of a virtual heart model is challenging due to the necessity of fine spatial and temporal resolution of the domain. Therefore, efficient surrogate models are needed to predict the dynamics under varying parameters and inputs. In this work, we develop an adaptive, projection-based surrogate model for cardiac electrophysiology. We introduce an a posteriori error estimator that can accurately and efficiently quantify the accuracy of the surrogate model. Using the error estimator, we systema
The locality of solution features in cardiac electrophysiology simulations calls for adaptive methods. Due to the overhead incurred by established mesh refinement and coarsening, however, such approaches failed in accelerating the computations. Here we investigate a different route to spatial adaptivity that is based on nested subset selection for algebraic degrees of freedom in spectral deferred correction methods. This combination of algebraic adaptivity and iterative solvers for higher order collocation time stepping realizes a multirate integration with minimal overhead. This leads to moderate but significant speedups in both monodomain and cell-by-cell models of cardiac excitation, as demonstrated at four numerical examples.