Skip to main content

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

Image used with permission by copyright holder
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.”

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!)

Editors' Recommendations

Luke Dormehl
I'm a UK-based tech writer covering Cool Tech at Digital Trends. I've also written for Fast Company, Wired, the Guardian…
Clever new A.I. system promises to train your dog while you’re away from home
finding rover facial recognition app dog face big eyes

One of the few good things about lockdown and working from home has been having more time to spend with pets. But when the world returns to normal, people are going to go back to the office, and in some cases that means leaving dogs at home for a large part of the day, hopefully with someone coming into your house to let them out at the midday point.

What if it was possible for an A.I. device, like a next-generation Amazon Echo, to give your pooch a dog-training class while you were away? That’s the basis for a project carried out by researchers at Colorado State University. Initially spotted by Chris Stokel-Walker, author of YouTubers:How YouTube Shook Up TV and Created a New Generation of Stars, and reported by New Scientist, the work involves a prototype device that’s able to give out canine commands, check to see if they’re being obeyed, and then provide a treat as a reward when they are.

Read more
This is how Google’s internet-serving Loon balloons can float for nearly a year
google launches project loon in sri lanka balloon

Only Google could think that the way to improve the flight of giant, helium-filled balloons is by coming up with better algorithms. And to be fair to the Mountain View-based search leviathan, it seems to have worked.

For the past couple of years, Project Loon, a subsidiary of Google’s parent company Alphabet, has been working to provide internet access in rural and remote parts of the world by using high-altitude balloons in the stratosphere to create aerial wireless networks. Last year, Loon announced that it had reached 1 million hours of stratospheric flight with its combined balloon fleet. Then, at the end of October, Loon set a new record for longest stratospheric flight by remaining airborne for a whopping 312 days, covering a distance of some 135,000 miles.

Read more
Landmark court decision says robots can’t be inventors. But the fight isn’t over
brain network on veins illustration

You only need to visit Digital Trends on a day of the week that ends with “day” to see that there’s no shortage of inventors of some stripe doing amazing things with artificial intelligence. But can artificial intelligence itself invent anything? That might sound like an abstract hypothesis, but it’s one that recently landed an official court ruling. The official answer: No, it can’t. But not everyone agrees.

The United Kingdom’s High Court recently dismissed an appeal, claiming that robots cannot be credited as inventors under the Patents Act. Stephen Thaler, the creator of “Creativity Machine” called DABUS, had argued that it had invented a patentable emergency warning light and interlocking food container design. The judge in the case did not agree; arguing that an inventor must be a natural person and not a machine. All settled then, right?

Read more