New research published in the Journal of Psychopathology and Clinical Science suggests that how quickly and frequently we type on our phones may offer insight into our cognitive health—particularly in people with mood disorders. The findings suggest that passive data from daily phone use may help detect cognitive impairments often seen in mood disorders like depression and bipolar disorder.
Mood disorders such as major depressive disorder and bipolar disorder affect millions of people and are linked to substantial impairments in thinking skills. These difficulties with memory, attention, and mental flexibility can interfere with daily tasks, reduce quality of life, and increase the burden on caregivers. Cognitive challenges in these disorders are also associated with significant indirect costs, including lost productivity.
Traditional assessments of thinking abilities are typically conducted in clinics using paper-and-pencil or computer-based tasks. While helpful, these tests may not reflect how people function in their everyday environments. In addition, they are time-consuming and require active participation, which can be burdensome.
Researchers are exploring ways to measure thinking in more natural settings without requiring effort from participants. One promising approach involves using sensors in smartphones to collect behavioral data passively. Since typing on a phone engages multiple cognitive systems—including attention, planning, and motor control—it may serve as a real-world window into how the brain is functioning.
“Cognitive problems are a major part of mood disorders and can persist even when the mood symptoms improved. We wanted to use the BiAffect app, developed by Dr. Alex Leow, as a method to passively and objectively assess cognitive function in the context of mood disorders. BiAffect uses smartphone typing as a index of brain function and has been tested a range of disorders,” said study author Olu Ajilore, the University of Illinois Center for Depression and Resilience (UI CDR) Professor of Psychiatry and director of the Mood and Anxiety Disorders Program, Clinical Research Core/Center for Clinical and Translational Science, and Adult Neuroscience Residency Research Track.
The study recruited 127 adults between the ages of 25 and 50, including people diagnosed with various mood disorders as well as healthy controls. Over a four- to five-week period, participants used BiAffect, which captured metadata about their typing behavior, such as the time between keystrokes and physical motion detected by the phone’s accelerometer. Participants were instructed to use this keyboard as their default during the study.
Each person completed two in-person sessions at least two weeks apart. During these visits, they underwent standardized cognitive tests. These included four tests from the NIH Toolbox, which measured skills such as attention, working memory, and mental flexibility, and a paper-based Trail Making Test Part B, which assesses executive function and speed in connecting numbers and letters in alternating order.
The researchers applied statistical techniques to reduce the large number of keyboard variables into core components. They then used structural equation modeling to see if the typing data collected between the two lab visits could predict performance on the cognitive tests at each time point.
The main keyboard features extracted were typing speed and overall keyboard usage. Typing speed was based on the delay between consecutive key presses, while usage captured how often participants typed and how much that varied over time.
In healthy participants, slower typing was linked to lower performance on the NIH Toolbox tasks. More frequent typing was associated with better performance. Together, typing patterns accounted for a substantial portion of the differences in thinking ability across these individuals—over 40% at the second lab visit.
However, in individuals with mood disorders, typing patterns were not as strongly related to their scores on the NIH Toolbox tests. These findings suggest that in this group, the relationship between everyday smartphone behavior and these types of thinking skills is either more complex or more variable.
“Measuring cognition using only the NIH Toolbox showed that the relationship between typing measures and cognition was driven by healthy controls subject, not subjects with mood disorders,” Ajilore told PsyPost.
The results were different for the Trail Making Test Part B. Typing patterns predicted performance on this test equally well in both healthy individuals and those with mood disorders. People who typed more slowly or more frequently tended to take longer to complete the trail-making task, regardless of diagnosis. This task relies heavily on mental flexibility and quick decision-making, which are known to be affected in mood disorders.
Follow-up analyses showed that this link between slower typing and poorer trail-making performance became stronger as depressive symptoms increased. In other words, as people felt more depressed, the connection between their typing speed and their executive functioning became clearer.
“Typing speed reliably predicts processing speed and executive function and focusing on the Trail Making Test Part B, the relationship gets stronger with more depressive symptoms,” Ajilore said.
These findings suggest that passively collected data from smartphones may help detect changes in certain aspects of cognitive functioning, particularly executive function and mental flexibility. The fact that typing behavior predicted performance on the Trail Making Test across all groups suggests this measure may be especially well-suited to real-world monitoring of cognitive health.
In contrast, the weaker relationship between typing behavior and performance on the NIH Toolbox tasks in mood disorder participants points to challenges in using passive data to measure all types of thinking skills. One possibility is that people with mood disorders show more variability in cognitive functioning due to fluctuating symptoms, medication use, or other personal factors.
The study also highlights the potential value of tracking continuous symptom severity instead of relying only on diagnostic categories. For example, the strength of the link between typing speed and cognitive performance grew with increasing depression severity, even when comparing people within the same diagnosis.
While the results are promising, the study had some limitations. The time between the two lab visits—around two weeks—was relatively short. This made it harder to capture meaningful changes in cognition over time. In clinical populations, changes in thinking skills often occur over months rather than weeks.
“The main limitation is the relatively short time we monitored participants for (just 30 days),” Ajilore noted. “Future studies will focus on longer term assessment of participants to understand the predictive power of our digital monitoring tool.”
The sample was also relatively well-educated, which may have provided some protection against cognitive decline. Including participants with a broader range of educational backgrounds could help determine how generalizable the findings are.
Additionally, although typing behavior predicted cognitive performance on some tasks, it was not useful across all types of thinking. The NIH Toolbox includes a range of skills, some of which may not be strongly reflected in typing patterns. This suggests that passive typing data may be most helpful for measuring specific cognitive domains rather than overall mental ability.
The researchers hope that one day this approach could help clinicians and patients monitor cognition more easily and in real time. Subtle changes in typing patterns might provide an early signal that a person is experiencing cognitive difficulties or is at risk of a depressive or manic episode.
Using smartphone data in this way could reduce the need for frequent in-person testing and allow for more timely interventions. Because typing is something people do many times a day, it offers a natural and unobtrusive way to gather information.
“Ultimately, we would like to use this technology as an early warning detection system for mood episodes by detecting subtle changes in cognitive function that may precede depressive or manic episodes in patients with mood disorders,” Ajilore explained.
The study, “Predicting Cognitive Functioning in Mood Disorders through Smartphone Typing Dynamics,” was authored by Emma Ning, Ryne Estabrook, Theja Tulabandhula, John Zulueta, Mindy K. Ross, Sarah Kabir, Faraz Hussain, Scott A. Langenecker, Olusola Ajilore, Alex Leow, and Alexander P. Demos.