Data from wearables helped teach an AI to spot signs of diabetes

In a new study conducted with the UCSF Department of Medicine, a neural network developed by a startup called Cardiogram was able to detect diabetes with nearly 85 percent accuracy, just by looking at people's heart beats over time.

In a new study conducted with the UCSF Department of Medicine, a neural network developed by a startup called Cardiogram was able to detect diabetes with nearly 85 percent accuracy, just by looking at people's heart beats over time. And the kicker? As always, the study didn't require any fancy medical hardware — just Apple Watches, Fitbits, Android Wear devices, and other wearables with heart rate sensors.

Cardiogram has conducted similar studies in the past, like when it trained that neural network — DeepHeart — to search for telltale signs of strokes in a pool of roughly 6,000 users. This undertaking required even more work. For the new study, which also attempted to spot high cholesterol, sleep apnea and hypertension in that sea of heartbeats, the startup worked with a larger pool of 14,011 users. All told, Cardiogram wound up with 57,675 person-weeks of heart rate information, most of which was used to hone DeepHeart's sense of what is and isn't a normal heartbeat pattern.

In their quest to find meaning in all this data, Cardiogram tried a handful of approaches. One was to train the model with a so-called "semi-supervised" learning method. "First, you have an unsupervised phase where the algorithm is presented with data and is not told who has diabetes and who doesn't," Ballinger explained. "And it learns how normal heart rates vary."

In a subsequent supervised phase, DeepHeart was given a limited sample of labeled data from known diabetics to help it figure out what kinds of heart rate variances correspond to diabetes. Another method, heuristic pre-training, yielded even better results.

Curiously, that impressive 85 percent detection rate came when the neural network wasn't pre-trained at all, an outcome that led the team to believe there's "potential benefit from combining hand-engineered features with deep learning." In other words, don't count on completely removing humans from the process of spotting disease."

To be clear, though, DeepHeart wasn't designed to diagnose diabetes. As sophisticated as the algorithm is, the link between the diabetes and its effects on your heart rate is a subtle one, and making crystal clear determinations using consumer-grade heart sensors isn't possible yet. Instead, Ballinger says the goal is to help screen for diabetes in people who otherwise had no idea they were at risk for it. The potential impact is huge, too: the CDC reports that more than 100 million adults in the United States live with either diabetes or prediabetes. And out of the people who have diabetes, roughly 25 percent of them don't even know about it.

The kind of diabetic pre-screening DeepHeart makes possible will eventually wind up in Cardiogram's app, though Ballinger wouldn't confirm when that would actually happen. As valuable as this potential tool is, though, the company hasn't ruled out the possibility of eventually offering full-blown diagnoses too.

"If the Apple Watch Series 5 winds up having a glucose sensor or a blood pressure sensor, we could actually do it," Ballinger said.