Empathic Response Generation in Chatbots Timo Spring Jacky Casas University of Bern HES-SO Bern, Switzerland University of Applied Sciences timo.spring@students.unibe.ch Western Switzerland, Fribourg, Switzerland jacky.casas@hes-so.ch Karl Daher Elena Mugellini Omar Abou Khaled HES-SO HES-SO HES-SO University of Applied Sciences University of Applied Sciences University of Applied Sciences Western Switzerland, Western Switzerland Western Switzerland Fribourg, Switzerland Fribourg, Switzerland Fribourg, Switzerland karl.daher@hes-so.ch elena.mugellini@hes-so.ch omar.aboukhaled@hes-so.ch Abstract Thereby, most of these interactions with chat- bots are still of transactional nature, for example Recent years show an increasing popular- when ordering a pizza. Furthermore, the inter- ity of chatbots, with latest efforts aiming actions with chatbots are usually short and there- to make them more empathic and human- fore, not resembling normal human-like conver- like, finding application for example in sations. Hence, recent efforts aim to also create customer service or in treating mental ill- more personalised chatbots for deeper and emo- nesses. Thereby, emphatic chatbots can tionally charged conversations. This can also help understand the user’s emotional state and boosting the usage of chatbots by making users respond to it on an appropriate emotional feel better, instead of providing or offering cer- level. This survey provides an overview tain services to them. Thus, making the overall in- of existing approaches used for emotion teraction more natural and human-like. Empathic detection and empathic response gener- chatbots find application for example in customer ation. These approaches raise at least service or for treating mental illnesses. one of the following profound challenges: Chatbots for customer service is a growing the lack of quality training data, balanc- trend and Gartner1 predicts that by 2020 about ing emotion and content level informa- 25% of customer service requests will be handled tion, considering the full end-to-end expe- using chatbots. Xu et al. (2017) have analysed one rience and modelling emotions throughout million service requests made over Twitter. The conversations. Furthermore, only few ap- authors note that about 40% of the requests ex- proaches actually cover response genera- press emotions, attitudes or opinions rather than tion. We state that these approaches are seek for specific information. In addition, the av- not yet empathic in that they either mir- erage response time for customer service requests ror the user’s emotional state or leave it up is about 6.5 hours. However, 72% of users who file to the user to decide the emotion category a request, expect a response within an hour. Thus, of the response. Empathic response gener- empathic chatbots could help improving customer ation should select appropriate emotional support by reducing the response time, reacting to responses more dynamically and express specific user emotions and reduce overall costs. them accordingly, for example using emo- Empathic chatbots also indicate potential in di- jis. 1 https://www.gartner.com/en/newsroom/ 1 Introduction press-releases/2018-02-19-gartner- says-25-percent-of-customer-service- Chatbots are everywhere, from booking a flight operations-will-use-virtual-customer- online to checking the balance of a bank account. assistants-by-2020 Copyright c 2019 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 Interna- tional (CC BY 4.0). agnosing and treating mental illnesses. According gorithms are used to manipulate the public and to the Swiss Health Observatory, one out of five form opinions, yielding in multiple reports on the Swiss suffers from at least a slight depression2 . In matter. Woolley and Guilbeault (2017) analysed the United States of America, nearly one in five the usage of chatbots during the 2016 presiden- adults suffers from some form of mental illness tial election in the United States using a quanti- causing economic costs of around $210 billion an- tative network analysis of over 17 million tweets. nually3 . A lack of mental professionals and psy- The authors state that chatbots in fact showed a chiatrists makes it difficult to treat and detect af- measurable influence during the election by ei- fected individuals. Empathic chatbots can provide ther manufacturing online popularity or by de- good accessibility and are scalable to a vast public mocratizing propaganda. Thus, governments of with a low entrance-barrier and to help detecting several countries start to introduce regulations and treating mental illness faster. to fight against these kinds of online manipula- There are already some noteworthy advance- tions (Howard et al., 2018). However, chatbots ments in the field of empathic chatbots to treat or oftentimes remain a widely-accepted tool for pro- detect mental illnesses. Woebot (Fitzpatrick et al., paganda (Woolley and Guilbeault, 2017). 2017) for example, is a chatbot from the Univer- The rest of this survey is structured as follows. sity of Stanford, using methods from Cognitive Section 2 introduces the different stages in the in- Behavioural Therapy (CBT) to provide a step-by- teraction with empathic chatbots. For each stage, step guidance to users with anxieties or depres- we present the most common and noteworthy ap- sions. Another noteworthy chatbot is Replika in proaches. In Section 2.3, we focus on the state the form of a digital companion with the main of empathic response generation and outline short- goal of providing someone to talk to 24/7 and to comings. Finally, we conclude and discuss the sur- tackle certain resolutions for example being more vey in Section 3. social4 . The underlying code of Replika is open source. 2 The Four Stages of Empathic Chatbots One important aspect in designing empathic We partition the interaction with an empathic chat- chatbots is understanding what empathy actually bot in four stages — the emotion expression by the is. In this survey, we consider empathic chatbots to user in text format, the emotion detection and re- use affective empathy as defined by Liu and Sun- sponse generation by the chatbot and the response dar (2018). So, the chatbots detect and understand or rather emotion expression from the chatbot back the user’s emotions and respond to them on an ap- to the user in text format. An overview of the propriate emotional level. Liu and Sundar (2018) stages can be seen in Figure 1. Each stage re- observe in their study that the expression of either quires special attention to ensure a proper end- sympathy or empathy from a health advice chatbot to-end user experience. The following chapter is favoured over an unemotional response. presents each stage and points out common ap- With chatbots becoming more and more human- proaches, challenges and shortcomings. like, it gets difficult for people to distinguish on- line conversations with bots and humans. This fact has lately become problematic5 , since bots are increasingly being misused for political propa- ganda and the manipulation of people. The Com- putational Propaganda Research Project (COM- PROP)6 from the University of Oxford devotes it’s time to investigating, how chatbots and other al- 2 https://www.obsan.admin.ch/de/ Figure 1: Four stages of interaction to consider publikationen/psychische-gesundheit 3 when building empathic chatbots https://www.nimh.nih.gov/health/ statistics/mental-illness.shtml 4 https://replika.ai 5 https://www.nytimes.com/2018/12/04/ 2.1 Emotion Expression opinion/chatbots-ai-democracy-free- speech.html Emotions are a complex construct and the abil- 6 https://comprop.oii.ox.ac.uk ity to detect emotions in text is heavily dependent on how these emotions are expressed. Even for ter two models are seldomly used for emotion de- humans, it can be tricky to guess the emotional tection, since more emotion categories mean addi- state of a text message. There are three major tional complexity for the classification task. challenges when it comes to emotions. First, they Seyeditabari et al. (2018) review existing works are context sensitive by nature, they can be multi- and approaches in the field of emotion detection layered within a sentence, and they can be implicit. and provide a good overview of the state-of-the- Hence, emotions are perceived differently based art of emotion detection in text. They list different on contextual and personal circumstances, such as resources used for detecting emotions in text such the culture, age, sex, education, previous experi- as labelled text, emotion lexicons, or word embed- ences and other individual parameters (Ben-Zeev, dings and elaborate on common approaches used 2000; Oatley et al., 2006). for emotion detection. Seyeditabari et al. (2018) In normal face-to-face conversations, emotions conclude that there is still potential for improving are also expressed over the tonality of the speaker, emotion detection in text. Thereby, the complex body language, gestures and facial expressions. nature of emotion expression, the shortage of qual- However, when focusing solely on the emotion ex- ity data and inefficient models induce most chal- pression in text, lots of potential information stem- lenges for future work. ming from these non-verbal cues go lost. This In this survey, we distinguish three major might lead to mis-interpretations of the opponent’s approaches used for emotion detection in text emotions, when communicating over text mes- — rule-based, non-neural machine learning and sages only. deep learning. Words holding a strong emotional charge such 2.2.1 Rule-Based Approaches as kisses for love, tears for sadness, or wow for surprise can help interpreting the emotional state. Rule-based approaches mainly use emotion lexi- Such word associations are also used in emotion cons or word embeddings. Both approaches are lexicons and word embeddings. based on keyword lookup from text to detect the underlying emotion. The rule-based approach is The usage of emojis can help amplifying or only as good, as is its parsing algorithm, and the transporting emotional meaning in text-based con- quality of the lexical resource used for the lookup. versations, but can also pose additional interpreta- Emotion lexicons list emotion-bearing words and tion challenges, for example, when multiple con- classify them to single or multiple emotional cate- tradicting emojis are used. We further discuss gories. Word embeddings, on the other hand, also emojis in the context of response expression in take into account frequently co-occurring words Section 2.4. that are semantically similar. Emotion lexicons can be built from scratch. 2.2 Emotion Detection However, there exist good off-the-shelf solu- In the emotion detection stage, we try to classify tions. One of the most popular being WordNet- and map an utterance to an emotional category. Affect (Strapparava et al., 2004). These off-the- It is important to note, that emotion detection is shelf solutions differ tremendously in terms of strongly tied with response generation as similar their number of entries. WordNet-Affect con- approaches are used for both stages. tains close to five thousand words, whereas De- One of the first challenges is setting the num- pecheMood (Liu and Zhang, 2012), another pop- ber of emotion categories to be used for classifi- ular lexicon, contains more than thirty-five thou- cation. There is no universally accepted model of sand words. Nonetheless, the quality of the lexi- emotions and the number of emotions differs dras- con is not solely dependent on its size. The vocab- tically depending on the underlying model. One ulary used for the lexicon also impacts its qual- of the most popular models in emotion detection ity. Bandhakavi et al. (2017) argue that general- is Ekman’s six basic emotions — happiness, sad- purpose lexicons such as WordNet-Affect perform ness, fear, anger, disgust, and surprise (Ekman, not as good as domain-specific emotion lexi- 1992). Other popular models include Plutchik’s cons. Therefore, a smaller domain-specific lex- wheel of emotions (Plutchik, 1991) or Parrot’s icon might yield in better results than a larger Emotional Layers (Parrott, 2001) consisting of general-purpose lexicon. LIWC-based lexicons thirty-one different emotions. However, the lat- (Linguistic Inquiry and Word Count) are also widely used, since these dictionaries list grammat- ing the Swiss Center for Affective Sciences7 pro- ical, psychological, and content word categories, viding datasets like the International Survey On and thus also emotion categories with thousands Emotion Antecedents And Reactions (ISEAR) and of entries (Chung and Pennebaker, 2012). other useful tools for emotion detection. Other The idea behind word embeddings is similar to well-known datasets are EmotiNet (Balahur et al., emotion lexicons. Each word is represented as a 2011) and SemEval-2007 (Strapparava and Mihal- vector in the vector space. Thereby, frequently co- cea, 2007). occurring words are considered semantically simi- As stated by Seyeditabari et al. (2018), one of lar and therefore, close in the vector space (Seyed- the major challenges for supervised approaches itabari et al., 2018). Among the most popular word is the lack of quality training data. Oftentimes, embedding methods is word2Vec (Mikolov et al., these datasets are unbalanced in terms of emo- 2013). Word embeddings are also often used to tion categories. Banchs (2017) analyse the large train machine learning models, like LSTM, which movie dialogue dataset MovieDiC and conclude usually take word vectors as inputs. that emotions such as love, or joy occur much Both rule-based approaches are straightforward. more frequently than fear or surprise. The clas- However, there are some drawbacks to them. The sifiers trained on such datasets will therefore un- emotional meaning of keywords can be ambiguous derperform for these emotional categories. and is context-sensitive. The sentences She hates me, and I hate her, could both be classified as 2.2.3 Deep Learning Approaches anger based on the keyword hate. However, when Most recent advances that showed to be effective looking at the sentence level information, the first in the field of emotion detection, have been made utterance could also be perceived as sad. Ignor- using deep learning (Xu et al., 2017). ing the syntactic structure and semantics of the Oftentimes, deep learning approaches are cov- whole sentence, can therefore lead to misinterpre- ering both, the emotion detection and the response tations. Furthermore, sentences without any emo- generation, for example when using an Encoder- tional keywords cannot be classified. Even if they Decoder architecture (Serban et al., 2015). This might contain an implicit expression of emotions, architecture consists of two stages — the encod- for example in the form of a metaphor (Kao et al., ing and decoding stage. In the encoding stage, the 2009). As a consequence, especially emotion lex- raw text input is turned into a feature representa- icons often lack accuracy compared to more com- tion, usually in the form of a vector. The vector plex approaches. is then used as an input for the decoding stage to generate a response by applying the same strate- 2.2.2 Non-Neural Machine-Learning gies as in the encoding stage, but in the opposite Unlike rule-based approaches, non-neural direction. learning-based approaches are trying to detect A well-known approach applying the encoding- emotions using trained classifiers, such as the decoding architecture is Long Short-Term Memory Support Vector Machine (SVM) (Teng et al., (LSTM) (Jithesh et al., 2017). LSTM is a Recur- 2006), Naive Bayes, or Decision Trees. rent Neural Network (RNN) that allows to capture We distinguish between supervised and unsu- long-term dependencies and store sequential infor- pervised learning. Unsupervised approaches are mation over a longer time. It can retain and forget an evolution of the rule-based approaches and the previous state and memorise extracted infor- are learning from test data that is not anno- mation from the input data depending on its im- tated with emotional labels. Most commonly, portance (Xu et al., 2017; Sun et al., 2019). these approaches use movie dialogues (Banchs, The commonly used Sequence to Sequence 2017; Honghao et al., 2017) or children’s fairy (Seq2Seq) model also uses LSTMs and the tales (Kim et al., 2010) to build emotional lexicons Encoding-Decoding architecture (Sutskever et al., and train their models. 2014). There is one LSTM for the encoding stage, Supervised approaches, on the other hand, learn transforming the raw text input into a fixed-length from labelled data such as Twitter messages. vector representation, whereas another LSTM is Common labels are annotations, hashtags or emo- used for the decoding to a variable-length text out- jis. There exist a few good sources for emotion- ally labelled text, one of the most prominent be- 7 https://www.unige.ch/cisa/ put (Cho et al., 2014; Xu et al., 2017; Chan and are after all still acted and not naturally occurring, Lui, 2018). which might also have an impact on the quality of To improve the model’s efficiency, Chan and the training data. Lui (2018) investigate different approaches on em- Other common datasets include chat conver- bedding emotional information for Seq2Seq mod- sations, for example from Twitter service re- els. Different styles, positioning, and embeddings quests (Xu et al., 2017) that might yield in more of emotional information are tested. The authors natural conversations. conclude that the positioning in general matters 2.3.2 Dynamic Generation and impacts the emotion detection. These approaches are strongly tied with the 2.3 Response Generation deep-learning approaches used for emotion de- One of the most difficult tasks for empathic chat- tection from Section 2.2.3 and usually based bots is generating an empathic response. Firstly, on the encoder-decoder architecture, such as the because it faces similar challenges as the emotion Sequence-to-Sequence model. detection stage. Secondly, because it not only has The input sentence is encoded on a word-by- to ensure that the response is appropriate in terms word basis by embedding each word separately, of content level information, but also in terms of whilst taking into account already encoded words emotion level information. This balancing act is using hidden states. Thereby, the last word embed- tremendously difficult, as one usually has to sac- ding will produce a vector representation of the rifice accuracy for one of the information levels, whole input sequence, encapsulating all relevant when trying to optimise the other (Xu et al., 2017; sentence level information. Semantically similar Zhou et al., 2017). sentences are therefore close to each other in a In terms of empathic response generation, we vector space (Sutskever et al., 2014). distinguish between two strategies — retrieval- The decoder will then use the sentence vector based approaches and dynamic generation. or rather sentence embedding to produce an out- put sentence using inverted encoding mechanisms 2.3.1 Retrieval-Based approaches on a word-by-word basis. This allows encoding- These approaches look up common responses to decoding architectures to generate variable length the user’s utterance in conversation datasets. How- responses. Thereby, it will consider already de- ever, this method is very limited in its applicabil- coded words to ensure that the generated response ity. Similar inputs yield in the same responses, is also grammatically correct. To find appropri- making the conversation repetitive and less natu- ate responses to a given word from the encoding ral. Furthermore, huge datasets of emotional con- stage, vocabularies or word-embeddings are being versations are required for such systems in order used. to achieve acceptable results. As such datasets are However, the longer the input sequence, the scare, these types of approaches tend to yield in more challenging to capture the full meaning in a responses such as I don’t know in cases where no single sentence embedding. For an input sentence candidate response can be found. of 30 words, the decoder would have to consider, A more advanced version of retrieval-based sys- what was encoded 30 steps ago, just to decode the tems uses word embeddings on the input text to first word. This long-range dependency problem find the closest candidate responses, thus yield- oftentimes results in poor responses, like I don’t ing in slightly more diverse responses (Bartl and know (Chan and Lui, 2018). Spanakis, 2017). However, it still requires lots of Attention mechanisms are commonly used emotionally charged sample conversations. to tackle the issue of long-range dependen- Empathic response generation in general re- cies (Sutskever et al., 2014). Using attention, the quires similar datasets as emotion detection, but decoder has direct access to the hidden state of with a bigger focus on conversation and dialogue each encoded word and can weight each word cor- turns. Movie dialogues are a good source for emo- respondingly. This allows the decoder to attend tionally charged conversations. However, they of- and weight on relevant parts of an input sentence, tentimes do not resemble daily conversation and when generating the output. This mechanism is seem more artificial and theatrical (Chan and Lui, also applied in Neural Machine Translation (Bah- 2018). Furthermore, emotions in movie dialogues danau et al., 2014). However, these Recurrent Neural Networks the interaction natural, then we have to change the (RNN) still suffer from the vanishing gradient emotion category based on the emotional state of problem, that causes issues with long-range de- the user’s message automatically. pendencies (Hochreiter, 1998). LSTMs also apply 2.3.3 Empathic Responses attention and in addition allow to retain and for- get information, therefore handling the long-range As discussed in Section 1, empathy requires un- dependency problem better than other approaches. derstanding of the user’s emotion and replying to All these mechanisms are essentially required to them on an appropriate emotional level. Using ensure an appropriate response in terms of content emotion detection, we can achieve good results in level information. When we also want to consider understanding the user’s emotions. The difficult emotion level information, we add additional com- part is actually selecting the appropriate emotion plexity to the model. Emotions either have to be to condition the response with. additionally encoded during the encoding stage or One approach could be to simply mirror fed directly to the decoding stage to generate emo- the user’s emotion. However, in human- tional responses (Zhou et al., 2017). conversations, empathy finds expression, when one tries to feel with the opponent and not neces- The Emotional Chatting Machine as proposed sarily similar to the opponent. One’s own emotion by Zhou et al. (2017) is a recent and noteworthy must not be confused with the opponent’s emo- approach for assessing the emotional state of con- tion. When resonating to the opponent’s emotion, versations and to generate appropriate emotional one is still aware that it might be different from the responses. Therefore, it belongs to the dynamic personal emotion (Singer and Klimecki, 2014). If generation approaches. The ECM deep learn- someone is sad, you might understand this sadness ing algorithm is trained with 22.300 Chinese blog and try to cheer them up, instead of responding in posts that are manually annotated with Ekman’s a sad way as well. However, it does not mean that six basic emotions. you are necessarily feeling sad as well. Thus, sim- In terms of architecture, the ECM is based on ply mirroring the user’s emotion does not neces- the Seq2Seq model with an encoding and decod- sarily yield in empathic responses. ing phase. In addition, Zhou et al. (2017) intro- This is also an important aspect with regards to duce an internal and external memory to the model a chatbot’s personality, since in these cases, one to capture changes in the emotion state throughout should think about the chatbot’s own emotion, as the sentence and to map explicit emotion expres- well as how it might resonate on someone else’s sions to emotion categories. Figure 2 provides a emotions. good overview of the ECM architecture. As in- Another crucial aspect is taking into account the put, the ECM requires the user’s text message and user’s emotional evolution throughout the whole one of the Ekman’s six emotion categories to con- conversation. When just considering the latest dition the response. Based on the input message, user utterance for emotion detection, misinterpre- the ECM will generate an appropriate response tations or frequent switches in the emotions ex- and condition it using the input emotion cate- pressed by the chatbot’s response might occur. For gory. Zhou et al. (2017) benchmark the ECM with example, the user could genuinely be in a bad other approaches, such as the traditional Seq2Seq mood, but laugh at a joke one just made. If we model or lexicon-based approaches and show that would consider just the latest user utterance to ECM performs best across all emotion categories. detect the user’s emotion and condition the re- However, it lacks behind slightly on the content sponse accordingly, the chatbot’s expressed emo- level that the authors put down to an imbalance in tion would switch from negative to positive within the training set. a single sentence. Modelling the user’s emotion One drawback of the ECM is that the input emo- over a longer period might also be important when tion has to be set manually. This hardwiring of the applying empathic chatbots in treating mental ill- output emotion can be useful, if the chatbot should nesses, or when building personality profiles to always respond in the same emotional state, or ex- monitor the emotional state of the user. press certain personality traits such as being angry We observe that only little research actually fo- all the time. However, if we want the chatbot to cusses on the generation of empathic responses dynamically react to the user’s emotions and make in Computer Science, compared to the efforts Figure 2: Overview of the ECM architecture based on the encoder-decoder framework with the addition of an internal and external memory to further improve the emotional response (Zhou et al., 2017). done for emotion detection. There exist some ap- the main reason for the usage of emojis in mes- proaches, such as the Encoder-Decoder architec- sages is to express emotions or strengthen expres- ture, that cover emotion detection as well as emo- sions. tional response generation. Nonetheless, an emo- Emojis could therefore also be considered when tional response is not necessarily an empathic re- detecting the user’s emotion. However, two chal- sponse as elaborated before. lenges arise when using emojis as possible emo- How humans are generating empathic responses tional labels. First, the emoji label could be con- is still an ongoing field of research in neuro- tradictory to the perceived emotional state from science (Shamay-Tsoory and Lamm, 2018). Sim- the text, for example implying a sarcastic utter- ilar to emotions, there is no universally accepted ance. Figure 3 shows, how emojis can lead to such model for empathic responses, except that em- contradicting interpretations. Second, emojis are pathy is heavily context-dependent (Singer and prone to cultural differences as stated by Ljubešić Klimecki, 2014). and Fišer (2016). Chatbots with a global scope should therefore take into account, that emojis 2.4 Response Expression might be used and perceived differently depend- In a normal conversation, non-verbal cues such as ing on the country. facial expressions or gestures can help indicate a person’s emotional state. However, with chatbots, we are missing such information and have to fo- cus solely on the user’s text, to detect the emo- tional state. Similar constraints also apply to the Figure 3: Two examples of challenging cases response expression by the chatbot. It is difficult where the emojis are contradictory to the per- to transport the intended emotion from the gen- ceived emotional state of the text message, or the erated response back to the user in a text format. multiple contradicting emojis are used. Some approaches try to simulate non-verbal cues by displaying the chatbot as a 3D simulation of a DeepMoji (Felbo et al., 2017) is an impressive person (Tatai et al., 2003). We note that in general, tool translating text into a set of emojis expressing chatbots do not express responses in any other way a similar emotional state returning the five most than text. Because such non-verbal cues are miss- likely emojis together with their probabilities. It ing in traditional electronic messaging systems, is trained on 1.2 billion tweets containing emo- people are using emojis to supply such cues. The jis and uses LSTM to predict the most appropri- usage of emojis has increased heavily over the pre- ate emojis. Generated emojis could be mapped to vious years. In 2017, Facebook revealed that on an different emotion categories and used to express average day, over 5 Billion emojis are being sent emotions in the response to the user. We leave the over Messenger only8 . Hu et al. (2017) state that validation of this method for future work. 8 We state that the usage of emojis in conversa- https://www.adweek.com/digital/ facebook-world-emoji-day-stats-the- tional agents might be a clue to make them more emoji-movie-stickers/ human-like and to help expressing non-verbal cues that otherwise might go missing. Future work message. Taking into account the evolution of the should therefore focus on validating this hypoth- user’s emotion throughout the whole conversation esis. and possibly even over several previous conversa- tions, prevents frequent changes of the chatbot’s 3 Discussion and Conclusion expressed emotions and helps model the user’s long-term emotional state. We note that current state-of-the-art approaches Furthermore, more efforts should be devoted to face the following major challenges: understanding empathy and how chatbots can gen- 1. Shortage of quality training data — erate empathic responses instead of just emotional Machine-Learning algorithms for emotion detec- responses. tion and empathic response generation require an In this survey, we have presented the state-of- extensive amount of annotated training data. Ex- the-art of empathy and especially empathic re- isting datasets are scarce and are oftentimes unbal- sponse generation in chatbots and pointed out sev- anced for different emotions. Hence, chatbots that eral noteworthy approaches. We pointed out the were trained using such datasets will lead to poor four stages of the interaction with the chatbot and performances on these emotions. Using annotated underlined the importance to take all the stages data from social media has proven to yield in good into account when creating empathic chatbots. results, but also suffers from unbalanced emotion We note that there exist many different ap- distribution. To generate human-like responses, proaches to tackle the problem of emotion detec- natural conversations should be used for training tion, but only few for empathic response genera- as opposed to artificial and theatrical movie dia- tion. Overall, deep learning algorithms, such as logues. the Emotional Chatting Machine (ECM) tend to 2. Emotion level and content level — To gener- yield in the best results. Even though, there is still ate responses that are grammatically correct and potential for improvement as the ECM only gener- that reflect the appropriate content level is very ates emotional responses, but not empathic ones. complex. Using domain specific training data can help improve the accuracy. If the answer should also reflect the emotional level and detect possibly References implicit or multi-layered emotions, then the com- Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Ben- plexity increases even further. Improving one of gio. 2014. Neural machine translation by jointly the levels — emotion or content — without sac- learning to align and translate. arXiv preprint rificing accuracy for the other is very challeng- arXiv:1409.0473 https://arxiv.org/abs/1409.0473. ing. For response generation, we note that existing Alexandra Balahur, Jesús M. Hermida, Andrés Mon- approaches are mainly focusing on content level toyo, and Rafael Muñoz. 2011. EmotiNet: A knowl- information and consider emotions only as addi- edge base for emotion detection in text built on the appraisal theories. In Natural Language Process- tional information during encoding. ing and Information Systems, Springer Berlin Hei- 3. Considering the full end-to-end experience delberg, pages 27–39. https://doi.org/10.1007/978- — In order to achieve good results, one has to 3-642-22327-34 . consider the impacts of all four stages — emotion Rafael E. Banchs. 2017. On the construction of more expression by the user, emotion detection by the human-like chatbots: Affect and emotion analy- chatbot, response generation by the chatbot, and sis of movie dialogue data. In 2017 Asia-Pacific appropriate response expression back to the user. Signal and Information Processing Association An- Only by considering the full end-to-end experi- nual Summit and Conference (APSIPA ASC). IEEE. https://doi.org/10.1109/apsipa.2017.8282245. ence can chatbots be improved to be more human- like and empathic. Anil Bandhakavi, Nirmalie Wiratunga, Stewart Future work should investigate the integration Massie, and Deepak Padmanabhan. 2017. Lex- icon generation for emotion detection from of emojis into the full end-to-end experience — text. IEEE Intelligent Systems 32(1):102–108. from emotion detection to response expression. https://doi.org/10.1109/mis.2017.22. 4. Modelling emotions throughout conversa- A. Bartl and G. Spanakis. 2017. A retrieval- tions — We state that when selecting emotions to based dialogue system utilizing utterance and condition the response, one should not only con- context embeddings. In 2017 16th IEEE sider the detected emotion from the latest user International Conference on Machine Learning and Applications (ICMLA). pages 1120–1125. US election: Was polarizing content concen- https://doi.org/10.1109/ICMLA.2017.00011. trated in swing states? CoRR abs/1802.03573. http://arxiv.org/abs/1802.03573. Aaron Ben-Zeev. 2000. The Sub- tlety of Emotions. The MIT Press. Tianran Hu, Han Guo, Hao Sun, Thuy-vy Thi https://doi.org/10.7551/mitpress/6548.001.0001. Nguyen, and Jiebo Luo. 2017. Spice up your chat: The intentions and sentiment effects of Yin Hei Chan and Andrew Kwok Fai Lui. using emoji. arXiv preprint arXiv:1703.02860 2018. Encoding emotional information for https://arxiv.org/abs/1703.02860. sequence-to-sequence response generation. In 2018 International Conference on Artificial V Jithesh, M Justin Sagayaraj, and K G Srini- Intelligence and Big Data (ICAIBD). IEEE. vasa. 2017. LSTM recurrent neural networks https://doi.org/10.1109/icaibd.2018.8396177. for high resolution range profile based radar target classification. In 2017 3rd Interna- Kyunghyun Cho, Bart van Merrienboer, Caglar Gul- tional Conference on Computational Intelligence cehre, Dzmitry Bahdanau, Fethi Bougares, Holger & Communication Technology (CICT). IEEE. Schwenk, and Yoshua Bengio. 2014. Learning https://doi.org/10.1109/ciact.2017.7977298. phrase representations using RNN encoder–decoder for statistical machine translation. In Pro- Edward Chao-Chun Kao, Chun-Chieh Liu, Ting- ceedings of the 2014 Conference on Empiri- Hao Yang, Chang-Tai Hsieh, and Von-Wun Soo. cal Methods in Natural Language Processing 2009. Towards text-based emotion detection a (EMNLP). Association for Computational Linguis- survey and possible improvements. In 2009 tics. https://doi.org/10.3115/v1/d14-1179. International Conference on Information Man- agement and Engineering. IEEE, pages 70–74. Cindy K. Chung and James W. Pennebaker. 2012. Lin- https://doi.org/10.1109/icime.2009.113. guistic inquiry and word count (LIWC). In Ap- plied Natural Language Processing, IGI Global, Sunghwan Mac Kim, Alessandro Valitutti, and pages 206–229. https://doi.org/10.4018/978-1- Rafael A. Calvo. 2010. Evaluation of un- 60960-741-8.ch012. supervised emotion models to textual affect recognition. In Proceedings of the NAACL HLT Paul Ekman. 1992. An argument for basic emo- 2010 Workshop on Computational Approaches tions. Cognition and Emotion 6(3-4):169–200. to Analysis and Generation of Emotion in Text. https://doi.org/10.1080/02699939208411068. Association for Computational Linguistics, Strouds- Bjarke Felbo, Alan Mislove, Anders Søgaard, Iyad burg, PA, USA, CAAGET ’10, pages 62–70. Rahwan, and Sune Lehmann. 2017. Using mil- http://dl.acm.org/citation.cfm?id=1860631.1860639. lions of emoji occurrences to learn any-domain rep- resentations for detecting sentiment, emotion and Bing Liu and Lei Zhang. 2012. A survey of opin- sarcasm. In Proceedings of the 2017 Conference ion mining and sentiment analysis. In Min- on Empirical Methods in Natural Language Pro- ing Text Data, Springer US, pages 415–463. cessing. Association for Computational Linguistics. https://doi.org/10.1007/978-1-4614-3223-41 3. https://doi.org/10.18653/v1/d17-1169. Bingjie Liu and S. Shyam Sundar. 2018. Should ma- Kathleen Kara Fitzpatrick, Alison Darcy, and Molly chines express sympathy and empathy? experiments Vierhile. 2017. Delivering cognitive behavior ther- with a health advice chatbot. Cyberpsychology, apy to young adults with symptoms of depres- Behavior, and Social Networking 21(10):625–636. sion and anxiety using a fully automated con- https://doi.org/10.1089/cyber.2018.0110. versational agent (woebot): A randomized con- trolled trial. JMIR Mental Health 4(2):e19. Nikola Ljubešić and Darja Fišer. 2016. A global anal- https://doi.org/10.2196/mental.7785. ysis of emoji usage. In Proceedings of the 10th Web as Corpus Workshop. Association for Computa- Sepp Hochreiter. 1998. The vanishing gradi- tional Linguistics. https://doi.org/10.18653/v1/w16- ent problem during learning recurrent neu- 2610. ral nets and problem solutions. Interna- tional Journal of Uncertainty, Fuzziness and Tomas Mikolov, Kai Chen, Greg Corrado, and Jef- Knowledge-Based Systems 6(02):107–116. frey Dean. 2013. Efficient estimation of word https://doi.org/10.1142/S0218488598000094. representations in vector space. arXiv preprint arXiv:1301.3781 https://arxiv.org/abs/1301.3781. WEI Honghao, Yiwei Zhao, and Junjie Ke. 2017. Building chatbot with emotions Keith Oatley, Dacher Keltner, and Jennifer M Jenkins. http://web.stanford.edu/class/cs224s/reports. 2006. Understanding emotions. Blackwell publish- ing. Philip N. Howard, Bence Kollanyi, Samantha Brad- shaw, and Lisa-Maria Neudert. 2018. Social me- W Gerrod Parrott. 2001. Emotions in social psychol- dia, news and political information during the ogy: Essential readings. Psychology Press. Robert Plutchik. 1991. The emotions. University Press Anbang Xu, Zhe Liu, Yufan Guo, Vibha Sinha, and of America. Rama Akkiraju. 2017. A new chatbot for cus- tomer service on social media. In Proceedings Iulian Vlad Serban, Alessandro Sordoni, Yoshua of the 2017 CHI Conference on Human Factors Bengio, Aaron C. Courville, and Joelle Pineau. in Computing Systems - CHI 17. ACM Press. 2015. Hierarchical neural network generative mod- https://doi.org/10.1145/3025453.3025496. els for movie dialogues. CoRR abs/1507.04808. http://arxiv.org/abs/1507.04808. Hao Zhou, Minlie Huang, Tianyang Zhang, Xiaoyan Zhu, and Bing Liu. 2017. Emotional chatting Armin Seyeditabari, Narges Tabari, and Wlodek machine: Emotional conversation generation with Zadrozny. 2018. Emotion detection in text: internal and external memory. arXiv preprint a review. arXiv preprint arXiv:1806.00674 arXiv:1704.01074 https://arxiv.org/abs/1704.01074. https://arxiv.org/abs/1806.00674. Simone Shamay-Tsoory and Claus Lamm. 2018. The neuroscience of empathy – from past to present and future. Neuropsychologia 116:1 – 4. Special Issue: The Neuroscience of Empathy. https://doi.org/10.1016/j.neuropsychologia.2018.04.034. Tania Singer and Olga M. Klimecki. 2014. Empathy and compassion. Current Biology 24(18):R875 – R878. https://doi.org/10.1016/j.cub.2014.06.054. Carlo Strapparava and Rada Mihalcea. 2007. SemEval-2007 task 14. In Proceedings of the 4th International Workshop on Semantic Evaluations - SemEval 07. Association for Computational Lin- guistics. https://doi.org/10.3115/1621474.1621487. Carlo Strapparava, Alessandro Valitutti, et al. 2004. Wordnet affect: an affective extension of wordnet. In Lrec. Citeseer, volume 4, pages 1083–1086. Xiao Sun, Chen Zhang, and Lian Li. 2019. Dy- namic emotion modelling and anomaly detec- tion in conversation based on emotional tran- sition tensor. Information Fusion 46:11–22. https://doi.org/10.1016/j.inffus.2018.04.001. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. CoRR abs/1409.3215. http://arxiv.org/abs/1409.3215. Gábor Tatai, Annamária Csordás, Árpád Kiss, At- tila Szaló, and László Laufer. 2003. Happy chatbot, happy user. In Intelligent Virtual Agents, Springer Berlin Heidelberg, pages 5–12. https://doi.org/10.1007/978-3-540-39396-22 . Zhi Teng, Fuji Ren, and Shingo Kuroiwa. 2006. Retracted: Recognition of emotion with SVMs. In Lecture Notes in Computer Science, Springer Berlin Heidelberg, pages 701–710. https://doi.org/10.1007/978-3-540-37275-28 7. Samuel C Woolley and Douglas R Guilbeault. 2017. Computational propaganda in the united states of america: Manufacturing consensus online. Computational Propaganda Research Project page 22. http://blogs.oii.ox.ac.uk/politicalbots/wp- content/uploads/sites/89/2017/06/Comprop- USA.pdf.