Hacker News new | past | comments | ask | show | jobs | submit login
Like an AI Could Ever Spot Sarcasm (nvidia.com)
131 points by bcaulfield on Jan 31, 2018 | hide | past | favorite | 106 comments



This is neat.

Sarcasm is hard because it's a violation of the cooperative principle. I think describing it as simply incongruity is understating the difficulty of the problem (that said, good enough for 80% accuracy on the task is nothing to sniff at).

In communication, you've got two systems attempting to convey their internal, unobservable states to eachother. This happens across a number of different channels, each noisier and more imperfect than the next. Natural Language is lossy enough compression as it is. Now add idiolect, prosody, body language, context. And on top of that, the internal states of the two systems may only be alignable along the coarsest axes to begin with (do we share the same qualia?). The only way we can have any hope of understanding eachother is when we know both sides are trying their best to make themselves understood, as per Grice's maxims.

Sarcasm is a form of dissembly, a deliberate subversion of the cooperative principle, that words mean things, for other means. Sometimes to communicate to others, who are not the target. Sometimes for the communicator's own personal satisfaction. Sometimes it's meant to be understood, but the drier the sarcasm, the fewer hints are given.

And at the same time, in some cases, a sarcastic utterance is the most concise way of conveying information, if it is correctly received. Because acting in violation of typically observed rules of conversation carries its own set of semantics. It's another mode of communicating, and all of these different modes capture different lower-dimensional slices of the hyper-thing of mind-state and intent that they're purporting to convey.

All that to say, that elsewhere in these comments, the problem has been described as AI Complete. I'd go a step further, and say that it's telepath-complete, to know the intent of another, and even then, knowing the accurate truth of the thing by oracle might end you up with less Information than if you'd just gotten the joke in the first place.


That's a very good summary. I would say based on my experience on the internet, that spotting sarcasm is frequently beyond human capability, so it's not realistic to do it with an AI any time soon.

Besides communicating with a recipient, subverting the cooperative principle can also be used to selectively communicate with one recipient out of many, or to mislead some or all.

A lot of things people want to calculate these days seem like absurd hubris to me, but I suppose that's also how progress has always occurred, by trying to do things that seem out of reach.


> I would say based on my experience on the internet, that spotting sarcasm is frequently beyond human capability ...

In a 1983 Usenet FAQ by Jerry Schwarz: "Avoid sarcasm and facetious remarks."

More recently, aka Poe's Law.


For people who aren't familiar with the Gricean maxims, see https://en.wikipedia.org/wiki/Cooperative_principle.


it would ultimately more fruitful to treat irony as a semantic phenomenon, as belonging to the spectrum of tropes such as metaphor, metonymy and synecdoche. how should treating it as a violation tell you more about how it works?


People deploying Gricean maxims don't necessarily regard them as prescriptive, although sometimes listeners may get angry at speakers who violate them. For example, Wikipedia quotes Kent Bach as saying that these maxims

> are not sociological generalizations about speech, nor they are moral prescriptions or proscriptions on what to say or communicate. Although Grice presented them in the form of guidelines for how to communicate successfully, I think they are better construed as presumptions about utterances, presumptions that we as listeners rely on and as speakers exploit.

Wikipedia says Grice also "found it interesting when [the maxims] were not respected, namely either "flouted" (with the listener being expected to be able to understand the message) or "violated" (with the listener being expected to not note this)" -- the former including the case of sarcasm.


Last year we were working on a rubber ducky debugging chatbot and relying a bit too heavily on StackOverflow data for conversational training data. It frequently gave sarcastic answers, especially if you asked for help concerning regular expressions.


Did it respond with Zalgo if you asked about Regex and HTML? https://stackoverflow.com/questions/1732348/regex-match-open...


He comes.


Name the bot Tony the Pony and call it a feature.


Is there an online demo? Or a recording? Would love to see it! And how did you get the data? Is there a public dataset or did you crawl on your own?


