Author Profiling for Hate Speech Detection

Pushkar Mishra, Marco Del Tredici, Helen Yannakoudakis, Ekaterina ShutovaarXiv 2019

TL;DR

Current hate speech detection models often fail because they ignore the social context of the speaker. By using graph embeddings (node2vec) to profile a user’s social community, this paper demonstrates that "who you know" is a powerful signal for identifying hate speech, leading to significant performance gains—especially in detecting nuanced sexism.

What Problem Does This Paper Address?

Detecting hate speech is a high-stakes game of cat-and-mouse. While automated systems are necessary to handle the sheer volume of social media, most current state-of-the-art (SOTA) models suffer from "textual tunnel vision." They rely exclusively on lexical and semantic cues—the specific words and their meanings.

However, hate speech doesn't exist in a vacuum. It is often rooted in specific online communities that share stereotypes and coded language. A phrase that looks benign to a text-only model might be clearly hateful when viewed through the lens of the author's social circle. The authors aim to bridge this gap by incorporating author profiling—specifically, community-based features—into the detection pipeline.

Methods

The researchers propose a hybrid approach that combines traditional NLP text classification with social network analysis.

  1. Community Graph Construction: They built an undirected graph of Twitter users where an edge exists if one user follows another. As shown in Figure 1, some authors belong to dense, tightly-knit clusters, while others are more isolated. Snippets from the community graph
  2. Author Profiling (AUTH): To turn this graph into usable data, they employed node2vec. This framework generates dense, low-dimensional embeddings (vector representations) for each user based on their position and neighbors in the network. These embeddings capture the "social flavor" of the user's community.
  3. Classification Models: They tested three baseline text-only models:
  4. LR: Logistic Regression using character n-grams.
  5. HS (Hidden-state): A 2-layer Gated Recurrent Unit (GRU) that encodes word sequences.
  6. WS (Word-sum): A Gradient Boosted Decision Tree (GBDT) trained on the sum of word embeddings.
  7. The "Plus" Factor: The core innovation was simply appending the 200-dimensional node2vec author profile to the text features before feeding them into the final classifier (e.g., LR + AUTH).
Figure 1: Snippets from the community graph for our Twitter data.

Datasets

The study utilized a well-known dataset originally curated by Waseem and Hovy (2016):

  • Source: ~16k tweets manually annotated for hate speech.
  • Classes: Racism (12%), Sexism (19.4%), and None (68.6%).
  • Network Data: The authors successfully extracted community info for 1,836 unique authors, covering over 16,000 tweets.

Key Insights and Ideas

  • Homophily as a Feature: The researchers leaned into the concept of homophily—the tendency of similar people to associate. If a user is deeply embedded in a community known for sexist rhetoric, that social context serves as a strong prior for classifying their individual tweets.
  • Disambiguating the Ambiguous: Text-only models often struggle with short or vague tweets. For example, the tweet "Just 'her body' right?" was misclassified as "none" by the text-only model but correctly identified as "sexism" once the author's profile was added. The profile acts as a proxy for the wider discourse the author is participating in.
  • Community Clustering: Visualization via t-SNE (Figure 2 and 3) confirmed their hypothesis: authors of sexist tweets are significantly more clustered in the embedding space than those who post non-hateful content. Visualization of author embeddings
Figure 2: Visualization of author embeddings in 2-dimensional space.

Key Results

The addition of author profiling features provided a statistically significant boost across the board.

  • Overall Performance: The LR + AUTH model achieved the highest overall F1 score of 87.57, outperforming the text-only baseline by nearly 4 points (Table 1). Average weighted precision, recall and F1 scores
  • The Sexism "Win": The most dramatic improvement was in the sexism class, where the F1 score jumped by over 10 points (from ~72 to ~82). This suggests that sexist behavior on Twitter is highly community-driven.
  • The Racism "Challenge": Conversely, the improvement for the racism class was more modest. The authors attribute this to data sparsity: the racist tweets in this specific dataset came from only 5 unique authors, making it difficult for node2vec to learn a robust "racist community" signature.
Average weighted precision, recall and F1 scores

Limitations and Future Work

  • Obfuscation: The models still struggle with deliberate attempts to evade filters, such as using asterisks in slurs (e.g., "c*nt"). The authors suggest that character-level neural networks might be better suited for this.
  • Opaque Content: Tweets containing only shortened URLs remain a blind spot, as the model cannot "see" the destination content.
  • Scalability & Scope: While node2vec scales well, this study was limited to a specific 16k tweet dataset. Future work could explore applying these community-based profiles to other nuanced NLP tasks like sarcasm detection or identifying political bias.

Summary updated

BibTeX
@misc{mishra2019author,
  author = {Pushkar Mishra and Marco Del Tredici and Helen Yannakoudakis and Ekaterina Shutova},
  title = {{Author Profiling for Hate Speech Detection}},
  year = {2019},
  eprint = {1902.06734},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1902.06734},
}
Figure