Menus Subscribe Search

The World Wide Web

secret-service

(Photo: David Stuart Productions/Shutterstock)

Can We Really Detect Sarcasm With a Machine?

• June 17, 2014 • 10:00 AM

(Photo: David Stuart Productions/Shutterstock)

What was once the domain of literary critics has now become the world of the Secret Service.

Eyes rolled a couple of weeks ago when the Secret Service posted a work order for new social media analytics software. Not because the law enforcement agency tasked with protecting the president and other federal officials lacks a social media presence, but because among the 22 functionality requirements for the software was the “ability to detect sarcasm and false positives.”

Edwin M. Donovan, deputy assistant director of the Secret Service’s Office of Government and Public Affairs, emphasizes that sarcasm detection is only one of many requirements. “It’s so you don’t have to sift through thousands of tweets,” he says. “We want to streamline, to automate the social media monitoring process. Not just for sarcasm.”

“Right now, if there were suddenly 200 tweets about something on D Street near the Capitol, we’d want to be able to synthesize that.”

Donovan says that assessing large volumes of messages has been a problem for the Secret Service, which in the past has borrowed the analytics tools of other agencies, like FEMA. “It’s an issue that’s come up before, and we don’t want to waste time sifting through messages.”

“Right now,” Donovan says, “if there were suddenly 200 tweets about something on D Street near the Capitol, we’d want to be able to synthesize that.” The agency wants to be able to monitor its own presence on social media, but also track trending topics and influential users.

“Remember the purple tunnel of doom?” Donovan asks, referring to the debacle during the 2009 presidential inauguration when thousands of attendances with purple tickets were caught in the Third Street Tunnel, unable to cross 395 to attend the event. “We weren’t monitoring Twitter that day, so we didn’t know. Since then, we’ve entered social media.”

The Secret Service (@SecretService) joined Twitter in February of 2010. The account has posted only 572 tweets, but is followed by 110,000 users. And it’s not the only governmental agency interested in assessing the tone of other users. Last summer, the BBC reported that the French company Spotter provided such an analytics tool to the British Home Office, the European Union Commission, and Dubai Courts.

For around $1,675 per month, Spotter provides software that “uses a combination of linguistics, semantics and heuristics to create algorithms that generate reports about online reputation.” Determining whether users are genuinely complaining or sincerely threatening a government agency is difficult, but Spotter claims an 80 percent accuracy rate and offers the service in 29 languages.

But how does software accomplish a task that is difficult even for sentient beings? Even the most casual of correspondents has had a text message or email misunderstood by its recipient. Without the aid of eye rolls or shoulder shrugs, textual sarcasm can be difficult to detect. The science of sincerity, or sarcasm if you’re a glass-empty type, is critical for law enforcement agencies, but also profitable for corporations seeking to improve their customer service. Understanding whether a reviewer sarcastically praised your product or honestly questioned your services is critical.

So what used to be the domain of literary critics has become a novel problem for software designers. A 2010 paper by three researchers at Hebrew University presented a sarcasm algorithm with a 77 percent precision rate. Developed through an analysis of 66,000 Amazon product reviews, the algorithm was able to detect the situational irony of titles (“[I] Love the Cover” for a book review and “Where Am I?” for a GPS device) and sarcastic patterns in speech and punctuation (sentence length, multiple exclamation or question marks in sentences, and the number of words with all capital letters among others).

But Amazon reviews have many words. In a 2011 paper, three researchers at Rutgers’ School of Communication & Information were much less successful at identifying sarcasm on Twitter, which is limited to 140-character tweets. Tweet length as well as the lack of context made assessing tone very difficult, for machines but also humans. Even with the assistance of Twitter tics like emoticons and hashtags, the human judges and the machines demonstrated only 70 percent accuracy when distinguishing sarcastic tweets from positives or negative tweets.

But that was 2011, and with companies like Spotter already reporting 80 percent accuracy, the Secret Service will likely find more bids than it needs. Donovan expressed some sarcasm of his own when I asked about how they will measure the actual accuracy of whichever software they purchase. “That’s a great question,” Donovan says, “for the companies that make these claims.”

Casey N. Cep
Casey N. Cep is a writer from the Eastern Shore of Maryland. She has written for the New Republic, the New York Times, the New Yorker, and the Paris Review. Follow her on Twitter @cncep.

More From Casey N. Cep

A weekly roundup of the best of Pacific Standard and PSmag.com, delivered straight to your inbox.

Recent Posts

August 19 • 4:00 PM

Can Lawmakers Only Make Laws That Corporations Allow?

There’s a telling detail in a recent story about efforts to close loopholes in corporate tax laws.




