Traditional natural language processing treats text classification as an objective exercise. A sentence expresses positive sentiment, discusses politics, or contains a grammatical error. Humor, however, breaks this paradigm. It is fundamentally subjective, highly contextual, and deeply intertwined with personal and demographic backgrounds. What causes one person to laugh might cause another to take offense.
To build models that truly understand human language, researchers have shifted from binary "humor detection" toward capturing the continuous, multi-dimensional spectrum of funniness, offense, and controversy. As J. A. Meaney argues in Crossing the Line: Where do Demographic Variables Fit into Humor Detection?, treating humor as a universally agreed-upon attribute fails to capture real-world nuance. Instead, modern frameworks model humor not in isolation, but alongside its social boundaries.
Isolating Humor via Micro-Edits
How do we train a machine to recognize what makes something funny? One elegant approach isolates the mechanism of humor through "micro-edits." By taking a serious news headline and replacing a single word or named entity, humans can subvert expectations and induce humor.
This setup provides an intuitive playground for neural networks. Pre-trained language models contain deep statistical representations of language; they know which words are expected to follow one another. When a micro-edit introduces an unexpected word, it creates a semantic clash—an incongruity that forms the bedrock of many jokes.
The authors of LRG at SemEval-2020 Task 7: Assessing the Ability of BERT and Derivative Models to Perform Short-Edits Based Humor Grading demonstrated that the attention mechanisms of transformer models inherently capture these short-edit dynamics, allowing them to grade the funniness of an edit without any humor-specific pre-training. To explicitly isolate this shift, Xuefeng Luo et al. utilized vector subtraction between original and edited headline embeddings, combining this semantic "delta" with LSTMs and TF-IDF features to pinpoint the exact change that triggers amusement (Funny3 at SemEval-2020 Task 7: Humor Detection of Edited Headlines with LSTM and TFIDF Neural Network System). Other approaches have successfully paired contextual representations with traditional classifiers (Enas Khwaileh et al. in ELMo-NB at SemEval-2020 Task 7: Assessing Sense of Humor in EditedNews Headlines Using ELMo and NB) or optimized advanced architectures like ERNIE 2.0 to rank which edits are funnier than others (J. A. Meaney et al. in Smash at SemEval-2020 Task 7: Optimizing the Hyperparameters of ERNIE 2.0 for Humor Ranking and Rating).
The Intersecting Dimensions of Offense and Controversy
While micro-edited headlines reveal how semantic incongruity creates humor, real-world text—such as social media posts—introduces a thornier problem: the relationship between humor and offense. A joke can be hilarious to one demographic while being deeply offensive to another.
To address this, J. A. Meaney et al. introduced a shared task framework to jointly detect and rate humor alongside offense (SemEval 2021 Task 7: HaHackathon, Detecting and Rating Humor and Offense). Instead of treating offense as an accidental failure mode of humor, models are trained to predict multiple targets simultaneously: humor intention, humor intensity, general offensiveness, and humor controversy (the variance or disagreement among human annotators).
This multi-task framing forces models to map out the complex boundaries of language. For example, a model must distinguish between text that is intentionally humorous but highly offensive, versus text that is benignly funny.
Architectural Trade-offs Between Scale and Nuance
Solving these multi-dimensional tasks requires careful architectural choices. Intuitively, one might expect the largest language model to win across all metrics. However, benchmarking reveals a more nuanced reality.
Nathan Chi et al. discovered a striking trade-off: while massive pre-trained transformers excel at identifying an author's intended humor, lighter, more constrained models are frequently more effective at predicting social nuances like offensiveness and controversy (RedwoodNLP at SemEval-2021 Task 7: Ensembled Pretrained and Lightweight Models for Humor Detection). Large models can overfit to the semantic patterns of a joke, missing the subtle social cues that trigger a negative human reaction.
To balance these demands, researchers frequently turn to hybrid architectures and feature fusion:
- Feature Fusion: Yang Bai combined the deep contextual understanding of ALBERT with traditional TF-IDF and CNN layers to capture both high-level semantics and low-level word frequency signals (hub at SemEval-2021 Task 7: Fusion of ALBERT and Word Frequency Information Detecting and Rating Humor and Offense).
- Multi-Scale Modeling: Zehao Liu et al. paired DistilBERT with a multi-scale CNN to capture both broad context and localized phrase-level triggers (UoR at SemEval-2021 Task 7: Utilizing Pre-trained DistilBERT Model and Multi-scale CNN for Humor Detection).
- Stacked Embeddings: Afrin Sultana et al. blended representations from multiple architectures (GPT-2, BERT, and RoBERTa) to create a more resilient embedding space for classification (CSECU-DSG at SemEval-2021 Task 7: Detecting and Rating Humor and Offense Employing Transformers).
From Evaluation to Generation
As models grow more adept at scoring the fine line between humor and offense, these insights feed back into generative systems. Narendra Nath Joshi evaluated how humans perceive AI-generated jokes compared to human ones, noting that while large language models can now produce humor of comparable quality, human evaluation remains heavily influenced by cognitive biases and knowledge of the joke's origin (Evaluating Human Perception and Bias in AI-Generated Humor).
Meanwhile, collaborative efforts like the creative jam session analyzed by Anne-Gwenn Bosser et al. demonstrate how structured humor corpora are actively pushing the boundaries of computational creativity (Poetic or Humorous Text Generation: Jam event at PFIA2022). By learning where the line is drawn, AI moves closer to mastering one of humanity's most complex social tools.
Key Foundational Work
Humor in Collective Discourse: Unsupervised Funniness Detection in the New Yorker Cartoon Caption Contest (2016) — contributed 1 concept elements to this direction.
A Crowd-Annotated Spanish Corpus for Humor Analysis (2018) — contributed 1 concept elements to this direction.