journal article·2023-04-17Open access

Exploring Bi-Directional Context for Improved Chatbot Response Generation Using Deep Reinforcement Learning

Quoc-Dai Luong Tran, Anh-Cuong Le

Applied Sciences· Volume 13· Issue 8

Abstract

The development of conversational agents that can generate relevant and meaningful replies is a challenging task in the field of natural language processing. Context and predictive capabilities are crucial factors that humans rely on for effective communication. Prior studies have had a significant limitation in that they do not adequately consider the relationship between utterances in conversations when generating responses. This study aims to address this limitation by proposing a novel method that comprehensively models the contextual information of the current utterance for response generation. A commonly used approach is to rely on the information of the current utterance to generate the corresponding response, and as such it does not take advantage of the context of a multi-turn conversation. In our proposal, different from other studies, we will use a bi-directional context in which the historical direction helps the model remember information from the past in the conversation, while the future direction enables the model to anticipate its impact afterward. We combine a Transformer-based sequence-to-sequence model and the reinforcement learning algorithm to achieve our goal. Experimental results demonstrate the effectiveness of the proposed model through qualitative evaluation of some generated samples, in which the proposed model increases 24% average BLEU score and 29% average ROUGE score compared to the baseline model. This result also shows that our proposed model improves from 5% to 151% for the average BLEU score compared with previous related studies.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Topic Modeling · AI in Service Interactions · Speech and dialogue systems

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Natural Language Processing and Knowledge Discovery Laboratory, Faculty of Information Technology, Ton Duc Thang University, Ho Chi Minh City 700000, Vietnam

References (58)

