Astralis @ HASOC 2020: Analysis On Identification Of Hate Speech In Indo-European Languages With Fine-Tuned Transformers

Hiren Madhu, Shrey Satapara, Harsh RathodFIRE (Working Notes) 2020

TL;DR

This paper tackles the crucial challenge of identifying hate speech and offensive language across Indo-European languages (English, Hindi, German) using fine-tuned transformer models. The authors demonstrate that transformer-based approaches, particularly CNNs combined with BERT embeddings, achieve superior performance compared to traditional machine learning methods, highlighting the effectiveness of these advanced models for multilingual hate speech detection.

What Problem Does This Paper Address?

The proliferation of social media has unfortunately led to a significant increase in online harassment and the spread of hate speech. While much research has focused on English, there's a growing need to address this issue in other languages, especially those with diverse linguistic structures like Hindi and German. Detecting hate speech is complex due to the nuances of language, including sarcasm, indirectness, and the "online disinhibition effect" where anonymity can embolden offensive behavior. This paper aims to bridge this gap by analyzing and comparing various machine learning and deep learning models for hate speech and offensive language identification in a multilingual context, specifically within the HASOC 2020 shared task.

Methods

The researchers explored a range of methodologies, starting with traditional text classification techniques and progressing to state-of-the-art deep learning models.

  • Preprocessing: Standard steps included removing Twitter handles, URLs, and retweets, while preserving emojis as transformer models can handle them.
  • Embeddings: They experimented with TF-IDF, multilingual BERT (bert-base-multilingual-uncased), and OpenAI GPT-2 to represent text numerically.
  • Models:
    • Traditional ML: Support Vector Machines (SVM), K-Nearest Neighbors (KNN), and Naive Bayes were implemented using scikit-learn.
  • Deep Learning: Artificial Neural Networks (ANN) and Convolutional Neural Networks (CNN) were developed using TensorFlow and Keras. The CNN architecture, inspired by Yoon Kim, employed multiple branches for different n-grams (bigrams and trigrams were found to be most effective) and incorporated batch normalization and dropout for improved performance and regularization.

Datasets

The study utilized the dataset provided for the HASOC 2020 shared task, which included labeled tweets in English, Hindi, and German. The dataset was divided into two subtasks:

  • Subtask 1 (Coarse-grained): Binary classification into "Hate and Offensive" (HOF) and "Non-Hate and Offensive" (NOT).
  • Subtask 2 (Fine-grained): Classification into "Hate Speech" (HATE), "Offensive" (OFFN), and "Profane" (PRFN) categories, in addition to "None" for non-offensive content.

The paper provides detailed class distributions for both the training and test sets for each language.

Key Insights and Ideas

  • Transformer Dominance: Fine-tuned transformer models, particularly BERT and GPT-2, significantly outperformed traditional machine learning models (SVM, Naive Bayes, KNN) across most languages and subtasks. This underscores their superior ability to capture complex linguistic nuances.
  • CNN's Robustness: The CNN architecture, especially when combined with transformer embeddings (like BERT), proved highly effective. Its ability to process n-grams and learn hierarchical features from text made it adept at handling the noisy and indirect nature of tweets.
  • Multilingual Challenges: While transformers show promise, performance varied across languages. The multilingual BERT model was crucial for Hindi and German, demonstrating the importance of language-specific or multilingual pre-trained models.
  • Data Imbalance Impact: The paper notes that the imbalance in the dataset, particularly for categories like OFFN and HATE in Subtask 2, led to lower F1 scores for these classes, highlighting a common challenge in hate speech detection.

Key Results

The "Astralis" team achieved competitive results in the HASOC 2020 task. Their best-performing system, a CNN model using Bigram + Trigram embeddings with a bert-base-uncased transformer for English and bert-base-multilingual-cased for Hindi and German, demonstrated strong performance.

  • English: The bert-based-uncased Bigram + Trigram CNN model yielded the best performance in English for both subtasks. For Subtask A, it achieved an F1 Macro score of 0.858, and for Subtask B, 0.528.
  • Hindi & German: The bert-base-multilingual-cased transformer with CNN also performed well for Hindi and German. For example, in Subtask A, it achieved an F1 Macro score of 0.665 for German and 0.482 for Hindi.
  • Overall Ranking: The paper indicates that their models achieved good ranks, with their best German/B submission ranking 2nd and Hindi/B ranking 3rd.

Limitations and Future Work

  • Data Imbalance: The authors acknowledge that the imbalance in the dataset, especially for less frequent categories like "OFFN" and "HATE" in Subtask 2, negatively impacted the F1 scores for these specific classes.
  • Profane and Hate Content: Identifying profane and hate content remains a strenuous task, suggesting that current models still have room for improvement in these challenging areas.
  • Future Directions: The authors express hope that future work will explore better models and methods to enhance the effectiveness of hate speech identification. This could involve more sophisticated attention mechanisms, advanced data augmentation techniques, or exploring entirely new model architectures tailored for multilingual offensive language detection.

Summary updated

BibTeX
@inproceedings{madhu2020astralis,
  author = {Hiren Madhu and Shrey Satapara and Harsh Rathod},
  title = {{Astralis @ HASOC 2020: Analysis On Identification Of Hate Speech In Indo-European Languages With Fine-Tuned Transformers}},
  booktitle = {FIRE (Working Notes)},
  year = {2020},
  url = {https://openreview.net/forum?id=WjbrZCrPXg},
}
Figure