Reconstructing synthetic hearts from ECG using flow matching
This paper introduces visionECG, a conditional flow matching framework that leverages large-scale UK Biobank data to reconstruct accurate, patient-specific 3D left ventricular geometries and motion directly from widely accessible ECG signals and demographic information, thereby enabling scalable quantitative cardiac assessment without the need for traditional imaging.
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 a complex machine whose health is written in two very different languages. One language is electrical: the rhythmic spark of electricity that travels through the heart muscle to make it squeeze. This signal is captured by an electrocardiogram, or ECG, a test that is quick, cheap, and available in almost every clinic on Earth. For over a century, doctors have read these squiggly lines to spot electrical glitches, but the test has long been seen as a limited window, revealing only the timing of the heartbeat rather than the shape or strength of the organ itself. The other language is structural: the physical form of the heart, its chambers, walls, and valves, which change shape as the heart beats. To see this, doctors traditionally rely on advanced imaging like magnetic resonance scans, which provide a detailed, three-dimensional movie of the heart's motion. However, these machines are expensive, require specialized technicians, and are not available everywhere, leaving a vast gap between the electrical signal everyone can get and the structural truth that only a few can see.
For years, researchers have tried to bridge this gap using artificial intelligence, teaching computers to guess heart problems from ECG lines. But these attempts usually stopped at simple answers, like a "yes" or "no" for a specific disease, or a single number for heart function. They did not rebuild the heart itself. A new study from researchers at Imperial College London and other institutions changes this approach. Instead of just predicting a disease label, they have built a system that takes a standard ECG and basic information about a person, such as their age and height, and reconstructs a full, moving 3D model of the heart's left ventricle. This system, called visionECG, does not just guess that a heart is weak; it generates a digital movie of that specific heart beating, showing exactly how the walls move and how the chambers change size.
The researchers trained this system using a massive collection of data from the UK Biobank, a large health study containing records from over 71,000 people. For each person in this group, the team had both a standard 12-lead ECG and a high-resolution, time-resolved 3D model of their heart derived from magnetic resonance imaging. The computer learned to find the hidden patterns connecting the electrical signal to the physical shape. It discovered that the specific way the electricity travels through the heart encodes detailed information about the heart's geometry and motion. By using a technique called flow matching, which helps the computer learn the probability of how one shape turns into another, the system learned to translate the flat electrical line into a complex, three-dimensional structure.
When tested on thousands of new patients, the system proved remarkably accurate. It generated a sequence of 50 frames that showed the heart beating from the moment it fills with blood to the moment it squeezes it out. The digital models it created matched the real magnetic resonance images with a high degree of precision. The average error in the volume of the heart chamber was less than 10 percent, and the error in the thickness of the heart wall was similarly small. In direct comparisons, this new system outperformed other existing methods that tried to link ECGs to heart images. Crucially, the researchers showed that the system was not just guessing based on general statistics like age or sex. When they replaced a patient's unique ECG with a generic, average heartbeat, the system's ability to predict the specific shape of that patient's heart dropped significantly, especially for those with heart disease. This confirmed that the unique details of the electrical signal were essential for reconstructing the specific physical reality of the heart.
The power of this approach lies in what the researchers can do with the generated models. Because the output is a complete, moving 3D structure, they can measure almost anything they could measure from a real scan. They calculated standard medical metrics like the amount of blood the heart pumps, the thickness of the muscle walls, and the efficiency of the squeeze. They found that these virtual measurements matched the real ones closely enough to be useful. More importantly, the system could distinguish between different types of heart disease. For example, it could tell the difference between a heart that has become thick due to high blood pressure and a heart that is thick due to a genetic condition called hypertrophic cardiomyopathy, even though both conditions involve increased muscle mass. The system also identified signs of heart failure and heart attacks with high accuracy, performing better than models that only looked at the electrical signal or simple image-based classifiers.
The study also looked at whether these virtual heart models could predict future health risks. By analyzing the generated heart shapes and movements, the system was able to stratify patients into high-risk and low-risk groups for future heart failure, heart attacks, and major cardiovascular events. The predictions based on the reconstructed heart geometry were significantly better at forecasting these outcomes than predictions based solely on the raw electrical signal. This suggests that the physical structure of the heart, once recovered from the electrical signal, holds independent and valuable information about a person's long-term health.
The researchers validated their findings not only within the large UK Biobank group but also in an external group of 5,000 patients from a different hospital who had both ECGs and ultrasound scans. The system maintained its accuracy in this new setting, showing that the method can work across different populations and equipment. While the system is not a replacement for a full medical scan and still has some limitations in capturing the finest local details, it represents a significant shift in how electrical signals can be used. It moves beyond simple diagnosis to a form of digital reconstruction, turning a simple, widely available test into a source of detailed, three-dimensional anatomical information. This opens the possibility that in the future, a routine ECG could provide a personalized, moving map of a patient's heart, offering deep insights into their heart health without the need for expensive or inaccessible imaging technology.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.