A Personalized Multi-Turn Generation-Based Chatbot with Various-Persona-Distribution Data
<p>The examples of persona, stylistic, and contextual consistency. In example (<b>a</b>), the response contains information that is consistent with persona. For example (<b>b</b>), the response presents a gentlemanly style. The purpose of example (<b>c</b>) is to determine the consistency between premises and hypotheses.</p> "> Figure 2
<p>Examples of conversation using different persona. (<b>a</b>) Humans usually do not show private information in the beginning. (<b>b</b>) To show persona, agent selects the persona “I like skiing”, although it would be better not to select the other given persona.</p> "> Figure 3
<p>The architecture of the proposed persona-adapted and -consistent dialogue model.</p> "> Figure 4
<p>The traning and prediction processes of classifier <math display="inline"><semantics> <msub> <mi>C</mi> <mrow> <mi>p</mi> <mi>s</mi> </mrow> </msub> </semantics></math>. The prediction process is applied twice, firstly to construct the expanded dataset, where the response replaces the context. The second is to give the adapted persona when training our model. The training process uses the expanded dataset to fine-tune the classifier and improve the accuracy of the persona dataset.</p> ">
Abstract
:1. Introduction
- We propose a BERT-based generation framework, which considers the distribution of persona in the dataset to generate persona-consistent responses.
- We designed a persona selection mechanism that explicitly selects a persona using an NLI model and implicitly fuses it into the responses. This allows the agent to exhibit different user speaking styles.
- We use the NLI model to annotate the persona of the responses, solving the problem of existing datasets without persona labels. PersonaChat dataset and PersonalDialog dataset are extended and manually evaluated with 88.5% accuracy.
2. Related Work
2.1. Persona-Based Models
2.2. Natural Language Inference
3. Model
3.1. Task Definition
3.2. Overview
3.3. Encoder E
3.4. Persona-Select Classifier
3.5. Decoder
3.6. Decoder
3.7. Training
3.7.1. Response Generation Task
3.7.2. Auxiliary Tasks
3.7.3. Classifier Task
4. Experiments
4.1. Datasets
4.2. Baselines
4.2.1. Universal Language Model
4.2.2. Persona-Based Model
4.3. Experimental Settings
4.4. Evaluation Metrics
4.4.1. Automatic Evaluation
4.4.2. Human Evaluation
5. Result
5.1. Model Performance
5.2. Further Analysis
5.2.1. Ablation Study
5.2.2. Study of Persona Distribution
5.2.3. Case Study
6. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Shum, H.Y.; He, X.d.; Li, D. From Eliza to XiaoIce: Challenges and opportunities with social chatbots. Front. Inf. Technol. Electron. Eng. 2018, 19, 10–26. [Google Scholar] [CrossRef] [Green Version]
- Li, F.L.; Qiu, M.; Chen, H.; Wang, X.; Gao, X.; Huang, J.; Ren, J.; Zhao, Z.; Zhao, W.; Wang, L.; et al. AliMe Assist: An Intelligent Assistant for Creating an Innovative E-Commerce Experience. In Proceedings of the 2017 ACM on Conference on Information and Knowledge Management, (CIKM ’17), Singapore, 6–10 November 2017; Association for Computing Machinery: New York, NY, USA, 2017; pp. 2495–2498. [Google Scholar] [CrossRef]
- Huang, M.; Zhu, X.; Gao, J. Challenges in Building Intelligent Open-Domain Dialog Systems. ACM Trans. Inf. Syst. 2020, 38, 1–32. [Google Scholar] [CrossRef] [Green Version]
- Song, H.; Zhang, W.N.; Cui, Y.; Wang, D.; Liu, T. Exploiting Persona Information for Diverse Generation of Conversational Responses. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, Macao, China, 10–16 August 2019; pp. 5190–5196. [Google Scholar] [CrossRef] [Green Version]
- Ma, Z.; Dou, Z.; Zhu, Y.; Zhong, H.; Wen, J.R. One Chatbot Per Person: Creating Personalized Chatbots Based on Implicit User Profiles. In Proceedings of the 44th International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’21, Virtual Event, 11–15 July 2021; Association for Computing Machinery: New York, NY, USA, 2021; pp. 555–564. [Google Scholar] [CrossRef]
- Liu, Y.; Wei, W.; Liu, J.; Mao, X.; Fang, R.; Chen, D. Improving Personality Consistency in Conversation by Persona Extending. In Proceedings of the 31st ACM International Conference on Information & Knowledge Management, CIKM ’22, Atlanta, GA, USA, 17–21 October 2022; Association for Computing Machinery: New York, NY, USA, 2022; pp. 1350–1359. [Google Scholar] [CrossRef]
- Tsay-Vogel, M.; Shanahan, J.; Signorielli, N. Social media cultivating perceptions of privacy: A 5-year analysis of privacy attitudes and self-disclosure behaviors among Facebook users. New Media Soc. 2018, 20, 141–161. [Google Scholar] [CrossRef]
- Humphreys, L.; Gill, P.; Krishnamurthy, B. Twitter: A content analysis of personal information. Inf. Commun. Soc. 2014, 17, 843–857. [Google Scholar] [CrossRef]
- Song, H.; Zhang, W.N.; Zhang, K.; Liu, T. A Stack-Propagation Framework for Low-Resource Personalized Dialogue Generation. ACM Trans. Inf. Syst. 2022. accepted. [Google Scholar] [CrossRef]
- Zhang, S.; Dinan, E.; Urbanek, J.; Szlam, A.; Kiela, D.; Weston, J. Personalizing Dialogue Agents: I have a dog, do you have pets too? In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics, Melbourne, Australia, 15–20 July 2018; Volume 1: Long Papers, pp. 2204–2213. [Google Scholar] [CrossRef] [Green Version]
- Zheng, Y.; Chen, G.; Huang, M.; Liu, S.; Zhu, X. Personalized Dialogue Generation with Diversified Traits. arXiv 2019, arXiv:1901.09672. [Google Scholar]
- Li, J.; Galley, M.; Brockett, C.; Spithourakis, G.; Gao, J.; Dolan, B. A Persona-Based Neural Conversation Model. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics, Berlin, Germany, 7–12 August 2016; Volume 1: Long Papers, pp. 994–1003. [Google Scholar] [CrossRef] [Green Version]
- Qian, Q.; Huang, M.; Zhao, H.; Xu, J.; Zhu, X. Assigning Personality/Profile to a Chatting Machine for Coherent Conversation Generation. In Proceedings of the Twenty-Seventh International Joint Conference on Artificial Intelligence, IJCAI-18, Stockholm, Sweden, 13–19 July 2018; pp. 4279–4285. [Google Scholar] [CrossRef] [Green Version]
- Zhang, W.N.; Zhu, Q.; Wang, Y.; Zhao, Y.; Liu, T. Neural personalized response generation as domain adaptation. World Wide Web 2019, 22, 1427–1446. [Google Scholar]
- Mazaré, P.E.; Humeau, S.; Raison, M.; Bordes, A. Training Millions of Personalized Dialogue Agents. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, Brussels, Belgium, 31 October–4 November 2018; Association for Computational Linguistics: Brussels, Belgium, 2018; pp. 2775–2779. [Google Scholar] [CrossRef]
- Raffel, C.; Shazeer, N.; Roberts, A.; Lee, K.; Narang, S.; Matena, M.; Zhou, Y.; Li, W.; Liu, P.J. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer. J. Mach. Learn. Res. 2022, 21, 5485–5551. [Google Scholar]
- Lewis, M.; Liu, Y.; Goyal, N.; Ghazvininejad, M.; Mohamed, A.; Levy, O.; Stoyanov, V.; Zettlemoyer, L. BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 7871–7880. [Google Scholar] [CrossRef]
- Zheng, Y.; Zhang, R.; Huang, M.; Mao, X. A Pre-Training Based Personalized Dialogue Generation Model with Persona-Sparse Data. Proc. AAAI Conf. Artif. Intell. 2020, 34, 9693–9700. [Google Scholar] [CrossRef]
- Song, H.; Wang, Y.; Zhang, K.; Zhang, W.N.; Liu, T. BoB: BERT Over BERT for Training Persona-based Dialogue Models from Limited Personalized Data. In Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing, Virtual Conference, 1–6 August 2021; Volume 1: Long Papers, pp. 167–177. [Google Scholar] [CrossRef]
- Song, H.; Wang, Y.; Zhang, W.N.; Liu, X.; Liu, T. Generate, Delete and Rewrite: A Three-Stage Framework for Improving Persona Consistency of Dialogue Generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 5821–5831. [Google Scholar] [CrossRef]
- Li, J.; Liu, C.; Tao, C.; Chan, Z.; Zhao, D.; Zhang, M.; Yan, R. Dialogue History Matters! Personalized Response Selection in Multi-Turn Retrieval-Based Chatbots. ACM Trans. Inf. Syst. 2021, 39, 1–25. [Google Scholar] [CrossRef]
- Mesgar, M.; Simpson, E.; Gurevych, I. Improving Factual Consistency Between a Response and Persona Facts. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, Online, 19–23 April 2021; pp. 549–562. [Google Scholar] [CrossRef]
- Cao, Y.; Bi, W.; Fang, M.; Shi, S.; Tao, D. A Model-agnostic Data Manipulation Method for Persona-based Dialogue Generation. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, Dublin, Ireland, 22–27 May 2022; Volume 1: Long Papers, pp. 7984–8002. [Google Scholar] [CrossRef]
- Fu, T.; Zhao, X.; Tao, C.; Wen, J.R.; Yan, R. There Are a Thousand Hamlets in a Thousand People’s Eyes: Enhancing Knowledge-grounded Dialogue with Personal Memory. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics, Dublin, Ireland, 22–27 May 2022; Volume 1: Long Papers, pp. 3901–3913. [Google Scholar] [CrossRef]
- Bowman, S.R.; Angeli, G.; Potts, C.; Manning, C.D. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, Lisbon, Portugal, 17–21 September 2015; pp. 632–642. [Google Scholar] [CrossRef]
- Welleck, S.; Weston, J.; Szlam, A.; Cho, K. Dialogue Natural Language Inference. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 28 July–2 August 2019; pp. 3731–3741. [Google Scholar] [CrossRef] [Green Version]
- Chen, R.; Wang, J.; Yu, L.C.; Zhang, X. Learning to Memorize Entailment and Discourse Relations for Persona-Consistent Dialogues. arXiv 2023, arXiv:2301.04871. [Google Scholar]
- Vaswani, A.; Shazeer, N.; Parmar, N.; Uszkoreit, J.; Jones, L.; Gomez, A.N.; Kaiser, L.U.; Polosukhin, I. Attention is All you Need. In Advances in Neural Information Processing Systems; Guyon, I., Luxburg, U.V., Bengio, S., Wallach, H., Fergus, R., Vishwanathan, S., Garnett, R., Eds.; Curran Associates, Inc.: Red Hook, NY, USA, 2017; Volume 30. [Google Scholar]
- Dinan, E.; Logacheva, V.; Malykh, V.; Miller, A.; Shuster, K.; Urbanek, J.; Kiela, D.; Szlam, A.; Serban, I.; Lowe, R.; et al. The Second Conversational Intelligence Challenge (ConvAI2). In The NeurIPS ’18 Competition; Escalera, S., Herbrich, R., Eds.; Springer International Publishing: Cham, Switzerland, 2020; pp. 187–208. [Google Scholar]
- Williams, A.; Nangia, N.; Bowman, S. A Broad-Coverage Challenge Corpus for Sentence Understanding through Inference. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, New Orleans, LA, USA, 1–6 June 2018; Volume 1: Long Papers, pp. 1112–1122. [Google Scholar] [CrossRef] [Green Version]
- Xu, L.; Hu, H.; Zhang, X.; Li, L.; Cao, C.; Li, Y.; Xu, Y.; Sun, K.; Yu, D.; Yu, C.; et al. CLUE: A Chinese Language Understanding Evaluation Benchmark. In Proceedings of the 28th International Conference on Computational Linguistics, Barcelona, Spain (Online), 8–13 December 2020; pp. 4762–4772. [Google Scholar] [CrossRef]
- Gu, X.; Cho, K.; Ha, J.W.; Kim, S. DialogWAE: Multimodal Response Generation with Conditional Wasserstein Auto-Encoder. In Proceedings of the International Conference on Learning Representations, New Orleans, LA, USA, 6–9 May 2019. [Google Scholar]
- Radford, A.; Wu, J.; Child, R.; Luan, D.; Amodei, D.; Sutskever, I. Language models are unsupervised multitask learners. OpenAI Blog 2019, 1, 9. [Google Scholar]
- Zhang, S.; Roller, S.; Goyal, N.; Artetxe, M.; Chen, M.; Chen, S.; Dewan, C.; Diab, M.; Li, X.; Lin, X.V.; et al. OPT: Open Pre-trained Transformer Language Models. arXiv 2022, arXiv:2205.01068. [Google Scholar]
- Li, J.; Galley, M.; Brockett, C.; Gao, J.; Dolan, B. A Diversity-Promoting Objective Function for Neural Conversation Models. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego, CA, USA, 12–17 June 2016; pp. 110–119. [Google Scholar] [CrossRef] [Green Version]
- Li, M.; Roller, S.; Kulikov, I.; Welleck, S.; Boureau, Y.L.; Cho, K.; Weston, J. Don’t Say That! Making Inconsistent Dialogue Unlikely with Unlikelihood Training. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Online, 5–10 July 2020; pp. 4715–4728. [Google Scholar] [CrossRef]
- Madotto, A.; Lin, Z.; Wu, C.S.; Fung, P. Personalizing Dialogue Agents via Meta-Learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, 28 July–2 August 2019; pp. 5454–5459. [Google Scholar] [CrossRef] [Green Version]
- Liu, Y.; Ott, M.; Goyal, N.; Du, J.; Joshi, M.; Chen, D.; Levy, O.; Lewis, M.; Zettlemoyer, L.; Stoyanov, V. Roberta: A robustly optimized bert pretraining approach. arXiv 2019, arXiv:1907.11692. [Google Scholar]
PersonaChat | |
---|---|
Context | A: hi, how are you doing today? |
B: i am spending time with my 4 sisters. what are you up to. | |
A: wow, four sisters. just watching game of thrones. | |
Persona | my mom is my best friend. |
i love iced tea. | |
i have four sisters. | |
Response | that is a good show. i watch that while drinking iced tea |
PersonalDialog | |
Context | A: You’re going to the gym? |
B: I exercise for half an hour every day. | |
A: I run over 200 km a month. | |
Profile | interset tags: iPhone;Apple. |
location: Singapore | |
gender: male | |
Response | Then I’m no match for you |
Dataset | Statistics | Train | Valid | Test | Total |
---|---|---|---|---|---|
PersonaChat | Dialogues | 16,090 | 1788 | 1000 | 18,878 |
Avg utterances 1 | 14.7 | 14.7 | 15.6 | 14.8 | |
Avg personas 2 | 4.5 | 4.5 | 4.5 | 4.5 | |
PersonalDialog | Dialogues | 5,438,165 | 10,000 | 10,000 | 5,458,165 |
Avg utterances | 2.6 | 6.0 | 6.0 | 2.7 | |
Avg personas | 2.0 | 2.0 | 2.0 | 2.0 |
Model | ppl. | Dist.1 | Dist.2 | p.Ent | p.Ctd | P | C.Score | Per.Acc | Fluency | Diversity | Consistency |
---|---|---|---|---|---|---|---|---|---|---|---|
DialogWAE [32] | 37.4 | 3.24 | 14.96 | 35.8 | 41.7 | 5.9 | 1.74 | 2.21 | 3.12 | 3.03 | 3.07 |
GPT2 [33] | 12.7 | 7.68 | 28.42 | 11.3 | 20.6 | 9.3 | 14.73 | 8.76 | 3.93 | 3.47 | 3.34 |
OPT [34] | 6.6 | 8.95 | 31.83 | 6.4 | 48.5 | 42.1 | 16.47 | 9.24 | 4.16 | 3.63 | 3.78 |
PerCVAE [4] | 41.5 | 2.76 | 12.59 | 38.5 | 45.7 | 7.2 | 7.92 | 6.94 | 2.91 | 2.85 | 3.26 |
Transformer [29] | 25.3 | 4.39 | 19.87 | 22.6 | 35.8 | 13.2 | 2.83 | 3.02 | 3.36 | 3.14 | 2.69 |
AR [18] | - | - | - | - | - | - | - | - | - | - | - |
BoB [9] | 7.0 | 8.60 | 27.94 | 6.7 | 79.3 | 72.6 | 18.64 | 9.73 | 3.87 | 3.61 | 3.81 |
Ours | 4.3 | 9.31 | 33.18 | 4.1 | 92.5 | 88.4 | 18.91 | 14.57 | 4.24 | 3.72 | 4.17 |
Model | ppl. | Dist.1 | Dist.2 | p.Ent | p.Ctd | P | C.Score | Per.Acc | Fluency | Diversity | Consistency |
---|---|---|---|---|---|---|---|---|---|---|---|
DialogWAE [32] | 52.4 | 2.52 | 8.92 | 50.2 | 54.9 | 4.7 | -1.95 | 0.16 | 2.57 | 2.26 | 2.07 |
GPT2 [33] | 24.0 | 4.67 | 16.59 | 23.5 | 49.8 | 26.3 | 2.47 | 1.67 | 2.98 | 2.75 | 3.04 |
OPT [34] | 16.8 | 5.82 | 18.52 | 15.4 | 67.3 | 52.3 | 3.83 | 1.93 | 3.44 | 2.93 | 3.42 |
PerCVAE [4] | 58.5 | 2.38 | 7.53 | 52.3 | 65.2 | 12.9 | 0.81 | 0.35 | 2.21 | 2.07 | 2.35 |
Transformer [29] | 39.1 | 2.82 | 11.58 | 38.4 | 44.1 | 5.7 | 0.54 | 0.28 | 2.63 | 2.36 | 2.39 |
AR [18] | 32.6 | 4.45 | 15.96 | 27.7 | 56.2 | 28.5 | 1.32 | 0.91 | 2.65 | 2.58 | 2.78 |
BoB [9] | 17.4 | 5.62 | 18.31 | 15.2 | 72.5 | 57.3 | 3.51 | 1.27 | 3.04 | 2.85 | 3.34 |
Ours | 12.9 | 6.17 | 23.70 | 10.8 | 93.6 | 82.8 | 4.19 | 2.84 | 3.59 | 3.21 | 3.62 |
Model | ppl. | Dist.1 | Dist.2 | p.Ent | p.Ctd | P | C.Score | Per.Acc | Fluency | Diversity | Consistency |
---|---|---|---|---|---|---|---|---|---|---|---|
Ours | 4.3 | 9.31 | 33.18 | 4.1 | 92.5 | 88.4 | 18.91 | 14.57 | 4.24 | 3.72 | 4.17 |
w/o | 5.6 | 8.95 | 32.62 | 4.9 | 78.2 | 73.3 | 16.75 | 8.35 | 4.01 | 3.69 | 4.06 |
w/o | 6.1 | 8.71 | 31.73 | 5.9 | 22.8 | 16.9 | 3.32 | 12.94 | 3.95 | 3.58 | 3.31 |
w/o | 6.9 | 8.69 | 29.97 | 6.8 | 21.1 | 14.3 | 3.38 | 7.92 | 3.76 | 3.39 | 3.24 |
w/o | 20.8 | 3.73 | 17.63 | 19.4 | 21.5 | 2.1 | 2.84 | 10.27 | 3.87 | 3.49 | 3.29 |
E+D1 | 24.2 | 3.52 | 15.88 | 23.3 | 26.1 | 2.8 | 2.79 | 3.72 | 3.44 | 3.25 | 3.17 |
Model | ppl. | Dist.1 | Dist.2 | p.Ent | p.Ctd | P | C.Score | Per.Acc | Fluency | Diversity | Consistency |
---|---|---|---|---|---|---|---|---|---|---|---|
Ours | 12.9 | 6.17 | 23.70 | 10.8 | 93.6 | 82.8 | 4.19 | 3.84 | 3.59 | 3.21 | 3.62 |
w/o | 13.8 | 5.75 | 21.41 | 11.3 | 78.6 | 67.3 | 3.93 | 1.73 | 3.38 | 3.19 | 3.26 |
w/o | 14.7 | 5.61 | 20.37 | 12.9 | 26.3 | 13.4 | 2.17 | 3.04 | 3.47 | 3.03 | 3.31 |
w/o | 15.3 | 5.64 | 19.70 | 13.0 | 24.1 | 11.1 | 2.01 | 1.69 | 3.26 | 3.14 | 3.08 |
w/o | 38.9 | 2.03 | 9.74 | 35.8 | 41.7 | 5.9 | 1.48 | 2.95 | 2.84 | 2.93 | 2.53 |
E+D1 | 43.4 | 1.66 | 8.31 | 41.2 | 43.4 | 2.2 | 1.39 | 1.26 | 2.73 | 2.95 | 2.04 |
Persona | i just want to have fun with my friends. |
i’m 19 and i cannot wait to move out 19 my parents home. | |
i do not drink or do drugs or anything. | |
i work took i have a part time job at burger king. | |
Adapted Persona | i just want to have fun with my friends. |
Context | A: hi there ! sitting on the porch with my kitty . |
B: i’m wishing i could go out with my friends but mom and dad won’t let me | |
A: awww ! i’m sorry ! where do you want to go? | |
OPT [34] | It’s not fair that I can’t move out with my friends just because I’m only 20. |
BoB [9] | Hey there! I’m doing okay, just working a part-time job at Burger King right now. |
Our | anywhere with good friends. i want to go to a new place. |
Gold Response | i want to move out so i can have fun with my friends whenever i want. |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Zhu, S.; Ma, T.; Rong, H.; Al-Nabhan, N. A Personalized Multi-Turn Generation-Based Chatbot with Various-Persona-Distribution Data. Appl. Sci. 2023, 13, 3122. https://doi.org/10.3390/app13053122
Zhu S, Ma T, Rong H, Al-Nabhan N. A Personalized Multi-Turn Generation-Based Chatbot with Various-Persona-Distribution Data. Applied Sciences. 2023; 13(5):3122. https://doi.org/10.3390/app13053122
Chicago/Turabian StyleZhu, Shihao, Tinghuai Ma, Huan Rong, and Najla Al-Nabhan. 2023. "A Personalized Multi-Turn Generation-Based Chatbot with Various-Persona-Distribution Data" Applied Sciences 13, no. 5: 3122. https://doi.org/10.3390/app13053122