Source-linked AI summary

Detecting Offensive Language in Tweets Using Deep Learning

Georgios K. Pitsilis, Heri Ramampiaro, Helge Langseth

arXiv:1801.04433v1cs.CLcs.CYcs.SI

TL;DR

Hate-speech detection in short social-media text is difficult, especially when offensive language is obfuscated and user history may contain useful signals. The paper proposes an ensemble of LSTM classifiers combining word-frequency text vectors with user behavioral features, and reports performance above current state-of-the-art methods. The approach is evaluated on a public labeled Twitter dataset, with scope affected by unretrievable tweets and room for further improvement.

  • Problem

    The paper addresses detecting hateful content in social media, where user behavioral tendencies may provide useful information beyond tweet text.

  • Method

    The approach ensembles multiple LSTM classifiers using word-frequency vectors together with features describing users' historical tendencies toward racism, sexism, or neutrality.

  • Results

    The approach outperforms current state-of-the-art methods for classifying short messages and distinguishes racism and sexism from normal text.

  • Takeaways & Limitations

    Word-frequency vectorization avoids dependence on pre-trained vectors and can represent obfuscated or newly formed offensive words in short messages.

  • Takeaways & Limitations

    The evaluation omitted tweets that were not retrievable, and the authors state that classification algorithms still have room for improvement.

Abstract

from arXiv · show

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.

1 Introduction

The paper targets automated detection of hateful social-media messages, motivated by shortcomings in manual reporting and existing language-dependent approaches. It proposes LSTM-based classifiers that combine tweet content with user behavioral features and evaluates them on labeled Twitter data.

  • Motivation: Hateful messages can harm users and communities, motivating detection before publication.The paper defines hateful messages as text expressing hatred toward a group with the intention to humiliate its members.
  • Motivation: Current platform responses rely substantially on manual user reporting, leaving a need for more effective automated detection.
  • Motivation: NLP-based detectors can be complex and language-dependent, while pre-trained vectors may miss deliberately obfuscated slang and novel spellings.
  • Motivation: User histories correlate with offensive-class labels, with reported tendency coefficients of 0.71 for racism and 0.76 for sexism.
  • Approach: The proposed solution uses multiple LSTM classifiers with user behavioral characteristics alongside text features, without pre-trained word embeddings.

2 Problem Statement

The paper formulates hate-speech detection as classifying a new user posting as Neutrality, Sexism, or Racism using the user's identity and posting history. Its goals are to improve classification and assess whether personalized historical information helps.

  • Formalization: The target classes are Neutrality, Sexism, and Racism, defined as mutually exclusive categories.
  • Research question: The task is to identify a new posting's class given the posting user's identity and history.
  • Goals: One goal is to develop a method that improves state-of-the-art hate-speech classification performance or accuracy.
  • Goals: Another goal is to measure how labeled postings from users' past histories affect classification performance or accuracy.
  • Motivation: The paper motivates new algorithms because existing automatic solutions still fall short of effective and efficient abusive-message classification.

3 Related Work

Prior work includes unsupervised NLP and machine-learning approaches, supervised neural models, and CNN-based systems, but hate-speech detection remains difficult. The paper positions deep learning as an opportunity to improve classification beyond existing approaches.

  • Existing approaches: Word-based blocking and blacklisting can miss subtle offenses and produce false positives because word meanings vary by context.
  • Existing approaches: Ordinary NLP methods can struggle with spelling variation in user-generated text, while hate-speech classification remains challenging for supervised models.
  • Unsupervised learning: Unsupervised approaches commonly exploit lexical and syntactic features or bag-of-words representations, but obfuscation can reduce their effectiveness.
  • Supervised and neural methods: Prior supervised neural work used LSTM models with character n-grams and Gradient Boosted Decision Trees, while CNN systems used character n-grams and pre-trained word vectors.
  • Open challenge: No solution had obtained an F-score above 0.93, underscoring the difficulty of the task.

4 Description of our Recurrent Neural Network-based Approach

