Getting Serious about Humor: Crafting Humor Datasets with Unfunny Large Language Models

Zachary Horvitz, Jingru Chen, Rahul Aditya, Harshvardhan Srivastava, Robert West, Zhou Yu, Kathleen R. McKeownarXiv 2024 · DOI

Introduction

Humor detection remains a "grand challenge" in Natural Language Processing (NLP) due to its subjective and context-dependent nature. Traditional training requires "aligned" datasets—pairs of sentences where one is a joke and the other is a nearly identical serious statement. Creating such data is labor-intensive and expensive. This research explores an innovative solution: leveraging the inherent "unfunniness" of Large Language Models (LLMs) to automate the creation of high-quality humor datasets.

The "Unfunning" Paradigm

While LLMs struggle to generate original, high-quality humor, they excel at the inverse task: "unfunning." This process involves taking a satirical or humorous text and editing it to be serious while maintaining high token-level similarity. This asymmetry allows researchers to generate large-scale aligned datasets that teach models to distinguish humor based on specific word choices or "twists" rather than general topics.

Visual examples of the "unfunning" process applied to satirical headlines and code-mixed English-Hindi tweets.

Methodology

The researchers employed several strategies to test the efficacy of LLM-driven dataset creation:

  1. Few-Shot Prompting: Models like GPT-4 and Mistral-7B were provided with examples of (humorous, serious) pairs to learn the transformation.
  2. Baselines: LLM performance was compared against RoBERTa-SWAP, a masked language model baseline that replaces "surprising" tokens with "boring" ones.
  3. Cross-Lingual Application: The method was tested on English-Hindi code-mixed tweets, using GPT-4 as a secondary filter to ensure the "serious" versions were truly devoid of humor.

Key Insights: Asymmetrical Difficulty

A central finding is that humor removal is significantly easier for AI than humor generation. LLMs, trained to be helpful and neutral, are naturally predisposed to stripping away the "punchline" of a joke.

Human evaluation metrics comparing LLM-generated content against human-curated benchmarks for realism, humor, and coherence.

Human evaluations revealed that GPT-4’s "unfunned" headlines were perceived as "real news" approximately 49-51% of the time, outperforming original human players in the Unfun game (33%). Conversely, only 10% of GPT-4’s attempts at satire were rated as genuinely funny, compared to 24% for headlines from The Onion.

Performance and Robustness

The utility of these synthetic datasets was validated through classifier performance:

  • Detection Accuracy: Classifiers trained on GPT-4’s synthetic "unfun" data achieved 76.5% accuracy on holdout sets, nearing the 80.3% mark set by human-gold-standard data.
  • Adversarial Strength: Synthetic examples serve as effective adversarial data. By presenting a sentence that looks like a joke but lacks the twist, they force models to learn deeper semantic features rather than relying on surface-level keywords.
  • Code-Mixed Success: In the English-Hindi task, filtering with GPT-4 reduced the residual humor rate in synthetic "serious" sets from 16% to just 3.6%.

Conclusion

By reframing the LLM's lack of humor as a feature rather than a bug, this research provides a scalable path for building robust humor detection systems. Future work may use these high-quality synthetic datasets to bridge the gap in humor generation, eventually helping models understand the underlying mechanics of wit.

Summary updated

BibTeX
@misc{horvitz2024getting,
  author = {Zachary Horvitz and Jingru Chen and Rahul Aditya and Harshvardhan Srivastava and Robert West and Zhou Yu and Kathleen R. McKeown},
  title = {{Getting Serious about Humor: Crafting Humor Datasets with Unfunny Large Language Models}},
  year = {2024},
  eprint = {2403.00794},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2403.00794},
}
Figure