Each year in the U.S., more than 300,000 people die from sudden cardiac arrest, a condition where the heart's electrical system malfunctions without warning. The medical emergency can kill both high-risk older adults and young athletes with no history of heart issues, and while internal defibrillators that shock the heart can save lives, figuring out who actually needs one remains a high-stakes guessing game.
With a new tool that could transform how that game is played, UC Berkeley researchers have discovered a previously unrecognized signal in electrocardiograms that can better detect high-risk patients before their heart stops.
Using more than 440,000 EKGs from Sweden paired with information from death certificates, researchers trained an artificial intelligence model to analyze the spikes and waveforms produced by the heart's electrical currents. They fed the model scans from healthy people, at-risk patients and those who later suffered cardiac death until it recognized waveform patterns for people who later suffered sudden cardiac death. Over multiple years, researchers tested the model on thousands of other patient files from both the U.S. and Taiwan.

They found that the algorithm's read on patient EKGs outperformed standard clinical tests, which measure how much blood the heart ejects with each beat. Those tests identify a high-risk group with a 4.6% annual rate of sudden cardiac death. The AI system isolates a high-risk group with a 7% annual rate - a difference of thousands of patients annually, the vast majority of whom look low-risk by current standards
In other words, the model flagged a larger high-risk pool and better predicted who would suffer sudden cardiac death - all based on images that are widely available at medical centers around the world.
The study, published today in the prestigious journal Nature, could lead doctors to better identify who needs an internal defibrillator. It also opens the door for new research about the physiological mechanism that the AI tool homed in on that appears related to the heart suddenly and fatally misfiring.
"Medical decisions are really hard, and I think that's why AI is so exciting for me," said Ziad Obermeyer, an associate professor at UC Berkeley's School of Public Health and the study's lead author. "We can not only make better decisions, but also start to understand what's actually going on with these patients before their heart stops."
Whereas a heart attack stems from restricted blood flow to the heart, cardiac arrest occurs when the heart's electrical current suddenly stops firing. CPR and a shock from an automated external defibrillator can save lives, but approximately 90% of those who suffer sudden cardiac arrest outside of a hospital will die within minutes.
Obermeyer puts sudden cardiac death near the top of the list of stubborn medical mysteries. Because people die so abruptly, it's hard to know what was happening inside the heart before it stopped. Autopsies can reveal some details about its structure, like blocked vessels or hardened tissues. But the actual functioning before death remains something of a black box to Obermeyer, an emergency physician who does research at the intersection of machine learning, medicine and health policy.
"One thing that makes the problem very tragic, but also very well suited for AI, is that we have the cure for this problem," Obermeyer said. "If you knew you were one of the people who was going to drop dead, you would go to a cardiologist and you'd get a defibrillator implanted. The problem is that doctors can't figure out who needs one before it's too late."
The most commonly used method to identify at-risk patients measures how much blood the heart squeezes with each contraction. If that rate is below a certain threshold, the patient might qualify for an implantable defibrillator.
That test requires patients to have a more involved medical evaluation, something the vast majority of victims never knew they needed. Additionally, two-thirds of implants for those allegedly high-risk patients never actually end up needing to fire. That means patients undergo invasive, costly procedures to prevent an emergency they may never face.
Meanwhile, thousands of people who didn't know they were at risk die annually.
"In some fraction of those people, we could have prevented those deaths if we had just known it in time," Obermeyer said. "There are a lot of lives being lost from people who are dropping dead of sudden cardiac death that are preventable if we just had better AI tools to find these things."
To build and test the AI model, Obermeyer and his team used three distinct data sources.
First, Obermeyer's team used six years of scans from Sweden's unified health system to train the model and spot potentially significant waveform patterns, matched with death certificates. They then validated the algorithm on two years of deidentified EKGs from a hospital system in San Diego as well as a separate dataset from Taipei.
"Good AI starts with good data," said Obermeyer, who is also part of the joint UCSF-UC Berkeley Computational Precision Health program. "Unfortunately, data like the ones we used for this study are incredibly hard to access. It's a big part of why there's so little clinical AI in use today."
Compiling all the data for the current study took about a decade, Obermeyer said, and included the work from two groups he co-founded - Dandelion Health and Nightingale Open Science - that are at the intersection of AI and medical research.
"It's one of the tremendous luxuries of being at Berkeley," Obermeyer said. "You can pursue these projects that just are a slow burn and then have - hopefully - a big return when they get over the finish line."
The next phase of the project has already started. Obermeyer is working with health systems in Sweden, Taiwan and the U.S. to deploy the algorithm on hospital EKG databases. For scans that it flags as high-risk, doctors would notify patients and give them the option of wearing a patch that continuously monitors their heart. That data could help researchers better understand the physiological mechanism within the heart that is causing signals that apparently correspond with elevated risk. It could even lead to the placement of a potentially life-saving internal defibrillator.
Obermeyer also built a website where individuals interested in assessing their own risk can submit basic information and their email address, allowing the research team to contact them for EKG analysis once the AI tool is more widely available.
Beyond helping doctors and patients make better decisions, Obermeyer is optimistic about the role AI will play in pushing forward the science of medicine.
"There is also going to be a new way of doing science that comes out of these tools," Obermeyer said, "and it's fun to think about how that starts happening."