Efficiency of LLMs in Identifying Abusive Language Online: A Comparative Study of LSTM, BERT, and GPT

Zaur Gouliev, Rajesh R Jaiswal · 2024

As social media continues to grow, the prevalence of abusive language on these platforms has emerged as a major safety concern, particularly for young people exposed to such harmful content, motivating our study.We aim to identify and classify instances of abusive language to create a more respectful and safer online environment.We utilise a range of models, including an LSTM-based architecture and LLMs such as BERT and GPT-3.5 to explore the efficacy of transfer learning in abusive language detection.Our methodology includes data preprocessing, model fine-tuning, and evaluation, with particular attention to addressing class imbalances in datasets through techniques such as SMOTE.We use the Davidson et al. dataset and the ConvAbuse dataset, well-known in the field of abusive language detection (ALD), alongside standard text preprocessing and hyperparameter tuning to optimise model performance.Results indicate that while all models exhibit proficiency in detecting abusive language, the GPT model achieves the highest accuracy, with 88% on the Davidson et al. dataset and 95% on the ConvAbuse dataset.Our findings highlight that transfer learning significantly enhances performance by leveraging the extensive language understanding of pre-trained models, improving detection accuracy with relatively minimal data and training time.This research demonstrates the potential of employing these technologies ethically and effectively to mitigate online abusive language on social media platforms.

Read the paper · More papers on PaperTik