SEPRG : Sentiment aware Emotion controlled Personalized Response Generation (2021)

Abstract: Social chatbots have gained immense popularity, and their appeal lies not just in their capacity to respond to the diverse requests from users, but also in the ability to develop an emotional connection with users. To further develop and promote social chatbots, we need to concentrate on increasing user interaction and take into account both the intellectual and emotional quotient in the conversational agents. Therefore, in this work, we propose the task of sentiment aware emotion controlled personalized dialogue generation giving the machine the capability to respond emotionally and in accordance with the persona of the user. As sentiment and emotions are highly co-related, we use the sentiment knowledge of the previous utterance to generate the correct emotional response in accordance with the user persona. We design a Transformer based Dialogue Generation framework, that generates responses that are sensitive to the emotion of the user and corresponds to the persona and sentiment as well. Moreover, the persona information is encoded by a different Transformer encoder, along with the dialogue history, is fed to the decoder for generating responses. We annotate the PersonaChat dataset with sentiment information to improve the response quality. Experimental results on the PersonaChat dataset show that the proposed framework significantly outperforms the existing baselines, thereby generating personalized emotional responses in accordance with the sentiment that provides better emotional connection and user satisfaction as desired in a social chatbot.

## introduction one of the significant challenges of artificial intelligence (ai) is to endow the machine with the ability to interact in natural language with humans. in the recent past, tremendous effort has been given to create smart personal assistants, such as microsoft's cortana, apple's siri, amazon's alexa, google home, etc. the personal assistants in our mobile devices invariably assist in our day-to-day lives by answering a wide range of queries. such assistants act as social agents that take care of the various activities of their users. besides reacting passively to user requests, they also proactively anticipate user needs and provide in-time assistance, such as reminding of an upcoming event or suggesting a useful service without receiving explicit user requests @xcite . the daunting task for these agents is that they have to work well in open domain scenarios as people learn to rely on them to effectively maintain their works and lives efficiently. empathy and social belonging are a few of the fundamental needs for human beings @xcite . building social chatbots to tackle these emotional needs is indeed of great benefit to our society. the primary objective of these chatbots is not inherently to answer all the users' questions, but rather to be a virtual companion of the users. to become a better companion, it is imperative for the agent to understand the personality of the user to assist in different aspects of life. along with understanding the personality traits of a user, the emotional connection is an essential factor for building better communication. social conversational agents can serve for a more extended period of time by maintaining a consistent personality (increasing trust in the user) and by establishing an emotional connection with them. the ability to empathize, create social belonging, and adhere to a personality and integration of these factors in conversational agents is one of the long-standing goals of artificial intelligence (ai). conversational agents need to monitor the user's emotion in order to suffice the emotional needs and simultaneously empathize with them, making the conversation engaging, increasing user contentment @xcite , persona 2 i am primarily a meat eater. i've a sweet tooth. i am a guitar player. i'm a babysitter and drive a mercedes. welding is my career field. i'm the middle child of 3 siblings. my parents don't know i am gay. i'm getting married in six months. and decreasing breakdowns in conversations @xcite . moreover, these agents should also have the capability to generate personalized responses conforming to the personal interests and unique needs of different users while presenting a consistent personality to gain the user's trust and confidence. hence, the primary motivation of our current work lies in generating responses that are engaging, emotionally appropriate, and also integrates the personal interests of the user. lately, researchers have started focusing on incorporating personality information on chit-chat @xcite and goal-oriented @xcite conversational systems. due to the lack of persona data sets, the authors created a personachat dataset in @xcite , where the individual personality data is represented in a few texts for open-domain chit-chat dialogue systems. we present an example from the dataset in from this is mainly because both sentiment and emotion refer to experiences resulting from the combination of biological, cognitive, and social influences. though both are considered to be the same, yet according to @xcite , the sentiment is formed and retained for a longer duration, whereas emotions are like episodes that are shorter in length. moreover, the sentiment is mostly targetcentric, while emotions are not always directed to a target. every emotion is associated with sentiments, hence using the sentiment information of the utterances can assist in narrowing down the set of emotions for generating contextually correct emotional responses. in the the key contributions of this work are as follows: the rest of the paper is structured as follows. in section ii, we present a brief survey of the related work. in section iii, we explain the proposed methodology. in section iv, we describe the details of the datasets that we used and annotated. the experimental setup, along with the evaluation metrics, is reported in section v. in section vi, we present the results along with the necessary analysis. finally, we conclude in section vii with future work. ## related work in complete applications, such as dialogue systems, natural language generation (nlg) has become increasingly essential @xcite @xcite and also in many other natural language interfaces. the generation of responses provides the means by which a conversational agent can communicate with its user to assist users in achieving their desired goals. recently, generative adversarial networks have been exploited for dialogue generation @xcite @xcite @xcite for a better generation of responses. persona information is an essential part of generating responses. earlier works on persona-based conversational models @xcite incorporated speakers' embeddings to infuse persona information in the responses. to incorporate persona in chit-chat models, the authors in @xcite introduced a personachat dataset that includes personal information of the speakers. this dataset has been extensively used to build persona-based dialogue systems @xcite @xcite . the authors in @xcite used a meta-learning framework to include persona information in the generated responses. similarly, the authors in @xcite employed a hierarchical pointer network for generating personabased responses. the authors in @xcite used persona information to generate diverse responses by employing conditional variational autoencoder. our present work differs from these existing works (that made use of the personachat dataset) in a sense that we intend to use the persona information while generating emotional responses. persona information is also being exploited in goal-oriented dialogue systems @xcite @xcite . the authors in @xcite introduced persona information in the babi dialog dataset for creating better responses. the authors used conditional variational auto-encoders for personalized generation in @xcite . as personalization has been considered in responses, we intend to take a step ahead by inculcating the emotions in accordance to the emotion of the user and the dialogue history. lately, emotional text generation has gained immense popularity @xcite @xcite @xcite @xcite . in @xcite , an emotional chatting machine (ecm) was proposed that was built upon seq2seq framework for generating emotional responses. recently, a lexiconbased attention framework was employed to generate responses with a specific emotion @xcite . emotional embedding, along with affective sampling and regularizer, was employed to generate the affect driven dialogues in @xcite . lately, authors in @xcite designed personalized response generation framework with controllable emotions using basic sequence-to-sequence framework. our present research differs from these existing works as we propose a novel framework using a generative adversarial network to generate responses in an empathetic manner, having a consistent persona. ## methodology we define the problem statement in this section, followed by the detailed descriptions of the proposed methodology. the architectural diagram of the sentiment and persona guided emotional dialogue generation framework is presented in figure 1 . problem definition: in our present work we aim at solving the task of emotional and personalized dialogue generation in accordance to the conversational history, sentiment and the persona information of the speaker. for a given sequence of dialogue turns @xmath0, u 2 , . . . , u n ] as the dialogue context, where u @xmath1, w 2 , . . . , w k ] is the n th dialogue turn and each dialogue turn is associated with sentiment labels represented by s @xmath2, s 2 , . . . , s n having a set of persona information @xmath3, p 2 , . . . , p m the task is to generate an emotional personalized response @xmath4, y 2 , . . . , y n along with the emotion embedding v e for the desired emotion e that is sensitive to the speaker's expressed sentiment and is consistent to the persona information. ## dataset and experimentation dataset description: on the recently published convai2 benchmark dataset, which is an extended version (with a new test set) of the persona-chat dataset @xcite , we conduct our experiments. the interactions are collected from the randomly paired crowd workers who were instructed to play the part of a given persona. in over 10,981 dialogues, this dataset comprises of 164,356 utterances and has a collection of 1,155 personas, each consisting of at least four personality texts. there are 1,016 dialogues in the testing set and 200 never before seen personas. as the dataset is not labeled with emotions, we use the emotion annotated version of the dataset used in @xcite . ## result and analysis for thorough analysis of our proposed framework, we provide a detailed analysis of the results (both automatic and manual) along with the generated responses. we also analyze the errors made by the network in generating empathetic personalized responses. ## conclusion and future work grounding conversations based on the user's persona and emotions is an exciting research direction that can contribute to building natural, engaging and social conversational agents. our current work presents one of the first examples of an empathetic, personalized dialogue generation for building a robust social chatbot using the sentiment information of the speaker in the ongoing conversation. we trained a novel transformer framework capable of generating responses that is sensitive to the emotions of the speaker and in accordance with their persona information and sentiment. specifically, the experimental analysis on the personachat dataset shows that the responses having both the emotional quotient and persona knowledge in the responses help build interactive and engaging conversations. our future work would focus on extending the architectural framework for improving the performance of the generation. in addition, we would also investigate other factors such as politeness, diversity in responses for creating a comprehensive social chatbot.