Can AI Understand Sarcasm?

AI’s quickly advancing and researchers continue to figure out whether AI can truly understand sarcasm.

This nuanced form of communication often confuses even humans. Researchers at the University of Groningen are answering to this with a new sarcasm detection algorithm.

How Does The Algorithm Work?

The researchers at the University developed a system that combines sentiment analysis and emotion recognition to detect sarcasm. This algorithm evaluates both the audio and text of a conversation. It works like this:

Audio Analysis: The system listens to the speech, analysing pitch, speaking rate, and energy. These acoustic parameters help identify the emotional tone behind the words.

Text Transcription: The spoken words are transcribed into text. This text is then analysed for sentiment, identifying phrases that may carry sarcastic intent.

Emoji Integration: The transcribed text is labelled with emojis that reflect the emotional intent of the speech. This helps the system to convey the detected sarcasm clearer.

Xiyuan Gao, a researcher involved in the project, explained that their approach allows for more accurate detection of sarcasm compared to systems that rely solely on text.

How Accurate Is The System?

The algorithm has been tested on data from popular TV shows like “Friends” and “The Big Bang Theory”. These shows were chosen for their diverse expressions and contexts.

The algorithm achieved an accuracy rate of 74% in recognising sarcasm, which is a big improvement over previous attempts that often struggled with the subtleties of sarcastic speech.

The study also found these interesting things:

  • Pitch is also a big indicator of sarcasm. In English and German, sarcasm often involves a decrease in pitch, whereas in Italian, French, and Cantonese, it tends to increase.
  • The system’s effectiveness is different depending on the languages and cultural contexts used or need, which means that it can be refined further to increase its accuracy.



What Are They Used For Everyday?

Understanding sarcasm also has everyday applications, particularly in AI-driven healthcare and virtual assistants. The ability to detect sarcasm can improve interactions in a few ways:

AI Health Assistants: can better understand patient emotions, so that there are more empathetic and accurate responses.

Support for Cognitive Disabilities: People who are neurodivergent who might struggle with recognising sarcasm, can benefit from tools that help interpret social cues better.

Virtual Assistants: More sophisticated AI assistants can better user experience by recognising and appropriately responding to sarcastic remarks.

Who Else Has Researched AI and Sarcasm?
Apart from this recent discovery, after doing some research online, there seems to be some more interesting detections made by other institutions and companies.

Komprehend’s Sarcasm Detection API

This platform has developed a Sarcasm Detection API that can identify sarcasm in text content sourced from blogs, articles, forums, consumer reviews, surveys, and social media.

Their system analyses text for sarcastic remarks by recognising contradictory statements, such as “I like long walks (positive), especially when they are taken by people who annoy me (negative).” This API is customisable and can be trained on specific datasets to improve accuracy and performance.

University Of Central Florida’s Research

At the University of Central Florida, a team led by Associate Professor Ivan Garibay also created a sarcasm detector that focuses on social media copy.

This tool helps startups, for example, as they can better understand and respond to customer feedback on platforms like Twitter and TikTok.

Garibay’s team taught their model to recognise patterns and cue words that indicate sarcasm. Their findings were published in the journal Entropy.

Garibay said, “Sarcasm isn’t always easy to identify in conversation, so you can imagine it’s pretty challenging for a computer programme to do it and do it well.”

He explained that their model uses multi-head self-attention and gated recurrent units to pick out sarcastic cue words and understand their context.