The researchers had something online at one point, but it wasn't working when I needed the link for the story. They said they planned to fix it, but so far they haven't.


"Use jQuery"


That sounds like a pretty good result. Yandex has released it's voice assistant a few months ago (wasn't big news here on HN because it's Russian-only), and one feature that separated it from all the rest was sarcasm and kind of dark humor it acquired. Wouldn't you want your chatbot to be sarcastic sometimes?


I often recall this post from Andrej Karpathy when I'm noticing the current limitations of AI http://karpathy.github.io/2012/10/22/state-of-computer-visio...


Sarcasm is almost certainly AI-complete. Consider this post: https://cabalamat.wordpress.com/2018/01/31/royal-mail-announ... which is pretty easy for a human to tell is sarcastic, but would be difficult for an AI unless it actually understood it.


Why? It has a few tell-tale word choices, and image recognition would indicate that the stamp images are "wrong" and/or correlated to humor memes.


Go and build an AI that detects sarcasm, then I will agree with you.


Easy. "Don’t they make you proud to be British!" is incongruous because nobody is proud to be British!

(I jest, please don't kill me)


If anyone is interested in studying sarcasm themselves, there is a dataset available:

A Large Self-Annotated Corpus for Sarcasm https://arxiv.org/abs/1704.05579

1.3 million sarcastic statements!


> So now, computers can be as sarcastic as the rest of us. That sounds just great.

I love how sarcasm has so many subtle ways to be use to break tensions in some meetings, and how it can quickly derail any light conversation into some almost-nuclear mood.

But computers generating sarcasm, well... that will put a whole new level to automatic chat bots.


To be perfectly fair, human beings can't pick up on sarcasm reliably: or at the very least it seems to be cultural/contextual.

Australians/brits consistently bemoan the inability of Americans to understand deadpan and sarcasm.

And I'm even reminded of one of my European friends (from Austria) bemoaning conversations with Germans along the lines of:

Austrian: "could you be any more condescending!?" German: "yes I could be more condescending."...blank stare.


That is very much a statistically significant thing, yes. I'm Danish. Get along fine with Brits and Aussies, deadpans, understatements and poisonous sarcastic barbs translating well enough both ways. With Americans present, experience has taught me to shift into a far more cautious mode. And often these days, what Americans describe as irony, I fail to recognize as such.

A very broad generalization, of course, but has served me well enough as survival guide.


In some parts, "irony police" are a running joke - people will explain why any given example of irony is not really ironic.


Honest question: does the Austrian in your example not understand the deadpan/sarcasm or is he/she merely annoyed by it? Sometime it may not be a question of understanding but just of preferred communication patterns.

But yeah, there's definitely a lot of culture and context involved.


So, is it the Austrian who is not picking up on the sarcasm? Or the German.


Can't wait for the first next gen AI programming language to support an "as if" statement.


> “We found lots of tweets, especially in politics, to be sarcastic,” he said, in what may be the biggest understatement so far of 2018.


The Secret Service did want a sarcasm detector.

https://www.thedailybeast.com/secret-service-wants-a-sarcasm...


(The Groucho Marx joke isn't sarcasm.)


The point of sarcasm is to hide your true intent except for people who are sufficiently aligned with you to be able to decode it correctly.

If computers can decode sarcasm then it is not effective. Then sarcasm will evolve.


I trust many more details of the secrets of my life to computers than people. Computers are smarter than people in many areas, so sarcasm that only a computer recognizes is not a problem for sarcasm.


Yes, this is exactly what we need.


Side note, is there a name for a type of humor where you are being facetious and serious at the same time?

That's kind of my go-to, and I'd say about 20% of people overall don't get it. I hear "I can't tell if you are joking or not" all the time. I personally think both is a reasonable answer, but if we aren't able to teach people how such a sense of humor works, I don't have much hope for training an AI.


If I was trying to explain humor to an alien, I would say it's a pleasurable sensation created by the resolution of ambiguity or uncertainty in the communications between two or more people. This is achieved by performing similar mental operations and reaching the same result as each other.

So typically, you say something, and someone understands that it is not serious, and they laugh at the point at which they realize you two understand each other.

Your style of humor is more evolved, in that it adds an additional step, where first they think you are not serious, and then they understand you are, and if they get it, they laugh because they have completed the path to a shared understanding. It may not be appreciated so much, because since the journey is more difficult, the listener may infer that you are trying to put down people who are not sufficiently quick witted.



"Why stop now just when I’m hating it?" - Marvin the paranoid android


If humans can’t identify sarcasm, why would you expect AI to?

It’s like expecting AI to read handwriting, when people can’t even do that 100% of the time.


People didn’t expect to be humbled by a machine at the game of Go either. Yet here we are.


Apples and oranges comparison. Go is much closer to chess than it is to recognizing sarcasm.


I’m not convinced.

Good computer chess play is based on a deterministic tree walking algorithm, something that’s been clearly in computers’ wheelhouse since forever.

Good computer go play is based on neural pattern recognition, which is also (probably) what human sarcasm detection is based on.


On the other hand, go operates in a much more finite universe than conversation does. You have 2 pieces, and a number of places to put them. You have a goal.

Conversation doesn't work like that, and takes a vast amount of information to understand whether someone is being sarcastic.


So you’re saying that the people cited in the article accomplished something more significant than the AlphaGo team…?


Probably not, because the approach taken in the paper is identifying a small set of patterns that are present in sarcasm, not fully understanding the meaning and context of why the sentence is sarcastic. It's a useful tool with pragmatic applications in online discourse analysis, but not a solved problem.


I'm just saying it's easier to make progress when your universe is easier to define.


It may appear to you to be the case, but DeepBlue used a tree search algorithm. AlphaGo was an ensemble method that was based on neural networks, just like how the researchers used to detect sarcasm (sequence to vector). Read the article!


AlphaGo also uses a tree search algorithm.

Every tree search algorithm needs a guiding heuristic, and that's what AlphaGo replaces with a neural network.

So both DeepBlue and AlphaGo are fairly described as being based on tree search.


If humans can’t do simple math, why would you expect computers to?

It’s like expecting AI to sum up 1000 integers without errors, when people can’t even do that 100% of the time.


There are some things easier for a computer to do, like lots of simple math, given that the computer can accurately store the result of each calculation, whereas people have difficulty doing so for 1000 integers.

And there are some things that are relatively easy for humans to do, like communicate with natural language. Sarcasm falls into the later category. This is because human understanding is heavily social and conceptual.


Sarcasm is a great tool. But there are a couple of people I know who never turn off their "Sarcastic tone", and it becomes impossible to tell what's genuine and what's bullshit. I try to tell them that their noise-to-signal ratio is bad, but they um... react defensively.


The key thing about using sarcasm is that you should never direct it at someone you're talking to. Doing that is a great way to make someone instantly dislike you.

Sarcasm as a form of humor is too easy to do. You don't have to be clever. You just have to look down on someone/something and then caricature it. Whoever does that too much just seems unlikable.

When you're actually clever or subtle about it, people tend to enjoy the twist that makes the joke.


It can be a coping mechanism for depressive people just like cynism, at least I know that it serves that function for me: Can't be straight up negative, for dragging the mood down, so I'll settle for some sarcasm.


You are likely not fooling anyone with your sarcasm.


It's not about fooling anybody, I consider it more like gallows humor.


“sarcasm and jokes were often the bottle in which clinical depressives sent out their most plangent screams for someone to care and help them.”


So true. This was me, once upon a time. Unfortunately, it tends to have the opposite effect and push people away.


in Britain we mostly do the sarcasm without any change in tone...


Maybe they have a speech impediment: https://www.youtube.com/watch?v=ziH9St7ajuw


> I try to tell them that their noise-to-signal ratio is bad, but they um... react defensively.

Defense mechanism could be one possible explanation.


I have to note that often humans fail to detect sarcasm, and police forums with religious fervor demanding the application of those ridiculous "\s" tags wherever they be deemed necessary. Small wonder, why it would be difficult to catch in a program.


Inherently ambiguous medium of hierarchical, ambiguous data requiring personal and situational context difficult to interpret.

Surprise! NLP is still hard... which is good news for anyone interested in understanding language, neural networks, o the human condition.


It's more than incongruity. Context is king. "I like being ignored" is sarcasm. But followed up with "No, really, I like being ignored. Its like a super power! I can ..." is serious (sort of).


And then you get people like me, where "I like being ignored" is not sarcasm, but a commentary/personality preference related to disliking a cultures obsession with fame and popularity and struggling to think of anything worse than being recognised/constantly under surveillance.

As you said, context is everything. It is literally impossible to detect sarcasm reliably with only the sentence in which sarcasm is contained.


There's also a blurry line between sarcasm and lies. I'll often say things that are patently untrue to people with the expectation that they know the truth (and me) well enough to get that I'm not serious.

For instance, to my sister:

"I hate you." - sarcasm. "I've already told you many times that I hate you." - obvious lie, maybe sarcasm?


Even humans have great difficulty discerning sarcasm in text. Poe's law is the famous statement that sarcasm is not distinguishable once the Overton window is sufficiently wide.


In a standup context I'd read the continuation as sarcasm as well, as a part of a stream of jokes to come.


Computers are getting smarter. They can do many stuff faster than humans. They can even detect sarcasm. But do they "understand" it? Can Computers understand a subtle joke? Maybe we could train a Computer to detect jokes and make it laugh, but can it really understand a joke? Interesting topic.


Computers will understand language like boats swim.


What does 'understand' mean, if not something functional? You mean consciousness? Tough question to answer.

Are you familiar with Daniel Dennett's 'Competence without comprehension' ideas? He points out for instance that even a very simple computer is far better at division and exponentiation than even the smartest human. It does this without any comprehension at all - a pocket calculator is far too simple to have any meaningful understanding of anything, but that has zero impact on its functional usefulness.

Another favourite example of his is evolution by natural selection.

Annoyingly I couldn't find a brief online article on the topic by the man himself.


Yeah I had consciousness in mind.


We live in such interesting times!

Any criteria we can come up with for computers would then need to be applied to people. But how could we do that, when humans answer questions so differently? Do we ask one human? A sample of humans? All humans?

I don't think we'll find a criteria that delineates computers' "understanding" from our own. Perhaps the regularity from a sample of computers would be an indication.

All this is to say, what makes us think that humans understand subtle jokes?


It is all context oriented. Lets see how these things develop. Lets ask a computer who just laughed at a joke "Why did you laugh? Or what made you laugh? Or Why did you find it funny?", and see what replies we get :D


"I laughed because 'jmp 0xdeadbeef' leads to the sound playing routine"


"- .. what a funny compiler!"


moo


Yes! I need alexa to be sarcastic.


That's irony, not sarcasm.


> That was especially true for tweets that include numbers; their accuracy rate of 80 percent more than triples previous efforts.

Which is to say that previous efforts had only half of the true positives a random number generator would have had. Neat.


Sounds like previous efforts might even have been outperformed by a naive algorithm that purely looked for one word sentences like "right", "totally" and "neat" :-)


Looking forward to Deep Sarcasm...


claims too much. and the task definition seems off: sarcasm is more like a speaker attitude, while irony is the linguistic phenomenon. another case of "lets throw an ANN onto anything".


Like a human being could ever read that text.

If you're having as much trouble reading it as I was, open the developer tools and on the body style, remove "DINPro" from the font-family, turn off the font-weight: 300 or change it to 400, and increase the font-size to 16px or whatever size you like.

If the AIs ever do take over, my one request is that they use plenty of sarcasm when they talk about designers who think unreadable text with substandard font-weight is a good thing.

Of course, being AIs, maybe they could care less.


The funny thing is that I think it's in part motivated by the desire for minimalism. But instead of minimising the form they have minimised the function!


The harder it is to read, the longer you'll spend reading it. And time spent on page is a really common vanity metric.


Or.. the harder it is to read, the more unlikely I am to read it. And will instead leave the page and find another source for the information if I care that much.


It actually looks quite nice in Firefox, it is hard to read in Chrome though. Maybe they have the one last web design team that primarily tests in FF? :D


I'm curious which OS you're using. On Windows, it looks pretty much equally bad to my eyes in Chrome, Firefox, and Edge.


Looks good in Firefox on Windows. I'm not on a high DPI monitor, which can certainly mess things up.

Taking a screenshot and zooming in with a pixel grid, the 'i' on comedian is antialiased to 3 pixels in total wide, though the 2 on the side are very light. Firefox is 2 pixels wide, but both columns are dark. Chrome is also 2 pixels wide, but the columns are rather lightly colored.

(Windows' native font antialiasing is amazing, I'm sad all apps don't use it...)


It's legible in my computer. Debian 8, with Firefox, no-script, and ublocker, with 24" screen and a forced minimum font size of something that I don't even remember.

Anything of those could be making it legible. I'd rather trust the opinion of somebody with a more standard system, and I doubt the GP is that somebody either.


It's the no-script. Allowing scripts loads a crappy font. Hurray for NoScript!


It looks good for me in Firefox on Xubuntu 16.04.


awful on mobile safari. and then if you zoom in to read it, a line no longer fits on the screen


Sarcastic CSS is the current fashion.


Cascading Snarky Sarky.


I find reader mode to be easier than modifying CSS, and it's built in to all major browsers (except desktop Chrome, funnily enough...)


So that's what the Luxo lamp in my Chrome toolbar is for! (I have the Evernote extension installed in Chrome, and it includes Clearly as well.)

It's funny, I've hardly ever used that thing. Like a dummy I forget it's there, and instead I go in and hack the CSS (mostly removing styles) and then post sarcastic comments about it.

But you're right, I just clicked the Luxo lamp and the whole page became perfectly readable.

And then I dragged the Luxo lamp over to the left where my most-used extensions are, so I'll remember it next time.

Thanks for the tip!


[flagged]


Please don't take personal swipes or post unsubstantive comments.

https://news.ycombinator.com/newsguidelines.html


It wasn’t a personal swipe, it was a friendly joke (I’m a front-end dev too). What qualifies as an unsubstantive comment? People around here are so uptight sometimes.


Your intent is obvious to you but only to you, and if you don't find an unambiguous way to encode it into your message, few people are going to get it.

One problem here might be that you're applying the standard of in-person conversation where it doesn't apply, at least not without modification. Interpreting my response, and that of users flagging, as "uptight" is a similar confusion. In person we'd all just laugh at the friendly joke and respond in kind. But the conditions are quite different here, as measured by how frequently such comments turn into brawls, and if we want to keep this place going for thoughtful conversation, we need standards that work on the internet.


Perhaps you’re right; it’s the kind of comment that would be obvious to my group of friends in other online communities, but I’m making too many assumptions about the audience here and how adversarial discussions can get. It’s one of the reasons I struggle with bigger online communities where you can’t as easily develop a report. Next time I’m joking around I’ll try to slip in a disclaimer even if it takes some of the oomph out of my joke :P.


Thanks!


You even left a comment on the site writing that. Don't be an asshole.


Fair enough, I edited the comment I posted there to take out the sarcasm and just kept the note on how to make the page readable. OK now?


Put it back in. We love sarcasm!


OK, chief! I even stepped it up and called it "scrawny text" for good measure.

I am like a politician waffling and flip-flopping as the polling winds blow to and fro.

Hmm... Chicken and waffles sounds pretty good right now!


Will look into changing that font up, many thanks for the feedback!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: