RUCIR at NTCIR-14 STC-3 CECG Subtask Speaker: Jiaqing Liu School of Information Renmin University of China Author: Xiaohe Li and Zhicheng Dou 2019/6/12 1
STC-3 CECG @ NTCIR-14 Conversation Generation Task ๏ Input: post ( ๐ = ๐ฆ 1 ๐ฆ 2 โฏ ๐ฆ ๐ ) ๏ Output: response (with fluency and coherence) Post (Given) Response (to be Generated) ็ฑ็่ฟไผๅ้ฅญ็็ทไบบ๏ผๆๅธ ไบ๏ผ ไผๅ้ฅญ็็ทไบบๆฏๅพๅธ ็ๅใ The man who cooks and loves dogs is very The man who cooks is handsome. handsome! 2019/6/12 2
STC-3 CECG @ NTCIR-14 Conversation Generation Task ๏ Input: post ( ๐ = ๐ฆ 1 ๐ฆ 2 โฏ ๐ฆ ๐ ) ๏ Output: response (with fluency and coherence) Post (Given) Response (to be Generated) ็ฑ็่ฟไผๅ้ฅญ็็ทไบบ๏ผๆๅธ ไบ๏ผ ไผๅ้ฅญ็็ทไบบๆฏๅพๅธ ็ๅใ The man who cooks and loves dogs is very The man who cooks is handsome. handsome! No Not Co Conside ider Em Emotion on (Import ortant ant in Co Convers ersati ation) on) 2019/6/12 3
STC-3 CECG @ NTCIR-14 Emotional Conversation Generation ๏ Input: post & emotion category (of response) {Like, Happiness, Anger, Disgust, Sadness, Other} ๏ Output: response (with fluency and coherence & emotional consistency) Emotion Post (Given) Response (to be Generated) (Given) ็ฑ็่ฟไผๅ้ฅญ็็ทไบบ๏ผๆๅธ ไบ๏ผ ๅๆฌข ไผๅ้ฅญ็็ทไบบๆฏๅพๅธ ็ๅใ The man who cooks and loves dogs Like The man who cooks is handsome. is very handsome! 2019/6/12 4
STC-3 CECG @ NTCIR-14 Emotional Conversation Generation ๏ Input: post & emotion category (of response) {Like, Happiness, Anger, Disgust, Sadness, Other} ๏ Output: response (with fluency and coherence & emotional consistency) Emotion Post (Given) Response (to be Generated) (Given) ็ฑ็่ฟไผๅ้ฅญ็็ทไบบ๏ผๆๅธ ไบ๏ผ ๅๆฌข ไผๅ้ฅญ็็ทไบบๆฏๅพๅธ ็ๅใ The man who cooks and loves dogs Like The man who cooks is handsome. is very handsome! Goal: l: Genera rate te the Respon onse se with h Sp Specia ial l Em Emotion on 2019/6/12 5
STC-3 CECG @ NTCIR-14 Same me Post: st: Different ferent Res espo ponse se with th Diffe ffere rent nt Emotion otion Emotion Post (Given) Response (to be Generated) (Given) ็ฑ็่ฟไผๅ้ฅญ็็ทไบบ๏ผๆๅธ ไบ๏ผ ๅๆฌข ไผๅ้ฅญ็็ทไบบๆฏๅพๅธ ็ๅใ The man who cooks and loves dogs Like The man who cooks is handsome. is very handsome! ็ฑ็่ฟไผๅ้ฅญ็็ทไบบ๏ผๆๅธ ไบ๏ผ ๅๆถ ไฝๆฏๆ็็่ฎจๅ่ฟๆ ท็็ทไบบ๏ผ The man who cooks and loves dogs Disgust But I really hate such a man! is very handsome! ็ฑ็่ฟไผๅ้ฅญ็็ทไบบ๏ผๆๅธ ไบ๏ผ ๆฒไผค ๅฅฝไผคๅฟ๏ผๆๆฒก้ๅฐ่ฟ่ฟๆ ท็็ทไบบใ The man who cooks and loves dogs Sadness So sad, I have never met such a man. is very handsome! 2019/6/12 6
Model Architecture Emotional Response Generate and Select Reranker 4. Reranker Rule-Based Decoder Decoder Decoder Attention Attention Attention Copy Emotion Mechanism Mechanism Mechanism Mechanism Factor Keywords Encoder Encoder Encoder Extraction ร ๐ 3. Emotional Seq2Seq 1. Rule-Based 2. Multi-Seq2Seq with Fine Tune Post & Emotion 2019/6/12 7
Rule-Based Method Emotional Response Generate and Select Reranker 4. Reranker Rule-Based Decoder Decoder Decoder Attention Attention Attention Copy Emotion Mechanism Mechanism Mechanism Mechanism Factor Keywords Encoder Encoder Encoder Extraction ร ๐ 3. Emotional Seq2Seq 1. Rule-Based 2. Multi-Seq2Seq with Fine Tune Post & Emotion 2019/6/12 8
Rule-Based Method ๏ Extract the Keyword in the Post (based on NER) ๏ Fill it into the Proper Constructed Template ๆตทๅๆธธๆฏ็ ด็ญไบ [ ๆ ][ ๆ ][ ๆ ] Post Hainan tour is ruined [angry] [angry] [angry] ๅๆฌข ๆๅๆฌข ๆตทๅ ไบ Like I like Hainan most. ้ซๅ ด ๆณๅฐ ๆตทๅ ๅฐฑๅพๅผๅฟ Happiness I am very happy when I think of Hainan . ็ๆฐ ไธๆณๅฌๅฐ ๆตทๅ ๏ผๅซ่ทๆๆ๏ผ I donโt want to hear about Hainan , don't mention it to me! Anger ๅๆถ ่ถ ็บงไธๅๆฌข ๆตทๅ ๏ผ Disgust Super dislike Hainan ! ๆฒไผค ๆตทๅ ไผค้ไบๆ็ๅฟ Sadness Hainan broke my heart 2019/6/12 9
Multi-Seq2Seq Emotional Response Generate and Select Reranker 4. Reranker Rule-Based Decoder Decoder Decoder Attention Copy Emotion Attention Attention Mechanism Mechanism Mechanism Mechanism Factor Keywords Encoder Encoder Encoder Extraction ร ๐ 3. Emotional Seq2Seq 1. Rule-Based 2. Multi-Seq2Seq with Fine Tune Post & Emotion 2019/6/12 10
Seq2Seq with Attention + Attention ๐ 3 ็็กฎ ๐ 3,1 ๐ 3,2 ๐ 3,3 ๐ 3,4 ๆฏ็ ๅฆๆญค totally Yeah true <EOS> โ 1 โ 2 โ 3 โ 4 ๐ก 1 ๐ก 2 ๐ก 3 ๐ก 4 ้ฃ ๅฐๅญ ็ ๆฏ็ ็็กฎ ้ ท <SOS> ๅฆๆญค That guy is really Yeah totally cool true Decoder Alignment Encoder Model Image Reference: Qiu et al., 2017. Alime chat: A sequence to sequence and rerank based chatbot engine. ACL 2017. 2019/6/12 11
Multi-Seq2Seq with Fine Tune ๏ Train Different Seq2Seq Models for Different Emotions All Data: Encoder Attention Decoder Post Response 2019/6/12 12
Multi-Seq2Seq with Fine Tune ๏ Multi-Seq2Seq: One Model for One Emotion Category All Data: Encoder Attention Decoder Post Response Response Like Data: Encoder Attention Decoder Post (Like) Response Happy Data: Encoder Attention Decoder Post (Happy) Response Anger Data: Decoder Post Encoder Attention (Anger) Response Disgust Data: Encoder Attention Decoder Post (Disgust) Response Sad Data: Decoder Post Encoder Attention (Sad) 2019/6/12 13
Emotional Seq2Seq Emotional Response Generate and Select Reranker 4. Reranker Rule-Based Decoder Decoder Decoder Attention Attention Attention Copy Emotion Mechanism Mechanism Factor Mechanism Mechanism Keywords Encoder Encoder Encoder Extraction ร ๐ 3. Emotional Seq2Seq 1. Rule-Based 2. Multi-Seq2Seq with Fine Tune Post & Emotion 2019/6/12 14
Emotional Seq2Seq ๏ Idea: Increase the Probability of Emotional Words ๏ Emotional Seq2Seq: One Model for Many Emotion Categories Attention Mechanism Encoder Post Copy-Net Decoder Response Mechanism Emotion Emotion Category Factor ๐ Reference: Zhou et al., 2018. Emotional chatting machine: Emotional conversation generation with internal and external memory. AAAI 2018. 2019/6/12 15
Emotional Seq2Seq ๏ Implicit Method: Emotion Factor by Emotion Embedding ( ๐ ๐ ) ๐ก ๐ข = GRU decoder ๐ก ๐ขโ1 ; [๐ง ๐ขโ1 , ๐ ๐ข , ๐ ๐ ] Attention Mechanism Encoder Post Copy-Net Decoder Response Mechanism Emotion Emotion Category Factor ๐ ๐ ๐ Reference: Zhou et al., 2018. Emotional chatting machine: Emotional conversation generation with internal and external memory. AAAI 2018. 2019/6/12 16
Emotional Seq2Seq ๏ Explicit Method: Adding Copy Probability of Emotional Word in Emotional Dictionary ( E ) Built by Clustering ๐ ๐ง ๐ข |๐ก ๐ข = ๐ ๐๐ ๐ ๐ง ๐ข |๐ก ๐ข + ๐ ๐๐๐ ๐ง ๐ข |๐ก ๐ข , ๐น ๐๐๐ โ ๐๐๐๐ข๐๐๐๐๐ ๐ฅ๐๐ ๐ ๐๐๐ ๐ง ๐ข |๐ก ๐ข , ๐น = แ 0, ๐ softmax ๐น๐ ๐ ๐ก ๐ข , ๐๐๐๐ข๐๐๐๐๐ ๐ฅ๐๐ ๐ Attention Mechanism Encoder Post Copy-Net Decoder Response Mechanism Reference: Zhou et al., 2018. Emotional chatting machine: Emotional conversation generation with internal and external memory. AAAI 2018. 2019/6/12 17
Re-Ranker Emotional Response Generate and Select Reranker 4. Reranker Rule-Based Decoder Decoder Decoder Attention Attention Attention Copy Emotion Mechanism Mechanism Mechanism Mechanism Factor Keywords Encoder Encoder Encoder Extraction ร ๐ 3. Emotional Seq2Seq 1. Rule-Based 2. Multi-Seq2Seq with Fine Tune Post & Emotion 2019/6/12 18
Re-Ranker ๏ Given the Response Set: How to select the Best Response? Rule-Base Method Generated Response 1 Multi-Seq2Seq Generated Responses Beam Width Emotional Seq2Seq Generated Responses Beam Width 2019/6/12 19
Re-Ranker ๏ Given the Response Set: How to select the Best Response? ๏ Metrics: Emotional Consistency & Coherence & Fluency ๏ Rank by Metrics: Emotion Score + Coherence Score Rule-Base Method Generated Response 1 Multi-Seq2Seq Generated Responses Beam Width Ranked by Generated Probability Emotional Seq2Seq Generated Responses Beam Width 2019/6/12 20
Re-Ranker ๏ Emotion Score based on Emotional Dictionary ๏ Explicit Emotional Word: High Score ๏ Implicit Emotional Word: Low Score ๏ Degree Word (e.g., very, a little, not) : ๏ Strengthen or Weaken or Reverse Emotion Score ไฝ ็ไธๅปไธๅคชๅฅฝใ Post You don't look very good. ๆฒไผค ๆๆจๆๅคฑ็ ไบใ ๏ Sadness I lost sleep last night. ๆฒไผค ๆจๆๅคฑ็ ไบ๏ผๆๅฅฝ้พ่ฟใ ๏ Sadness I was so sad about insomnia last night. Dictionary Reference: ๅพ็ณๅฎ , ๆ้ธฟ้ฃ , ๆฝๅฎ , ไปปๆ , ้ๅปบ็พ : ๆ ๆ่ฏๆฑๆฌไฝ็ๆ้ . ๆ ๆฅๅญฆๆฅ 27(2), 180 โ 185 (2008). 2019/6/12 21
Re-Ranker ๏ Coherence Score ๏ The Term Similarity between Response and Post ๏ Count the Number of Same Term (to be improved) ๆ่ทๅฅไบใ Post I won the prize. ้ซๅ ด ๆไธบไฝ ๆๅฐๅพๅผๅฟใ ๏ Happiness I am so happy for you. ้ซๅ ด ๆไธบไฝ ่ทๅฅ่ๆๅฐๅผๅฟใ ๏ Happiness I am very happy that you won the prize. 2019/6/12 22
Recommend
More recommend