Emotion Chatbot

Speech Processing Lab supervised by Prof. Lin-shan Lee
Speech Processing Lab
supervised by Prof. Lin-shan Lee

Developed an emotion chatbot in Chinese with seq2seq model.

Developed an emotion chatbot
in Chinese with seq2seq model.

result

Figure 1. Sample responses generated by emotion chatbot.

Perception and expression of emotion are key factors to the success of dialogue systems or conversational agents. In this research, we planned to develop an emotional chatbot that can generate appropriate responses not only in content (relevant and grammatical) but also in emotion. Our first step was to implement a classifier to perceive emotions for large-scale corpus. After that, we created a seq2seq chatbot to express emotions in conversation. Our result is listed above on Figure 1.

Figure 2. Classifier results among confusion matrix, class distribution, and classification sample.

1. Classifier Phase

In order to build a large emotion corpus for chatbot training, we implement a classifier with BERT word embedding and metric learning techniques. We got 62.5% accuracy on 6 emotion classes which we discovered it is easily to perceive emotional sentence as non-emotional. The results are shown above on Figure 2.

Figure 3. Seq2seq architecture for emotion chatbot.

2. Chatbot Phase

With a large emotion corpus, we developed our chatbot with basic seq2seq model, the most popular model for chatbot. The whole architecture contains emotion category embedding for embedding level feature, internal memory for hidden state level feature, and external memory for word level feature, as shown above on Figure 3.

For more information, please refer to our report.