Source-linked AI summary

Detecting Hate Speech in Social Media

Shervin Malmasi, Marcos Zampieri

arXiv:1712.06427v2cs.CL

TL;DR

The paper asks how to distinguish hate speech from general profanity in social-media text, addressing limitations of binary abusive-language classification. It applies a linear SVM with lexical features to a three-class annotated tweet dataset, achieving 78% accuracy; the main challenge is separating hate speech from profanity.

  • Problem

    The paper addresses the need to distinguish hate speech from offensive profanity rather than treating abusive language as a binary hate-speech task.

  • Method

    The study establishes a lexical baseline with a linear SVM using character n-grams, word n-grams, word skip-grams, and Brown clusters.

  • Results

    78% accuracy is achieved across three classes, with character 4-grams performing best among the evaluated feature types.

  • Takeaways & Limitations

    Distinguishing profanity from hate speech is a very challenging task, with the strongest confusion occurring between HATE and OFFENSIVE content.

  • Takeaways & Limitations

    Future work should investigate ensemble classifiers, informative features, and error analysis of misclassified instances.

Abstract

from arXiv · show

In this paper we examine methods to detect hate speech in social media, while distinguishing this from general profanity. We aim to establish lexical baselines for this task by applying supervised classification methods using a recently released dataset annotated for this purpose. As features, our system uses character n-grams, word n-grams and word skip-grams. We obtain results of 78% accuracy in identifying posts across three classes. Results demonstrate that the main challenge lies in discriminating profanity and hate speech from each other. A number of directions for future work are discussed.

1 Introduction

The paper addresses abusive-language detection in social media by distinguishing hate speech from general profanity. It establishes a lexical baseline for this three-class task using an annotated English-tweet dataset.

  • Abusive-language detection has become an active area spanning blogs, micro-blogs, and social networks.
  • The dataset labels tweets as HATE, OFFENSIVE language without hate speech, or OK.
  • Most earlier studies modeled abusive-language detection as binary classification, which can encourage reliance on offensive-word frequency.
  • Profanity alone does not establish hate speech, while hate speech can denigrate or threaten without profanity.
  • The paper establishes a lexical baseline to measure task difficulty and identify challenges for future work.

2 Related Work

Related work includes computational studies of abusive language, hate speech, and bullying, with most hate-speech research using binary distinctions. Research has also expanded beyond English.

  • Prior work applied sentiment analysis and LDA topic models to detect bullying in tweets.
  • Most reported hate-speech studies used binary classification, such as hate speech versus non-hate speech.
  • Abusive-language detection research has expanded to Arabic, Chinese, German, and Slovene datasets or systems.

3 Methods

The experiments use a three-class English-tweet dataset with a linear SVM and lexical features, evaluated through stratified 10-fold cross-validation against baseline and oracle references.

  • 3.2 Classifier and features: The classifier is a linear SVM using surface n-grams, word skip-grams, and Brown clusters.
  • 3.1 Data: The dataset contains 14,509 English tweets annotated by at least three annotators.
  • 3.1 Data: Tweets are labeled HATE, OFFENSIVE, or OK, representing hate speech, offensive language without hate speech, or no offensive content.
  • 3.3 Features: Surface features include character n-grams of orders 2–8 and word n-grams of orders 1–3, with character n-grams crossing word boundaries.
  • 3.3 Features: Word skip-grams include 1-, 2-, and 3-skip bigrams to approximate longer-distance dependencies.
  • 3.4 Evaluation: Performance is assessed with stratified 10-fold cross-validation using accuracy, majority-class, and oracle comparisons.

4 Results

Character 4-grams provide the strongest individual feature performance, but the three-class task remains difficult, especially for distinguishing HATE from OFFENSIVE content. More data improves accuracy, with slower gains after 15,000 training instances.

  • Overall performance: The oracle reaches 91.6% accuracy, indicating that the evaluated feature sets miss a substantial portion of samples.
  • Feature comparison: Character 4-grams achieve the best performance among the individual feature types, while word unigrams also perform well.
  • Feature comparison: Combining all features fails to match character 4-grams and expands dimensionality to 5.5 million features.
  • Learning curve: Accuracy increases continuously with more training instances while cross-validation variability decreases.
  • Learning curve: Accuracy improves much more slowly after 15,000 training instances.
  • Error analysis: The greatest confusion is between HATE and OFFENSIVE texts, with substantial OFFENSIVE content also misclassified as non-offensive.

5 Conclusion

The paper establishes a lexical baseline for three-way hate-speech detection and finds that profanity–hate-speech discrimination remains especially difficult. It identifies feature analysis, ensemble methods, metalearning, and error analysis as directions for extending the work.

  • Conclusion: 78% accuracy was achieved by a character 4-gram model distinguishing hate speech, profanity, and other texts.The model used standard lexical features with a linear SVM classifier.
  • Conclusion: The experiment addresses a setting that includes non-hate-speech profanity, unlike earlier binary distinctions between hate speech and socially acceptable texts.This makes profanity a separate class rather than part of a single non-hate-speech category.
  • Future Work: Future extensions include robust classifier ensembles, metalearning, linguistic analysis of informative features, and error analysis of misclassified instances.These directions are intended to investigate classifier performance, feature behavior, and annotation issues more thoroughly.
  • Future Work: Coarse and obscene words are informative for both HATE and OFFENSIVE classes, which confuses the classifiers.Words targeting ethnic and social groups are prominent for HATE, while grammatical words are informative for OK.
Loading 1712.06427v2…