Tercet@ LT - EDI -2023: Homophobia/Transphobia Detection in social media comment (2023)

Abstract: The advent of social media platforms has revo- lutionized the way we interact, share, learn , ex- press and build our views and ideas. One major challenge of social media is hate speech. Homo- phobia and transphobia encompasses a range of negative attitudes and feelings towards people based on their sexual orientation or gender iden- tity. Homophobia refers to the fear, hatred, or prejudice against homosexuality, while trans- phobia involves discrimination against trans- gender individuals. Natural Language Process- ing can be used to identify homophobic and transphobic texts and help make social media a safer place. In this paper, we explore us- ing Support Vector Machine , Random Forest Classifier and Bert Model for homophobia and transphobia detection. The best model was a combination of LaBSE and SVM that achieved a weighted F1 score of 0.95.

## introduction the advent of social media platforms has revolutionized the way we interact, share, learn, express, and build our views and ideas. as these platforms have made communication with a large audience incredibly easy and available to everyone, free speech has become a governing concept of the virtual social realm. however, this newfound freedom has also posed its own threats. one major challenge of social media is hate speech. hateful comments directed at minorities and vulnerable groups pose a significant threat because they can perpetuate existing prejudices and stereotypes, normalize or incite discrimination, and alienate these groups. homophobia and transphobia encompass a range of negative attitudes and feelings towards people based on their sexual orientation or gender identity. homophobia refers to the fear, hatred, or prejudice against homosexuality, while transphobia involves discrimination against transgender individuals. research @xcite shows that sustained exposure to homophobic attitudes and behav-iors can increase a person's stress levels. studies @xcite have demonstrated that adolescent victims of cyberbullying are more likely to experience depression and anxiety than adolescent non-victims. disparities in mental health among lgbtq youths persist into adulthood and adversely affect their development in social relationships, academic achievements, and self-concepts. sexual minorities also often make greater use of the internet as a result of seeking specific socialization environments in which they can meet other people with the same sexual orientation or avoid face-to-face social rejection and homophobic bullying @xcite . this makes it even more necessary to address the problem of anti-lgbt hate speech. the task given to us is detection of homophobia and transphobia in social media comments @xcite . in this paper, we have used the language-agnostic sentence embedder (labse), along with support vector machine (svm). labse encodes sentences in a way that captures their semantic meanings across multiple languages, enabling it to capture nuances and context more accurately than models that do not consider cross-lingual semantics. along with this, svm is used, known for its ability to handle highdimensional data and effectively separate different classes. the combination of labse and svm constitutes an ensemble approach, where the strengths of both components are leveraged. ensemble methods often result in better performance than individual models. the paper is organized as follows: in section 2, related works identified through a literature survey are presented. section 3 offers an overview of the dataset, while section 4 elaborates on the methodology employed for the task. the results are discussed in section 5, and finally, section 6 presents the concluding remarks. sushil ugursandi and anand kumar m (ugursandi and anand kumar, 2022) analyzed social media texts such as comments from youtube to detect homophobic sentiments using deep learning or machine learning models. in this work, a 6-layer classification model was used and and an f1-score of 0.5 on multi-class classification and 0.97 on homophobic/transphobic classification was achieved. konstantinos perifanos and dionysis goutsos @xcite employed transfer learning and fine-tuning of bidirectional encoder representations from transformers (bert) and residual neural networks (resnet) for hate speech classification. they produced a high accuracy score of 0.970 and f1-score of 0.947 in racist and xenophobic speech detection. sunil saumya and ankit kumar mishra @xcite analyzed social media texts, including comments from youtube, to detect homophobic sentiments using deep learning and machine learning models. they employed a 6-layer classification model, achieving an f1-score of 0.5 for multi-class classification and 0.97 for homophobic/transphobic classification. shanita biere (biere et al., 2018) used a convolutional neural network classifier to assign tweets to the categories : hate, offensive language, and neither. the model gave an accuracy of 0.91, precision of 0.91, recall of 0.90 and a f-measure of 0.90. in another paper, @xcite j. lu and h. lin utilized dual contrastive learning to address the challenges posed by complex semantic information in hate speech and the imbalanced distribution between hate speech and non-hate speech data. the experimental results outperformed state-of-the-art models. orestes appel @xcite conducted sentiment analysis using a sentiment lexicon enhanced with the assistance of sentiwordnet, and fuzzy sets to estimate the semantic orientation po-larity and its intensity for sentences. the results of the hybrid method was compared with naïve bayes and maximum entropy techniques. the hybrid method emerged to be the better performer. in addition, it is shown that when applied to datasets containing snippets, this method performs similarly to state of the art techniques. bharathi raja chakravarthi (chakravarthi et al., 2022) addresses the challenge of limited resources for studying homophobia and transphobia detection. they propose a solution involving data augmentation through pseudolabeling. this approach involves transliterating code-mixed text into the parent language, enhancing model performance on a newly generated dataset. ## dataset the datasets provided were to us in task a of homophobia/transphobia detection in social media comments:-lt-edi-2023 foot_0 . it consisted of social media comments in english where each comment had a label corresponding to it. the labels given were 'non-anti lgbt+ content', 'homophobia' and 'transphobia'. the data was divided into three parts: training, development and testing, consisting of the columns 'text' and 'category'. the testing dataset was not provided with labels. the task was to predict the labels on our own. the training dataset consisted of 3164 entries with 2978 for nonanti-lgbt+ content, 179 for homophobia and 7 for transphobia. the development dataset consisted of 792 entries with 748 for non-anti-lgbt+ content, 42 for homophobia and 2 for transphobia. the train and dev datasets were used to train the model which was then tested on the test dataset. the test dataset had 991 entries. the development and training datasets given were severely imbalanced. ## methodology the method used in this task is processing data, extracting its features and applying it to classifier models. ## result and analysis after evaluating the metrics of multiple models, we focused on combining the labse feature extraction model along with the svm classifier as this gave us the best results. ## conclusion in this paper, we have presented traditional classification models coupled with labse, a pre-trained language agnostic bert model, for the classification of non-anti lgbt, homophobia and transphobia comments on the data given by dravidian-langtech in the english language. the traditional models explored were random forest and support vector machine and it was found that svm yields a higher f1 score of 0.95. we believe that we can improve the accuracy of our results using more sophisticated models such as deep learning architectures (e.g., convolutional neural networks, recurrent neural networks, transformers) and combining predictions from multiple models or model variations through techniques like ensemble learning.