Skip to main content
QUICK REVIEW

[Paper Review] HASOCOne@FIRE-HASOC2020: Using BERT and Multilingual BERT models for Hate Speech Detection

Suman Dowlagar, Radhika Mamidi|arXiv (Cornell University)|Jan 22, 2021
Hate Speech and Cyberbullying DetectionComputer Science12 references5 citations
TL;DR

This paper proposes using fine-tuned BERT and multilingual-BERT models for hate speech and offensive content detection across English, German, and Hindi languages. The approach leverages transfer learning on FIRE 2019–2020 shared task datasets, achieving state-of-the-art performance with macro F1 scores up to 88.33% on English hate speech detection, significantly outperforming traditional SVM and ELMO-based methods.

ABSTRACT

Hateful and Toxic content has become a significant concern in today's world due to an exponential rise in social media. The increase in hate speech and harmful content motivated researchers to dedicate substantial efforts to the challenging direction of hateful content identification. In this task, we propose an approach to automatically classify hate speech and offensive content. We have used the datasets obtained from FIRE 2019 and 2020 shared tasks. We perform experiments by taking advantage of transfer learning models. We observed that the pre-trained BERT model and the multilingual-BERT model gave the best results. The code is made publically available at https://github.com/suman101112/hasoc-fire-2020.

Motivation & Objective

  • To develop an automated system for classifying hate speech and offensive content in multilingual social media text.
  • To evaluate the effectiveness of transfer learning using BERT and multilingual-BERT on low-resource and multilingual hate speech detection tasks.
  • To compare BERT-based models against traditional machine learning and neural network baselines such as SVM with TF-IDF and ELMO embeddings.
  • To analyze model performance and failure cases across diverse languages including English, German, and Hindi.
  • To explore joint learning strategies for improving classification of related but distinct labels: hate speech and offensive content.

Proposed method

  • Fine-tuning the pre-trained BERT-base and multilingual-BERT-base models on hate speech and offensive content detection tasks using labeled datasets from FIRE 2019 and 2020.
  • Using the [CLS] token representation from the final BERT layer as a sentence-level encoding, followed by a fully connected softmax layer for binary classification.
  • Employing transfer learning to adapt generic language representations from large-scale pre-training to downstream classification tasks with limited annotated data.
  • Comparing BERT with alternative approaches: SVM using TF-IDF, and ELMO embeddings with SVM, using the same tokenization and preprocessing pipeline.
  • Applying SentencePiece tokenization for subword-level segmentation to improve out-of-vocabulary word handling across languages.
  • Evaluating models using macro F1 and accuracy on test sets for English, German, and Hindi subtasks A and B.

Experimental results

Research questions

  • RQ1How do BERT and multilingual-BERT models perform compared to traditional machine learning and neural network baselines in multilingual hate speech detection?
  • RQ2What is the impact of transfer learning using pre-trained transformer models on classification performance across low-resource languages like Hindi and German?
  • RQ3Why do certain models, such as multilingual-BERT, misclassify a high proportion of hate speech and offensive content labels as 'NONE' in non-English languages?
  • RQ4To what extent do contextual embeddings from BERT improve classification over static or non-contextual embeddings like TF-IDF or ELMO?
  • RQ5Can joint modeling of hate speech and offensive content detection improve overall classification performance by leveraging label relationships?

Key findings

  • The BERT model achieved a macro F1 score of 88.33% and accuracy of 88.33% on the English subtask A (hate speech detection), outperforming all baselines.
  • For offensive content identification in English (subtask B), BERT achieved a macro F1 of 54.44% and accuracy of 81.57%, showing a 5–7% improvement over ELMO + SVM and SVM baselines.
  • Multilingual-BERT showed moderate performance on German subtasks, achieving 77.91% macro F1 on hate speech detection and 47.78% on offensive content identification.
  • On Hindi subtasks, multilingual-BERT achieved 63.54% macro F1 on hate speech detection and 49.71% on offensive content identification, outperforming SVM and ELMO + SVM baselines.
  • The BERT model misclassified many hate speech and offensive content instances in Hindi and German, often predicting 'NONE' or 'PROF' (profane), indicating challenges in low-resource language generalization.
  • Error analysis revealed that the model struggled most with distinguishing 'HATE' and 'OFFN' labels, frequently misclassifying them as 'PROF', especially in non-English languages.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.