Home > Cool Tech > Watch your tone! Machine-learning algorithm can…

Watch your tone! Machine-learning algorithm can detect sarcasm in tweets

You know what I love on a Monday? Coming into work to be handed a lengthy machine learning paper by my editor and asked to write up its findings by lunchtime. What could be better?

Any human reader out there can probably identify hints of sarcasm in these sentences (as it happens, this is a double sarcasm bluff: the paper’s actually pretty darn interesting). A computer, however, takes things literally — which is exactly the problem.

“The goal of my present work is sarcasm detection,” Silvio Amir at the University of Lisbon, Portugal, told Digital Trends. “Given a social media post, the goal is to figure out whether a certain tweet is sarcastic or not. This is important because we’ve been using social media analysis to study a lot of things, such as political participation, or the way that people are reacting to certain subjects. There is a lot of misinformation out there on the internet. If you use machine-learning models to analyze these things at face value, or in a literal sense, you’ll get a distorted or misleading picture when people express certain views ironically or sarcastically. That’s because sarcasm means saying something which is the literal opposite of the real meaning.”

Related: New algorithm could help diagnose depression by analyzing the tone of your voice

The work carried out by Amir and other researchers at the University of Lisbon and University of Texas at Austin aimed to right this wrong by creating a deep learning model that looks at users’ past tweets to work out whether a particular message seems out of character.

“For example, if a person posts positively about Donald Trump, but their past messages show they have often spoken negatively about him, that could be a clue or signal that the person is maybe being sarcastic,” Amir continued.

Of course, there are still challenges present. People can change their opinions over time, or the original tweets the system is taking as genuine may have been sarcastic. However, the project has impressively been shown to be more effective than other rival approaches when it comes to solving the sarcasm conundrum, with the AI correctly guessing whether a tweet is sarcastic or not 87 percent of the time.

We couldn’t be more impressed. (Like, for real!)