Your Keystrokes Can Reveal Who You Are — And How You Feel

An NYU researcher is using machine learning to show how easy it is to identify people and emotions from typing patterns

Photo Illustration: Vocativ
May 10, 2017 at 1:44 PM ET

What if your computer could verify your identity — and determine your mental state — simply by monitoring how you type?

According to Leon Eckert, a researcher at New York University’s Interactive Telecommunications Program, it’s already possible, and not just for big data-gathering conglomerates like Facebook and Google.

For an ongoing research project, Eckert created a system that recognizes the speed and rhythm of a person’s keystrokes in the same way a human would recognize someone’s signature. After the user “enrolls” by typing the same phrase three times, the software creates a profile containing statistics about their typing patterns, including the millisecond duration of each key press and the delay between hitting one particular key and another — which Eckert calls “dwell time” and “flight time,” respectively.

Once that information is recorded, the software can recognize who is typing after just a few keystrokes. During a demonstration for Vocativ, it took only one or two seconds of typing before Eckert’s software brought my name to the top of a list of candidates, which is ranked based on which keystroke profile best matched the person typing.

The project’s second phase goes even further. Eckert asked a number of volunteers to install keystroke monitoring software on their computers, which occasionally interrupted their typing and prompted them to enter how they feel using a sliding interface including various emotional states, like “excited,” “sad” and “tired.” Utilizing this self-reported data, Eckert is building a machine learning algorithm to will allow him predict a person’s mental and emotional state by comparing their typing to previous examples demonstrating different mental states.

“It’s concerning that by analyzing our keystrokes, an algorithm could analyze how we feel,” Eckert told Vocativ. “If my computer knows if I’m tired or sad, there’s a lot of things it can use against me.”

For now, Eckert’s system only works for users who have provided him with examples of their typing, or by voluntarily self-reporting their emotions and installing Eckert’s key-tracking program. And he’s working to improve it, he says: His program currently achieves around 85 percent accuracy when identifying people by their keystrokes, a number that should improve as he gets a larger dataset.

Such capabilities could already prove invaluable to an enterprising hacker or nosy employer, however. If such a person secretly installed keylogging software on your device, they could train a behavioral model to suss out a repeatedly entered phrase, like your computer’s login password.

Eckert’s project isn’t the first to record keystrokes for identifying people and emotions. Several academic research papers have been published on keystroke dynamics, and some companies already employ such techniques. The Swedish firm BehavioSec offers tech that continuously tracks “behavioral biometrics,” including typing patterns, as a means of detecting fraud and unauthorized access. Other companies, like the biometric identification company TypingDNA, use the patterns as an extra security measure to authenticate who’s logging into secure sites and applications.

It’s reasonable to assume some popular apps and social platforms already employ similar techniques, Eckert said. Facebook, for example, previously sparked outrage with an experiment that secretly manipulated users’ behavior by modifying the emotional content of their news feeds.

Facebook also records everything a user types into a status update, even if they ultimately don’t post it. Given that the company already uses machine learning to detect the emotional content of posts, it could theoretically improve its ability to detect emotions by associating users’ typing patterns with the emotional cues of the words they type.

“If you did this on a large scale, my guess would be you could find general patterns,” said Eckert. “You could probably find that generally people slow down [typing] when they’re tired, for example.

Eckert’s primary goal, however, is to highlight the intimate relationships we share with our devices, and how power in those relationships is asymmetrical.

“We all engage in a very intense relationship with our devices. We carry them around at all time, share our thoughts… in a way [they] know us really well,” he said. “[But] the relationship we have with devices is one-directional. We open ourselves up to devices, but they don’t open to us.”

Update: Friday, May 12, 2017: This article was updated to clarify that Eckert achieved 85% accuracy with the program that identifies users from their keystrokes, and that he is still building the algorithm that detects emotions.