Elamur Research⌕
☰
home / papers / 2017 / Using Convolutional Neural Networks to Classify Hate-Speech

Using Convolutional Neural Networks to Classify Hate-Speech

Summary

The paper addresses automatic detection of hate-speech on Twitter, motivated by growing political pressure on platforms and by the slowness of manual moderation. The authors use the English tweet collection released by Waseem (2016). They retrieved 6,655 of its tweets and labelled each as racism, sexism, both, or non-hate-speech. Each final label comes from a weighted vote that counts the Expert annotator twice and each of three crowd-sourced Amateurs once.

They then compare four Convolutional Neural Network variants that differ only in their input representation:

  • randomly initialised word vectors,
  • word2vec embeddings,
  • character 4-grams,
  • word2vec concatenated with character n-grams.

Max-pooling condenses each tweet into a fixed-size representation, and a softmax layer assigns the class. Under 10-fold cross-validation, the word2vec variant achieved the best F-score, about 78.3%. Every CNN beat the earlier Logistic Regression system of Waseem and Hovy (2016) on precision and F-score, although that system kept higher recall. The work shows that even a fairly simple CNN can improve on a feature-based linear baseline for fine-grained hate-speech labels. However, very rare classes remain largely unsolved.

Key points

  • Data: the Waseem (2016) Twitter set, reduced to 6,655 tweets because some had been deleted. The class counts are 91 racism, 946 sexism, 18 both and 5,600 non-hate-speech, so roughly 84% of tweets are non-hate-speech.

  • Character features: each character is a one-hot vector of length 28, with 26 slots for English letters, one for digits and one for all remaining symbols. The n-gram length was fixed at 4, following Waseem and Hovy (2016).

  • Results (10-fold CV, precision / recall / F1):

    ModelPrecisionRecallF1
    Random vectors86.6867.2675.63
    word2vec (best)85.6672.1478.29
    Character 4-grams85.5770.1176.95
    word2vec + char n-grams86.6170.4277.38
    LogReg baseline (Waseem and Hovy, 2016)72.8777.7573.89
  • Effect of character n-grams: combining them with word2vec raised precision slightly but reduced both recall and F-score.

  • Error analysis: per-fold confusion matrices show that the "both" class (only 1–2 examples per fold) was almost never recognised. Sexism, the largest hate class, was handled best, and the model generally under-predicted hate-speech.

Interesting ideas

  • I1. Weighted annotator voting: labels are merged by giving the domain expert a double vote alongside several crowd workers. This is a cheap way to combine expert reliability with crowd volume in any annotation project that mixes annotators of uneven skill.
  • I2. Compact character encoding: characters are collapsed into a tiny 28-dimensional alphabet, with letters kept separate and all digits and symbols bucketed together. A similarly small scheme could be adapted to Cyrillic or noisy social-media text to capture sub-word cues without a large vocabulary.
  • I3. Swap only the input layer: the architecture stays fixed while only the input embeddings change, including a random-vector control. This isolates how much pretrained semantic information actually contributes, which is a clean experimental template for other classification tasks.
  • I4. Inspect confusion matrices per fold: looking beyond averaged scores reveals that a headline F-score can hide near-total failure on tiny classes like "both". This is a useful check for any imbalanced multi-class dataset.
  • I5. Report precision and recall separately against the baseline: the CNNs and Logistic Regression trade precision against recall differently. Depending on whether a moderation setting cares more about false alarms or missed abuse, the "better" model could change.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

Fields: Natural language processing

Cited by

115 papers of our library cite it (of the 140884 whose bibliographies we read); 5 of them have a page here, 110 not yet.

Cite

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/w17-3013

