← Latest papers
🧬 biology

JAX-EP: A Fully Differentiable Monodomain Solver for Cardiac Electrophysiology

This paper introduces JAX-EP, the first fully differentiable, GPU-accelerated monodomain solver for cardiac electrophysiology that leverages JAX's automatic differentiation to enable rapid, gradient-based parameter inference and digital twin personalization directly from clinical recordings.

Original authors: Ovais Ahmed Jaffery, Mahmoud Ehnesh, H Valli, Gregory Slabaugh, Edward J. Vigmond, Shouvik Haldar, Caroline H. Roney

Published 2026-08-25
📖 6 min read🧠 Deep dive

Original authors: Ovais Ahmed Jaffery, Mahmoud Ehnesh, H Valli, Gregory Slabaugh, Edward J. Vigmond, Shouvik Haldar, Caroline H. Roney

Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). ⚕️ This is an AI-generated explanation of a preprint that has not been peer-reviewed. It is not medical advice. Do not make health decisions based on this content. Read full disclaimer

The human heart is a pump, but it is also an electrical machine. For every beat, a wave of electricity must travel across the muscle, telling the cells when to squeeze. When this electrical signal gets tangled or blocked, the heart can fall into dangerous rhythms like atrial fibrillation, a condition that affects millions and often requires delicate procedures to fix. To understand these problems, doctors and scientists build digital twins: computer models that mimic a specific patient's heart using their own anatomy and tissue properties. These models are powerful, but they have a major flaw. While we can easily see the heart's shape from a scan, we cannot easily see the electrical properties of the tissue inside. To make a model useful, we must guess these hidden settings, but guessing is slow, imprecise, and often fails to capture the true complexity of a patient's heart.

A team of researchers has now built a new kind of tool that changes how these digital hearts are calibrated. They created a solver, a piece of software that simulates electrical waves, which is fully differentiable. In plain language, this means the software can not only predict what a heart will do, but it can also instantly calculate exactly how changing a single setting would alter that prediction. This ability allows the computer to learn the correct settings by comparing its own simulation to real-world recordings, adjusting its guesses automatically and with extreme speed. The result is a system that can recover the hidden electrical properties of heart tissue from clinical data with a level of accuracy and speed that was previously impossible, turning a slow, manual tuning process into a rapid, automated one.

The researchers, working across institutions in the United Kingdom and France, developed a program called JAX-EP. They applied it to a digital model of a human left atrium, the upper chamber of the heart, reconstructed from a patient's MRI scan. This model contained over 132,000 points, creating a detailed map of the heart's surface. The goal was to test if the software could figure out five specific biological settings that control how electricity moves and how long the heart cells stay excited. These settings include how fast the cells recharge and how easily electricity flows along the muscle fibers. In the past, finding these values required running thousands of separate simulations, a process that could take days or weeks on a standard computer and often relied on rough approximations.

JAX-EP solved this problem by running the entire simulation as a single, continuous chain of calculations that the computer could analyze from start to finish. Instead of guessing and checking, the software used a mathematical technique to trace the path of the electrical wave backward through time, identifying exactly which settings produced the observed result. The team tested this on a patient-specific model where they knew the correct answers beforehand. They simulated electrical recordings from a high-definition grid catheter, a device used in hospitals to map heart rhythms. The software then tried to recover the original settings from these simulated recordings. It succeeded with remarkable precision, recovering the five hidden parameters with an average error of less than one-tenth of one percent. This means the digital twin's internal settings were almost identical to the ground truth, a level of accuracy that suggests the method could work with real patient data.

Speed was another critical breakthrough. The researchers found that running the simulation on a standard graphics processing unit, the type of chip found in many gaming computers, was nearly forty times faster than running it on a single central processor. More importantly, the ability to calculate gradients, or the direction in which to adjust the settings, was achieved in a fraction of the time required by traditional methods. While a standard approach might need to run the simulation ten times to estimate how one setting affects the outcome, JAX-EP did it in five passes with perfect mathematical precision. This efficiency allowed the team to run thousands of simulations simultaneously on a single machine, a task that would have required a massive supercomputer using older technology. This speed makes it feasible to perform complex calibrations in minutes rather than days, bringing the idea of a personalized digital twin closer to a reality that doctors could use during a procedure.

The team also tested how well the system held up when the data was noisy, mimicking the imperfect signals often found in real clinical environments. They added random static and interference to the simulated recordings to see if the software would still find the correct settings. Even when the signal was distorted by significant noise, the system recovered the key parameters with high accuracy, though the precision dropped slightly as the noise increased. This robustness is essential, as real-world heart recordings are rarely perfect. The researchers confirmed that the software could distinguish between the timing of the electrical wave and the speed of its travel, two factors that are often difficult to separate. They verified their results by comparing the software's output against a well-established cardiac simulator, finding that the electrical waves and timing matched almost perfectly, with differences so small they were likely due to minor numerical variations rather than fundamental errors.

The study did not claim to have solved all problems in cardiac modeling. The researchers noted that their tests were performed on simulated data, and the next step is to validate the system against recordings from actual patients. They also acknowledged that the electrical model they used, while effective for capturing the basic shape of the heart's electrical pulse, is a simplified version of the complex biology found in human tissue. More detailed models exist, but they require more computing power and introduce new challenges for the software to handle. Furthermore, the current version of the tool works on the surface of the heart, whereas a more complete picture might require modeling the electrical activity throughout the entire volume of the organ. Despite these limitations, the work demonstrates that the barrier of computational cost and mathematical complexity can be overcome.

By making the simulation fully differentiable, the researchers have opened a new path for personalizing heart models. The ability to automatically tune a digital twin to match a patient's specific electrical behavior means that doctors could one day use these models to plan treatments with greater confidence. Instead of relying on average values for all patients, a model could be calibrated to the unique electrical signature of an individual, potentially leading to more effective ablation strategies and better outcomes for those with arrhythmias. The work establishes a foundation where the complex physics of the heart can be integrated directly into the learning process of a computer, moving the field from static, manually adjusted models to dynamic, self-correcting digital twins.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →