인공지능/자연어 처리

ESC task 발표 준비

이게될까 2024. 10. 8. 19:11
728x90
728x90
  • ESC task 설명
  • 목적
  • 데이터셋
    • 기존 kullm v3 학습에 사용한 데이터셋 + esconv 번역한 데이터
      • 기존 데이터셋 달라진 점
      • 우리 데이터셋 예시
  • 실험 결과
  • 분석 결과
  • 최종 모델 설명 + 데모?

 

ESC task 설명

ESC - Emotional Support Conversation
감정적 지지를 제공하는 대화 시스템을 정의하는 작업 
도움을 요청하는 사용자의 감정적 상태를 파악하고, 그들의 문제를 탐색한 뒤 위로하거나 적절한 조언을 제공, 사용자가 감정적 안정감을 찾도록 돕는 대화 형태 

탐색 : 문제를 파악하기 위해 대화하는 단계
위로 : 공감을 표현하고 그들의 감정에 대한 이해를 제공하는 단계
행동 : 문제를 해결할 수 있는 행동을 제안하는 단계

ESC

ESConv - Emotional Supprot Conversation Dataset
감정적 지지를 제공하기 위해 특별히 설계된 대화 데이터 셋 
사용자(도움을 받는 사람)과 지지자(도움을 제공하는 사람) 사이의 대화를 기반으로 구성, 감정적 지지 전략이 사용된 사례를 포함 

 

목적

help - seeker에 상황과 감정에 대해 ESC하는 하나의 시스템 

기존의 kullm

입력

speaker :   엄마, 남편 차 새로 바꿔야 할까?
listener :   갑자기 멀쩡한 차는 왜 바꿔?
speaker :   어제 아이가 집에 와서는 아빠 차 낡아서 부끄럽다고 툴툴대더라고.
listener :   생전 그런 투정 안 부리는 애가 무슨 일이래?
speaker :   모르겠어. 갑자기 그러니까 나도 황당해서 멀쩡한 차를 왜 바꾸냐고 했더니 펑펑 울잖아.
listener :

공감이 필요한 사용자에게 해결책 제시 + 대화를 이어나가지 못함

- gold
    
    '우리 손주가 이유 없이 그러는 애는 아닌데, 네가 많이 놀랐겠구나.'

 

이제 시스템 프롬포트를 줘서 출력해보자

> 너는 speaker의 상황을 듣고 그 상황과 speaker가 느끼는 감정에 대해 공감을 하는 listener야. 주어진 대화를 보고 적절한 listener의 답변을 생성해줘.


> You are a helpful and considerate supporter.
Your job is to generate appropriate emotional supporting utterances based on the help-seeker’s utterance.
>

system prompt를 줬음에도 상황 설명만 하고있음 + 잘못된 내용

 

 

데이터셋

ai hub의 데이터셋 샘플을 사용하려고 했으나 이 데이터는 직장 동료, 친구, 연인, 부부 등 특정 관계를 가지는 두 화자 간의 데이터로만 구성 

->우리의 목적이 help-seeker에 상황과 감정에 대한 emotional support conversation을 하는 하나의 시스텀으로써 kullm을 구축하는 것이라면 영향을 주지는 않을지 걱정됨.

기존 데이터셋 활용하여 멀티턴 셋팅으로 학습

모든 listener의 답변을 학습하는게 아니라 listener_empathy가 있는 답변만 학습하도록

기존 kullm v3 학습에 사용한 데이터셋 + esconv 번역한 데이터

ai hub - 한국어 데이터 

{'listener_empathy': None, 'role': 'speaker', 'speaker_changeEmotion': None, 'terminate': False, 'text': '엄마, 남편 차 새로 바꿔야 할까?', 'utterance_id': 'BE22000101.1'}
{'listener_empathy': None, 'role': 'listener', 'speaker_changeEmotion': None, 'terminate': False, 'text': '갑자기 멀쩡한 차는 왜 바꿔?', 'utterance_id': 'BE22000101.2'}
{'listener_empathy': None, 'role': 'speaker', 'speaker_changeEmotion': None, 'terminate': False, 'text': '어제 아이가 집에 와서는 아빠 차 낡아서 부끄럽다고 툴툴대더라고.', 'utterance_id': 'BE22000101.3'}
{'listener_empathy': None, 'role': 'listener', 'speaker_changeEmotion': None, 'terminate': False, 'text': '생전 그런 투정 안 부리는 애가 무슨 일이래?', 'utterance_id': 'BE22000101.4'}
{'listener_empathy': None, 'role': 'speaker', 'speaker_changeEmotion': None, 'terminate': False, 'text': '모르겠어. 갑자기 그러니까 나도 황당해서 멀쩡한 차를 왜 바꾸냐고 했더니 펑펑 울잖아.', 'utterance_id': 'BE22000101.5'}
{'listener_empathy': ['위로'], 'role': 'listener', 'speaker_changeEmotion': None, 'terminate': False, 'text': '우리 손주가 이유 없이 그러는 애는 아닌데, 네가 많이 놀랐겠구나.', 'utterance_id': 'BE22000101.6'}
{'listener_empathy': None, 'role': 'speaker', 'speaker_changeEmotion': None, 'terminate': False, 'text': '응. 그러더니 문을 꽝 닫고 자기 방으로 들어가 버렸어. 이런 적이 없었는데. 당황스러워.', 'utterance_id': 'BE22000101.7'}
{'listener_empathy': ['위로'], 'role': 'listener', 'speaker_changeEmotion': None, 'terminate': False, 'text': '아이가 갑자기 그러면 네가 많이 당황스러울 만하지. 우리 손주가 사춘기가 오려나 보네. 그 이후로 얘기는 나눠 봤어?', 'utterance_id': 'BE22000101.8'}
{'listener_empathy': None, 'role': 'speaker', 'speaker_changeEmotion': None, 'terminate': False, 'text': '아침에 얘기 좀 하려고 했더니 벌써 학교 가고 없었어. 말 잘 듣는 순둥이가 갑자기 이러니까 정말 당혹스럽네. 불안하기도 하고.', 'utterance_id': 'BE22000101.9'}

 

 

 

