Abstract
Humor detection in natural language processing has traditionally focused on short-form texts like puns or one-liners. However, humor in online reviews often relies on complex referential incongruity—the juxtaposition of standard domain language with unexpected external concepts. This paper explores a generative language modeling approach that identifies humor by measuring the "distance" between a review's content and typical domain discourse. By utilizing Wikipedia to model referenced entities, the proposed system achieves 85.77% accuracy in humor classification and reveals a significant correlation between humor and perceived review helpfulness.
Introduction
Humor is a fundamental aspect of human expression, yet it remains a significant challenge for artificial intelligence. While previous research has successfully identified stylistic humor markers like alliteration or phonetic ambiguity in short sentences, these features often fail in long-form, narrative-driven content such as Yelp reviews. In these contexts, humor is frequently "referential," involving the creative integration of outside concepts into a specific domain. For instance, a reviewer might humorously attribute "healing properties" to a bowl of soup, comparing its effects to medicine. This paper formalizes the Theory of Incongruity—the psychological premise that humor arises from a mismatch between expectations and reality—to build a robust humor detection system.
Methodology: Modeling Incongruity
The core of the proposed approach is a generative mixture model that represents how a humorous review is constructed. The model posits that words in a review are drawn from two primary sources:
- A Background Model: Representing the standard vocabulary of the domain (e.g., typical restaurant review terminology).
- Topical Aspect Models: Representing specific entities or concepts referenced in the review, modeled using external knowledge from Wikipedia.
Entity Linking and Feature Extraction
To operationalize this, the researchers employed "Wikification" to link specific terms in a review to their corresponding Wikipedia entries. These entries serve as reference language models for "out-of-place" topics.
The system extracts several key features to quantify humor:
- Incongruity (A1, A2): These features measure the extent to which a reviewer deviates from the background model to focus on unexpected topics.
- Unexpectedness (D2, U2): Using Kullback-Leibler (KL) divergence, the model calculates the mathematical "distance" between the language of the referenced Wikipedia entity and the standard Yelp domain. A high divergence score indicates a significant topical mismatch, a strong signal for humor.
Experimental Setup
The study utilized a subset of the Yelp Dataset Challenge, comprising 1.6 million reviews. A balanced ground-truth dataset of 24,000 reviews was established:
- Humorous: Reviews with five or more "funny" votes from the community.
- Non-humorous: Reviews with zero "funny" votes.
Wikipedia served as the external knowledge base for building the topical aspect models, providing the necessary context to understand references to medicine, pop culture, or other non-culinary subjects.
Results and Discussion
The proposed model, implemented via an AdaBoost classifier, achieved an accuracy of 85.77%, significantly outperforming baselines that relied solely on unigram counts or stylistic features.
A key finding of the research is the strong relationship between humor and utility. The authors observed a 0.77 correlation between "funny" and "helpful" votes. This suggests that humor is not merely decorative; it is a strategic tool used by reviewers to make their feedback more memorable, engaging, and ultimately more useful to other consumers. When the humor classifier was used to rank reviews by helpfulness, it achieved a Precision@1 of 1.00, consistently identifying the most valuable content.
Conclusion and Future Work
This research demonstrates that referential humor in long-form text can be effectively modeled by quantifying topical incongruity against a background domain. While the model is highly effective, it remains dependent on the presence of linkable entities. Future work may involve using neural network embeddings to capture more subtle forms of humor, such as observational irony or sarcasm, which do not rely on specific external references. Additionally, applying this framework to other domains beyond restaurant reviews could help platforms surface high-quality, creative content that might otherwise be buried by simpler ranking algorithms.
Summary updated