TL;DR
This paper explores how to improve online sexism detection by integrating explicit linguistic features and using continuous pretraining on large language models. While linguistic features didn't boost performance, continuous pretraining proved beneficial for the more nuanced task of categorizing sexism, suggesting that domain-specific adaptation is key for complex tasks.
What Problem Does This Paper Address?
Online platforms are rife with sexism, and while automated systems can flag it, they often struggle to explain why content is sexist. This lack of explainability hinders a deeper understanding and improvement of detection models. SemEval-2023 Task 10 aimed to address this by introducing two tasks: binary sexism detection (sexist vs. not sexist) and sexism categorization (identifying specific types like threats, derogation, animosity, or prejudiced discussions). This paper investigates how to build effective models for these tasks by exploring two main avenues: the impact of incorporating explicit linguistic features and the benefits of continuous pretraining on domain-relevant data.
Methods
The researchers employed a two-phase approach.
Phase 1: Model Selection They first benchmarked three pre-trained language models: BERT, HateBERT (BERT further pretrained on hate speech data), and DeBERTa. These models were fine-tuned on the sexism detection tasks.
Phase 2: Feature Integration and Continuous Pretraining The best-performing model from Phase 1 was then augmented with external linguistic features. Three feature extraction approaches were used:
- Empath: Analyzes text for connotations across various lexical categories.
- PerspectiveAPI: A machine learning algorithm that measures the emotional impact of text.
- HurtLex: A lexicon of aggressive, offensive, and hateful words.
These features were integrated by appending them to the input text. Additionally, the best model underwent continuous pretraining on 2 million unlabeled sentences to see if further domain adaptation would improve performance.
Datasets
- Training/Development Data: A dataset of 14,000 annotated messages for sexism detection and categorization. A local development set was created as a 15% split of this data.
- Additional Pretraining Data: 2 million unlabeled sentences (1 million from Reddit, 1 million from Gab) were used for continuous pretraining.
Key Insights and Ideas
- Linguistic Features are Redundant for Strong Models: Explicit linguistic features (Empath, HurtLex, PerspectiveAPI) did not improve the performance of already strong, domain-specific models like HateBERT. This suggests that advanced language models, especially those already pretrained on relevant data, have implicitly learned much of the information these external features aim to provide.
- Continuous Pretraining Benefits Nuanced Tasks: Continuous pretraining significantly improved performance on Task B (sexism categorization), which requires understanding subtle distinctions between different types of sexism. It had a less pronounced effect on Task A (binary detection), which is a simpler classification problem. This highlights the importance of domain adaptation for tasks demanding deeper contextual understanding.
- Domain-Specific Pretraining is Crucial: HateBERT, which was pretrained on hate speech data, outperformed general-purpose models like BERT and DeBERTa, underscoring the value of pretraining on data closely related to the target task.
Key Results
- Model Selection: HateBERT emerged as the best-performing model in Phase 1, achieving the highest mean macro-F1 scores for both Task A (0.8298) and Task B (0.6151).
- Linguistic Features: For Task A, the HateBERT model without any additional features achieved the best performance (macro-F1 of 0.8331). For Task B, a combination of HateBERT with Empath and PerspectiveAPI yielded the best result (macro-F1 of 0.6220) when considering both local and competition development sets. However, the paper emphasizes that these features were generally found to be redundant.
- Continuous Pretraining: Continuous pretraining improved Task B's performance, with the best mean macro-F1 score reaching 0.6246 for a model without additional features. For Task A, continuous pretraining did not improve the macro-F1 score compared to regular pretraining (0.8259 vs. 0.8331).
- Overall Performance: The SKAM system, using HateBERT with continuous pretraining and no additional features, ranked 45th out of 84 for Task A and 39th out of 69 for Task B on the official test set.
Limitations and Future Work
- Limitations:
- The integration of linguistic features by simply appending them to the text input might not be the most effective method. Future work could explore numerical integration of these features.
- The paper notes that the dataset is one of the cases where HurtBERT (a BERT model extended with Hurtlex) did not show improvement, suggesting that the effectiveness of features can be dataset-dependent.
- Future Work:
- Incorporate context-guided linguistic features.
- Experiment with different methods of integrating features into the classification process, potentially utilizing their numerical nature.
- Further investigate the effectiveness of HurtBERT with Empath and PerspectiveAPI on other datasets.
Summary updated