Offensive Language and Hate Speech Detection with Deep Learning and Transfer Learning

08/06/2021
by   Bencheng Wei, et al.
25

Toxic online speech has become a crucial problem nowadays due to an exponential increase in the use of internet by people from different cultures and educational backgrounds. Differentiating if a text message belongs to hate speech and offensive language is a key challenge in automatic detection of toxic text content. In this paper, we propose an approach to automatically classify tweets into three classes: Hate, offensive and Neither. Using public tweet data set, we first perform experiments to build BI-LSTM models from empty embedding and then we also try the same neural network architecture with pre-trained Glove embedding. Next, we introduce a transfer learning approach for hate speech detection using an existing pre-trained language model BERT (Bidirectional Encoder Representations from Transformers), DistilBert (Distilled version of BERT) and GPT-2 (Generative Pre-Training). We perform hyper parameters tuning analysis of our best model (BI-LSTM) considering different neural network architectures, learn-ratings and normalization methods etc. After tuning the model and with the best combination of parameters, we achieve over 92 percent accuracy upon evaluating it on test data. We also create a class module which contains main functionality including text classification, sentiment checking and text data augmentation. This model could serve as an intermediate module between user and Twitter.

READ FULL TEXT

page 1

page 2

page 3

page 4

page 5

research
09/23/2018

Detecting Hate Speech and Offensive Language on Twitter using Machine Learning: An N-gram and TFIDF based Approach

Toxic online content has become a major issue in today's world due to an...
research
03/13/2023

Transformer-based approaches to Sentiment Detection

The use of transfer learning methods is largely responsible for the pres...
research
01/22/2021

HASOCOne@FIRE-HASOC2020: Using BERT and Multilingual BERT models for Hate Speech Detection

Hateful and Toxic content has become a significant concern in today's wo...
research
09/20/2021

Model Bias in NLP – Application to Hate Speech Classification

This document sums up our results forthe NLP lecture at ETH in the sprin...
research
03/17/2020

Author2Vec: A Framework for Generating User Embedding

Online forums and social media platforms provide noisy but valuable data...
research
06/26/2019

Enhancing PIO Element Detection in Medical Text Using Contextualized Embedding

In this paper, we investigate a new approach to Population, Intervention...
research
02/07/2022

Universal Spam Detection using Transfer Learning of BERT Model

Deep learning transformer models become important by training on text da...

Please sign up or login with your details

Forgot password? Click here to reset