“Is Hate Lost in Translation?”: Evaluation of Multilingual LGBTQIA + Hate Speech Detection (2024)

Abstract: This paper explores the challenges of detecting LGBTQIA+ hate speech of large language models across multiple languages, including English, Italian, Chinese and (code-mixed) English-Tamil, examining the impact of machine translation and whether the nuances of hate speech are preserved across translation. We examine the hate speech detection ability of zero-shot and fine-tuned GPT. Our findings indicate that: (1) English has the highest performance and the code-mixing scenario of English-Tamil being the lowest, (2) fine-tuning improves performance consistently across languages whilst translation yields mixed results. Through simple experimentation with original text and machine-translated text for hate speech detection along with a qualitative error analysis, this paper sheds light on the socio-cultural nuances and complexities of languages that may not be captured by automatic translation.

## introduction lgbtqia+ individuals are particularly vulnerable to hate speech due to their sexual orientation and gender identity. they are frequently subject to harassment, discrimination, violence due to their identity @xcite . therefore, many social media platforms have implemented hate speech detection as part of content sanitation on their platforms to create safer online environments. as social media platforms become increasingly diverse with people coming from different linguistic backgrounds, we investigate if hate speech detection is sustained across different languages, translations, and code-mixing environments. in other words, is hate speech detection "lost in translation" 1 ? 1 as part of a discussion on his poem "stopping by woods on a snowy evening", robert frost famously remarked the approach of using machine translation to translate the test data into english and running inference using an english-only model has long been studied @xcite . this method may be better for complex tasks that require common sense or real-world knowledge, as it benefits from the use of a stronger english-only model @xcite , which may be useful for the complex task of hate speech detection. therefore, we ask the question: "how does hate speech detection perform for original text and translated text?" we do so for the case of hate speech towards lgbtqia+ people. while it is intuitive that machine translation will not preserve all semantics, our experiments with zero-shot and fine-tuned gpt show that it particularly holds true for hate speech detection. our error analysis sheds light on the nature of errors to highlight 'what' is lost in translation. ## methodology our methodology is as shown in figure 1 . we utilise labeled datasets in english, italian, chinese, and english-tamil (code-mixed 2 ), each focusing on lgbtqia+-specific hate speech. our preprocessing involves removing excess spaces and invalid characters. we translate non-english datasets (italian, chinese, and english-tamil (code-mixed) into english via the chosen llm (large language model) in zeroshot setting using the following user prompt 'translate this sentence into english: 'text". this forms our translated dataset. we then perform zero-shot classification using the chosen llm to the detect homotransphobia 3 , with 1 referring to homotransphobic content and 0 referring to non-homotransphobic content. we use the following system prompt "you are an ai assistant that classifies text as either homotransphobic (1) or not homotransphobic (0). respond with only 0 or 1.", and the user prompt being "classify the following text: 'text". this is applied on both the preprocessed dataset and the translated dataset. this gives us classification results for original and translated respectively. we then perform fine-tuning on the llm via the openai api 4 using the preprocessed dataset and translated dataset using the same prompts as what was used for the earlier round of classification. we then get the classification results for finetuned (original) and fine-tuned (translated) respectively. finally, we perform comparative analysis between the classification results from four models 2 code-mixing indicates the use of vocabulary from multiple languages. the english-tamil (code-mixed) dataset employed in this paper are remarks written in mostly roman character employing tamil vocabulary with either tamil or english grammar @xcite . ## experiment setup the llm which we use for our experiments is the gpt-3.5-turbo model foot_1 , a chat-bot based on the gpt-3.5 language model developed by openai. this model is optimised for prompt-based usage but performs equally well for traditional nlp tasks @xcite . the datasets which we employ are shown in the downstream task is hate speech detection, and is evaluated using the following metrics: f1 score, precision, recall, and cohen-kappa agreement. in particular, cohen's kappa is used to measure the agreement between the predicted labels and the true label. it is chosen as it is a good measure of intra-rater reliability, while correcting for times when the raters may agree by chance @xcite . f1 score, precision, and recall are weighted to account for class imbalances. (0.7952), followed by chinese (0.7464), italian (0.5990), and english-tamil (0.3619). the strong performance in chinese suggests good generalisation to non-latin scripts after translation, while the low score for english-tamil highlights challenges with code-mixed content @xcite . ## related work despite broad interest in hate speech detection, research specifically addressing lgbtqia+ communities remain limited. challenges to create a generalised hate speech model for various targets have been reported in particular @xcite . shared tasks have been particularly important for hate speech detection towards lgbtqia+ community. the lt-edi@eacl series (2022-2024) focuses on the identification of homophobia, transphobia, and nonanti-lgbtqia+ content in tamil, english, and code-mixed english-tamil @xcite @xcite . the shared task has expanded to include various languages to look at homotransphobia in a multilingual context. there have also been other shared tasks on the topic, focusing on various languages. examples include homo-mex2023@iberlef which focuses on hate speech detection towards the mexican spanish-speaking lgbtqia+ population @xcite . in a similar vein, hodi is a shared task for the automatic detection of homotransphobia in italian presented at evalita 2023 @xcite . beyond shared tasks, some research has employed transformer-based models like bert and xlm-roberta to identify transphobic and homophobic insults in social media comments @xcite . benchmarks such as wino-queer @xcite provide pairs of sentences to measure anti-lgbtqia+ bias in language models. to the best of our knowledge, this is the first hate speech detection comparison centered around machine translation. the datasets we use are reported in past work. ## conclusion this study provides valuable insights into the effectiveness of llm in hate speech detection in diverse linguistic settings involving lgbtqia+ communities. we compare the ability of zero-shot and finetuned gpt for hate speech detection of multilingual text in the original language and translated versions to english. our insights were: (1) hate speech detection via llm is in general effective (including in non-latin script settings), however llms perform significantly worse when dealing with code-mixed languages; (2) hate speech detection via llm can be improved simply via fine-tuning, although the degree of improvement is language-dependent; (3) translation is ineffective in transferring nuanced ideas and show visible degradation on hate speech detection performance. to the best of our knowledge, this is the first work in hate speech detection with machine translation as our anchor. while the technique itself is simplistic, our research demonstrates the complexity of hate speech detection, especially for lgbtqia+ communities in multilingual contexts and the need for continued research in this area. by advancing our understanding of multilingual hate speech detection, we can work towards creating safer, more inclusive online spaces for lgbtqia+ individuals across different linguistic communities.