All research

Physiological signal processing · 2022–2023

Presymptomatic COVID-19 detection from smartwatch heart rate

Personalised anomaly detection on smartwatch resting heart rate that flags COVID-19 infection, often before symptoms begin.

Qatar University · Qatar National Research Fund UREP28-144-3-046

Timeline from day −30 to day 30 around symptom onset at day 0, divided into four periods: baseline before day −20, non-infectious from day −20 to −10, infectious from day −7 to day 21, and recovery after day 21.
Figure 3 from Abir et al. (2023). The four periods around symptom onset. Each person’s model learns from the baseline period, and heart rate in the infectious period is treated as anomalous.View full-size figureSource article© 2023 Elsevier Ltd · author reuse

Approach

Can changes in resting heart rate recorded by consumer smartwatches reveal COVID-19 infection before symptoms appear?

COVID-19 spreads before symptoms appear, and RT-PCR testing rarely happens that early. Smartwatches and fitness trackers already record heart rate and steps around the clock. This project treated infection as an anomaly in each person’s resting heart rate: a model learns that person’s normal pattern from the weeks before illness and flags periods it cannot reconstruct. Both studies used public Fitbit data from a Stanford University study of COVID-19.

  1. Derive resting heart rate
  2. Learn each person’s normal pattern
  3. Flag anomalies around symptom onset

A personalised LSTM variational autoencoder

Computers in Biology and Medicine · 2022

Resting heart rate was derived from minute-level heart rate and step counts, keeping only minutes that followed 12 minutes without steps. It was then smoothed over 6 hours 40 minutes and resampled hourly to remove short-lived rises from daily activity.

Each of 25 people with COVID-19 had a separate model, trained only on their own baseline more than 20 days before symptom onset. Seven time-series augmentations enlarged these small training sets. An LSTM variational autoencoder reconstructed 8-hour windows, and windows it could not reconstruct well were flagged as anomalous.

Two thresholds traded precision against early warning. Using the largest training loss gave a precision of 0.946. A lower threshold, three standard deviations above the mean training loss, flagged 20 of the 25 people before their symptoms began and missed none.

People with COVID-19
25
Flagged before symptom onset (sensitive threshold)
80%
Precision (strict threshold)
0.946
How each period around symptom onset was used.
Days from symptom onsetUse in the study
BaselineBefore day −20Training data for each person’s model
Non-infectiousDay −20 to −10Test data treated as normal
InfectiousDay −7 to 21Test data treated as anomalous
RecoveryAfter day 21Test data; heart rate can stay raised

Convolutional autoencoder with LSTM embeddings

Engineering Applications of Artificial Intelligence · 2023

PCovNet+ extended the evaluation to 68 people with COVID-19 by adding the second phase of the Stanford University study. A convolutional variational autoencoder encoded each window, and an LSTM network learned how these encodings change over time, so the decoder rebuilt each window from embeddings that carried its recent history.

Many people had only a short baseline before infection, so both networks were first pre-trained on healthy participants and then fine-tuned on each person’s own baseline. The framework was also set out so that a model could keep updating as new smartwatch data arrive.

Across the 68 people, PCovNet+ reached a precision of 0.993, a recall of 0.534 and an F1 score of 0.693, and flagged infection in 74% of them: 47% before symptom onset and 27% after. Adding the LSTM embeddings raised recall and F1 in both phases of the study.

People with COVID-19
68
Precision
0.993
Flagged before symptom onset
47%
The two frameworks compared. From Table 3 of the PCovNet+ paper.
PeoplePrecisionRecallF1 scoreBefore onsetAfter onsetMissed
PCovNet, strict threshold250.9460.2340.37544%44%12%
PCovNet, sensitive threshold250.9040.2740.42180%20%0%
PCovNet+680.9930.5340.69347%27%26%
Four-step diagram. Step 1 trains a CNN encoder and decoder on heart-rate windows and sets a VAE threshold from the loss. Step 2 passes windows through the trained encoder to produce LSTM embeddings. Step 3 trains an LSTM network to predict the next embedding. Step 4 chains the trained encoder, LSTM and decoder and sets the final threshold from the reconstruction loss.
Figure 7 from Abir et al. (2023). The PCovNet+ training sequence: the CNN-VAE, the LSTM embeddings and the combined threshold.View full-size figureSource article© 2023 Elsevier Ltd · author reuse
Three stacked plots for one participant from January to early April. (a) Resting heart rate between about 53 and 62 beats per minute, with symptom onset on 6 March. (b) Reconstruction loss of the CNN-VAE alone: the only anomalies fall in late February outside the infectious period, giving precision and recall of 0. (c) Loss with LSTM embeddings: anomalies cover late February into the shaded infectious period, with precision 0.98 and recall 0.76.
Figure 9 from Abir et al. (2023). For one participant, (a) resting heart rate and the anomalies found (b) without and (c) with LSTM embeddings. The shaded band marks the infectious period.View full-size figureSource article© 2023 Elsevier Ltd · author reuse

My contribution

For PCovNet, I contributed to the wearable-data analysis, model evaluation, interpretation and manuscript review. For PCovNet+, I worked on the software and on the analysis of the method and experiments, and reviewed and edited the manuscript.

Study scope

Both studies used one public cohort of Fitbit users with self-reported symptom onset, and the infectious period was set from the literature rather than measured for each person. Resting heart rate also changes with other illnesses, stress and daily routine, so a flag points to possible infection rather than a diagnosis. Prospective testing would be needed before real-world use.