Show source-provided references
1. Wallace, R. (2009). Parsing the Turing Test, Springer.
2. Filter, Rank, and Transfer the Knowledge: Learning to Chat
3. Yan, Z., Duan, N., Bao, J., Chen, P., Zhou, M., Li, Z., and Zhou, J. (2016, January 7–12). DocChat: An Information Retrieval Approach for Chatbot Engines Using Unstructured Documents. Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Berlin, Germany.10.18653/v1/P16-1049 ↗
4. Zhong, H., Dou, Z., Zhu, Y., Qian, H., and Wen, J.R. (2022, January 10–15). Less is More: Learning to Refine Dialogue History for Personalized Dialogue Generation. Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Seattle, WA, USA.10.18653/v1/2022.naacl-main.426 ↗
5. Serban, I.V., Sordoni, A., Bengio, Y., Courville, A., and Pineau, J. (2016, January 12–17). Building End-to-End Dialogue Systems Using Generative Hierarchical Neural Network Models. Proceedings of the Thirtieth AAAI Conference on Artificial Intelligence, Phoenix, AZ, USA.10.1609/aaai.v30i1.9883 ↗
6. Mou, L., Song, Y., Yan, R., Li, G., Zhang, L., and Jin, Z. (2016, January 11–16). Sequence to Backward and Forward Sequences: A Content-Introducing Approach to Generative Short-Text Conversation. Proceedings of the COLING 2016, the 26th International Conference on Computational Linguistics: Technical Papers, Osaka, Japan.
7. Sequence to Sequence Learning with Neural Networks
8. Sordoni, A., Galley, M., Auli, M., Brockett, C., Ji, Y., Mitchell, M., Nie, J.Y., Gao, J., and Dolan, B. (June, January 31). A Neural Network Approach to Context-Sensitive Generation of Conversational Responses. Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Denver, CO, USA.10.3115/v1/N15-1020 ↗
9. Xu, H.D., Mao, X.L., Chi, Z., Sun, F., Zhu, J., and Huang, H. (2021, January 13–17). Generating Informative Dialogue Responses with Keywords-Guided Networks. Proceedings of the Natural Language Processing and Chinese Computing: 10th CCF International Conference, NLPCC 2021, Qingdao, China. Proceedings, Part II.10.1007/978-3-030-88483-3_14 ↗
10. Ismail, J., Ahmed, A., and Ouaazizi Aziza, E. (2022, January 29–30). Improving a Sequence-to-sequence NLP Model using a Reinforcement Learning Policy Algorithm. Proceedings of the Artificial Intelligence, Soft Computing and Applications. Academy and Industry Research Collaboration Center (AIRCC), Copenhagen, Denmark.10.5121/csit.2022.122317 ↗
11. Csaky, R. (2019). Deep Learning Based Chatbot Models. arXiv.
12. Cai, P., Wan, H., Liu, F., Yu, M., Yu, H., and Joshi, S. (2022, January 10–15). Learning as Conversation: Dialogue Systems Reinforced for Information Acquisition. Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Seattle, WA, USA.10.18653/v1/2022.naacl-main.352 ↗
13. A stochastic model of human-machine interaction for learning dialog strategies10.1109/89.817450 ↗
14. Pieraccini, R., Suendermann, D., Dayanidhi, K., and Liscombe, J. (2009). Text, Speech and Dialogue, Springer.
15. Multitask Learning and Reinforcement Learning for Personalized Dialog Generation: An Empirical Study10.1109/TNNLS.2020.2975035 ↗
16. ELIZA—A Computer Program for the Study of Natural Language Communication between Man and Machine10.1145/365153.365168 ↗
17. Parkison, R.C., Colby, K.M., and Faught, W.S. (1986). Readings in Natural Language Processing, Morgan Kaufmann Publishers Inc.
18. Ritter, A., Cherry, C., and Dolan, W.B. (2011, January 27–31). Data-Driven Response Generation in Social Media. Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, Edinburgh, UK.
19. Wu, Y., Schuster, M., Chen, Z., Le, Q.V., Norouzi, M., Macherey, W., Krikun, M., Cao, Y., Gao, Q., and Macherey, K. (2016). Google’s Neural Machine Translation System: Bridging the Gap between Human and Machine Translation. arXiv.
20. Shen, S., Cheng, Y., He, Z., He, W., Wu, H., Sun, M., and Liu, Y. (2015). Minimum Risk Training for Neural Machine Translation. arXiv.10.18653/v1/P16-1159 ↗
21. Vaswani, A., Bengio, S., Brevdo, E., Chollet, F., Gomez, A.N., Gouws, S., Jones, L., Kaiser, L., Kalchbrenner, N., and Parmar, N. (2018). Tensor2Tensor for Neural Machine Translation. arXiv.
22. Nallapati, R., Xiang, B., and Zhou, B. (2016). Sequence-to-Sequence RNNs for Text Summarization. arXiv.
23. Nallapati, R., Zhai, F., and Zhou, B. (2016). SummaRuNNer: A Recurrent Neural Network based Sequence Model for Extractive Summarization of Documents. arXiv.10.1609/aaai.v31i1.10958 ↗
24. Paulus, R., Xiong, C., and Socher, R. (2017). A Deep Reinforced Model for Abstractive Summarization. arXiv.
25. Pamungkas, E.W. (2019). Emotionally-Aware Chatbots: A Survey. arXiv.
26. Li, J., Monroe, W., Ritter, A., Jurafsky, D., Galley, M., and Gao, J. (2016, January 1–5). Deep Reinforcement Learning for Dialogue Generation. Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, Austin, TX, USA.10.18653/v1/D16-1127 ↗
27. Li, J., Galley, M., Brockett, C., Gao, J., and Dolan, B. (2016, January 12–17). A Diversity-Promoting Objective Function for Neural Conversation Models. Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, San Diego, CA, USA.10.18653/v1/N16-1014 ↗
28. Survey on reinforcement learning for language processing10.1007/s10462-022-10205-5 ↗
29. Gašić, M., Breslin, C., Henderson, M., Kim, D., Szummer, M., Thomson, B., Tsiakoulis, P., and Young, S. (2013, January 22–24). POMDP-based dialogue manager adaptation to extended domains. Proceedings of the SIGDIAL 2013 Conference, Metz, France.
30. POMDP-Based Statistical Spoken Dialog Systems: A Review10.1109/JPROC.2012.2225812 ↗
31. Recent Advances in Deep Reinforcement Learning Applications for Solving Partially Observable Markov Decision Processes (POMDP) Problems: Part 1—Fundamentals and Applications in Games, Robotics and Natural Language Processing10.3390/make3030029 ↗
32. A Task-Oriented Chatbot Based on LSTM and Reinforcement Learning10.1145/3529649 ↗
33. Distributed Structured Actor-Critic Reinforcement Learning for Universal Dialogue Management10.1109/TASLP.2020.3013392 ↗
34. Ultes, S., Rojas-Barahona, L.M., Su, P.H., Vandyke, D., Kim, D., Casanueva, I., Budzianowski, P., Mrkšić, N., Wen, T.H., and Gašić, M. (August, January 30). PyDial: A Multi-domain Statistical Dialogue System Toolkit. Proceedings of the ACL 2017, System Demonstrations, Vancouver, BC, Canada.10.18653/v1/P17-4013 ↗
35. Verma, S., Fu, J., Yang, S., and Levine, S. (2022, January 10–15). CHAI: A CHatbot AI for Task-Oriented Dialogue with Offline Reinforcement Learning. Proceedings of the 2022 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Seattle, WA, USA.10.18653/v1/2022.naacl-main.332 ↗
36. Devlin, J., Chang, M., Lee, K., and Toutanova, K. (2018). BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. arXiv.
37. De Coster, M., and Dambre, J. (2022). Leveraging Frozen Pretrained Written Language Models for Neural Sign Language Translation. Information, 13.10.3390/info13050220 ↗
38. Yan, R., Li, J., Su, X., Wang, X., and Gao, G. (2022). Boosting the Transformer with the BERT Supervision in Low-Resource Machine Translation. Appl. Sci., 12.10.3390/app12147195 ↗
39. Kurtic, E., Campos, D., Nguyen, T., Frantar, E., Kurtz, M., Fineran, B., Goin, M., and Alistarh, D. (2022, January 7–11). The Optimal BERT Surgeon: Scalable and Accurate Second-Order Pruning for Large Language Models. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, Abu Dhabi, United Arab Emirates.10.18653/v1/2022.emnlp-main.279 ↗
40. Towards understanding and mitigating unintended biases in language model-driven conversational recommendation10.1016/j.ipm.2022.103139 ↗
41. Lewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., and Zettlemoyer, L. (2020, January 5–10). BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Association for Computational Linguistics, Online.10.18653/v1/2020.acl-main.703 ↗
42. Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer
43. Leveraging Pre-trained Checkpoints for Sequence Generation Tasks10.1162/tacl_a_00313 ↗
44. Chen, C., Yin, Y., Shang, L., Jiang, X., Qin, Y., Wang, F., Wang, Z., Chen, X., Liu, Z., and Liu, Q. (2022, January 22–27). bert2BERT: Towards Reusable Pretrained Language Models. Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Dublin, Ireland.10.18653/v1/2022.acl-long.151 ↗
45. Open-Domain Response Generation in Low-Resource Settings Using Self-Supervised Pre-Training of Warm-Started Transformers10.1145/3579164 ↗
46. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
47. Sutton, R.S., and Barto, A.G. (2018). Reinforcement Learning: An Introduction, A Bradford Book.
48. Simple Statistical Gradient-Following Algorithms for Connectionist Reinforcement Learning10.1007/BF00992696 ↗
49. Zaremba, W., and Sutskever, I. (2015). Reinforcement Learning Neural Turing Machines. arXiv.
50. DailyDialog: A Manually Labelled Multi-turn Dialogue Dataset
51. Wang, H., Lu, Z., Li, H., and Chen, E. (2013, January 18–21). A Dataset for Research on Short-Text Conversations. Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, Seattle, WA, USA.
52. Papineni, K., Roukos, S., Ward, T., and Zhu, W.J. (2002, January 7–12). BLEU: A Method for Automatic Evaluation of Machine Translation. Proceedings of the 40th Annual Meeting on Association for Computational Linguistics, Philadelphia, PA, USA. ACL’02.10.3115/1073083.1073135 ↗
53. Vinyals, O., and Le, Q.V. (2015, January 6–11). A Neural Conversational Model. Proceedings of the ICML, Lille, France.
54. Kapočiūtė-Dzikienė, J. (2020). A Domain-Specific Generative Chatbot Trained from Little Data. Appl. Sci., 10.10.3390/app10072221 ↗
55. Sordoni, A., Bengio, Y., Vahabi, H., Lioma, C., Grue Simonsen, J., and Nie, J.Y. (2015, January 18–23). A Hierarchical Recurrent Encoder-Decoder for Generative Context-Aware Query Suggestion. Proceedings of the 24th ACM International on Conference on Information and Knowledge Management, New York, NY, USA. CIKM ’15.10.1145/2806416.2806493 ↗
56. Zhou, H., Huang, M., Zhang, T., Zhu, X., and Liu, B. (2018, January 2–7). Emotional Chatting Machine: Emotional Conversation Generation with Internal and External Memory. Proceedings of the Thirty-Second AAAI Conference on Artificial Intelligence and Thirtieth Innovative Applications of Artificial Intelligence Conference and Eighth AAAI Symposium on Educational Advances in Artificial Intelligence, Orleans, LA, USA.10.1609/aaai.v32i1.11325 ↗
57. Bao, S., He, H., Wang, F., Wu, H., and Wang, H. (2020, January 5–10). PLATO: Pre-trained Dialogue Generation Model with Discrete Latent Variable. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, Association for Computational Linguistics, Online.10.18653/v1/2020.acl-main.9 ↗
58. Fan, J., Yuan, L., Song, H., Tang, H., and Yang, R. (2020). NLP Final Project: A Dialogue System, Hong Kong University of Science and Technology (HKUST).