close
close

Happy, sad, angry? Artificial intelligence can detect emotions in text, new research shows

Happy, sad, angry? Artificial intelligence can detect emotions in text, new research shows

Artificial intelligence (AI) has begun to permeate many aspects of human experience. Artificial intelligence is not just a tool for analyzing data; It also transforms the way we communicate, work and live. From ChatGP to AI video creators, the lines between technology and parts of our lives are increasingly blurring.

So, do these technological advances mean that artificial intelligence can identify our emotions online?

Inside our new research We examined whether AI can detect human emotions in posts on X (formerly Twitter).

Our research focused on how emotions expressed in usage posts about specific nonprofits can influence subsequent actions, such as the decision to donate to them.

Using emotions to direct a response

Traditionally, researchers have relied on sentiment analysis, which categorizes messages as positive, negative, or neutral. Although this method is simple and intuitive, it has limitations.

Human emotions are much more subtle. For example, anger and frustration are both negative emotions, but they can cause very different reactions. Angry customers can react much more strongly than disappointed customers in a business context.

To address these limitations, we implemented an artificial intelligence model that can detect specific emotions expressed in tweets, such as joy, anger, sadness, and disgust.

Our research found that the sentiments expressed in X can serve as a representation of the public’s general feelings about particular nonprofits. These emotions had a direct impact on donation behavior.

detecting emotions

” we used the expression.learning transformer transferA model for detecting emotions in text. Pre-trained on massive data sets by companies like Google and Facebook, transformers are highly complex AI algorithms that excel at understanding natural language (naturally evolving languages ​​rather than computer languages ​​or code).

We fine-tuned the model on a combination of four self-reported emotion datasets (more than 3.6 million sentences) and seven other datasets (more than 60,000 sentences). This allowed us to map the wide range of emotions expressed online.

For example, the model will detect joy as the dominant emotion when reading a post X like the following:

It’s best to start our mornings in schools! Everyone is smiling at #purpose #children.

Conversely, the model expressed her sadness in a tweet:

I feel like I’ve lost a part of myself. I lost my mother more than a month ago and my father 13 years ago. I’m lost and afraid.

The model achieved an impressive 84% accuracy in detecting emotions in text, a notable achievement in the field of artificial intelligence.

We then looked at tweets about the Fred Hollows Foundation and the University of Auckland, two New Zealand-based organizations. We to create Tweets expressing sadness were more likely to increase donations to the Fred Hollows Foundation, while anger was associated with an increase in donations to the University of Auckland.

Our new model was able to identify different emotions expressed in X posts.
BlackJack3D/Getty Images

Ethical questions as artificial intelligence develops

Identifying specific emotions has important implications for industries such as marketing, education, and healthcare.

Being able to identify people’s emotional reactions in specific contexts online can support decision makers in responding to their individual customers or broader markets. Each emotion expressed in online social media posts requires a different response from a company or organization.

Our research has shown that different emotions lead to different outcomes when it comes to donation.

Knowing that sadness in marketing messages can increase donations to nonprofits allows for more effective, emotionally resonant campaigns. Anger can motivate people to act in response to perceived injustice.

While the transformative transfer learning model is excellent at detecting emotions in text, the next big breakthrough will come from integrating it with other data sources, such as tone of voice or facial expressions, to create a more complete emotional profile.

Imagine an AI that understands not only what you type but also how you feel. Clearly, such advances present ethical challenges.

If artificial intelligence can read our emotions, how can we ensure that this ability is used responsibly? How do we protect privacy? These are important questions that need to be addressed as technology continues to evolve.