Skip to main content
QUICK REVIEW

[Paper Review] NLP-CUET@DravidianLangTech-EACL2021: Offensive Language Detection from Multilingual Code-Mixed Text using Transformers

Omar Sharif, Eftekhar Hossain|arXiv (Cornell University)|Feb 28, 2021
Hate Speech and Cyberbullying DetectionComputer Science15 citations
TL;DR

This paper proposes a transformer-based system for offensive language detection in multilingual code-mixed text, focusing on Tamil, Malayalam, and Kannada mixed with English. It evaluates multiple models, finding XLM-R best for Tamil and Malayalam, and m-BERT for Kannada, achieving weighted F1 scores of 0.76, 0.93, and 0.71 respectively, significantly outperforming traditional ML and deep learning methods.

ABSTRACT

The increasing accessibility of the internet facilitated social media usage and encouraged individuals to express their opinions liberally. Nevertheless, it also creates a place for content polluters to disseminate offensive posts or contents. Most of such offensive posts are written in a cross-lingual manner and can easily evade the online surveillance systems. This paper presents an automated system that can identify offensive text from multilingual code-mixed data. In the task, datasets provided in three languages including Tamil, Malayalam and Kannada code-mixed with English where participants are asked to implement separate models for each language. To accomplish the tasks, we employed two machine learning techniques (LR, SVM), three deep learning (LSTM, LSTM+Attention) techniques and three transformers (m-BERT, Indic-BERT, XLM-R) based methods. Results show that XLM-R outperforms other techniques in Tamil and Malayalam languages while m-BERT achieves the highest score in the Kannada language. The proposed models gained weighted $f_1$ score of $0.76$ (for Tamil), $0.93$ (for Malayalam), and $0.71$ (for Kannada) with a rank of $3^{rd}$, $5^{th}$ and $4^{th}$ respectively.

Motivation & Objective

  • To develop an automated system capable of detecting offensive content in multilingual code-mixed social media text, particularly in Dravidian languages.
  • To address the challenge of code-switching complexity, which hinders monolingual models from effectively classifying multilingual offensive content.
  • To establish a robust baseline for future research by evaluating diverse models—traditional ML, deep learning, and transformer-based approaches—on a shared benchmark dataset.
  • To analyze model performance and error patterns across three Dravidian languages (Tamil, Malayalam, Kannada) with code-mixed English.

Proposed method

  • The system employs a multi-class classification framework to identify six offensive language classes: Not Offensive (NF), Offensive-Targeted-Insult-Other (OTIO), Offensive-Targeted-Insult-Individual (OTII), Offensive-Targeted-Insult-Group (OTIG), Not-Tamil/Not-Malayalam (NT/NM), and Not-Kannada (NK).
  • A range of models are evaluated: traditional machine learning (Logistic Regression, SVM), deep learning (LSTM, LSTM with Attention), and transformer-based models (m-BERT, Indic-BERT, XLM-R).
  • Word embeddings (Word2Vec, FastText) and TF-IDF features are used as input representations for non-transformer models.
  • For transformer models, fine-tuning is performed on the code-mixed datasets with a batch size of 4 for XLM-R and 12 for m-BERT and Indic-BERT.
  • Model performance is evaluated using weighted F1 score, precision, and recall, with error analysis conducted via confusion matrices for the best-performing models per language.

Experimental results

Research questions

  • RQ1How do traditional machine learning, deep learning, and transformer-based models compare in classifying offensive content in multilingual code-mixed text?
  • RQ2Which transformer model—m-BERT, Indic-BERT, or XLM-R—performs best for offensive language detection in Tamil, Malayalam, and Kannada code-mixed text?
  • RQ3What are the primary failure modes and class-specific misclassification patterns in the best-performing models across the three languages?
  • RQ4To what extent does class imbalance affect model performance, particularly for rare offensive categories like OTIO and OTIG?

Key findings

  • XLM-R achieved the highest weighted F1 score of 0.76 for Tamil, outperforming all other models, including m-BERT and Indic-BERT.
  • For Malayalam, XLM-R achieved a weighted F1 score of 0.93, ranking 3rd overall, with m-BERT and Indic-BERT scoring 0.90 and 0.92 respectively.
  • In Kannada, m-BERT achieved the highest weighted F1 score of 0.71, slightly outperforming XLM-R, and was selected as the best model based on precision and recall metrics.
  • Transformer-based models significantly outperformed both traditional machine learning and deep learning models, with F1 score improvements of 0.03 for Tamil, 0.05 for Malayalam, and 0.23 for Kannada.
  • Error analysis revealed high misclassification rates for OTIO (0% true positive rate in Tamil, 100% in Kannada), likely due to class imbalance and linguistic complexity in code-switched insults.
  • The model showed strong performance on the NF class but struggled with rare offensive categories like OTIG and OTII, especially in Malayalam, where only 2 out of 27 OTII instances were correctly classified.

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.