A bundle of nerves? AI can detect stress using your office keyboard

Written by Emma Hall (Digital Editor)

Forget heart rate monitors, AI can now detect stress from the way individuals type and click on their keyboard and mouse.

In a recent study, researchers from ETH Zurich (Switzerland) have taken on the immense and ever-important challenge of combatting workplace stress, by creating a machine learning model that can recognize office burnout using only a mouse and keyboard. This research may allow employees to recognize and help avoid chronic stress.

You are on the way to work, braving the rush hour frenzy. The woman next to you tugging anxiously at strands of her hair scraped back into a slick bun. The scent of burnt coffee emanating from the tremoring hands of the guy in a suit opposite you, tapping his freshly polished Oxford shoes erratically on the tube floor. The furious pattering of someone’s laptop keys as they rush to send an urgent email. Your own blood rushing through your ears as you think about the endless checklist of things you must prioritize in a single, meagre working day. Does this scene sound familiar?

Stress. It’s uncomfortable, exhausting and overwhelming. No one wants it, but it usually turns up nevertheless. In the UK, a staggering 76% of employees report feeling a moderate or high level of stress, and that this stress affects their mental or physical health. Stress can cause mood and behavioral changes, headaches, nausea, insomnia, and act as a contributing factor for various diseases and pathological conditions. It is therefore extremely important to detect workplace-related stress early on, to prevent negative health effects and avoid chronic stress.

The ETH Zurich team have demonstrated that our typing and clicking habits appear to be a stronger predictor of office stress than our pulse rates. Utilizing a machine learning model, the mouse and keyboard behaviors as well as the heart rates of 90 participants were recorded and analyzed while they performed regular everyday office tasks, for example appointment scheduling or data analysis. The participants also self-reported their stress levels during these tasks. One group of participants performed these tasks unperturbed (control group), while another group were asked to also partake in a job interview.

The model discovered that individuals who were relaxed took shorter, more precise routes to reach their mouse destination while also taking longer to reach their targets. On the other hand, stressed individuals took less direct, longer routes with their mouse and moved it more regularly.

In terms of keyboard use behavior, individuals who were stressed typed in short bursts with frequent short breaks and made more typing errors. More relaxed individuals made less mistakes and typed with less frequent but longer pauses. Surprisingly, keyboard and mouse behaviors were stronger predictors of office stress than the pulse rate of participants.

Jasmine Kerr, a psychologist researcher at ETH Zurich, explained the difference between typing and clicking behavior in stressed and relaxed individuals was due to the neuromotor noise theory: “Increased levels of stress negatively impact our brain’s ability to process information. This also affects our motor skills.”

At present, the model is being assessed utilizing data from Swiss employees that have agreed to data collection of their heart rates, keyboard and mouse behavior and self-reported stress measures via an app while they are at work.

The study does, however, raise some sensitivity concerns as the app must protect sensitive data. “The only way people will accept and use our technology is if we can guarantee that we will anonymize and protect their data. We want to help workers to identify stress early, not create a monitoring tool for companies,” Kerr concludedd.

Despite these concerns, if the data is managed responsibly, in the future these findings could have huge implications in recognizing and preventing workplace stress early on.