March 19, 2021

Smartphone Keystroke Data May Unobtrusively Predict Mood Variability

Quotes by Prechter Program collaborator Olusola Ajilore, M.D., Ph.D., from the Department of Psychiatry at the University of Illinois-Chicago

This article was published on Psychiatry & Behavioral Health Learning Network's website. 

Passive unobtrusive smartphone metadata, namely instability of typing speed and keystroke data, could be used to prospectively predict elevations in mood disorder and depression symptoms, according to both a recent pilot study and a larger open-science study presented at the American Association for Geriatric Psychiatry 2021 Annual Meeting.

In the initial pilot study, researchers examined 9 subjects diagnosed with bipolar spectrum disorder from the Prechter Longitudinal Study of Bipolar Disorder. Participants were provided with a smartphone loaded with a customized keyboard that passively collected keystroke metadata, in the end yielding 626,641 total keystrokes. The keystroke activity predicted both depressive and manic symptoms and may be used to intervene in patients’ mood episodes earlier and increase the number of patients a single provider can effectively manage, the study found.

“So, moving on from the pilot study that was done with the participants with bipolar disorder at the University of Michigan, we were interested in seeing if we can replicate and validate some of our initial findings in a larger sample, and this took place in our currently ongoing open-science study,” said Olusola Ajilore, MD, PhD, associate professor in the Department of Psychiatry at the University of Illinois-Chicago.

Metabolic Markers May Help Predict Recurrent Depression

Utilizing data collected from a mobile app called BiAffect that replaces users’ smartphone keyboards, researchers collected over 23,000 hours of typing logs from over 19,000 United States citizens as of April 2020, Dr. Ajilore told virtual attendees. From that data, using linear mixed-effects models, researchers examined data from 250 users, representing more than 12 million key presses and 140,000 typing sessions. Variables such as typing speed, typing variability, pausing, session duration, typing mistakes, and typing accuracy were examined.

Autocorrect and higher typing variability were associated with worsening depressive symptoms across the participants, the study found.

As part of the larger multisite Rembrandt Study intending to predict and prevent recurrent depression in older adults, researchers plan to research whether mobile cognitive assessment and cartography data, such as from smartwatches, can be used to “develop techniques that link smartphone derived digital biomarkers to brain network correlatives of affective and cognitive dysfunction that are associated with risk of depression recurrence.”

The findings in the BiAffect study may be pertinent to clinicians who are treating older adults with recurrent depression.

“Circadian effects were exacerbated in our older participants, so this diurnal variation is most pronounced for those around age 70. Such that older users type slower, more variable, and have longer pauses. Because of the effects of age and diurnal variation, they were used as covariates to see how typing dynamics related to mood,” Dr. Ajilore said.

Researchers plan to continue studying these smart devices and their connection to mood variability and prediction. “The hope is we can use smart, connected devices to passively, unobtrusively detect affective and cognitive dysfunction, and intervene, before it’s clinically apparent.”

—Meagan Thistle


“Depression recurrence – challenges, approaches and insights from neurobiology”. Presented at the American Association for Geriatric Psychiatry 2021 Annual Meeting: Virtual; March 17, 2021.


More information about BiAffect can be found here and here.