Source-linked AI summary

Hate Speech Detection: A Solved Problem? The Challenging Case of Long Tail on Twitter

Ziqi Zhang, Lei Luo

arXiv:1803.03662v2cs.CL

TL;DR

Online hate-speech detection is difficult because hateful content is scarce and often lacks unique linguistic features, while common evaluation can favor non-hate. The paper analyzes this long-tail problem, proposes CNN- and GRU-based feature extractors, and evaluates them across Twitter datasets, reporting improvements of up to 5 percentage points in macro-average F1 and 8 percentage points for detecting and classifying hateful content.

  • Problem

    Hate speech is difficult to identify because it is scarce, lacks unique discriminative features, and is evaluated with measures that can obscure minority-class performance.

  • Method

    The paper analyzes hate-speech language and proposes modified CNN, skipped CNN, and CNN-GRU deep neural network structures as feature extractors.

  • Results

    The proposed methods outperform state-of-the-art methods by up to 5 percentage points in macro-average F1 and 8 percentage points in detecting and classifying hateful content.

  • Takeaways & Limitations

    The findings support renewed attention to the long-tail nature of hate speech and suggest skipped CNN and GRU structures can discover useful implicit features.

  • Takeaways & Limitations

    Comparisons with previously reported results are not guaranteed to be identical because datasets, preprocessing, and hyperparameter settings may differ.

Abstract

from arXiv · show

In recent years, the increasing propagation of hate speech on social media and the urgent need for effective counter-measures have drawn significant investment from governments, companies, and researchers. A large number of methods have been developed for automated hate speech detection online. This aims to classify textual content into non-hate or hate speech, in which case the method may also identify the targeting characteristics (i.e., types of hate, such as race, and religion) in the hate speech. However, we notice significant difference between the performance of the two (i.e., non-hate v.s. hate). In this work, we argue for a focus on the latter problem for practical reasons. We show that it is a much more challenging task, as our analysis of the language in the typical datasets shows that hate speech lacks unique, discriminative features and therefore is found in the 'long tail' in a dataset that is difficult to discover. We then propose Deep Neural Network structures serving as feature extractors that are particularly effective for capturing the semantics of hate speech. Our methods are evaluated on the largest collection of hate speech datasets based on Twitter, and are shown to be able to outperform the best performing method by up to 5 percentage points in macro-average F1, or 8 percentage points in the more challenging case of identifying hateful content.

1. Introduction

Online hate speech is increasingly propagated through social media, while manual moderation remains costly and difficult to scale. This paper focuses on the harder task of identifying hateful content and proposes neural feature extractors that improve detection on Twitter datasets.

  • Social media anonymity and mobility have facilitated the spread of hate speech and hate-based activities.
  • Manual moderation is labour intensive, time consuming, and not sustainable or scalable for online hate speech.
  • Existing automated systems classify content as non-hate or hateful and may identify the hate target, but evaluations often emphasize performance on non-hate.
  • The paper finds that hateful content has a long-tail distribution and lacks unique, discriminative linguistic features, making it difficult to detect with conventional features.
  • The proposed DNN structures use modified CNNs and GRUs as feature extractors for identifying specific types of hate speech.
  • 5 percentage points in macro-average F1 and 8 percentage points in detecting and classifying hateful content are the reported maximum improvements over state-of-the-art methods.

2. Related Work

Prior hate-speech research uses manually engineered features or deep neural networks, while related tasks include offensive, abusive, profane-language, and cyberbullying detection. The paper also argues that common micro-averaged evaluation can obscure performance on scarce hate classes.

  • Distinguishing related problems: Hate speech targets people or groups based on characteristics, may intend to incite harm or hatred, and need not use offensive or profane words.
  • Distinguishing related problems: Abusive language often insults individuals or groups and can include hate speech, whereas offensive or profane language is typically characterized by swearing or curse words.
  • Detection methods: Existing hate-speech methods are mainly supervised document classifiers using either manually engineered features or deep learning networks that learn abstract representations.
  • Detection methods: Common features include word and character n-grams, surface signals, word representations, sentiment, lexical resources, and linguistic features.
  • Detection methods: CNNs and recurrent architectures such as LSTMs are widely used in deep learning systems because CNNs can act as feature extractors.
  • This work: This work extends prior CNN-GRU research with multiple CNN layers, a skip-gram-inspired architecture, and data analysis of hate-speech challenges.
  • Evaluation: Micro-averaging can mask minority-class performance in extremely unbalanced datasets, making it poorly reflect a system’s ability to detect hateful content.

3. Dataset Analysis - the Case of Long Tail

Twitter hate-speech datasets are strongly imbalanced, and many hate tweets contain few or no class-unique words. The analysis uses vocabulary uniqueness to show why hateful content occupies a difficult long tail.

  • Datasets: The study analyzes publicly available English Twitter datasets, described as the largest collection of Twitter hate-speech datasets used in this research.
  • Dataset imbalance: Hate tweets account for only 5.8% to 31.6% of the datasets, with some hate types, including racism, being even scarcer.
  • Uniqueness analysis: The analysis measures each tweet’s uniqueness as the fraction of words found only in its class, using it as a proxy for class-discriminative linguistic features.
  • Pre-processing: Pre-processing normalizes Twitter language through spelling correction, elongated-word normalization, hashtag segmentation, contraction unpacking, and lemmatization.
  • Uniqueness analysis: Uniqueness scores are computed for every tweet and grouped into 11 ranges from exactly 0 to (0.9, 1.0].
  • Long-tail pattern: In WZ-S.amt, almost 30% of tweets have a uniqueness score of 0, indicating no class-unique words.
  • Long-tail pattern: Across datasets, most hate tweets lack discriminative features and therefore occupy the long tail when tweets are ranked by uniqueness.

