[Paper Review] Detecting Offensive Language in Tweets Using Deep Learning
An ensemble of LSTM-based classifiers augmented with user history features detects hate speech in tweets, achieving state-of-the-art F-scores on a 16k-tweet dataset and operating without pretrained word embeddings.
This paper addresses the important problem of discerning hateful content in social media. We propose a detection scheme that is an ensemble of Recurrent Neural Network (RNN) classifiers, and it incorporates various features associated with user-related information, such as the users' tendency towards racism or sexism. These data are fed as input to the above classifiers along with the word frequency vectors derived from the textual content. Our approach has been evaluated on a publicly available corpus of 16k tweets, and the results demonstrate its effectiveness in comparison to existing state of the art solutions. More specifically, our scheme can successfully distinguish racism and sexism messages from normal text, and achieve higher classification quality than current state-of-the-art algorithms.
Motivation & Objective
- Motivate automated hate-speech detection to improve scalability over manual moderation.
- Explore whether incorporating user history features (tendency towards Neutral, Racism, Sexism) improves classification accuracy.
- Develop a language-agnostic deep learning model that does not rely on pretrained word embeddings.
- Evaluate an ensemble of LSTM classifiers on a Twitter dataset and compare to state-of-the-art methods.
Proposed method
- Represent tweets as word frequency vectors (language-agnostic) and append user-behavior features tN, tR, tS.
- Use an ensemble of 3–5 LSTM classifiers, each taking the augmented input vector.
- Combine classifier outputs via majority voting or, when tied, the most confident prediction (Combined Decision).
- Train four-layer neural networks (embedding/input, LSTM, dense, softmax) with 3-class output (Neutral, Racism, Sexism).
- Preprocess data with Moses tokenization, cap tweet length at 30 words, and use 25k vocabulary with ADAM optimization in Keras.
- Evaluate with 10-fold cross-validation, reporting Precision, Recall, and F-score; perform 15 re-runs per setup for stability.
Experimental results
Research questions
- RQ1How accurately can a new tweet be classified into Neutral, Racism, or Sexism given the author’s past posting history?
- RQ2What is the impact of incorporating user-history features (tN, tR, tS) on hate-speech classification performance?
- RQ3Does an ensemble of LSTM classifiers outperform a single LSTM model and prior approaches on Twitter data?
- RQ4Is a language-agnostic approach without pretrained embeddings viable for detecting hate speech in short texts?
Key findings
- The ensemble with three classifiers (O + NRS + NR) achieves F-Score 0.9298 (Precision 0.9283, Recall 0.9315).
- Ensembles generally improve performance over single classifiers; the best five-classifier ensemble (xi) yields F-Score 0.9320 (Precision 0.9305, Recall 0.9334).
- Single classifiers achieve F-Scores around 0.926–0.926, while ensembles reach up to about 0.930–0.932.
- Per-class results show Sexism is easy to detect (near-perfect Precision/Recall), Racism is harder (e.g., F around 0.70), with Neutral also reliably detected (F around 0.95).
- Using user-behavior features (tN, tR, tS) provides gains over text-only baselines, demonstrating the value of personalized history information.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.