Skip to main content
Back to Blog

How keyboard analytics can help with mental disease detection and prevention

Reading Time: 3 minutes

Smart technology is progressively transforming the healthcare landscape through unconventional yet ingenious interventions in ways more than one. Incredible strides in big data and machine learning have revealed the true potential of technology in analyzing neurological health indicators captured through people’s routine interactions with their smartphones. Early research suggests possible correlations between patterns in geolocation data with episodes of depression and relapses in schizophrenia, certain keystroke patterns that could predict mania in bipolar disorder, and even computational methods that could measure eye-gaze patterns in toddlers to detect autism.  

With the help of passive digital phenotyping, which uses data gathered from smart devices to create a meticulously defined picture of the user’s health, Fleksy’s keyboard technology adds a data layer that equips healthcare startups and companies to analyze typing cadence with precision. The science of digital phenotyping considers key factors like behavioral patterns, neural activity, sleep patterns, and heart rate to collect highly accurate data to monitor and detect neurological issues. Leveraging this capability to collect comprehensive real-time data about a person’s state of mind on the basis of factors such as typing speeds and response times, AI systems are enabled to make well-informed diagnostics of mental health. 

Keystroke behaviors are digital biomarkers of mood

The relationship between typing cadence and mental health 

Keystroke dynamics, also known as keystroke timing data, which refers to the rhythm and timing when a person types, is a powerful metric to examine the relationship between typing dynamics and mental or brain health. Data from observation studies corroborate the feasibility of using passively collected keystroke dynamics to analyze the relationship between typing performance, circadian rhythms, and depression symptom severity. For instance, evidence shows that more severe depression is associated with more variable typing speed and shorter keyboard sessions.

Applications: psychomotor impairment, depression, bipolar disorder

Keystroke dynamics have previously been proven useful in detecting psychomotor impairment, consisting of dense, coordinated finger movements, which can affect typing cadence. In subjects with bipolar disorders, a statistical relationship has also been reported between keystroke meta-data and mood disturbances. Typing accuracy, for instance, as encoded based on autocorrect rates, has been observed to decrease in more depressed individuals. Intuitive tools like Global Autocorrect, which help students with dyslexia and literacy difficulties, hold testimony to technological interventions into the link between mental conditions and typing. The intelligent and discreet correction of spelling allows students to concentrate on their writing without being distracted by the urgency and anxiety induced by the red lines of error correction. 

Objective, unimposing assessments in natural settings

Real-time data collected remotely 

One of the biggest advantages of using ubiquitous technology over traditional approaches in the detection and monitoring of mental health is that diagnosis is no longer limited to clinical settings. Real-time data can be remotely collected from users in their natural settings, just as they engage/interact with technology in their daily lives.

A systematic assessment

Not only does this eliminate subjectivity and self-reporting bias from the process, as in the case of questionnaires and interviews, but it is also a more systematic measure of cognitive ability. A contrast to diagnostics based on data acquired from disconnected points in time, this potential to collect behavioral data with continuity facilitates more accurate screening and diagnosis.

No additional devices required

That it doesn’t require the possession of any additional devices like wearables allows it a seamless, non-intrusive integration within the user’s existing digital ecosystem. 

Early-stage detection 

Detecting symptoms 

Digital phenotyping helps immensely in recognizing symptoms right from the outset without waiting for debilitating episodes to take place. For instance, symptoms preceding a manic episode could potentially include faster typing, increased frequency of the “delete” key, an increase in typos, and so on, whereas, during episodes of depression, users tend to send short, infrequent messages.

Understanding facets

The data is useful in assessing not just the final outcomes but also intermediate functional and behavioral states. In the place of attempts to typify the overall state, digital phenotyping offers opportunities to measure the facets of a disorder. 

Recognizing subtleties 

Consider neurodegenerative disorders like Parkinson’s Disease (PD), for which the initial motor symptoms are often very subtle, leading patients to seek medical assistance only once their condition has substantially deteriorated. Interestingly, evidence suggests that early PD intervention could potentially slow down the progression of symptoms and, in the long term, improve the quality of life. The combination of passively captured accelerometer and touchscreen typing data could be analyzed using appropriate deep-learning frameworks to detect crucial early signs. 

In conclusion 

Passive digital phenotyping offers a wealth of data that helps understand how keyboard usage patterns can be related to cognition and neuropsychological functioning. Developments in this field can help in the prediction and prevention of mental health disorders while also maintaining the highest levels of user privacy. 

At Fleksy, we’re proud to power several companies and organizations to prevent, monitor, and treat neurodegenerative diseases and more with our virtual keyboard SDK, available here.

Did you like it? Spread the word:

✭ If you like Fleksy, give it a star on GitHub ✭