Evaluation of Different ML and Text Processing Techniques for Hate Speech Detection

Abstract

Social media has become a domain that involves a lot of cyberbullying and hate speech. Some users feel entitled to engage in abusive conversations by sending abusive messages, tweets, or photos to other users. It is critical to detect hate speech and prevent innocent users from becoming victims of cyberbullying. In this paper, we investigate the applicability and performance of a variety of machine learning techniques with the help of text processing techniques in the pursuit of a reliable system for identifying hate speech. We evaluate Naïve Bayes, Support Vector Machines, Decision Trees, Random Forests, Logistic Regression, and K Nearest Neighbors on three different datasets. We used Term Frequency-Inverse Document Frequency (TF-IDF), unigram, bigram, trigram, combination of unigram and bigram, and combination of unigram, bigram, and trigram for the text corpus read by the machine learning techniques to see which approach gives better results. Additionally, since the datasets are unbalanced, we under-sampled and over-sampled the data and investigated the results. Our results show that on all three datasets over-sampling the minority class and using a combination of unigram, bigram, and trigram gave the best results with Random Forests achieving the highest F1-score of at least 0.96 on the three datasets. This was followed by SVM and Logistic Regression, which achieved F1-scores of at least 0.939.

Department(s)

Computer Science

Document Type

Conference Proceeding

DOI

10.1109/ICDIS55630.2022.00040

Keywords

abusive words, cyberbullying, hate speech, machine learning, social media

Publication Date

1-1-2022

Journal Title

Proceedings 2022 4th International Conference on Data Intelligence and Security Icdis 2022

Share

COinS