Skip to main content
QUICK REVIEW

[Paper Review] Towards NLP with Deep Learning: Convolutional Neural Networks and Recurrent Neural Networks for Offensive Language Identification in Social Media

Andrei-Bogdan Puiu, Andrei-Octavian Brabete|arXiv (Cornell University)|Mar 2, 2019
Hate Speech and Cyberbullying DetectionComputer Science14 references3 citations
TL;DR

This paper proposes and evaluates deep learning models—specifically Convolutional Neural Networks (CNNs), LSTMs, and GRUs—alongside traditional classifiers for offensive language identification in social media tweets. Using pre-trained word embeddings, text preprocessing (stemming, lemmatization, tokenization), and TF-IDF features, the CNN outperformed RNN-based models, achieving a macro F1 score of 0.6835 on Task A, demonstrating superior performance in detecting and categorizing offensive content.

ABSTRACT

This short paper presents the design decisions taken and challenges encountered in completing SemEval Task 6, which poses the problem of identifying and categorizing offensive language in tweets. Our proposed solutions explore Deep Learning techniques, Linear Support Vector classification and Random Forests to identify offensive tweets, to classify offenses as targeted or untargeted and eventually to identify the target subject type.

Motivation & Objective

  • To identify and categorize offensive language in social media tweets using deep learning and traditional machine learning models.
  • To evaluate the effectiveness of various preprocessing techniques—stemming, lemmatization, and tokenization—on model performance.
  • To compare the performance of CNNs, LSTMs, GRUs, and traditional classifiers (e.g., SVM, Random Forest) on offensive language detection tasks.
  • To address class imbalance in offensive language datasets through data augmentation techniques.
  • To determine the optimal feature representation (e.g., TF-IDF, word embeddings) for offensive language classification.

Proposed method

  • Text preprocessing using regular expressions to remove emojis, hashtags, user mentions, and non-alphabetic characters.
  • Application of Porter stemming and part-of-speech-specific lemmatization (verbs only) to reduce word forms to root forms.
  • Tokenization of preprocessed tweets to construct a vocabulary and map words to indices for embedding lookup.
  • Use of pre-trained word embeddings (e.g., word2vec, GloVe) and look-up embedding layers in deep learning models.
  • Implementation of CNNs with ReLU activation, max-pooling, dropout, and fully connected layers for feature extraction and classification.
  • Training of LSTM and GRU-based RNNs with similar architectures to compare sequence modeling effectiveness on tweet classification.

Experimental results

Research questions

  • RQ1Which deep learning architecture—CNN, LSTM, or GRU—performs best for offensive language identification in tweets?
  • RQ2How do different preprocessing techniques (stemming, lemmatization, tokenization) impact model performance on offensive language detection?
  • RQ3What is the relative contribution of context-aware embeddings (e.g., word2vec) versus frequency-based features (e.g., TF-IDF) in classifying offensive content?
  • RQ4How effective are traditional classifiers (SVM, Random Forest, Logistic Regression) compared to deep learning models on this NLP task?
  • RQ5To what extent can data augmentation mitigate class imbalance in offensive language detection datasets?

Key findings

  • The CNN model achieved the highest macro F1 score of 0.6835 on Task A (offensive vs. non-offensive classification), outperforming both LSTM (0.4968) and GRU (0.4890) models.
  • The GRU-based model achieved a macro F1 score of 0.5168 on Task B (targeted vs. untargeted offense classification), showing moderate performance.
  • For Task C (target subject classification), the CNN achieved a macro F1 score of 0.3510, significantly outperforming the LSTM (0.3312) and GRU (0.2842) models.
  • The best-performing model on the CodaLab test set was the CNN, which generalized better than RNN-based models and traditional classifiers.
  • Data augmentation through random tweet construction improved performance on imbalanced datasets, particularly for the minority class in Task B (untargeted offenses).
  • TF-IDF and look-up embeddings were both explored, but context-aware embeddings were not used due to the task’s reliance on specific high-frequency offensive words.

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.