Skip to main content
QUICK REVIEW

[Paper Review] Detecting Online Hate Speech Using Context Aware Models

Lei Gao, Ruihong Huang|arXiv (Cornell University)|Oct 20, 2017
Hate Speech and Cyberbullying DetectionComputer Science16 references32 citations
TL;DR

This paper proposes context-aware hate speech detection models using a new annotated corpus of Fox News comment threads that preserve full contextual information. It introduces logistic regression and neural network models enhanced with context features—such as usernames, news titles, and threaded comments—achieving a 10% F1-score improvement over strong baselines, with ensemble models delivering the best performance.

ABSTRACT

In the wake of a polarizing election, the cyber world is laden with hate speech. Context accompanying a hate speech text is useful for identifying hate speech, which however has been largely overlooked in existing datasets and hate speech detection models. In this paper, we provide an annotated corpus of hate speech with context information well kept. Then we propose two types of hate speech detection models that incorporate context information, a logistic regression model with context features and a neural network model with learning components for context. Our evaluation shows that both models outperform a strong baseline by around 3% to 4% in F1 score and combining these two models further improve the performance by another 7% in F1 score.

Motivation & Objective

  • Address the lack of context in existing hate speech datasets and models, which often ignore surrounding text, usernames, and article context.
  • Develop a new annotated corpus of 1,528 Fox News user comments with full thread context, including usernames, article titles, and reply chains.
  • Improve hate speech detection by incorporating context features into both traditional machine learning (logistic regression) and deep learning (LSTM with attention) models.
  • Demonstrate that context-aware models significantly outperform context-blind baselines, especially in detecting subtle or implicit hate speech.
  • Show that combining different model types leverages complementary strengths, leading to superior overall performance.

Proposed method

  • Annotate 1,528 user comments from 10 Fox News discussion threads, preserving full context: usernames, article titles, and threaded replies.
  • Extract context features for logistic regression models, including character n-grams, word n-grams, LIWC, and NRC sentiment features from both the comment and its context.
  • Design a bi-directional LSTM model with an attention mechanism to capture long-range dependencies and highlight hate-indicative phrases in comments.
  • Train separate models on comment-only input and context-enhanced input to compare performance and isolate the impact of context.
  • Create ensemble models using both score averaging and max voting strategies to combine predictions from logistic regression and neural network models.
  • Use F1-score, AUC, precision, and recall as evaluation metrics to compare models across different configurations.

Experimental results

Research questions

  • RQ1To what extent does incorporating contextual information (e.g., usernames, article titles, reply threads) improve hate speech detection performance?
  • RQ2How do feature-based logistic regression models compare to neural network models in detecting hate speech when context is included?
  • RQ3Can ensemble models that combine logistic regression and neural network predictions achieve better performance than individual models?
  • RQ4What types of hate speech are better detected by logistic regression models versus neural network models, and why?
  • RQ5How do context-aware models handle subtle, implicit, or misspelled hate speech that standard models may miss?

Key findings

  • Context-aware logistic regression models improved F1-score by approximately 4% compared to a baseline model using only the comment text.
  • Neural network models with attention mechanisms improved F1-score by around 4% over their comment-only counterparts, particularly excelling in identifying hate in long, complex comments.
  • The ensemble model combining logistic regression and neural network predictions achieved a 10% improvement in F1-score over the strongest baseline model.
  • The Max Score Ensemble model improved recall by over 20% with comparable precision, indicating better detection of previously missed hateful comments.
  • The Average Score Ensemble model improved AUC by approximately 7%, showing enhanced overall discrimination ability.
  • Logistic regression models were especially effective at detecting hate speech involving OOV words, misspellings (e.g., 'femanazis'), and all-caps insults (e.g., 'FBLM'), due to strong character-level n-gram features.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.