본 연구에서는 '레플리카'와 같은 텍스트 입력 기반의 부정적 감정 완화가 가능한 국내 인공지능 챗봇인 BERGPT-chatbot을 제안하고자 한다. BERGPT-chatbot은 KR-BERT와 KoGPT2-chatbot을 파이프라인으로 만들어 감정 완화 챗봇을 모델링하였다. KR-BERT를 통해 정제되지 않은 일상 데이터셋에 감정을 부여하고, 추가 데이터셋을 KoGPT2-chatbot을 통해 학습하는 방식이다. BERGPT-chatbot의 개발 배경은 다음과 같다. 현재 전 세계적으로 우울증 환자가 증가하고 있으며, 이는 COVID-19로 인해 장기적 실내 생활이나 대인 관계 제한으로 더욱 심각한 문제로 대두되었다. 그로 인해 부정적 감정 완화나 정신 건강 케어에 목적을 둔 국외의 인공지능 챗봇이 팬데믹 사태로 사용량이 증가하였다. 국내에서도 국외의 챗봇과 비슷한 심리 진단 챗봇이 서비스 되고 있으나, 국내의 챗봇은 텍스트 입력 기반 답변이 아닌 버튼형 답변 중심으로 국외 챗봇과 비교하였을 때 심리 진단 수준에 그쳐 아쉬운 실정이다. 따라서, BERGPT-chatbot을 통해 감정 완화에 도움을 주는 챗봇을 제안하였으며, BERGPT-chatbot과 KoGPT2-chatbot을 언어 모델의 내부 평가 지표인 '퍼플렉서티'를 통해 비교 분석하여 BERGPT-chatbot의 우수함을 보여주고자 한다.
본 연구에서는 '레플리카'와 같은 텍스트 입력 기반의 부정적 감정 완화가 가능한 국내 인공지능 챗봇인 BERGPT-chatbot을 제안하고자 한다. BERGPT-chatbot은 KR-BERT와 KoGPT2-chatbot을 파이프라인으로 만들어 감정 완화 챗봇을 모델링하였다. KR-BERT를 통해 정제되지 않은 일상 데이터셋에 감정을 부여하고, 추가 데이터셋을 KoGPT2-chatbot을 통해 학습하는 방식이다. BERGPT-chatbot의 개발 배경은 다음과 같다. 현재 전 세계적으로 우울증 환자가 증가하고 있으며, 이는 COVID-19로 인해 장기적 실내 생활이나 대인 관계 제한으로 더욱 심각한 문제로 대두되었다. 그로 인해 부정적 감정 완화나 정신 건강 케어에 목적을 둔 국외의 인공지능 챗봇이 팬데믹 사태로 사용량이 증가하였다. 국내에서도 국외의 챗봇과 비슷한 심리 진단 챗봇이 서비스 되고 있으나, 국내의 챗봇은 텍스트 입력 기반 답변이 아닌 버튼형 답변 중심으로 국외 챗봇과 비교하였을 때 심리 진단 수준에 그쳐 아쉬운 실정이다. 따라서, BERGPT-chatbot을 통해 감정 완화에 도움을 주는 챗봇을 제안하였으며, BERGPT-chatbot과 KoGPT2-chatbot을 언어 모델의 내부 평가 지표인 '퍼플렉서티'를 통해 비교 분석하여 BERGPT-chatbot의 우수함을 보여주고자 한다.
In this paper, we propose a BERGPT-chatbot, a domestic AI chatbot that can alleviate negative emotions based on text input such as 'Replika'. We made BERGPT-chatbot into a chatbot capable of mitigating negative emotions by pipelined two models, KR-BERT and KoGPT2-chatbot. We applied a creative metho...
In this paper, we propose a BERGPT-chatbot, a domestic AI chatbot that can alleviate negative emotions based on text input such as 'Replika'. We made BERGPT-chatbot into a chatbot capable of mitigating negative emotions by pipelined two models, KR-BERT and KoGPT2-chatbot. We applied a creative method of giving emotions to unrefined everyday datasets through KR-BERT, and learning additional datasets through KoGPT2-chatbot. The development background of BERGPT-chatbot is as follows. Currently, the number of people with depression is increasing all over the world. This phenomenon is emerging as a more serious problem due to COVID-19, which causes people to increase long-term indoor living or limit interpersonal relationships. Overseas artificial intelligence chatbots aimed at relieving negative emotions or taking care of mental health care, have increased in use due to the pandemic. In Korea, Psychological diagnosis chatbots similar to those of overseas cases are being operated. However, as the domestic chatbot is a system that outputs a button-based answer rather than a text input-based answer, when compared to overseas chatbots, domestic chatbots remain at a low level of diagnosing human psychology. Therefore, we proposed a chatbot that helps mitigating negative emotions through BERGPT-chatbot. Finally, we compared BERGPT-chatbot and KoGPT2-chatbot through 'Perplexity', an internal evaluation metric for evaluating language models, and showed the superity of BERGPT-chatbot.
In this paper, we propose a BERGPT-chatbot, a domestic AI chatbot that can alleviate negative emotions based on text input such as 'Replika'. We made BERGPT-chatbot into a chatbot capable of mitigating negative emotions by pipelined two models, KR-BERT and KoGPT2-chatbot. We applied a creative method of giving emotions to unrefined everyday datasets through KR-BERT, and learning additional datasets through KoGPT2-chatbot. The development background of BERGPT-chatbot is as follows. Currently, the number of people with depression is increasing all over the world. This phenomenon is emerging as a more serious problem due to COVID-19, which causes people to increase long-term indoor living or limit interpersonal relationships. Overseas artificial intelligence chatbots aimed at relieving negative emotions or taking care of mental health care, have increased in use due to the pandemic. In Korea, Psychological diagnosis chatbots similar to those of overseas cases are being operated. However, as the domestic chatbot is a system that outputs a button-based answer rather than a text input-based answer, when compared to overseas chatbots, domestic chatbots remain at a low level of diagnosing human psychology. Therefore, we proposed a chatbot that helps mitigating negative emotions through BERGPT-chatbot. Finally, we compared BERGPT-chatbot and KoGPT2-chatbot through 'Perplexity', an internal evaluation metric for evaluating language models, and showed the superity of BERGPT-chatbot.
BERGPT-chatbot은 KR-BERT와 KoGPT2-chatbot을 하나의 파이프라인으로 만들어 구성하였다. KR-BERT와 KoGPT2-chatbot은 감정이 분류된 데이터를 사용하여 학습되었고, 기존 KoGPT2-chatbot의 경우 한 개의 데이터셋으로 학습되었다.
그리고 선정된 후보 문장을 파인튜닝 (fine-tuning) BERT를 통하여 문장에 대한 긍정과 부정 (Upvote & Downvote) 을 분류한다
본 연구에서는 감정 완화 챗봇인 BERGPT-chatbot을 제안한다. Fig.
본 연구에서는 한국어 감정 정보가 포함된 단발성 대화데이터셋을 통하여 모델을 비교하려고 한다. 한국어 감정 정보가 포함된 단발성 대화 데이터셋은 SNS 글 및 온라인댓글에 대한 문장으로 총 7개의 감정(기쁨, 슬픔, 놀람, 분노, 공포, 혐오, 중립)이 있으며 데이터의 개수는 38, 594개로 구성되어있다.
KR-BERT와 KoGPT2-chatbot은 감정이 분류된 데이터를 사용하여 학습되었고, 기존 KoGPT2-chatbot의 경우 한 개의 데이터셋으로 학습되었다. 이러한 부분은 챗봇에 다양한 응답을 기대하기 어려우므로 추가적으로 공개된 감정 데이터셋을비롯하여 일상 대화 데이터를 사용하여 학습한 KR-BERT 로 감정 분류를 진행하였다. 이후 분류된 일상 대화 데이터를 KoGPT2-chatbot의 추가 학습 데이터로 사용하여 모델을 학습하였다.
대상 데이터
BERGPT-chatbot은 KR-BERT와 KoGPT2-chatbot을 하나의 파이프라인으로 만들어 구성하였다. KR-BERT와 KoGPT2-chatbot은 감정이 분류된 데이터를 사용하여 학습되었고, 기존 KoGPT2-chatbot의 경우 한 개의 데이터셋으로 학습되었다. 이러한 부분은 챗봇에 다양한 응답을 기대하기 어려우므로 추가적으로 공개된 감정 데이터셋을비롯하여 일상 대화 데이터를 사용하여 학습한 KR-BERT 로 감정 분류를 진행하였다.
1은 감정 분석 대화를 위한 데이터셋이다. Naver sentiment movie corpus v1.0은 네이버 영화에서 사용자들의 리뷰를 스크랩하여 데이터를 구성하였다. 데이터는 id는 리뷰 아이디, document는 실제 리뷰, label은 리뷰의 감성 데이터로 구성되어있다.
웰니스 대화 스크립트 데이터셋은 AI Hub에서 제공하며, 사용자와 챗봇의 상담으로 대화가 이루어진 데이터만 사용하였다.
이러한 부분은 챗봇에 다양한 응답을 기대하기 어려우므로 추가적으로 공개된 감정 데이터셋을비롯하여 일상 대화 데이터를 사용하여 학습한 KR-BERT 로 감정 분류를 진행하였다. 이후 분류된 일상 대화 데이터를 KoGPT2-chatbot의 추가 학습 데이터로 사용하여 모델을 학습하였다. 이러한 KR-BERT와 KoGPT2-chatbot의 파이프라인은 더 다양한 데이터셋의사용으로 기존 모델과 비교하였을 때 정확한 응답을 기대해볼 수 있다.
본 연구에서는 한국어 감정 정보가 포함된 단발성 대화데이터셋을 통하여 모델을 비교하려고 한다. 한국어 감정 정보가 포함된 단발성 대화 데이터셋은 SNS 글 및 온라인댓글에 대한 문장으로 총 7개의 감정(기쁨, 슬픔, 놀람, 분노, 공포, 혐오, 중립)이 있으며 데이터의 개수는 38, 594개로 구성되어있다. 실험에서는 38, 594개에 대한 PPL을 계산하고, 이를 통해 모델의 비교를 진행하려고 한다.
성능/효과
Fig. 3을 통해 본연구에서 제안된 BERGPT-chatbot이 KoGPT2-chatbot 보다 우위에 있다는 것을 알 수 있다. 하지만 챗봇의 경우 사용자마다 응답에 대한 만족도 부분은 주관적인 의견이 강하기 때문에 챗봇의 답변은 수치상의 비교가 불가능하다는 문제가 있다.
따라서, 내부 평가 지표인 PPL을 이용해 성능을 비교하고자 하였다. 이러한 결과를 통해 BERGPT-chatbot의 구조가 기존 chatbot의 구조보다 우위에 있다는 것을 알 수 있었고, 이에 따라 챗봇의 성능이 달라짐을 확인할 수 있었다.
후속연구
그러나 본 연구에서 제안한 BERGPT-chatbot의 경우에도 한계점이 존재한다. 현재 공개되어 있는 감정 데이터셋의 한계로 인해 비감정 데이터셋인 일상 대화 데이터셋을 이용하여 학습을 진행하였음에도 모든 질문에 대한 응답에 한계가 있었다.
현재 공개되어 있는 감정 데이터셋의 한계로 인해 비감정 데이터셋인 일상 대화 데이터셋을 이용하여 학습을 진행하였음에도 모든 질문에 대한 응답에 한계가 있었다. 추후 연구에서는 보다 더 원활한 대화를 위해 다양한 데이터셋 확보와 제안 모델 보완으로 자연스러운 대화가 가능하도록 챗봇을 개선하고자 한다.
그러나 본 연구에서 제안한 BERGPT-chatbot의 경우에도 한계점이 존재한다. 현재 공개되어 있는 감정 데이터셋의 한계로 인해 비감정 데이터셋인 일상 대화 데이터셋을 이용하여 학습을 진행하였음에도 모든 질문에 대한 응답에 한계가 있었다. 추후 연구에서는 보다 더 원활한 대화를 위해 다양한 데이터셋 확보와 제안 모델 보완으로 자연스러운 대화가 가능하도록 챗봇을 개선하고자 한다.
참고문헌 (24)
Doyoun Kim, ChoMinKi, Shin Heecheon, "The Application of Artificial Intelligence Technology in Counseling and Psychotherapy: Recent Foreign Cases", Korean Journal Of Counseling And Psychotherapy, Vol. 32, No. 2, pp. 821-847, May 2020.
Se Hun An, Ok Ran Jeong, "A Study on the Psychological Counseling AI Chatbot System based on Sentiment Analysis", Journal of Information Technology Services, Vol. 20, No. 3, pp. 75-86, June 2021. DOI: 10.9716/KITS.2021.20.3.075
Soo-jin Seol, Su-Hee Hong, Doh-yeon Kim, Yongtae Shin, "A Study on Factors Influencing the Intention to Use the Intelligent Mental Health Diagnosis System-Focused on a Diagnosis System for Firefighters", Jounal of The Korea Society of Information Technology Policy & Management, Vol. 12, No. 6, pp. 2207-2213, December 2020.
The New York Times, https://www.nytimes.com/2021/06/01/health/artificial-intelligence-therapy-woebot.html
Sangah Lee, HAN SOL JANG, Yunmee Baik, Suzi Park, Hyopil Shin, "A Small-Scale Korean-Specific BERT Language Model", Journal of KIISE, Vol. 47, No. 7, pp. 682-692, July 2020. DOI: 10.5626/JOK.2020.47.7.682
Devlin, J., Chang, M. W., Lee, K., and Toutanova, K., "Bert: Pre-training of deep bidirectional transformers for language understanding", arXiv preprint arXiv:1810.04805. 2018.
Jae-Ok Min, Jin-Woo Park, Yu-Jeong Jo, Bong-Gun Lee, "Korean Machine Reading Comprehension for Patent Consultation Using BERT", KIPS Transactions on Software and Data Engineering, Vol. 9, No. 4, pp. 145-152, April 2020.
Radford, A., Narasimhan, K., Salimans, T., and Sutskever, I., "Improving language understanding by generative pre-training", 2018.
Radford, A., Wu, J., Child, R., Luan, D., Amodei, D., & Sutskever, I., "Language models are unsupervised multitask learners", OpenAI blog, 1(8), 9. 2019.
Brown, T. B., Mann, B., Ryder, N., Subbiah, M., Kaplan, J., Dhariwal, P., ... & Amodei, D., "Language models are few-shot learners", arXiv preprint arXiv:2005.14165. 2020.
SKT Open Source, https://sktelecom.github.io/project/kogpt2/
Hakim, F. Z. M.., Indrayani, L. M.., and Amalia, R. M., "A dialogic analysis of compliment strategies employed by replika chatbot", In Third International Conference of Arts, Language and Culture, Vol. 279, pp. 266-271, February 2019. DOI: https://doi.org/10.2991/icalc-18.2019.38
ETRI, AI API.DATA, https://aiopen.etri.re.kr/service_dataset.php
SKT Open Source, https://sktelecom.github.io/project/kobert/
Naver sentiment movie corpus v1.0, https://github.com/e9t/nsmc
Sanghoun Song, "Phraseological Analysis of Learner Corpus Based on Language Model", LANGUAGE AND INFORMATION, Vol. 22, No. 1, pp. 123-152, February 2018.
※ AI-Helper는 부적절한 답변을 할 수 있습니다.