Can Contextualizing User Embeddings Improve Sarcasm and Hate Speech Detection? (2022)

Abstract: While implicit embeddings so far have been mostly concerned with creating an overall representation of the user, we evaluate a different approach. By only considering content directed at a specific topic, we create sub-user embeddings, and measure their usefulness on the tasks of sarcasm and hate speech detection. In doing so, we show that task-related topics can have a noticeable effect on model performance, especially when dealing with intended expressions like sarcasm, but less so for hate speech, which is usually labelled as such on the receiving end.

## introduction while using the syntax or semantics of sentences and words has been the backbone of natural language processing (nlp) tasks for a long time, incorporating information about the authors themselves is a much more recent addition @xcite @xcite . existing approaches can be broadly grouped into explicit and implicit user modelling. explicit representations include known information, such as the user's occupation or location @xcite , their personality or sociodemographic traits @xcite , or even their emotional state @xcite . implicit models, on the other hand, use highly dimensional vectors (embeddings) to capture abstract differences and similarities between users, without relying on concrete knowledge @xcite . however, implicit approaches so far make use of an averaged user representation, for example by using a given user's post history regardless of content. social psychology, however, has shown the impact a given social situation can have on observable behavior @xcite , a fact that could be possible to translate to social media posts as well. to this end, we define a social situation as a given topic, such as sports or politics, as well as the ensuing conversations about these topics. in doing so, we hope to improve the accuracy of sarcasm and hate speech detection, nlp tasks that will only increase in importance as the internet -and social media -continues to take up more of our time. to this end, we use user2vec, one of the earlier approaches to implicit user modelling, which has already been shown to increase performance on sarcasm classification @xcite . ## conclusion and future work we showed that user embeddings created using user2vec @xcite provide helpful information, capable of aiding the classification of intended expressions that can be observed as a general tendency for a given user, such as sarcasm. on the other hand, their usefulness is generally lower when used for the classification of perceived expressions, such as hate speech. additionally, we were able to create specialized sub-user embeddings, capturing information about the user when exposed to a specific situation, such as when talking about school-related topics. depending on how these topics relate to the task, we were able to increase the performance as opposed to using generalized embeddings. this seems to be especially true for binary classification tasks, which can be noticeably impacted by selecting a topic known to lean heavily towards one of the labels, which we have shown to be true for politics-related content being particularly low on sarcasm. we used a relatively simple lda model to categorize posts by topic, but more sophisticated approaches should be able to even more properly select relevant data points. aside from the individual user, social connections can play a big role, potentially elevating the usefulness of user embeddings beyond the detection of characteristical, intended behavior. this information can be used in order to model user reactions, therefore providing insight about how a given user is perceived by others. doing so could overcome one of the limitation of user embeddings, making it possible to more accurately detect perceived behavior such as hate speech @xcite . and even the word embeddings, which we chose to leave fixed for all experiments, can be contextualized, as the information contained in a word can differ depending on the user who authored it @xcite . lastly, by assigning topic probabilities to individual posts, these could be used for the filtering of social media streams based on personal interest. extending this approach to the author themselves, and by assuming that proficiency in a given topic can be approximated by having authored a high number of related posts @xcite , it could be possible to filter users based on the topics they are knowledgeable about.