Skip to main content
QUICK REVIEW

[Paper Review] Offensive Language Analysis using Deep Learning Architecture

Ryan Ong|arXiv (Cornell University)|Mar 12, 2019
Hate Speech and Cyberbullying DetectionComputer Science4 references5 citations
TL;DR

This paper proposes a BiLSTM-CNN deep learning architecture for offensive language detection in social media, outperforming other CNN-RNN configurations on SemEval-2019 Task 6. The authors find that ordering RNN layers before CNN layers significantly improves macro F1-score, and that CNN layers provide minimal benefit, often degrading performance due to loss of sequential information; the best model achieves 0.75 macro F1 on Subtask A, 0.65 on Subtask B, and 0.46 on Subtask C.

ABSTRACT

SemEval-2019 Task 6 (Zampieri et al., 2019b) requires us to identify and categorise offensive language in social media. In this paper we will describe the process we took to tackle this challenge. Our process is heavily inspired by Sosa (2017) where he proposed CNN-LSTM and LSTM-CNN models to conduct twitter sentiment analysis. We decided to follow his approach as well as further his work by testing out different variations of RNN models with CNN. Specifically, we have divided the challenge into two parts: data processing and sampling and choosing the optimal deep learning architecture. In preprocessing, we experimented with two techniques, SMOTE and Class Weights to counter the imbalance between classes. Once we are happy with the quality of our input data, we proceed to choosing the optimal deep learning architecture for this task. Given the quality and quantity of data we have been given, we found that the addition of CNN layer provides very little to no additional improvement to our model's performance and sometimes even lead to a decrease in our F1-score. In the end, the deep learning architecture that gives us the highest macro F1-score is a simple BiLSTM-CNN.

Motivation & Objective

  • To identify and categorize offensive language in social media text using deep learning.
  • To address class imbalance in offensive language datasets using SMOTE and class weights.
  • To determine the optimal deep learning architecture for offensive language detection, focusing on RNN-CNN layer ordering and component effectiveness.
  • To evaluate the impact of pre-trained word embeddings and hyperparameter tuning on model performance.

Proposed method

  • Used a BiLSTM-CNN architecture with word embeddings, spatial dropout, and dense layers for classification.
  • Applied a multi-stage preprocessing pipeline: removing URLs, @USER tokens, expanding contractions, and handling special characters.
  • Experimented with three pre-trained word embeddings: GloVe Twitter (100d, 200d) and GloVe Common Crawl (300d).
  • Employed macro F1-score as the primary evaluation metric due to class imbalance.
  • Used 5-fold cross-validation with early stopping based on validation macro F1-score and a 20% held-out test set.
  • Conducted manual hyperparameter tuning for epochs, spatial dropout rate, and embedding types.

Experimental results

Research questions

  • RQ1Does the order of RNN and CNN layers significantly affect offensive language classification performance?
  • RQ2Does adding a CNN layer improve performance on offensive language detection, or does it degrade it due to loss of sequential information?
  • RQ3How effective are SMOTE and class weights in mitigating class imbalance across Subtasks A, B, and C?
  • RQ4What is the optimal combination of pre-trained word embeddings and hyperparameters for maximizing macro F1-score?

Key findings

  • The BiLSTM-CNN architecture achieved the highest macro F1-score across all subtasks, outperforming all other model variations.
  • Ordering the layers as BiLSTM followed by CNN yielded significantly better performance than CNN followed by BiLSTM, with a 0.07–0.09 F1-score improvement.
  • Adding a CNN layer provided minimal or no benefit and sometimes worsened performance, likely due to loss of sequential context in text.
  • The optimal number of training epochs was 5, as performance plateaued or declined beyond this point.
  • A spatial dropout rate of 20% was optimal, but removing dropout altogether had little impact, suggesting low overfitting in the current architecture.
  • Pre-trained word embeddings, especially 300d GloVe Common Crawl, improved performance over random or no embeddings, though results varied slightly with BiGRU-CNN.

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.