Hate Speech Detection: Leveraging LLM-GPT2 with Fine-Tuning and Multi-Shot Techniques
Mahima Choudhary, Basant Agarwal, Vishnu Goyal · Procedia Computer Science · 2025
Hate Speech can be referred as any type of communication that can degrade, discriminates against or prejudice or incites violence against groups or individual based on certain factors such as religion, race, nationality, skin color, gender etc. It is very crucial to detect hate speech to stop the harm or violence against targeted individuals or groups and to create safe and inclusive environment. In this paper, the performance of two large language model-based approaches were investigated. In the first approach, fine-tuning of GPT-2 model was performed using a hate-speech dataset and then evaluated the fine-tuned GPT model for hate speech detection. In the second approach, n-shot learning based approaches were used for value of n as zero, one and two, where prompt designing was done first and then ask the GPT model to detect if the given text is expressing hate based on the given prompt on test data. All the experiments were carried out on publicly available ‘HatEval’ dataset. Experimental results show that few(n) shot learning does not necessarily surpass lesser(