Enhancing Toxic Comment Classification: A Deep Learning Approach with Pre-trained Language Models

Khushi Tejwani, Vedant Naik, Aanya Lari, Dhruvin Jhaveri · 2024

Because of online communication, e-commerce, and digital devices, text data—especially short text—permeates every aspect of our life in the digital age. However, this transformation has also unveiled a darker side - the prevalence of harmful, offensive, and toxic comments, including hate speech and harassment. The integrity of online groups, social harmony, and individual safety are all gravely threatened by this toxin. In this work, we examine the effectiveness of two recurrent neural network (RNN) architectures, namely Gated Recurrent Unit (GRU) and Long Short-Term Memory (LSTM), for the classification of damaging comments. These models are evaluated using key metrics such as F1-score, recall, accuracy, and precision. Important measures, including accuracy, precision, recall, and F1-score, are used to assess these models. According to our findings, the GRU achieves higher precision and overall accuracy, while the LSTM performs well in recall, spotting harmful comments at the expense of pinpoint accuracy. Model selection should align with specific project goals and trade-offs between precision and recall.

Read the paper · More papers on PaperTik