Sparse, Contextually Informed Models for Irony Detection: Exploiting User Communities, Entities and Sentiment

Byron C. Wallace, Do Kook Choe, Eugene Charniak

Introduction: The Contextual Challenge of Irony

Automated irony detection remains a significant hurdle in sentiment analysis. A system that interprets "I love this product" literally when it is meant sarcastically will produce fundamentally flawed data. The primary difficulty lies in the fact that irony is often extrinsic; it depends less on the specific words used and more on the identity of the speaker and the environment in which they are speaking.

Example of contextual irony on Reddit where the subreddit and topic ('Obamacare') provide crucial cues.

Previous models relied heavily on intrinsic features—lexical and grammatical patterns within the text. However, human understanding of irony frequently requires external context. For instance, a positive statement about "Obamacare" is likely earnest in a progressive forum but highly likely to be ironic in a conservative one. This paper proposes a model that bridges this gap by incorporating "contextualizing information" from the user communities where comments are posted.

Methods: Interaction Features and Targeted Sparsity

The authors developed a linear classification model that extends beyond standard Bag-of-Words (BoW) approaches by introducing interaction features. These features are created by crossing Noun Phrases (NNPs) and sentiment scores with the specific subreddit where a comment appeared.

Key feature types include:

  • Subreddit x Noun Phrase: Captures community-specific targets of irony.
  • Subreddit x Noun Phrase x Sentiment: Identifies "praise-as-blame" patterns, where positive sentiment toward a disliked entity signals irony.

To manage the resulting high-dimensional feature space, the authors employed a composite regularization strategy. They applied a standard $\ell_2$ penalty to base BoW features while imposing a sparsity-inducing $\ell_1$ penalty on the interaction features. This "targeted sparsity" ensures the model focuses only on the most predictive entities for each community, enhancing both robustness and interpretability.

Data and Evaluation

The study utilized a Reddit irony corpus focused on polarized communities:

  1. Politics: progressive vs. conservative subreddits.
  2. Religion: atheism vs. Christianity subreddits.

The development set comprised 1,825 annotated comments (5,625 sentences), with ground truth established by three independent annotators.

Key Results and Performance Gains

The inclusion of contextual features led to significant improvements in model performance, particularly in recall. In the political domain, adding NNP x Subreddit features increased absolute median recall by 3.4 percentage points—a relative gain of approximately 12%—without a corresponding loss in precision.

Distribution of performance gains (recall and precision) across different feature combinations in the politics domain.

On a held-out political test set, the improvement in median recall reached nearly 4.0 percentage points. Furthermore, the composite $\ell_1/\ell_2$ regularization reduced performance variance across different data splits, making the detector more reliable.

Sociolinguistic Insights

The model's sparsity allows for direct inspection of what different communities find "irony-worthy." For example:

  • In the atheism subreddit, the term "god" is a top predictor of irony.
  • In the Christianity subreddit, "professor" emerges as a key ironic target.
  • In conservative circles, "Obamacare" and "freedom" (in progressive circles) are identified as frequent hotspots for sarcasm.

Limitations and Future Directions

While sentiment features were highly effective in the political domain, they did not yield similar improvements in the religion domain. This suggests that the linguistic markers of irony may vary significantly across different topical cultures. Additionally, the current study focuses on highly polarized environments. Future work will explore expanding the model to less polarized platforms and incorporating dynamic context, such as a user's individual posting history or the immediate conversational thread.

Summary updated

BibTeX
@inproceedings{wallace2015sparse,
  author = {Byron C. Wallace and Do Kook Choe and Eugene Charniak},
  title = {{Sparse, Contextually Informed Models for Irony Detection: Exploiting User Communities, Entities and Sentiment}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2015},
  doi = {10.3115/v1/p15-1100},
}
Figure