S arc E mp - Fine-tuning D ialo GPT for Sarcasm and Empathy (2024)

Abstract: Conversational models often face challenges such as a lack of emotional temperament and a limited sense of humor when interacting with users. To address these issues, we have selected relevant data and fine-tuned the model to (i) humanize the chatbot based on the user’s emotional response and the context of the conversation using a dataset based on empathy and (ii) enhanced conversations while incorporating humor/sarcasm for better user engagement. We aspire to achieve more personalized and enhanced user-computer interactions with the help of varied datasets involving sarcasm together with empathy on top of already available state-of-the-art conversational systems.

## introduction recent advancements in large-scale pre-trained models, such as models using transformer-based architectures, have produced impressive results, as seen with @xcite . however, it is only recently that these models have had access to enough data to respond in a neutral tone and provide information based solely on the user's input. understanding the emotional response and situation of the user is not an easy task, especially when it comes to providing an appropriate response. early sarcasm detection methods heavily depended on static textual patterns like lexical indicators, syntactic rules, and specific emoji occurrences @xcite , @xcite , @xcite . unfortunately, these methods often under-performed and lacked generalization due to their inability to leverage contextual information effectively. additionally, they faced issues with poor performance. another problem is the lack of an explicit longterm memory of the conversation because these systems are trained to generate a response based only on the recent dialogue history @xcite [a neural conversational model]. recently, chatbots have faced challenges in providing inaccurate, nonsensical, or insensitive responses, largely stemming from a lack of contextual understanding and emotional awareness during conversations. the key aim of this work is to enhance the neutral persona-based models by incorporating sarcasm and an empathetic touch. to achieve this, we fine-tuned the dialogpt model using two datasets. these datasets include 1.3 million sarcastic comments from reddit and 25,000 personal dialogues in which a speaker expressed a specific emotion, and a listener responded. ## related work recent developments in engaging dialogue agents with a 'profile' (saizheng zhang, 2018) have helped the vision of contextually aware chatbots immensely. this allows models to respond by sticking with a persona, and hence, replies are more stable and coherent. research on the emotional spectrum, including models that incorporate a sense of humor or sarcasm, is still being refined due to the challenging task of understanding the nuanced nature of sarcasm. according to the @xcite , sarcasm can be difficult to detect and harder to eradicate because abuse is sometimes hidden behind it. it will take much progress in the field to detect and generate sarcasm accurately. there have been models developed with the ability to detect sarcasm from user input @xcite . however, generating responses in the same fashion is not yet fully addressed. even models with the ability to produce empathetic responses (hannah rashkin, 2019) do not fully capture the wide range of emotions experienced by a typical human being and respond accordingly. another problem is the lack of an ex-plicit long-term memory of the conversation. typically, these systems are trained to generate a response based only on the recent dialogue history @xcite . ## results in this project, we choose perplexity as an automatic metric to evaluate the model's performance among others such as f1 score, loss, and token accuracy. perplexity loss measures how well a model can predict the next word in a sequence of text. lower values indicate a better understanding of the language and context. perplexity is also reported to have a robust correlation with human perceptions of coherent and contextually specific natural conversations @xcite . we report the results in the the fine-tuning of dialogpt on the sarc and empathetic dialogues datasets has yielded noteworthy results. the model achieves a low training perplexity of 2.996, showcasing improved confidence in predicting the next token. we also perform a variety of experiments by training and evaluating different models. ## conclusion in this work, we have introduced a new fine-tuned model that incorporated sarcasm and empathy on top of a state-of-the-model. the resulting model is performing pretty consistently in terms of automatic evaluation, although it would be interesting to see it perform in human evaluation tasks. we believe human evaluation would provide us with useful insights into the domain of more engaging and empathetic human-computer interactions and potential directions for improvements.