Researchers used portable ECG devices to collect 30,000 30-second clips from patients with varying forms of arrhythmia.

It might not be long before algorithms routinely save lives—as long as doctors are willing to put ever more trust in machines.

A team of researchers at Stanford University, led by Andrew Ng, a prominent AI researcher and an adjunct professor there, has shown that a machine-learning model can identify heart arrhythmias from an electrocardiogram (ECG) better than an expert.

The automated approach could prove important to everyday medical treatment by making the diagnosis of potentially deadly heartbeat irregularities more reliable. It could also make quality care more readily available in areas where resources are scarce.

The work is also just the latest sign of how machine learning seems likely to revolutionize medicine. In recent years, researchers have shown that machine-learning techniques can be used to spot all sorts of ailments, including, for example, breast cancer, skin cancer, and eye disease from medical images.

“I've been encouraged by how quickly people are accepting the idea that deep learning can diagnose at an accuracy superior to doctors in select verticals,” Ng said via e-mail. He adds that it’s encouraging to see researchers looking beyond imaging to other forms of data such as ECG.

Until recently, Ng was the chief scientist at the Chinese tech giant Baidu, where he helped found an institute dedicated to applying deep learning to different business problems.

The Stanford team trained a deep-learning algorithm to identify different types of irregular heartbeats in ECG data. Some irregularities can lead to serious health complications including sudden cardiac death, but the signal can be difficult to detect, so patients are often asked to wear an ECG sensor for several weeks. Even then it can be difficult for a doctor to distinguish between irregularities that may be benign and ones that could require treatment.

The Stanford researchers trained a deep-learning algorithm to identify different types of irregular heartbeats from the ECG data.

The researchers partnered with iRhythm, a company that makes portable ECG devices. They collected 30,000 30-second clips from patients with different forms of arrhythmia. To assess the accuracy of their algorithm, the team compared its performance to that of five different cardiologists on 300 undiagnosed clips. They had a panel of three expert cardiologists provide a ground-truth judgment.

Deep learning involves feeding large quantities of data into a big simulated neural network, and fine-tuning its parameters until it accurately recognized problematic ECG signals. The approach has proven adept at identifying complex patterns in images and audio, and it has led to the development of better-than-human image-recognition and voice-recognition systems.

Eric Horvitz, managing director of Microsoft Research and both a medical doctor and an expert on machine learning, says others, including two different groups from MIT and the University of Michigan, are applying machine learning to the detection of heart arrhythmias.

Looking ahead, though, there is the potential for machine learning to find traces of disease by combing through large quantities of disparate data.

A key challenge, however, will be persuading doctors and patients to trust in algorithms that are often so complex that their reasoning cannot be understood (see “The Dark Secret at the Heart of AI”). Deep learning is a particularly opaque form of machine learning, and finding ways to make it more explainable will be important both for building trust and refining treatment.

Still, Ng has no doubts that a revolution is coming. “We still have work ahead to get these algorithms into the health-care system's workflow,” he says. “But I think health care 10 years from now will use a lot more AI and will look very different than it does today.”