Chandler: An Explainable Sarcastic Response Generator

Silviu Oprea, Steven Wilson, Walid MagdyEMNLP 2021

TL;DR

This paper introduces Chandler, a novel system for generating sarcastic responses to user utterances. Unlike previous methods that rely on simplistic "opposite meaning" assumptions, Chandler is grounded in a linguistic theory of sarcasm (Implicit Display Theory), allowing it to generate not only sarcastic responses but also explanations for why they are sarcastic. This explainability is crucial for building more accountable and less offensive conversational agents.

What Problem Does This Paper Address?

Sarcasm is a common and complex form of human communication, often used to convey humor, criticism, or social bonding. While sarcasm detection has seen significant research, generating sarcastic responses has lagged behind. Existing sarcasm generation systems typically assume that sarcasm means the opposite of what is literally said. This is a flawed assumption, as it's neither necessary nor sufficient for sarcasm to occur. This oversimplification limits the expressiveness and naturalness of conversational agents. Furthermore, a lack of explainability in current systems makes it difficult to understand why a particular response is sarcastic, hindering trust and potentially leading to misinterpretations or offense. This paper aims to address these limitations by developing a sarcasm generator that is theoretically grounded, explainable, and capable of producing more nuanced and contextually appropriate sarcastic responses.

Methods

Chandler's generation process is built upon the Implicit Display Theory (IDT), which posits that sarcasm occurs within an "ironic environment" and implicitly displays three components: a failed expectation, pragmatic insincerity, and a negative attitude towards the failure.

The system's methodology involves:

  1. Identifying an Ironic Environment: The system assumes the input utterance (Uin) proposes an event P, and the failed expectation (Q) is the negation of P (i.e., ¬P).
  2. Allusion to Expectation: To allude to the failed expectation, Chandler uses the COMET commonsense knowledge graph to infer a proposition 'a' related to Uin via one of four coherence relation types: xNeed, xAttr, xReact, and xEffect. These relations describe what a user needed, how they are perceived, how they might react, or the effects of an action.
  3. Pragmatic Insincerity: This is achieved by generating a response that expresses the negation of the inferred proposition 'a' (i.e., ¬a), creating an incongruity with the original input.
  4. Negative Attitude: The system augments the negated proposition with verbal cues like hyperbole and interjections to convey a negative attitude.
  5. Logical Form to Text: The generated sarcastic response is expressed as emotion(¬a), where emotion is a function that adds the negative attitude. This logical form, along with the coherence chain linking 'a' to the failed expectation Q, forms the basis of the explanation.

The system generates four responses for each input, one for each relation type, allowing for diverse sarcastic expressions.

Datasets

  • COMET (Bosselut et al., 2019) fine-tuned on ATOMIC (Sap et al., 2019): Used for inferring the 'a' proposition based on if-then relations from the input utterance.
  • Corpus from Wilson and Mihalcea (2019): Used as input texts for the evaluation survey. This corpus consists of short texts (extracted from tweets) describing user actions.
  • Sentiment classifier from Barbieri et al. (2020): Used to categorize input texts into very negative, negative, neutral, and very positive partitions.

No new benchmark datasets were introduced.

Key Insights and Ideas

  • Beyond "Opposite Meaning": The paper strongly argues that the traditional "opposite meaning" theory of sarcasm is insufficient. Grounding generation in a more robust linguistic theory like IDT allows for more nuanced and accurate sarcasm.
  • Explainability as a Core Feature: Chandler's ability to provide explanations for its sarcastic outputs is a significant contribution. This addresses the critical need for accountability in AI systems, especially those dealing with potentially sensitive communication like sarcasm.
  • Leveraging Commonsense Knowledge: The use of COMET and ATOMIC to infer relationships between input utterances and potential expectations is a clever way to inject commonsense reasoning into sarcasm generation.
  • Diversity through Relation Types: Generating multiple responses based on different coherence relation types (xNeed, xAttr, xReact, xEffect) leads to more diverse and specific sarcastic outputs, avoiding repetitive or generic responses.
  • The Power of "Attribute" Sarcasm: The evaluation suggests that sarcasm targeting user attributes (xAttr) is perceived as particularly effective and coherent.

Key Results

  • Sarcasm Scores: Chandler achieved comparable or higher sarcasm scores than state-of-the-art generators like SarcasmBot and DialoGPT+R3.
  • Specificity and Coherence: Chandler's responses were perceived as more specific and coherent than those of DialoGPT, though slightly less specific than DialoGPT.
  • Diversity: Chandler generated more diverse responses compared to SarcasmBot, which produced a very limited set of repetitive outputs.
  • Best Performing Variant: The Ch-xAttr variant, which focuses on user attributes, achieved the highest sarcasm score and was perceived as highly coherent and specific.
  • Humor: Ch-xAttr and Ch-xNeed variants also scored highest in humor.

Limitations and Future Work

  • Reliance on Predefined Patterns: While the core generation is theory-based, the conversion of logical form to text still relies on predefined patterns, which could be expanded.
  • Input Assumption: The system assumes the input utterance expresses a proposition P and the expectation Q is ¬P. This might not hold for all sarcastic utterances.
  • Limited Scope of IDT Components: The paper focuses on specific aspects of IDT, and further exploration of its components could lead to richer generation.
  • Future Work: The authors suggest exploring policy-based generation with external rewards for potentially higher perceived sarcasm. They also leave open the possibility of other strategies for converting logical form to text.

Summary updated

BibTeX
@inproceedings{oprea2021chandler,
  author = {Silviu Oprea and Steven Wilson and Walid Magdy},
  title = {{Chandler: An Explainable Sarcastic Response Generator}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
}
Figure