August 19 • 12:00 PM

How ‘Contagion’ Became Contagious

Do ideas and emotions really spread like a virus?


August 19 • 10:00 AM

Child Refugees: The New Barbarians

The disturbing rhetoric around the recent rise in child refugees into the United States from Central America may be shaping popular opinion on upcoming immigration reform.


August 19 • 8:00 AM

Making Police Departments More Diverse Isn’t Enough

Local police departments should reflect the communities they serve, but fixing that alone won’t curb unnecessary violence.


August 19 • 7:15 AM

Common Knowledge Makes Us More Cooperative

People are more inclined to take mutually beneficial risks if they know what others know.


August 19 • 6:00 AM

Seeking a Healthy Public School Lunch? Good Luck

Mystery meat will always win.


August 19 • 4:00 AM

The Positive Effects of Sports-Themed Video Games

New research finds sports-themed video games actually encourage some kids to get onto the field.


August 19 • 1:00 AM

DIY Diagnosis: How an Extreme Athlete Uncovered Her Genetic Flaw

When Kim Goodsell discovered that she had two extremely rare genetic diseases, she taught herself genetics to help find out why.



August 18 • 3:30 PM

Mister Rogers’ Heart-Healthy Neighborhood

Researchers find living in a friendly, cohesive neighborhood lowers seniors’ chances of having a heart attack.


August 18 • 2:00 PM

Wealth or Good Parenting?

Framing the privileges of the rich.


August 18 • 12:00 PM

How Much Did the Stigma of Mental Illness Harm Robin Williams?

Addiction treatment routinely fails people with mental illnesses, while mental health care often ignores addiction. And everywhere, stigma is rife. Can a tragic death prompt a more intelligent approach?


August 18 • 10:00 AM

Punished for Being Poor: The Problem With Using Big Data in the Justice System

Correctional departments use data-driven analyses because they’re easier and cheaper than individual assessments. But at what cost?


August 18 • 8:00 AM

What Americans Can Learn From a Vial of Tibetan Spit

Living high in the mountains for thousands of years, Tibetans have developed distinct biological traits that could benefit all of us, but translating medical science across cultures is always a tricky business.


August 18 • 6:00 AM

The Problems With William Deresiewicz’s New Manifesto

Excellent Sheep: a facile approach to an urgent critique.


August 18 • 4:00 AM

Ferguson Is a Serious Outlier

One black city council member is not nearly enough. In a study of city councils, only one place in America had a greater representational disparity than Ferguson, Missouri.


August 16 • 4:00 AM

Six Days in Ferguson: Voices From the Protests

A day-by-day chronology of what happened in Ferguson, drawn from the best reporting by journalists and witnesses on the ground.


August 15 • 4:00 PM

Skirting Ochobo: Big Business Finds a Way Around Local Customs

The “liberation wrapper,” which was designed to shield mouths from public view while eating, has helped a Japanese chain increase sales by over 200 percent.


August 15 • 2:00 PM

How Wall Street Tobacco Deals Left States With Billions in Toxic Debt

Politicians wanted upfront cash from a legal victory over Big Tobacco, and bankers happily obliged. The price? A handful of states promised to repay $64 billion on just $3 billion advanced.


August 15 • 12:00 PM

How the Sexes Evolved

The distinction between males and females is one of the oldest facts of biology—but how did it come to affect our social identity?



August 15 • 10:00 AM

Will Philadelphia Ever Be Home to a Middle Class?

Jake Blumgart has watched his friends decamp his adopted hometown for places with more opportunities and city services. Will anyone be left to build a better Philly?


August 15 • 8:32 AM

How a Shift in Human Head Shape Changed Everything

When did homo sapiens become a more sophisticated species? Not until our skulls underwent “feminization.”


Follow us


Common Knowledge Makes Us More Cooperative

People are more inclined to take mutually beneficial risks if they know what others know.

How a Shift in Human Head Shape Changed Everything

When did homo sapiens become a more sophisticated species? Not until our skulls underwent "feminization."

Journalists Can Get PTSD Without Leaving Their Desks

Dealing with violent content takes a heavy toll on some reporters.

Do Ticking Clocks Make Women More Anxious to Have Children?

Yes, but apparently only women who grew up poor.

Facebook App Shoppers Do What Their Friends Do

People on Facebook are more influenced by their immediate community than by popular opinion.

The Big One

One in two full-time American fast-food workers' families are enrolled in public assistance programs, at a cost of $7 billion per year. July/August 2014 fast-food-big-one
Subscribe Now

Copyright © 2014 by Pacific Standard and The Miller-McCune Center for Research, Media, and Public Policy. All Rights Reserved.