What do the Apple Watch and Nokia Pulse Ox have in common? They’ve both got pulse oximeter sensors that measure heart rate using photoplethysmography (PPG), the expansion and contraction of capillaries based on changes in blood volume. They’re accurate to a degree, but require a fair amount of electricity because they’re light-based — they emit a signal onto the skin that reflects back to a photodiode.

One battery-saving alternative might be accelerometers, a sensor commonly found in smartphones, smartwatches, and activity trackers that measures non-gravitational acceleration. In a paper published on the preprint server Arxiv.org, researchers at Philips Health and the University of Bristol describe a machine learning algorithm that can predict heart rate almost exclusively from the sensors, boosting the battery life of the wearable to which they’re attached.

“Consumer PPG sensors typically consume up to 5000 times the power than the accelerometer used in wearables, which is an impediment to the long battery life desired in wearable technology,” the researchers wrote. “As accelerometers are widespread and exist in any device which would likely also contain a heart rate sensor, we are interested in considering the feasibility of acceleration as a means of predicting heart rate.”

They tapped data from test subjects participating in the EurValve project, a multiyear clinical study of patients who have undergone heart valve replacement surgery. Each sports a wearable with an accelerometer (with a three-week battery life) and a Philips Health monitor with a pulse oximeter (with a four-day battery life), and had a custom-designed compute unit — the Smart Home in a Box (SHiB) — installed in their home that receives and processes data from both wearable devices.

The researchers trained two machine learning models. The first was a baseline: a regression model that relied exclusively on data from the accelerometer, aligned it with wearers’ heart rates, and attempted to predict future heart rates. The second model, which could run on the SHiB units, took an “active learning” approach that allowed it to pull data from either health monitor, depending on the situation.

“This approach will predict heart rate from the streaming accelerometer data in an online fashion and be able to request the measurement of true heart rate via PPG when required,” the team wrote.

They employed a few clever tricks to cut down on energy use. The second model learned to assume that particular acceleration patterns, like walking or jogging, indicated that heart rate is likely to increase, and intelligently decided whether to measure heart rate using the accelerometer data or pulse oximeter data.

“Typically, in active learning problems it is possible to query the label … of samples, specifically for data samples for which the label will be particularly useful,” the team wrote. “This is however not feasible in our setting, where acceleration data is arriving constantly and we wish to consistently produce a heart rate estimate, and it is not possible to retrospectively measure the heart rate.”

The researchers evaluated the active learning model on three patients, each with four weeks’ worth of data collected two months apart. The mean absolute error (MAE, or the distance between two continuous variables) was between just 2.5 and 5 heartbeats per minute, and the energy savings were significant. In one example when the heart rate sensor was queried 20.25 percent of the time, MAE was 2.89.

That’s good news for fitness fanatics and smartwatch fans alike.