A Survey of Pun Generation: Datasets, Evaluations and Methodologies

Yuchen Su, Yonghua Zhu, Ruofan Wang, Zijian Huang, Diana Benavides-Prado, Michael Witbrock · DOI

Introduction

Pun generation represents a "hard mode" for Natural Language Generation (NLG). Unlike standard tasks such as translation or summarization, generating a successful pun requires a model to simultaneously navigate polysemy (multiple meanings), phonetics (similar sounds), and contextual coherence. A pun must be surprising yet logical within its sentence structure to be perceived as humorous. This paper provides the first comprehensive roadmap for the field of computational humor, synthesizing three decades of research to categorize the evolution of pun generation from rigid, rule-based templates to the sophisticated era of Large Language Models (LLMs).

Methodology Evolution

The authors categorize pun generation methodologies into five distinct technological stages, reflecting the broader evolution of artificial intelligence:

  1. Conventional Models (1990s–2010s): Early systems relied on human-crafted templates and linguistic rules (e.g., JAPE, STANDUP). While grammatically sound, these systems lacked variety and creative range.
  2. Classic Deep Neural Networks (DNNs): The introduction of LSTMs, GRUs, and GANs allowed models to learn pun patterns directly from data. These models often utilized "ambiguity rewards" to encourage the dual-meaning nature essential to wordplay.
  3. Pre-trained Language Models (PLMs) with Fine-Tuning: Leveraging models like GPT-2, T5, or BERT, researchers fine-tuned architectures on specific joke datasets to capture the nuances of wordplay more effectively than general-purpose models.
  4. PLMs with Prompting: The current state-of-the-art involves using LLMs (such as GPT-4 or Llama 3) via zero-shot or Chain-of-Thought (CoT) prompting. This paradigm shifts away from weight updates toward "guiding" the model's existing vast knowledge base.
  5. Visual-Language Models: A nascent area exploring "rebus art" and visual puns. Models like DALL-E 3 are used to generate images that play on double meanings, such as a literal "computer mouse" caught in a "mousetrap."

Datasets and Benchmarks

The survey identifies three tiers of datasets critical to the field:

  • Generic Corpora: Large-scale data like Wikipedia or BookCorpus used for initial language pre-training.
  • Derived Datasets: Puns scraped from humor websites (e.g., "Pun of the Day") to provide domain-specific examples.
  • Human-Annotated Benchmarks: The SemEval-2017 Task 7 dataset remains the gold standard for English puns. However, the authors highlight newer, specialized datasets like ChinesePun—the first for Chinese wordplay—and Pun Rebus Art for multimodal research.

Key Insights: The "Lazy Pun" Problem

A significant finding of the survey is the identification of the "Lazy Pun" pattern. While modern LLMs are technically capable of wordplay, they often lack true creativity, tending to reuse common pun words rather than inventing original or high-quality associations.

Furthermore, the research highlights a Homographic vs. Homophonic Bias. AI models generally find homographic puns (same spelling, different meaning) easier to generate because semantic relationships are deeply embedded in their text-based training data. Conversely, homophonic puns (different spelling, same sound) are more challenging as they require the model to process phonetics independently of text strings.

To combat these issues, the paper discusses the Surprisal vs. Coherence trade-off. A high-quality pun is one where the pun word is highly unexpected in its local context but remains logical in the global context of the sentence. Providing "contextual keywords" related to both meanings of the intended pun has been shown to significantly boost success rates compared to simple prompts.

Evaluation and Results

Measuring "funniness" remains a complex challenge. The survey summarizes various metrics:

  • Automatic Metrics: Perplexity and Dist-n measure fluency and diversity, while specialized metrics like Ambiguity and Distinctiveness attempt to quantify the "punniness" of a sentence.
  • Human vs. AI: While GPT-4 can explain puns at a near-human level, human evaluators still consistently rate human-generated puns as funnier and more creative than AI outputs.
  • The Multilingual Gap: English dominates the current research. Languages like Chinese, which rely on characters and tones, require entirely different morphological strategies (such as radical-based puns) that current models have not yet mastered.

Future Directions

The authors suggest that the future of pun generation lies in moving beyond the "lazy" generation patterns of current LLMs. Promising frontiers include more sophisticated prompting techniques, such as iterative bootstrapping or tree-of-thought reasoning. Additionally, the integration of multimodal approaches (text-to-image) offers a way to mitigate the comprehension challenges inherent in single-modality puns, potentially leading to more engaging and creative computational humor.

Summary updated

BibTeX
@misc{su2025survey,
  author = {Yuchen Su and Yonghua Zhu and Ruofan Wang and Zijian Huang and Diana Benavides-Prado and Michael Witbrock},
  title = {{A Survey of Pun Generation: Datasets, Evaluations and Methodologies}},
  year = {2025},
  eprint = {2507.04793},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.04793},
}
Figure