No matter how much you can pass the bar exam, ace medical exams, and excitedly read bedtime stories, artificial intelligence will never match the wonder of the human mind without first mastering the art of sarcasm.
But that art, it seems, may be next on the list of technology’s dizzying capabilities. Researchers in the Netherlands have built an AI-powered sarcasm detector that can detect when the lowest form of wit and the highest form of intelligence are being displayed.
“We are able to recognize sarcasm in a reliable way and we are eager to grow it,” said Matt Coler of the Speech Technology Laboratory at the University of Groningen. “We want to see how far we can take it.”
The project involves more than teaching algorithms: sometimes even the most effusive comments cannot be taken literally and must instead be interpreted as the diametric opposite. Sarcasm permeates our speech more than we might appreciate, Coler said, so understanding it is crucial for humans and machines to communicate smoothly.
“When you start studying sarcasm, you become very aware of the extent to which we use it as part of our normal mode of communication,” Coler said. “But we have to talk to our devices in a very literal way, as if we were talking to a robot, because we are. It does not have to be this way”.
Humans are generally adept at detecting sarcasm, although limited cues found only in text make it more difficult than in a face-to-face interaction when delivery, tone, and facial expressions reveal the speaker’s intent. In developing their AI, the researchers discovered that multiple cues were also important for the algorithm to distinguish sarcastic from sincere.
In paper presented at a joint meeting of the American Society of Acoustics and the Canadian Acoustics Association in Ottawa on Thursday, Xiyuan Gao, a doctoral student in the lab, described how the group trained a neural network on text, audio and emotional content. Of video. clips from American comedies such as Friends and The Big Bang Theory. The database, known as mustardwas compiled by researchers in the US and Singapore, who annotated phrases from TV shows with sarcasm tags to build their own detector.
A scene in which the AI was trained was Leonard’s futile effort escape from a locked room in The Big Bang Theory, prompting Sheldon to observe, “It’s just a privilege to watch your mind at work.” In another from Friends, Ross invites Rachel to join Joey and Chandler in putting together some furniture, prompting Chandler to comment, “Yeah, and we’re really excited about it.”
After training with the text and audio, along with scores that reflected the emotional content of the words spoken by the actors, the AI was able to detect sarcasm in unlabeled exchanges from the sitcoms almost 75% of the time. Other work in the lab has used synthetic data to further increase precision, but that research is pending publication.
Shekhar Nayak, another researcher on the project, said that in addition to making conversations with AI assistants more fluid, the same approach could be used to detect negative tones in language and detect abuse and hate speech.
Gao said additional improvements could be made by adding visual cues to the AI training data, such as eyebrow movements and smiles. Which begs the question of how accurate is accurate enough? “Are we going to have a machine that is 100% accurate?” Gao said. “That’s not something even humans can achieve.”
Making programs more familiar with how humans actually speak should help people converse with devices more naturally, Coler adds, but he wonders what will happen if machines adopt their new skills and start throwing us sarcasm. “If I ask, ‘Do you have time for a question?’ And she says, ‘Yeah, sure,’ you might think, well, does she or doesn’t she?