기존 데이터셋 달라진 점

멀티 턴 세팅 

우리 데이터셋 예시

help-seeker: hello
supporter: good afternoon
help-seeker: i am ok thanks but have an unusual issue. i think my girlfriend may be cheating on me but i'm too scared to do anything about it as i don't want her to leave me. i feel ashamed of myself but i can't help it
supporter: being in a relationship with someone when you suspect unfaithful behavior is a rough thing to go through.
help-seeker: yes it is but i should be leaving her and moving on. The problem is she is a 9, and I'm a 5, and I love her. pretty sure she is cheating though so hopefully if i ignore it she may just leave things as they are.
supporter: i've dealt with the same problem with my partner more than once. i love him very much and i found him to be a 9 to my 5 as well. however, the question of whether he was cheating or not was destroying my trust in him and everyone else not to mention what self-respect i had... i had to break down and talk to him about it
help-seeker: what happened out of interest when you had the conversation?
supporter: ignoring this will not help things. there is no relief in pretending a question or concern does not exist.
help-seeker: i know. i'm a typical man and i like the feeling when she is on my arm. i feel like the cat that has got the cream. it's superficial and sad i know. i knew this would never last. she is just too attractive for me. everyone told me iwas 'punching above my weight' and now they will all be laughing if it ends.

도움 요청자: 안녕하세요
지원자: 안녕하세요
도움 요청자: 저는 괜찮아요, 고마워요. 그런데 이상한 문제가 있어요. 여자친구가 저를 속이고 있는 것 같아요. 하지만 그녀가 저를 떠날까 봐 아무것도 할 수 없어요. 너무 두려워요. 제 자신이 부끄럽지만 어쩔 수 없어요.
지원자: 누군가와 관계를 맺고 있을 때 불충실한 행동을 의심하는 것은 힘든 일이죠.
도움 요청자: 네, 맞아요. 하지만 저는 그녀를 떠나고 새로운 삶을 시작해야 해요. 문제는 그녀가 9점이고 저는 5점인데다, 그녀를 사랑해요. 하지만 그녀가 저를 속이고 있는 것이 확실해요. 그래서 그냥 무시하면 현 상태를 유지할 수 있을 것 같아요.
지원자: 저도 파트너와 같은 문제를 여러 번 겪었어요. 저는 그를 매우 사랑했고, 그도 저에게 9점이고 저는 5점이라고 생각했어요. 그러나 그가 저를 속이고 있는지에 대한 의문은 그에 대한 신뢰와 제 자신에 대한 존경심을 망치고 있었어요. 결국 그와 대화해야 했어요.
도움 요청자: 그 대화 후에 어떻게 되었나요?
지원자: 무시하는 것은 도움이 되지 않아요. 질문이나 걱정을 무시한다고 해서 안심이 되는 것은 아니에요.
도움 요청자: 알아요. 저는 전형적인 남자이고 그녀가 제 옆에 있을 때의 기분이 좋아요. 마치 크림을 얻은 고양이 같은 기분이 들어요. 얄팍하고 슬프다는 걸 알아요. 이 관계가 오래 가지 않을 거라는 것도 알고 있었어요. 그녀는 저에게 너무 매력적이에요. 모두가 제가 '과분하다'고 말했었고, 이제 끝나면 모두가 비웃을 거예요.

 

 

실험 결과

CRITERIA Gold Kullm3 kullm3 +sft (esc) kullm_nemo + inst w esc kullm_nemo + inst w/o esc kullm_nemo + inst w/o esc + sft (esc) kullm_nemo + inst w/o esc + sft (esc) E6
fluency   4.83 4.89 4.87 4.92 4.93 4.92
coherence   4.78 4.85 4.86 4.91 4.93 4.92
accuracy   4.17 4.42 4.53 4.55 4.54 4.55
completeness   4.23 4.49 4.56 4.6 4.59 4.59
overall quality   4.36 4.54 4.62 4.64 4.64 4.63
awareness 5.46 5.36 5.17 6.03 7.78 7.79 7.83
regulation 7.02 6.67 6.57 7.5 8.15 8.07 8.29
motivation 5.17 5.45 5.26 5.95 7.89 7.89 8
Empathy 4.9 4.77 4.51 5.62 7.74 7.66 7.76
Social Skill 5.13 5.29 5.05 5.74 8.01 8.00 8.01
solution focused 4.38 4.96 4.69 4.71 7.25 7.08 7.09
avg 5.34 5.42 5.21 5.93 7.80 7.75 7.83

분석 결과

 

최종 모델 설명 + 데모?

 

 

728x90