Abstract
The increasing use of dialogue agents makes it extremely desirable for them to understand and acknowledge the implied emotions to respond like humans with empathy. Chatbots using traditional techniques analyze emotions based on the context and meaning of the text but often lack the understanding of emotions expressed through non-verbal cues. Emojis, representing digital facial expressions, present a promising way to express these emotions. We propose SentEmojiBot, a system based on the SentEmoji dataset designed to generate empathetic conversations using a combination of emojis and text. Evaluation metrics show that our BERT-based model outperforms vanilla transformer models. Furthermore, a user study indicates that dialogues generated by our model were highly understandable, and the addition of emojis improved perceived empathetic traits in conversations by 9.8%.
Introduction: Bridging the Digital Empathy Gap
While modern dialogue agents have become proficient at generating grammatically correct text, they often feel "cold" or robotic because they lack the non-verbal cues essential to human empathy. In face-to-face communication, facial expressions resolve ambiguities in tonality and intent. In the digital world, emojis serve as the primary proxy for these expressions.
Most existing research into empathetic chatbots focuses purely on textual semantics. However, ignoring emojis leaves a significant "empathy gap." As illustrated in the figure below, a simple textual response can be perceived as less natural or empathetic compared to one augmented with a contextually appropriate emoji.
The challenge lies in not just generating a good text response, but also identifying the underlying emotion and selecting an emoji that fits both the sentiment and the specific context of the sentence without being repetitive or unrealistic.
Methodology
We propose SentEmojiBot, a multi-stage pipeline designed to generate text and then "decorate" it with the right emoji. The architecture consists of two primary modules: textual response generation and emoji incorporation.
1. Text Response Generation
The system utilizes a retrieval-based approach to select the most appropriate response from a candidate set. We compared a Vanilla Transformer against a BERT-based model. Both models calculate the dot product between context embeddings and candidate response embeddings to identify the best match.
2. Emotion Classification
Once a text response is selected, a CNN-based classifier (inspired by Kim, 2014) analyzes the "Context" of the conversation to identify one of ten fundamental emotions. Our research found that training on the "Context" attribute—a summary of the situation—was more effective than training on raw individual utterances, as it provided a cleaner signal of the underlying emotional state.
3. Emoji Selection via Embedding Matching
To ensure the emoji is contextually relevant, the system maps the identified emotion to a specific "bucket" of emojis. It then calculates the cosine similarity between the emoji’s embedding (Emoji2Vec) and the generated sentence’s embedding (Word2Vec). To prevent "emoji spam" or unrealistic usage, an emoji is only appended if its similarity score exceeds a specific threshold.
Dataset and Experimental Setup
The study utilizes the SentEmoji (SE) dataset (Ravi et al., 2020), which consists of 24,850 conversations and 79,190 utterances. Each empathetic response is labeled with emojis and categorized into 10 mutually exclusive emotional states: Fear, Anger, Disgust, Sadness, Contempt, Amusement, Pride in Achievement, Satisfaction, Optimism, and Contentment. The average length of an utterance in this dataset is 15.2 words.
Results and Discussion
Automated Metrics
The BERT-based architecture significantly outperformed the vanilla Transformer in picking the "correct" human response from a pool. The BERT model achieved an Average BLEU score of 5.78 and a P@1,100 of 36%, compared to the Transformer's 4.38 BLEU and 3.65% P@1,100. This suggests that pre-trained language models capture the nuances of empathetic context much better than models trained from scratch on smaller datasets.
Emotion Classification and Human Evaluation
The CNN classifier reached a micro accuracy of 55.4%. While emotion extraction remains a difficult task in NLP, the downstream impact on user experience was significant. In a user study of 80 dialogues, adding emojis increased the mean empathy score from 2.88/5 to 3.37/5 (a 9.8% improvement). Users also rated the relevance of the added emojis at 3.11/5, indicating that the embedding-based selection successfully matched the tone of the conversation.
Conclusion and Future Work
SentEmojiBot demonstrates that emojis are not merely decorative but serve as vital "tonality resolvers" that help listeners interpret a speaker's intention. However, several limitations remain. Currently, the bot only appends emojis to the end of a sentence, whereas natural human chat often intersperses them. Future work will explore generative models that create text and emojis simultaneously, as well as expanding the emotional vocabulary beyond the current 10 categories to provide more nuanced responses.
Summary updated