Predictive Embeddings for Hate Speech Detection on Twitter

Rohan Kshirsagar, Tyus Cukuvac, Kathy McKeown, Susan McGregor

Detecting hate speech on social media is a critical yet complex task. While many state-of-the-art (SOTA) models rely on intricate architectures and extensive feature engineering, researchers at Columbia University have proposed a more streamlined approach. Their work demonstrates that focusing on the transformation of word embeddings can yield superior results with significantly less complexity.

The Transformed Word Embedding Model (TWEM)

The core innovation of this research is the Transformed Word Embedding Model (TWEM). Unlike standard models that pool generic embeddings directly, TWEM introduces a non-linear transformation layer to make the embeddings task-specific.

The architecture follows a specific pipeline:

  1. Embedding: Tweets are tokenized, maintaining original capitalization, and mapped to 300-dimensional GloVe embeddings.
  2. Transformation: Each embedding passes through a 1-layer Multi-Layer Perceptron (MLP) with a ReLU activation. This step projects generic vectors into a "hate-speech-aware" space.
  3. Dual Pooling: The model applies both max-pooling (to identify salient, aggressive words) and mean-pooling (to capture overall thematic context).
  4. Classification: The concatenated pooled vectors are processed by a final 2-layer MLP to predict categories such as "Racist," "Sexist," or "Neither."

Experimental Evaluation

The model was tested against three benchmark datasets: SR (Sexist/Racist), HATE (Hate Speech/Offensive), and HAR (Harassment). TWEM consistently matched or outperformed complex models, including those utilizing recurrent architectures or external metadata.

Comparative F1 scores of TWEM against state-of-the-art models across three datasets.

As shown in the results, TWEM achieved an F1 score of 0.924 on the HATE dataset, surpassing previous benchmarks. Notably, it outperformed a "GRU + Metadata" model on this dataset, suggesting that a well-structured text-only model can be more effective than those relying on social graph data.

Interpretability and Insights

One of the most significant findings was the "Preprocessing Paradox." The authors discovered that minimal preprocessing—specifically keeping ALL CAPS—provided vital signals of aggression. Standard techniques like lemmatization often removed these nuances, leading to higher validation loss.

Furthermore, the ReLU transformation allows for high interpretability. By clustering the transformed embeddings, the researchers found that the model naturally grouped words into distinct semantic categories related to hate speech and harassment.

Semantic clusters of tokens learned by the TWEM model, demonstrating its ability to categorize offensive language.

Conclusion

TWEM offers a highly efficient alternative to deep learning models, utilizing only 100,000 parameters compared to the 250,000+ typically required by SOTA architectures. While it still faces challenges with sarcasm and highly context-specific references, its simplicity and performance make it a robust tool for real-time hate speech detection. Future work may involve exploring character-level features to better handle the creative misspellings common in abusive online discourse.

Summary updated

BibTeX
@inproceedings{kshirsagar2018predictive,
  author = {Rohan Kshirsagar and Tyus Cukuvac and Kathy McKeown and Susan McGregor},
  title = {{Predictive Embeddings for Hate Speech Detection on Twitter}},
  booktitle = {ALW},
  year = {2018},
  doi = {10.18653/v1/w18-5104},
}
Figure