A Fine Line Between Irony and Sincerity: Identifying Bias in Transformer Models for Irony Detection

Aaron Maladry, Els Lefever, Cynthia Van Hee, Veronique HosteACL 2023

TL;DR

This paper investigates biases in transformer models for irony detection, finding they often rely on superficial cues like positive sentiment rather than true understanding. By analyzing model explanations and modifying data, they reveal how these models can be fooled by seemingly positive language, missing subtle irony.

What Problem Does This Paper Address?

Irony detection is a challenging task for both humans and machines. While transformer models have achieved state-of-the-art results, their "black box" nature makes it difficult to understand why they make certain predictions. This paper focuses on a specific problem: identifying and mitigating biases in these models, where they might learn spurious correlations between certain words or phrases and the label of "irony." For instance, if many ironic tweets happen to contain positive adjectives, a model might incorrectly learn that positive adjectives are a strong indicator of irony, leading to misclassifications of genuinely positive statements. This is particularly problematic for detecting subtle irony, where the positive sentiment might be the only overt cue.

Methods

The authors employ a multi-pronged approach:

  • Correlation Analysis: They first identify potential "bias words" by calculating the correlation between lemmatized unigrams (single words) and the irony label in the training data. They categorize these correlated words into adjectives, intensifiers, and topical nouns.
  • Data Manipulation: To test the impact of these bias words, they create modified datasets. For adjectives, they replace highly correlated ones with less correlated synonyms. For intensifiers, they remove them entirely, hypothesizing they are less crucial for irony detection than sentiment-bearing words.
  • Explainability Techniques: To understand how the model uses these words, they apply three state-of-the-art explainability metrics: Discretized Integrated Gradients (DIG), Layer-Integrated Gradients (LIG), and Layer-wise Relevance Propagation (LRP). These methods attribute importance scores to individual sub-tokens within a text, indicating their influence on the model's prediction. LRP is highlighted as the most reliable due to its label-specific attributions and reduced tendency to assign importance to irrelevant tokens.

Datasets

The study uses a balanced dataset for Dutch irony detection, originally collected by Van Hee et al. (2016). This dataset contains 4453 training samples and 1113 held-out test samples. Ironic tweets were collected using irony hashtags and then filtered. Non-ironic tweets were collected from the same users and manually annotated. The dataset uses a fine-grained annotation scheme but is simplified to binary irony labels for this research.

Key Insights and Ideas

  • Positive Sentiment as a Proxy: Transformer models for irony detection often rely heavily on the presence of intense positive sentiment (especially adjectives and intensifiers) as a trigger for irony, rather than understanding the underlying contrast.
  • Superficial Cues Over Substance: The models seem to pick up on superficial lexical cues and common topical nouns associated with irony, rather than grasping the nuanced semantic and contextual elements that define it.
  • Subtle Irony is Missed: This reliance on overt positive sentiment means that genuinely positive texts can be misclassified as ironic, and more subtle forms of irony, which lack explicit positive sentiment, are likely to be missed.
  • LRP as a Superior Explainer: Among the tested explainability methods, Layer-wise Relevance Propagation (LRP) proved to be the most effective and reliable for understanding transformer model attributions in this context.
  • Data Augmentation's Limited Impact (in this setup): While modifying the data by replacing adjectives with less correlated synonyms or removing intensifiers showed some promise in influencing model predictions, it did not lead to a direct improvement in performance on the held-out test set. This is hypothesized to be due to the presence of similar biases in both the training and test data.

Key Results

  • Bias Word Correlations: The study identified positive adjectives (e.g., "nice," "good"), intensifiers (e.g., "really," "very"), and topical nouns (e.g., "school," "exam") as having strong positive correlations with the irony label. Conversely, hyperlinks and positive emojis showed negative correlations.
  • Subset Performance: When evaluated on subsets of tweets containing specific bias words (adjectives and intensifiers), the model performed better on the irony label, achieving recall scores of 0.91 and 0.82 respectively. However, recall for the non-ironic label dropped significantly (0.55 and 0.60), indicating over-prediction of irony.
  • Modification Impact: Replacing adjectives with synonyms caused only minimal drops in irony probability (0.5-1%). Removing intensifiers from non-ironic tweets improved recall by 7%, while reducing irony recall by 8% and average irony probability by 8%, further supporting the hypothesis of sentiment intensity as a trigger.
  • Explainability Findings: LRP attributions were found to be more meaningful than DIG or LIG, correctly identifying primary reasons for irony predictions and avoiding over-attribution to irrelevant tokens or contradictory attributions within a single text.
  • Test Set Performance: Fine-tuning with augmented data (including modified samples) showed no direct improvement over the original training set on the held-out test set, with F1 scores remaining around 0.72.

Limitations and Future Work

  • Distinguishing Mistakes: A key limitation is the difficulty in distinguishing between genuine model mistakes and misinterpretations by the attribution techniques themselves.
  • Single Model & Data: The findings are based on a single fine-tuned model and a specific Dutch irony detection dataset. The observed patterns might differ for other models or datasets.
  • Contextual Understanding: The current models and datasets struggle with contextual understanding, which is crucial for irony detection. Social media texts are often reactions to previous content, a context not captured by the current setup.
  • Future Work:
    • Mitigation Strategies: Further research is needed on how to mitigate these biases, potentially through more advanced data augmentation or model adaptation.
  • Counterfactual Samples: Creating counterfactual samples (ironic to non-ironic and vice-versa) is proposed as a way to improve robustness.
  • External Data: Testing modified samples on new, external datasets is recommended for more reliable conclusions.
  • Additional Features: Incorporating common-sense knowledge as additional features could enhance model understanding.
  • Human Annotations: Comparing model explanations with human annotator insights on trigger words for irony could provide valuable validation.

Summary updated

BibTeX
@inproceedings{maladry2023fine,
  author = {Aaron Maladry and Els Lefever and Cynthia Van Hee and Veronique Hoste},
  title = {{A Fine Line Between Irony and Sincerity: Identifying Bias in Transformer Models for Irony Detection}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
}
Figure