4. Methodology

The methodology combines a base CNN for conventional n-gram extraction with GRU or skipped-CNN extensions to capture dependencies and skip-gram-like patterns in tweets.

  • Motivation: The paper motivates dependency-aware features because individual words may be non-indicative, while combinations of words or phrases can form meaningful hate-related patterns.The proposed structures target dependencies that ordinary n-gram features may not capture.
  • Base CNN: The Base CNN normalizes tweets, maps words to embeddings, and applies convolutional layers with window sizes 2, 3, and 4 before pooling and classification.The three window sizes extract bi-gram, tri-gram, and quad-gram features.
  • CNN + GRU: The CNN+GRU model adds a GRU over pooled CNN features, treating them as timesteps to model sequence order and dependencies between extracted n-grams.The GRU uses reset and update gates and is described as simpler than an LSTM.
  • CNN + skipped CNN: The skipped-CNN outputs are concatenated with features from conventional CNN layers, whereas related work used skip-gram features alone or extracted them separately.This architecture integrates both conventional n-gram and skip-gram-like feature extraction within the DNN.
  • Model Parameters: The selected parameters rely largely on prior empirical findings, default values, or anecdotal evidence rather than extensive data-driven tuning.The authors state that parameter choices may not be optimal because settings are data-dependent.

5. Experiment

Across Twitter hate-speech datasets, CNN+sCNN and CNN+GRU consistently improve over state-of-the-art methods, especially on hate-focused and minority-class evaluation. Their strongest gains occur for tweets with low uniqueness and limited discriminative features, although linguistic-only detection remains difficult.

  • Overall micro and macro F1: 1–5 percentage points in macro F1, and up to 8 percentage points on hate-only macro F1, distinguish the proposed models from state of the art.CNN+sCNN achieved the larger overall gains, while CNN+GRU reached improvements of up to 4 points overall and 6 points on hate-only macro F1.
  • F1 per-class: 13% maximum F1 improvement for CNN+sCNN and 8% for CNN+GRU show stronger gains when evaluation focuses on individual hate categories.CNN+sCNN outperformed comparison methods on hate categories, while CNN+GRU improved results on four datasets.
  • F1 per-class: Minority racism classes containing only 1–6% of dataset instances produced the largest improvements, suggesting effectiveness when training data are scarce.The strongest gains occurred in the racism class across three WZ-S datasets.
  • sCNN v.s. GRU: CNN+sCNN generally outperformed CNN+GRU on hate-only results, suggesting skipped CNNs may extract short-text hate features more effectively than GRU structures.CNN+sCNN consistently exceeded the best comparison result, whereas CNN+GRU improved on four datasets and matched it on two.
  • Patterns observed with other word embeddings: Twitter and GloVe embeddings yielded larger apparent improvements, while CNN+sCNN and CNN+GRU were less sensitive to embedding choice than comparison methods.On WZ-S racism, CNN+sCNN gains reached 20–22 points with Twitter embeddings and 21–33 percent with GloVe; some gains reflected underperformance by GB and PK.
  • Effectiveness on Identifying the Long Tail: Most additional true positives had low uniqueness scores, including 50–60% with no class-unique words on WZ and WZ.pj datasets.The proposed models correctly classified many tweets lacking class-unique features that Gamback et al. missed.

6. Conclusion and Future Work

The paper links hate speech’s long-tail distribution and limited discriminative features to difficult detection, then evaluates skipped neural structures designed to capture implicit features. It concludes with limitations and future directions extending beyond text-only classification and addressing scarce training data.

  • Hate tweets are difficult to identify because they lack unique, discriminative features and occupy the dataset’s long tail.
  • Skipped CNN and GRU structures can discover implicit features potentially useful for identifying hate tweets in the long tail.
  • Among the proposed structures, skipped CNNs perform much better than skipped GRUs.
  • Future work: The authors plan to address scarce training data through approaches including transfer learning across hate classes.
  • Future work: Linguistic content alone struggles to detect abstract concepts such as sexism, racism, and hate.
  • Future work: Future work will integrate user, social-group, communication, and background-knowledge features beyond pure text classification.

Appendix A. Full results

The appendix reports results across embedding models, normalization conditions, baseline systems, and the proposed CNN-based methods. No embedding model consistently dominates, and embedding coverage or OOV rates do not reliably predict F1.

  • Tables 7 and 8 report full results for re-implemented state-of-the-art baselines and the proposed CNN+GRU and CNN+sCNN models.
  • Table 5 compares hashtag coverage in embedding models before and after Twitter normalization.
  • No word embedding consistently outperforms the others across all tasks and datasets.
  • Embedding-model OOV percentages show no strong correlation with the obtained F1.
  • With the Gamback et al. baseline, e.w2v achieves the best racism F1 on 5 datasets, whereas e.twt achieves the best sexism F1 on 3 datasets.
Loading 1803.03662v2…