[Paper Review] A BERT-Based Transfer Learning Approach for Hate Speech Detection in Online Social Media
This paper proposes a BERT-based transfer learning approach for hate speech detection in social media, leveraging fine-tuning across multiple BERT encoder layers to improve performance. It achieves state-of-the-art results on benchmark datasets, demonstrating superior precision, recall, and F1-score while revealing biases in data annotation through misclassification analysis.
Generated hateful and toxic content by a portion of users in social media is a rising phenomenon that motivated researchers to dedicate substantial efforts to the challenging direction of hateful content identification. We not only need an efficient automatic hate speech detection model based on advanced machine learning and natural language processing, but also a sufficiently large amount of annotated data to train a model. The lack of a sufficient amount of labelled hate speech data, along with the existing biases, has been the main issue in this domain of research. To address these needs, in this study we introduce a novel transfer learning approach based on an existing pre-trained language model called BERT (Bidirectional Encoder Representations from Transformers). More specifically, we investigate the ability of BERT at capturing hateful context within social media content by using new fine-tuning methods based on transfer learning. To evaluate our proposed approach, we use two publicly available datasets that have been annotated for racism, sexism, hate, or offensive content on Twitter. The results show that our solution obtains considerable performance on these datasets in terms of precision and recall in comparison to existing approaches. Consequently, our model can capture some biases in data annotation and collection process and can potentially lead us to a more accurate model.
Motivation & Objective
- To address the challenge of limited annotated hate speech data and inherent biases in existing datasets for hate speech detection.
- To improve hate speech detection performance using transfer learning with the pre-trained BERT model.
- To investigate the impact of different BERT encoder layers on downstream hate speech classification through novel fine-tuning strategies.
- To analyze how model predictions reveal biases in data collection and annotation processes.
- To develop a robust, context-aware classifier capable of distinguishing hate speech from offensive or neutral content.
Proposed method
- Fine-tuning a pre-trained BERT model on hate speech detection using two publicly available Twitter datasets annotated for hate, racism, sexism, and offensive content.
- Applying a novel CNN-based fine-tuning strategy to exploit syntactic and contextual information from multiple BERT transformer encoder layers.
- Evaluating performance across different BERT layer representations to determine optimal feature extraction for hate speech detection.
- Using transfer learning to leverage BERT’s general language understanding from large-scale pre-training on English Wikipedia and BookCorpus.
- Analyzing misclassified samples to identify biases in data annotation, particularly related to dialect, geographic context, and slurs.
- Comparing model predictions against human annotations to assess the model’s ability to detect contextual nuances and annotation biases.
Experimental results
Research questions
- RQ1How does fine-tuning different BERT encoder layers affect hate speech detection performance on low-resource social media datasets?
- RQ2Can a BERT-based model outperform previous state-of-the-art approaches in terms of precision, recall, and F1-score for hate speech detection?
- RQ3To what extent can the model detect biases introduced during data collection and annotation, particularly related to dialect or slurs?
- RQ4How does the model differentiate between hate speech, offensive language, and neutral content in contextually complex tweets?
- RQ5Can the model’s predictions reveal systematic annotation biases in existing hate speech datasets?
Key findings
- The proposed BERT-based model achieved state-of-the-art performance on benchmark datasets, outperforming prior methods in precision, recall, and F1-score.
- Fine-tuning with a CNN-based strategy on multiple BERT layers significantly improved detection performance by leveraging contextual and syntactic features.
- The model demonstrated an ability to detect biases in data annotation, particularly in tweets using African American Vernacular English or slurs like 'nigga' or 'faggot'.
- Misclassifications were often linked to annotation bias rather than model failure, as tweets with slurs were frequently flagged as hate when contextually neutral or offensive.
- The model successfully discriminated between implicit hate, offensive language, and neutral content, suggesting strong contextual understanding from pre-trained knowledge.
- Analysis of misclassified samples revealed that annotators often labeled slurs as hate without considering speaker identity, dialect, or social context, highlighting data bias.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.