A hand to hold, a shoulder to cry on. Soon a virtual guardian angel will help Adrian Samson/Getty

Some humans just know when and how to offer a word of emotional support. Now computers are learning too, with the creation of a new algorithm that aims to deliver the right words at the right time.

“There’s a lot of need for emotional support at the moment,” says Judith Masthoff at the University of Aberdeen, UK, who is designing the system. “We have increased rates of mental health issues, and this has led to increased rates of informal care.” Trained professionals are only available for the most extreme cases, so Masthoff suggests that people could get instant support from apps instead.

The task for Masthoff and her colleagues has been to turn a person’s ability to offer a few words of support into a logical set of instructions – an algorithm, that could be put into practice by a computer.


They ran experiments to figure out what support to offer. Participants had to imagine different stressful situations and then choose the messages they would find most supportive, and their responses were built into an automatic system. A person recovering from injury or surgery, for example, would be presented with a message combining emotional reassurance and praise, something like: “I know this is hard but you are doing a great job”. The system can also offer support to people pressed for time or experiencing high mental or emotional load.

Virtual assistance

There is a gap between what people say about using a machine for emotional support, and how we actually behave. “When you ask some people whether they would accept emotional support from a computer they say: ‘No way,'” says Masthoff. “But when you actually build the system, they rely on it as if it’s a person.”

“People are able to trust robots more if they are able to communicate like humans, so this work is really important,” says Aneesha Singh at University College London. “So in the future, the most successful virtual assistants will be the ones that can offer some kind of emotional support.”

Mastoff’s system doesn’t do the work of identifying the user’s emotional state. There are other systems designed for this, but they struggle to figure out how to intervene when they detect problems. Phones and wearables produce piles of data about us, which can deliver insights about our mental and physical well-being. Plugging systems like Mastoff’s into those which identify stress, for instance, could be an inexpensive way to address a growing problem.

In crude form, automated emotional support is already here. Customer service chatbots already try to calm down distressed customers, while lifestyle and dieting apps try to provide us with motivation.

“A lot of people already have apps that help them to increase their daily walking activity or to eat more healthily,” says Masthoff. “I would like people to have their own guardian angel that could support them emotionally throughout the day.”