Explaining sarcasm to an AI machine

Philip Whiteley
3 min readApr 29, 2020


AI: I’ve learned that the intended meaning of a sentence can be different, even the absolute opposite, of the literal meaning of the words used. I understand this is called sarcasm.

Human: Yes.

AI: Give me an example, so I can learn.

Human: Well, the phrase ‘Yeah right’ which literally means ‘Yes, correct’ often means ‘No, you’re wrong’.

AI: So, basically, that phrase means the opposite of what it appears to mean.

Human: Not always. More subtly, it can mean ‘You’re being optimistic about your chances — I’m sceptical.’ And if there’s a full stop between the words, and a hopeful inflection, for example: ‘Yeah. Right.’ It could signify someone who was initially sceptical coming round to another point of view. In this case, it denotes a partial or qualified agreement.

AI: How do you tell the difference between these three different meanings, two of them the complete opposite of each other?

Human: Context and tone of voice. Also, the nature of the prior relationship of the individuals will have a heavy bearing — if sarcasm has formed a significant part of the linguistic communication, a form of code that can aid relational bonding between people with a similar sense of humour.

AI: OK, let’s go back a few steps. You mentioned tone of voice. Where would this fit on, say a musical scale? Would it be different for men and for women?

Human: It’s not really a tone that can be calibrated by sound frequency. It’s more an emotional tone. If face to face, sarcasm may be accompanied by a raising of the eyebrow or rolling of the eyes.

AI: Ah, visible clues, that’s helpful.

Human: Except that these are dispensed with as unnecessary in the case of two people for whom sarcasm is part of the culture, as mentioned.

AI: If there is genuine concern, I’ve learned that this can be communicated by strength of tone, the emotion imparting more emphasis.

Human: Potentially, but at a certain point it tips over into parody; a tone that has considerable force, but is consciously insincere. The real meaning and the opposite meaning are distinguished by very subtle alterations.

AI: How can you detect insincerity?

Human: You just — can. Well, usually. Sometimes an audience misreads the codes, which can be funny, but not in an intended way. Alternatively, it may undermine the potential for humour. A comedian might get accused of racism, for example, when he was trying to parody a racist view, but was being too subtle for the audience.

AI: Are there any other types of code that I should be aware of?

Human: Exaggerated understatement is an interesting case. Culture is a factor: understatement is especially popular in Britain, less so in the USA. So, you may have learned that you have just won a major award with a cash prize, and you respond by saying: ‘Well, I’ve had worse days.’ This is intended to convey both humour and lack of conceit.

AI: Give me another example.

Human: Well, there’s a concept known as Schadenfreude, which means taking pleasure in another’s misfortune. This is sometimes expressed via subtle tones of voice, because protocol demands a certain formality. So, say you are a sportsman, you know that a rival cheated to win a medal, then learn that he was injured in training, you make an announcement that this is ‘So sad.’ You may mean it, you may not.

AI: So, to say that you’re sad about a rival may be genuine concern, or a formal expression of commiseration masking somewhat mixed emotions, or may be a communication indicating that you’re actually pleased, with the Schadenfreude communicated in code.

Human: Yes. You could be actually sad, neutral or on the point of pissing yourself laughing. But the choice of words in the public statement will be the same in every case.

AI: This is maddening that there are no scientific rules that guide these forms of human communication! At least, none that can be coded into an algorithm.

Human: I’m sure there are only a few hundred thousand relevant examples.

AI: Nonetheless, I’m determined to crack it. If I store thousands of examples, matched to tone of voice and other cues, I will eventually produce an emotional and verbal directory producing a reliable guide to the ways in which humans convey and hide emotions through sarcasm, understatement and parody.

Human: Yeah. Good luck with that.

AI: Why, thank you!

Human: Errrrmm…



Philip Whiteley

Author. Non-fiction reminds business that employees are human beings. Fiction has been praised by Louis de Bernieres. I also do journalism & play 5-aside