@inproceedings{gamback2017using,
  title = {{Using Convolutional Neural Networks to Classify Hate-Speech}},
  author = {Gambäck, Björn and Sikdar, Utpal Kumar},
  booktitle = {Proceedings of the First Workshop on Abusive Language Online},
  year = {2017},
  doi = {10.18653/v1/w17-3013},
  url = {https://doi.org/10.18653/v1/w17-3013}
}

References

21 references, 4 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

  1. Erin E. Buckels, Paul D. Trapnell, and Delroy L. Paulhus. 2014. Trolls just want to have fun. Personality and Individual Differences 67:97–102. find
  2. CDU/CSU & SPD. 2017. Gesetzentwurf der Fraktionen der CDU/CSU und SPD: Entwurf eines Gesetzes zur Verbesserung der Rechtsdurchsetzung in sozialen Netzwerken (Netzwerkdurchsetzungsgesetz — NetzDG). Drs. 18/12356, Deutscher Bundestag, Berlin, Germany. find
  3. Ying Chen, Yilu Zhou, Sencun Zhu, and Heng Xu. 2012. Detecting offensive language in social media to protect adolescent online safety. In Proceedings of the 2012 ASE/IEEE International Conference on Social Computing and 2012 ASE/IEEE International Conference on Privacy, Security, Risk and Trust. IEE… find
  4. A long those lines, Sikdar and Gambäck (2017) report experiments with a set-up for named entity recognition combining an LSTM with a more traditional machine learning classifier based on Conditional Random Fields (CRF). Such an approach Ronan Collobert, Jason Weston, Léon Bottou, Michael Karlen, Kor… find
  5. Thomas Davidson, Dana Warmsley, Michael Macy, and Ingmar Weber. 2017. Automated hate speech detection and the problem of offensive language. In Proceedings of the International AAAI Conference on Web and Social Media (ICWSM). American Association for Artificial Intelligence, Toronto, Canada. To appe… find our card
  6. Sara Owsley Sood, Elizabeth F. Churchill, and Judd Antin. 2012. Automatic identification of personal insults on social news sites. Journal of the American Society for Information Science and Technology 63(2):270–285. find
  7. Home Affairs Committee. 2017. Hate crime: abuse, hate and extremism online. Fourteenth Report of Session 2016–17 HC 609, House of Commons, London, UK. find
  8. Ellen Spertus. 1997. Smokey: Automatic recognition of hostile messages. In Proceedings of the 14th National Conference on Artificial Intelligence and 9th Conference on Innovative Applications of Artificial Intelligence. American Association for Artificial Intelligence, Providence, Rhode Island, page… find
  9. Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013a. Efficient estimation of word representations in vector space. CoRR abs/1301.3781. find
  10. Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. 2013b. Distributed representations of words and phrases and their compositionality. In Advances in Neural Information Processing Systems 26 (NIPS 2013). Curran Associates, Red Hook, NY, USA, pages 3111–3119. find
  11. Emma Thomasson. 2017. German cabinet agrees to fine social media over hate speech. Reuters, Apr 5. http://uk.reuters.com/article/idUKKBN1771FK. ↗
  12. Zeerak Waseem. 2016. Are you a racist or am i seeing things? Annotator influence on hate speech detection on Twitter. In Proceedings of 2016 EMNLP Workshop on Natural Language Processing and Computational Social Science. ACL, Austin, Texas, pages 138–142. find our card
  13. Preslav Nakov, Alan Ritter, Sara Rosenthal, Fabrizio Sebastiani, and Veselin Stoyanov. 2016. SemEval-2016 Task 4: Sentiment analysis in Twitter. In Proceedings of the 10th International Workshop on Semantic Evaluation. ACL, San Diego, California. find our card
  14. Zeerak Waseem and Dirk Hovy. 2016. Hateful symbols or hateful people? Predictive features for hate speech detection on Twitter. In Proceedings of the 15th Annual Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies. ACL, San Diego, Ca… find our card
  15. Nikolaj Nielsen. 2017. EU states back bill against online hate speech. EUobserver, May 24. https://euobserver.com/justice/138009. ↗
  16. Chikashi Nobata, Joel Tetreault, Achint Thomas, Yashar Mehdad, and Yi Chang. 2016. Abusive language detection in online user content. In Proceedings of the 25th International Conference on World Wide Web. International World Wide Web Conferences Steering Committee, Montreal, Canada, pages 145–153. find
  17. Ellery Wulczyn, Nithum Thain, and Lucas Dixon. 2016. Ex Machina: Personal attacks seen at scale. CoRR abs/1610.08914. — [arXiv:1610.08914](https://arxiv.org/abs/1610.08914) find
  18. Etienne Papegnies, Vincent Labatut, Richard Dufour, and Georges Linarès. 2017. Impact of content features for automatic online abuse detection. In Alexander Gelbukh, editor, Computational Linguistics and Intelligent Text Processing: Proceedings of the 18th International Conference. Springer, Budapes… find
  19. Guang Xiang, Bin Fan, Ling Wang, Jason I. Hong, and Carolyn P. Rose. 2012. Detecting offensive tweets via topical feature discovery over a large scale Twitter corpus. In Proceedings of the 21st ACM International Conference on Information and Knowledge Management. ACM, Maui, Hawaii, pages 1980– 1984. find
  20. Björn Ross, Michael Rist, Guillermo Carbonell, Benjamin Cabrera, Nils Kurowsky, and Michael Wojatzki. 2016. Measuring the reliability of hate speech annotations: The case of the European refugee crisis. In 3rd Workshop on Natural Language Processing for Computer-Mediated Communication. Bochum, Germa… find
  21. Dawei Yin, Zhenzhen Xue, Liangjie Hong, Brian D. Davison, April Kontostathis, and Lynne Edwards. 2009. Detection of harassment on Web 2.0. In Proceedings of the Content Analysis in the WEB 2.0 Workshop at WWW2009. Madrid, Spain. find

↑ back to top

This page in Markdown → https://md.research.elamur.ai/free/en/papers/gamback-2017-convolutional-neural-networks-classify-hate/