The approach combines multiple LSTM-based classifiers with user-behavior features and word-frequency vectors to classify tweets. Classifier outputs are aggregated through voting and confidence-based conflict resolution.

  • Architecture: The model uses an ensemble of LSTM-based recurrent neural-network classifiers for tweet classification.The architecture combines outputs from multiple classifiers rather than relying on a single LSTM.
  • Architecture: The system’s high-level architecture consists of multiple classifiers whose outputs are combined into a final classification decision.Figure 1 presents this multi-classifier system view.
  • User-behavior features: User tendency features represent the proportions of a user’s historical tweets labeled Neutral, Racist, or Sexist.The features are tN,a, tR,a, and tS,a, computed from labeled subsets of each user’s tweet history.
  • Text representation: Tweets are represented with word-based frequency vectors, making the input modeling independent of the language used for posting.Word indices are determined by frequency of appearance in the corpus and used as vector elements.
  • Input and configuration: Each classifier receives vectorized tweet content together with behavioral features as input, with the ensemble containing three or five classifiers.The characteristic features are attached to each tweet’s computed content vector before input to an LSTM classifier.
  • Decision aggregation: The ensemble primarily uses majority voting and resolves unanimous disagreement by selecting the classifier with the strongest prediction confidence.The Combined Decision component implements this conflict-resolution logic.

5 Evaluation setup - Results

The evaluation tests LSTM-based ensemble schemes that combine tweet word-frequency vectors with user-behavior features on an approximately 16k-tweet corpus. Across repeated cross-validation experiments, ensembles improve performance over single classifiers, while user features and deep-learning schemes outperform relevant alternatives.

  • Data preprocessing: The preprocessing limits tweets to 30 words, pads shorter texts, converts them into word-frequency vectors, and attaches user-tendency features.The experiments vary combinations of features expressing users’ tendencies toward Neutrality, Racism, and Sexism.
  • Model architecture: Each classifier uses a four-layer architecture with an embedding input, 200-dimensional LSTM hidden layer, ReLU dense layer, and three-neuron softmax output.The output provides probabilities for Neutral, Racism, and Sexism.
  • Dataset and evaluation: The study evaluates 11 ensemble setups on approximately 16k manually labeled Twitter messages, including 1,943 Racism, 3,166 Sexism, and 10,889 Neutral tweets.The dataset is imbalanced toward Neutral tweets, and some tweets have dual labels.
  • Dataset and evaluation: Ten-fold cross-validation measures Precision, Recall, and weighted F-score, with validation-based epoch selection and repeated classifier runs for stability.Each classifier is run 15 times, and ensemble outputs combine classifier runs across 153 or, for the five-classifier ensemble, 55 combinations.
  • Results: Adding user-behavior features raises F-score from 0.9089 for textual content alone to 0.9295.The reported comparison attributes the increase to incorporating features related to users’ behavior.
  • Results: Some ensembles outperform the best single classifier, and the NRS classifier is included in the best-performing ensemble.The results also report that Sexism is easier to classify than Racism across ensembles.

6 Conclusions and Future Work

The paper presents an ensemble classifier for hateful short text that combines word-frequency representations with user-history features and reports state-of-the-art performance without pre-trained vectors. It identifies further algorithmic improvement and evaluation across datasets and languages as future work.

  • Conclusions: The proposed ensemble detects hateful short text using word-frequency vectorization and features describing users’ historical tendency to post abusive messages.The architecture was evaluated on a public dataset of labeled tweets.
  • Conclusions: The approach outperforms current state-of-the-art methods for classifying short messages, according to the authors.The paper states that no other model had achieved better performance in this task to their knowledge.
  • Conclusions: Word-frequency vectorization avoids pre-trained vectors and supports handling inventive spellings, concatenations, and slang terms in short messages.The paper gives “Islamolunatic” as an example of a frequent racist-posting term absent from popular Word2Vec or GloVe embeddings.
  • Future Work: The authors consider further improvement of the classification algorithms necessary.They also describe deep learning as having high potential for text classification and sentiment analysis.
  • Future Work: Future work will examine additional information sources and evaluate the approach on other datasets and texts written in different languages.This is intended to generalize the output of the current experiment.
Loading 1801.04433v1…